@gasket/core
Advanced tools
Comparing version
@@ -86,3 +86,3 @@ /* eslint-disable no-console, no-process-env */ "use strict"; | ||
// prune nullish and/or empty plugins | ||
config.plugins = config.plugins.filter(Boolean).map((plugin)=>plugin.default || plugin) // quality of life for cjs apps | ||
config.plugins = config.plugins.filter(Boolean).map((plugin)=>'default' in plugin ? plugin.default : plugin) // quality of life for cjs apps | ||
.filter((plugin)=>Boolean(plugin.name) || Boolean(plugin.hooks)); | ||
@@ -89,0 +89,0 @@ // start the engine |
@@ -41,3 +41,3 @@ /* eslint-disable no-console, no-process-env */ | ||
.filter(Boolean) | ||
.map(plugin => plugin.default || plugin) // quality of life for cjs apps | ||
.map(plugin => 'default' in plugin ? plugin.default : plugin) // quality of life for cjs apps | ||
.filter(plugin => Boolean(plugin.name) || Boolean(plugin.hooks)); | ||
@@ -44,0 +44,0 @@ |
@@ -73,2 +73,6 @@ declare module '@gasket/core' { | ||
export type PreNormalizedGasketConfig = Omit<GasketConfig, 'plugins'> & { | ||
plugins: Array<Plugin | { default: Plugin }>; | ||
} | ||
export class GasketEngine { | ||
@@ -137,7 +141,13 @@ constructor(plugins: Array<Plugin>); | ||
export type GasketConfigDefinition = Omit<GasketConfig, 'root' | 'env' | 'command'> & { | ||
// Allow nested merging of most config | ||
type ConfigKeysRequiringFullEnvConfig = 'plugins'; | ||
type GasketConfigOverrides = | ||
& PartialRecursive<Omit<GasketConfigDefinition, ConfigKeysRequiringFullEnvConfig>> | ||
& Partial<Pick<GasketConfigDefinition, ConfigKeysRequiringFullEnvConfig>>; | ||
export type GasketConfigDefinition = Omit<PreNormalizedGasketConfig, 'root' | 'env' | 'command'> & { | ||
root?: string | ||
env?: string | ||
environments?: Record<string, Partial<GasketConfigDefinition>> | ||
commands?: Record<string, Partial<GasketConfigDefinition>> | ||
environments?: Record<string, GasketConfigOverrides> | ||
commands?: Record<string, GasketConfigOverrides> | ||
} | ||
@@ -144,0 +154,0 @@ |
{ | ||
"name": "@gasket/core", | ||
"version": "7.2.1", | ||
"version": "7.2.2", | ||
"description": "Entry point to setting up Gasket instances", | ||
@@ -54,3 +54,3 @@ "type": "module", | ||
"dependencies": { | ||
"@gasket/utils": "^7.2.1", | ||
"@gasket/utils": "^7.2.2", | ||
"debug": "^4.3.4" | ||
@@ -132,3 +132,3 @@ }, | ||
}, | ||
"gitHead": "8af41663d838cb00344ffbdabf64fc535b78dd3d" | ||
"gitHead": "f34775900acd2c6a6b3a224751c6dc091b7f50fe" | ||
} |
138498
0.33%1795
0.45%Updated