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

@gasket/engine

Package Overview
Dependencies
Maintainers
8
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gasket/engine - npm Package Compare versions

Comparing version 6.43.1 to 6.43.2-canary-esm-port.0

42

lib/engine.js

@@ -1,3 +0,4 @@

const debug = require('debug')('gasket:engine');
const { Loader, pluginIdentifier } = require('@gasket/resolve');
import { default as diagnostics } from 'diagnostics';
import { Loader, pluginIdentifier } from '@gasket/resolve';
const debug = diagnostics('gasket:engine');

@@ -7,19 +8,23 @@ let dynamicNamingId = 0;

class PluginEngine {
export class PluginEngine {
constructor(config, { resolveFrom } = {}) {
this.config = config || {};
this.loader = new Loader({ resolveFrom });
return (async () => {
this.config = config || {};
this.loader = new Loader({ resolveFrom });
this._hooks = {};
this._plans = {};
this._traceDepth = 0;
this._hooks = {};
this._plans = {};
this._traceDepth = 0;
this._registerPlugins();
this._registerHooks();
await this._registerPlugins();
this._registerHooks();
// Allow methods to be called without context (to support destructuring)
[
'exec', 'execWaterfall', 'execMap', 'execApply',
'execSync', 'execWaterfallSync', 'execMapSync', 'execApplySync'
].forEach(method => { this[method] = this[method].bind(this); });
// Allow methods to be called without context (to support destructuring)
[
'exec', 'execWaterfall', 'execMap', 'execApply',
'execSync', 'execWaterfallSync', 'execMapSync', 'execApplySync'
].forEach(method => { this[method] = this[method].bind(this); });
return this;
})();
}

@@ -31,5 +36,4 @@

*/
_registerPlugins() {
const { plugins } = this.loader.loadConfigured(this.config.plugins);
async _registerPlugins() {
const { plugins } = await this.loader.loadConfigured(this.config.plugins);
// map the plugin name to module content

@@ -530,3 +534,1 @@ // if loaded from a file path, prefer module.name

}
module.exports = PluginEngine;
{
"name": "@gasket/engine",
"version": "6.43.1",
"version": "6.43.2-canary-esm-port.0",
"description": "Plugin engine for gasket",

@@ -10,2 +10,3 @@ "main": "lib/engine.js",

],
"type": "module",
"scripts": {

@@ -43,3 +44,3 @@ "lint": "eslint .",

"dependencies": {
"@gasket/resolve": "^6.43.1",
"@gasket/resolve": "^6.43.2-canary-esm-port.0",
"debug": "^4.3.1"

@@ -74,3 +75,3 @@ },

},
"gitHead": "a10c40dc23d0648ab60c757245de23579806b058"
"gitHead": "f7e3283fa63e20f353587fe7f4653ebf684538c8"
}
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