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

@webiny/api

Package Overview
Dependencies
Maintainers
1
Versions
332
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webiny/api - npm Package Compare versions

Comparing version 0.0.0-unstable.611c5af35e to 0.0.0-unstable.615a930a68

27

Context.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {

@@ -8,4 +9,7 @@ value: true

exports.Context = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _plugins = require("@webiny/plugins");
class Context {

@@ -25,11 +29,15 @@ constructor(params) {

}
getResult() {
return this._result;
}
hasResult() {
return !!this._result;
}
setResult(value) {
this._result = value;
}
waitFor(obj, cb) {

@@ -41,2 +49,3 @@ const initialTargets = Array.isArray(obj) ? obj : [obj];

*/
for (const key in initialTargets) {

@@ -48,2 +57,3 @@ const target = initialTargets[key];

*/
if (this[target]) {

@@ -58,2 +68,4 @@ continue;

*/
Object.defineProperty(this, target, {

@@ -71,2 +83,3 @@ /**

*/
for (const waiter of this.waiters) {

@@ -79,2 +92,4 @@ if (waiter.targets.includes(target) === false) {

*/
waiter.targets = waiter.targets.filter(t => t !== target);

@@ -84,2 +99,3 @@ /**

*/
if (waiter.targets.length > 0) {

@@ -92,5 +108,8 @@ continue;

*/
waiter.cb(this);
}
},
/**

@@ -108,2 +127,3 @@ * As we have set property with __ around it, we must get it as well.

*/
targets.push(target);

@@ -114,2 +134,4 @@ }

*/
if (targets.length === 0) {

@@ -122,4 +144,7 @@ cb(this);

*/
this.waiters.push({
targets,
/**

@@ -133,3 +158,5 @@ * TODO @ts-refactor

}
}
exports.Context = Context;

4

index.js

@@ -6,3 +6,5 @@ "use strict";

});
var _Context = require("./Context");
Object.keys(_Context).forEach(function (key) {

@@ -18,3 +20,5 @@ if (key === "default" || key === "__esModule") return;

});
var _ContextPlugin = require("./plugins/ContextPlugin");
Object.keys(_ContextPlugin).forEach(function (key) {

@@ -21,0 +25,0 @@ if (key === "default" || key === "__esModule") return;

12

package.json
{
"name": "@webiny/api",
"version": "0.0.0-unstable.611c5af35e",
"version": "0.0.0-unstable.615a930a68",
"main": "index.js",

@@ -15,4 +15,4 @@ "repository": {

"dependencies": {
"@babel/runtime": "7.20.1",
"@webiny/plugins": "0.0.0-unstable.611c5af35e"
"@babel/runtime": "7.19.0",
"@webiny/plugins": "0.0.0-unstable.615a930a68"
},

@@ -24,4 +24,4 @@ "devDependencies": {

"@babel/preset-typescript": "^7.18.6",
"@webiny/cli": "^0.0.0-unstable.611c5af35e",
"@webiny/project-utils": "^0.0.0-unstable.611c5af35e",
"@webiny/cli": "^0.0.0-unstable.615a930a68",
"@webiny/project-utils": "^0.0.0-unstable.615a930a68",
"rimraf": "^3.0.2",

@@ -39,3 +39,3 @@ "ttypescript": "^1.5.13",

},
"gitHead": "cdeed09317c2c0e07cb0d4d88f9ac38a214ddc22"
"gitHead": "615a930a68d692c832e4f100405eeb3f5a8874af"
}
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {

@@ -8,4 +9,7 @@ value: true

exports.createContextPlugin = exports.ContextPlugin = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _plugins = require("@webiny/plugins");
class ContextPlugin extends _plugins.Plugin {

@@ -17,2 +21,3 @@ constructor(callable) {

}
async apply(context) {

@@ -22,10 +27,15 @@ if (typeof this._callable !== "function") {

}
return this._callable(context);
}
}
exports.ContextPlugin = ContextPlugin;
(0, _defineProperty2.default)(ContextPlugin, "type", "context");
const createContextPlugin = callable => {
return new ContextPlugin(callable);
};
exports.createContextPlugin = createContextPlugin;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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