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

apostrophe-schema-widgets

Package Overview
Dependencies
Maintainers
10
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe-schema-widgets - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

16

index.js

@@ -50,6 +50,16 @@ var _ = require('lodash');

};
widget.load = function(req, item, callback) {
// TODO: carry out joins in the schema, including
// those nested in arrays
return callback(null);
if (req.aposSchemaWidgetLoading) {
// Refuse to do perform joins through two levels of schema widgets.
// This prevents a number of infinite loop scenarios. For this to
// work properly page loaders should continue to run in series
// rather than in parallel. -Tom
return setImmediate(callback());
}
req.aposSchemaWidgetLoading = true;
return self._schemas.join(req, options.schema, item, undefined, function(err) {
req.aposSchemaWidgetLoading = false;
return setImmediate(_.partial(callback, err));
});
};

@@ -56,0 +66,0 @@ apos.addWidgetType(widget.name, widget);

2

package.json
{
"name": "apostrophe-schema-widgets",
"version": "0.5.1",
"version": "0.5.2",
"description": "An easy form widget builder for the Apostrophe content management system",

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

@@ -100,1 +100,11 @@ # apostrophe-schema-widgets

```
## Joins in Schema Widgets
They work exactly like joins in snippet schemas.
If the current page contains a schema widget which results in a join with another page or snippet that also contains a schema widget, the second schema widget does *not* complete its joins. This is necessary to prevent infinite loops.
If you need nested joins, consider adding your joins to the [schema of a fancy page](https://github.com/punkave/apostrophe-fancy-pages) rather than using schema widgets. If you take this approach you can [use the `withJoins` option](https://github.com/punkave/apostrophe-schemas#nested-joins-you-gotta-be-explicit).
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