@gasket/core
Advanced tools
Comparing version 7.0.6 to 7.0.9
@@ -20,3 +20,3 @@ /* eslint-disable no-console, no-process-env */ "use strict"; | ||
const _engine = require("./engine.js"); | ||
const _utils = require("@gasket/utils"); | ||
const _config = require("@gasket/utils/config"); | ||
const _trace = require("./trace.js"); | ||
@@ -49,5 +49,5 @@ /** | ||
*/ constructor(configDef){ | ||
var _config; | ||
var _config1; | ||
const env = getEnvironment(); | ||
const config = (0, _utils.applyConfigOverrides)(configDef, { | ||
/** @type {import('@gasket/core').GasketConfig} */ const config = (0, _config.applyConfigOverrides)(configDef, { | ||
env | ||
@@ -57,6 +57,6 @@ }); | ||
var _root; | ||
(_root = (_config = config).root) !== null && _root !== void 0 ? _root : _config.root = process.cwd(); | ||
(_root = (_config1 = config).root) !== null && _root !== void 0 ? _root : _config1.root = process.cwd(); | ||
// prune nullish and/or empty plugins | ||
config.plugins = config.plugins.filter(Boolean).map((plugin)=>plugin.default || plugin) // quality of life for cjs apps | ||
.filter((plugin)=>Boolean(plugin.name) || Boolean(plugin.hooks)); | ||
config.plugins = config.plugins.filter(Boolean)// @ts-ignore - default not expected - quality of life for cjs apps | ||
.map((plugin)=>plugin.default || plugin).filter((plugin)=>Boolean(plugin.name) || Boolean(plugin.hooks)); | ||
// start the engine | ||
@@ -75,7 +75,7 @@ this.engine = new _engine.GasketEngine(config.plugins); | ||
this.symbol = Symbol('gasket'); | ||
// @ts-ignore | ||
// @ts-ignore - attached lifecycle trace methods | ||
this.execSync('init'); | ||
// @ts-ignore | ||
// @ts-ignore - attached lifecycle trace methods | ||
this.config = this.execWaterfallSync('configure', config); | ||
// @ts-ignore | ||
// @ts-ignore - attached lifecycle trace methods | ||
this.exec('ready'); | ||
@@ -82,0 +82,0 @@ } |
@@ -146,3 +146,3 @@ "use strict"; | ||
* to allow for tracing and further branching. | ||
* @type {import('./internal').isolateLifecycle<any>} | ||
* @type {import('./internal.js').isolateLifecycle<any>} | ||
*/ function isolateLifecycle(source, name, fn) { | ||
@@ -168,3 +168,3 @@ const instance = new GasketTrace(source._proxy); | ||
* to allow for tracing and further branching. | ||
* @type {import('./internal').isolateAction<any>} | ||
* @type {import('./internal.js').isolateAction<any>} | ||
*/ function isolateAction(source, name, fn) { | ||
@@ -188,3 +188,3 @@ const instance = new GasketTrace(source._proxy); | ||
* and return a traceable version. | ||
* @type {import('./internal').interceptActions} | ||
* @type {import('./internal.js').interceptActions} | ||
*/ function interceptActions(source, actions) { | ||
@@ -191,0 +191,0 @@ return new Proxy(actions, { |
/* eslint-disable no-console, no-process-env */ | ||
import { GasketEngine, lifecycleMethods } from './engine.js'; | ||
import { applyConfigOverrides } from '@gasket/utils'; | ||
import { applyConfigOverrides } from '@gasket/utils/config'; | ||
import { makeTraceBranch } from './trace.js'; | ||
@@ -26,2 +26,3 @@ | ||
* The Gasket class is the main entry point for the Gasket API. | ||
* @type {import('@gasket/core').Gasket} | ||
*/ | ||
@@ -35,2 +36,3 @@ export class Gasket { | ||
const env = getEnvironment(); | ||
/** @type {import('@gasket/core').GasketConfig} */ | ||
const config = applyConfigOverrides(configDef, { env }); | ||
@@ -43,3 +45,4 @@ config.env = env; | ||
.filter(Boolean) | ||
.map(plugin => plugin.default || plugin) // quality of life for cjs apps | ||
// @ts-ignore - default not expected - quality of life for cjs apps | ||
.map(plugin => plugin.default || plugin) | ||
.filter(plugin => Boolean(plugin.name) || Boolean(plugin.hooks)); | ||
@@ -64,7 +67,7 @@ | ||
// @ts-ignore | ||
// @ts-ignore - attached lifecycle trace methods | ||
this.execSync('init'); | ||
// @ts-ignore | ||
// @ts-ignore - attached lifecycle trace methods | ||
this.config = this.execWaterfallSync('configure', config); | ||
// @ts-ignore | ||
// @ts-ignore - attached lifecycle trace methods | ||
this.exec('ready'); | ||
@@ -71,0 +74,0 @@ } |
@@ -121,3 +121,3 @@ import debugPkg from 'debug'; | ||
* to allow for tracing and further branching. | ||
* @type {import('./internal').isolateLifecycle<any>} | ||
* @type {import('./internal.js').isolateLifecycle<any>} | ||
*/ | ||
@@ -149,3 +149,3 @@ function isolateLifecycle(source, name, fn) { | ||
* to allow for tracing and further branching. | ||
* @type {import('./internal').isolateAction<any>} | ||
* @type {import('./internal.js').isolateAction<any>} | ||
*/ | ||
@@ -175,3 +175,3 @@ function isolateAction(source, name, fn) { | ||
* and return a traceable version. | ||
* @type {import('./internal').interceptActions} | ||
* @type {import('./internal.js').interceptActions} | ||
*/ | ||
@@ -191,3 +191,3 @@ function interceptActions(source, actions) { | ||
* Create a new GasketTrace instance from a Gasket. | ||
* @type {import('./internal').makeTraceBranch} | ||
* @type {import('./internal.js').makeTraceBranch} | ||
*/ | ||
@@ -194,0 +194,0 @@ export function makeTraceBranch(gasket) { |
{ | ||
"name": "@gasket/core", | ||
"version": "7.0.6", | ||
"version": "7.0.9", | ||
"description": "Entry point to setting up Gasket instances", | ||
@@ -30,2 +30,3 @@ "type": "module", | ||
"build": "swc lib -d cjs --delete-dir-on-start --strip-leading-paths", | ||
"build:watch": "npm run build -- --watch", | ||
"postbuild": "node -e \"require('fs').writeFileSync('cjs/package.json', '{}')\"", | ||
@@ -54,3 +55,3 @@ "prepublishOnly": "npm run build" | ||
"dependencies": { | ||
"@gasket/utils": "^7.0.6", | ||
"@gasket/utils": "^7.0.9", | ||
"debug": "^4.3.4" | ||
@@ -102,3 +103,3 @@ }, | ||
}, | ||
"gitHead": "90fec87372fb74755e92668a9158fc3c820dd37f" | ||
"gitHead": "ff3acd042a9a22cd43ac29c6b064bd2f49304b9e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134718
1737
Updated@gasket/utils@^7.0.9