@gasket/engine
Advanced tools
Comparing version 6.43.2-canary-esm-port.0 to 6.44.0
@@ -1,4 +0,3 @@ | ||
import { default as diagnostics } from 'diagnostics'; | ||
import { Loader, pluginIdentifier } from '@gasket/resolve'; | ||
const debug = diagnostics('gasket:engine'); | ||
const debug = require('debug')('gasket:engine'); | ||
const { Loader, pluginIdentifier } = require('@gasket/resolve'); | ||
@@ -8,23 +7,19 @@ let dynamicNamingId = 0; | ||
export class PluginEngine { | ||
class PluginEngine { | ||
constructor(config, { resolveFrom } = {}) { | ||
return (async () => { | ||
this.config = config || {}; | ||
this.loader = new Loader({ resolveFrom }); | ||
this.config = config || {}; | ||
this.loader = new Loader({ resolveFrom }); | ||
this._hooks = {}; | ||
this._plans = {}; | ||
this._traceDepth = 0; | ||
this._hooks = {}; | ||
this._plans = {}; | ||
this._traceDepth = 0; | ||
await this._registerPlugins(); | ||
this._registerHooks(); | ||
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); }); | ||
return 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); }); | ||
} | ||
@@ -36,4 +31,5 @@ | ||
*/ | ||
async _registerPlugins() { | ||
const { plugins } = await this.loader.loadConfigured(this.config.plugins); | ||
_registerPlugins() { | ||
const { plugins } = this.loader.loadConfigured(this.config.plugins); | ||
// map the plugin name to module content | ||
@@ -534,1 +530,3 @@ // if loaded from a file path, prefer module.name | ||
} | ||
module.exports = PluginEngine; |
{ | ||
"name": "@gasket/engine", | ||
"version": "6.43.2-canary-esm-port.0", | ||
"version": "6.44.0", | ||
"description": "Plugin engine for gasket", | ||
@@ -10,3 +10,2 @@ "main": "lib/engine.js", | ||
], | ||
"type": "module", | ||
"scripts": { | ||
@@ -44,3 +43,3 @@ "lint": "eslint .", | ||
"dependencies": { | ||
"@gasket/resolve": "^6.43.2-canary-esm-port.0", | ||
"@gasket/resolve": "^6.44.0", | ||
"debug": "^4.3.1" | ||
@@ -75,3 +74,3 @@ }, | ||
}, | ||
"gitHead": "f7e3283fa63e20f353587fe7f4653ebf684538c8" | ||
"gitHead": "49d5341c44d1d87e03b948ad22867ae289da4069" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
30037
573
No
Updated@gasket/resolve@^6.44.0