Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pragma-schema

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pragma-schema - npm Package Compare versions

Comparing version 1.0.9 to 1.0.11

4

amd/src/schema-parser.js

@@ -214,3 +214,3 @@ define(["exports", "./lib/utils", "./schema"], function (exports, _utils, _schema) {

const forceReadOnly = resourceActionType === "Entity";
addDataset(primaryProperties, lookupResourceActions, schema, true, forceReadOnly, true);
addDataset(primaryProperties, lookupResourceActions, schema, true, true);
addBody(primaryProperties, schema, forceReadOnly);

@@ -223,2 +223,2 @@ }

});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNjaGVtYS1wYXJzZXIuanMiXSwibmFtZXMiOlsicmVzb3VyY2VUb1NjaGVtYSIsImFkZEJvZHkiLCJwcm9wZXJ0aWVzIiwic2NoZW1hIiwiZm9yY2VSZWFkT25seSIsImJ5VGVtcGxhdGUiLCJlbGVtZW50IiwiYm9keSIsImVsZW1lbnRzIiwidGVtcGxhdGUiLCJhZGRUZW1wbGF0ZSIsImlkIiwiYnVpbGRHcm91cGVkRWxlbWVudHMiLCJwdXNoIiwiYWRkQm9keUZvckNvbGxlY3Rpb24iLCJwcmltYXJ5UHJvcGVydGllcyIsInNlY29uZGFyeVByb3BlcnRpZXMiLCJyZXNvdXJjZUFjdGlvbk5hbWUiLCJhZ2dyZWdhdGUiLCJncm91cGluZyIsInNvcnRpbmciLCJwZXJzcGVjdGl2ZSIsInBlcnNwZWN0aXZlcyIsImFkZCIsImxpc3RUZW1wbGF0ZSIsImFkZFZpZXciLCJncmlkQ29sdW1ucyIsIm1hcCIsInByb3BlcnR5IiwibmFtZSIsImdyaWRWaWV3IiwiZ3JpZEVsZW1lbnQiLCJ2aXN1YWxpemF0aW9uIiwiYXR0cmlidXRlcyIsImF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V3XCIpO1xyXG5cclxuICAgIGlmIChyZXNvdXJjZUFjdGlvblR5cGUgPT09IFwiUXVlcnlcIikge1xyXG4gICAgICAgIGFkZERhdGFzb3VyY2UocmVzb3VyY2VOYW1lLCBzY2hlbWEsIHRydWUpO1xyXG4gICAgICAgIGFkZERhdGFzZXRGb3JDb2xsZWN0aW9uKHByaW1hcnlQcm9wZXJ0aWVzLCBzZWNvbmRhcnlQcm9wZXJ0aWVzLCBzY2hlbWEpO1xyXG4gICAgICAgIGFkZEJvZHlGb3JDb2xsZWN0aW9uKHByaW1hcnlQcm9wZXJ0aWVzLCBzZWNvbmRhcnlQcm9wZXJ0aWVzLCByZXNvdXJjZUFjdGlvbk5hbWUsIHNjaGVtYSk7XHJcbiAgICB9XHJcbiAgICBlbHNlIHtcclxuICAgICAgICBjb25zdCBmb3JjZVJlYWRPbmx5ID0gcmVzb3VyY2VBY3Rpb25UeXBlID09PSBcIkVudGl0eVwiO1xyXG4gICAgICAgIGFkZERhdGFzZXQocHJpbWFyeVByb3BlcnRpZXMsIGxvb2t1cFJlc291cmNlQWN0aW9ucywgc2NoZW1hLCB0cnVlLCB0cnVlKTtcclxuICAgICAgICBhZGRCb2R5KHByaW1hcnlQcm9wZXJ0aWVzLCBzY2hlbWEsIGZvcmNlUmVhZE9ubHkpO1xyXG4gICAgfVxyXG5cclxuICAgIHJlbW92ZUVtcHR5UHJvcGVydGllcyhzY2hlbWEpO1xyXG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHNjaGVtYSwgbnVsbCwgNCk7XHJcbn0iXX0=

@@ -217,3 +217,3 @@ "use strict";

const forceReadOnly = resourceActionType === "Entity";
addDataset(primaryProperties, lookupResourceActions, schema, true, forceReadOnly, true);
addDataset(primaryProperties, lookupResourceActions, schema, true, true);
addBody(primaryProperties, schema, forceReadOnly);

@@ -225,2 +225,2 @@ }

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpb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IjtcclxuICAgICAgICBhZGREYXRhc2V0KHByaW1hcnlQcm9wZXJ0aWVzLCBsb29rdXBSZXNvdXJjZUFjdGlvbnMsIHNjaGVtYSwgdHJ1ZSwgdHJ1ZSk7XHJcbiAgICAgICAgYWRkQm9keShwcmltYXJ5UHJvcGVydGllcywgc2NoZW1hLCBmb3JjZVJlYWRPbmx5KTtcclxuICAgIH1cclxuXHJcbiAgICByZW1vdmVFbXB0eVByb3BlcnRpZXMoc2NoZW1hKTtcclxuICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShzY2hlbWEsIG51bGwsIDQpO1xyXG59Il19
{
"name": "pragma-schema",
"version": "1.0.9",
"version": "1.0.11",
"description": "utility for building pragma schema structures",

@@ -5,0 +5,0 @@ "main": "commonjs/src/schema-parser.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