New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apostrophe-forms

Package Overview
Dependencies
Maintainers
15
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe-forms - npm Package Compare versions

Comparing version 0.5.21 to 0.5.22

19

index.js

@@ -116,2 +116,8 @@ /* jshint node:true */

// This takes an array of objects that have a label and a name value.
// i.e. [ label: 'IP Address', name: 'ipAddress' ]
// They'll be added to the exported CSV. This allows you to display fields
// that might not be in the form itself.
self.addExportColumns = options.addExportColumns || [];
snippets.Snippets.call(this, options, null);

@@ -484,3 +490,10 @@ self._apos.mixinModuleEmail(self);

return self.submissions.insert(result, callback);
// Adding an asynchronous hook here to make changes to a form submission
// before it is stored - Jimmy
self.beforeStore(req, result, function(err) {
if (err) {
return callback(err);
}
return self.submissions.insert(result, callback);
});
},

@@ -524,2 +537,6 @@ email: function(callback) {

self.beforeStore = function(req, result, callback) {
return setImmediate(callback);
};
// A convenient method to override to do something special when a

@@ -526,0 +543,0 @@ // form has been submitted

8

lib/exporter.js

@@ -25,3 +25,3 @@ /*

var formsCollection = self._apos.db.collection('aposFormSubmissions');
// ================================================================

@@ -95,4 +95,4 @@ // CRITERIA & FORM

var formItems = _.get(form[0], "body.items");
var labels = _.pluck(formItems, "label");
var labelIds = _.pluck(formItems, "fieldId");
var labels = _.pluck(formItems, "label").concat(_.pluck(self.addExportColumns, 'label'));
var labelIds = _.pluck(formItems, "fieldId").concat(_.pluck(self.addExportColumns, 'name'));

@@ -127,3 +127,3 @@ // make your first call to stringifier.write([]) in order to write

// length (i.e. if a field has no value, you still need to write '')
// grab some submissions

@@ -130,0 +130,0 @@ function convertAndStream(callback) {

{
"name": "apostrophe-forms",
"version": "0.5.21",
"version": "0.5.22",
"description": "Allow your users to build forms on the fly on their Apostrophe sites",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc