@powerlines/nx 0.11.54 → 0.11.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-B55WIY4O.js → chunk-2Q4BMQLY.js} +2 -2
- package/dist/{chunk-HLKK7VD3.mjs → chunk-424UJRUF.mjs} +1 -1
- package/dist/{chunk-THB3DAUG.js → chunk-B6MNKOLR.js} +176 -126
- package/dist/{chunk-PQ5HKYSM.js → chunk-CILJ5XPL.js} +2 -2
- package/dist/{chunk-LFTBECC5.js → chunk-CTYYVUVH.js} +2 -2
- package/dist/{chunk-PBIATN4L.js → chunk-DZVTDZLD.js} +2 -2
- package/dist/{chunk-74YNNU6Y.mjs → chunk-EWKNXKSM.mjs} +1 -1
- package/dist/{chunk-BEWXROGZ.mjs → chunk-GVL5WYYV.mjs} +1 -1
- package/dist/{chunk-TK7Z7ZUH.mjs → chunk-LFD5A3H7.mjs} +1 -1
- package/dist/{chunk-3A4C4TQK.js → chunk-OTBB6AI2.js} +2 -2
- package/dist/{chunk-VXIEFBNS.mjs → chunk-OZNOZMYS.mjs} +1 -1
- package/dist/{chunk-PZ7CC4XY.mjs → chunk-XC3DAHO3.mjs} +176 -126
- package/dist/executors.js +11 -11
- package/dist/executors.mjs +6 -6
- package/dist/index.js +11 -11
- package/dist/index.mjs +6 -6
- package/dist/src/base/base-executor.js +2 -2
- package/dist/src/base/base-executor.mjs +1 -1
- package/dist/src/executors/build/executor.js +4 -4
- package/dist/src/executors/build/executor.mjs +2 -2
- package/dist/src/executors/clean/executor.js +4 -4
- package/dist/src/executors/clean/executor.mjs +2 -2
- package/dist/src/executors/docs/executor.js +4 -4
- package/dist/src/executors/docs/executor.mjs +2 -2
- package/dist/src/executors/lint/executor.js +4 -4
- package/dist/src/executors/lint/executor.mjs +2 -2
- package/dist/src/executors/prepare/executor.js +4 -4
- package/dist/src/executors/prepare/executor.mjs +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Powerlines - Nx
|
|
4
4
|
|
|
5
|
+
## [0.11.55](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.55) (01/02/2026)
|
|
6
|
+
|
|
7
|
+
### Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated **powerlines** to **v0.36.29**
|
|
10
|
+
|
|
11
|
+
## [0.11.54](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.54) (01/01/2026)
|
|
12
|
+
|
|
13
|
+
### Updated Dependencies
|
|
14
|
+
|
|
15
|
+
- Updated **powerlines** to **v0.36.28**
|
|
16
|
+
|
|
5
17
|
## [0.11.53](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.53) (12/31/2025)
|
|
6
18
|
|
|
7
19
|
### Updated Dependencies
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkB6MNKOLR_js = require('./chunk-B6MNKOLR.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
|
|
6
6
|
// src/executors/lint/executor.ts
|
|
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
14
|
-
var executor =
|
|
14
|
+
var executor = chunkB6MNKOLR_js.withExecutor("lint", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|
|
@@ -366,35 +366,32 @@ ${value || ""}`.trim();
|
|
|
366
366
|
}
|
|
367
367
|
return false;
|
|
368
368
|
});
|
|
369
|
-
async function callHook(context,
|
|
370
|
-
const
|
|
371
|
-
if (
|
|
372
|
-
context.log(types.LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk5__default.default.bold.cyanBright(`${
|
|
369
|
+
async function callHook(context, key, options, ...args) {
|
|
370
|
+
const hooks = context.selectHooks(key, options);
|
|
371
|
+
if (hooks.length > 0) {
|
|
372
|
+
context.log(types.LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk5__default.default.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)}`);
|
|
373
|
+
const invokeHook = /* @__PURE__ */ chunkSHUYVCID_js.__name(async (hook, hookArgs) => {
|
|
374
|
+
return Reflect.apply(hook.handler, hook.context, hookArgs);
|
|
375
|
+
}, "invokeHook");
|
|
373
376
|
let results = [];
|
|
374
377
|
if (options?.sequential === false) {
|
|
375
|
-
results = await Promise.all(
|
|
376
|
-
if (!isFunction.isFunction(handler
|
|
377
|
-
throw new Error(`Plugin hook handler for hook "${
|
|
378
|
+
results = await Promise.all(hooks.map(async (hook) => {
|
|
379
|
+
if (!isFunction.isFunction(hook.handler)) {
|
|
380
|
+
throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
|
|
378
381
|
}
|
|
379
|
-
return
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
...args
|
|
383
|
-
])
|
|
384
|
-
);
|
|
382
|
+
return invokeHook(hook, [
|
|
383
|
+
...args
|
|
384
|
+
]);
|
|
385
385
|
}));
|
|
386
386
|
} else {
|
|
387
|
-
for (const
|
|
388
|
-
if (!isFunction.isFunction(handler
|
|
389
|
-
throw new Error(`Plugin hook handler for hook "${
|
|
387
|
+
for (const hook of hooks) {
|
|
388
|
+
if (!isFunction.isFunction(hook.handler)) {
|
|
389
|
+
throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
|
|
390
390
|
}
|
|
391
391
|
if (options?.result === "first" || options?.asNextParam === false) {
|
|
392
|
-
results.push(await Promise.resolve(
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
...args
|
|
396
|
-
])
|
|
397
|
-
));
|
|
392
|
+
results.push(await Promise.resolve(invokeHook(hook, [
|
|
393
|
+
...args
|
|
394
|
+
])));
|
|
398
395
|
if (options?.result === "first" && isSet.isSet(results[results.length - 1])) {
|
|
399
396
|
break;
|
|
400
397
|
}
|
|
@@ -405,12 +402,9 @@ async function callHook(context, hook, options, ...args) {
|
|
|
405
402
|
if (results.length > 0 && sequenceArgs.length > 0) {
|
|
406
403
|
sequenceArgs[0] = isFunction.isFunction(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
|
|
407
404
|
}
|
|
408
|
-
const result = await Promise.resolve(
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
...sequenceArgs
|
|
412
|
-
])
|
|
413
|
-
);
|
|
405
|
+
const result = await Promise.resolve(invokeHook(hook, [
|
|
406
|
+
...sequenceArgs
|
|
407
|
+
]));
|
|
414
408
|
if (result) {
|
|
415
409
|
if (options?.result === "last") {
|
|
416
410
|
results = [
|
|
@@ -771,7 +765,7 @@ function createResolver(options) {
|
|
|
771
765
|
chunkSHUYVCID_js.__name(createResolver, "createResolver");
|
|
772
766
|
|
|
773
767
|
// ../powerlines/src/types/build.ts
|
|
774
|
-
var
|
|
768
|
+
var UNPLUGIN_BUILDER_VARIANTS = [
|
|
775
769
|
"rollup",
|
|
776
770
|
"webpack",
|
|
777
771
|
"rspack",
|
|
@@ -779,7 +773,14 @@ var UNPLUGIN_BUILD_VARIANTS = [
|
|
|
779
773
|
"esbuild",
|
|
780
774
|
"farm",
|
|
781
775
|
"unloader",
|
|
782
|
-
"rolldown"
|
|
776
|
+
"rolldown",
|
|
777
|
+
"bun"
|
|
778
|
+
];
|
|
779
|
+
var BUILDER_VARIANTS = [
|
|
780
|
+
...UNPLUGIN_BUILDER_VARIANTS,
|
|
781
|
+
"tsup",
|
|
782
|
+
"tsdown",
|
|
783
|
+
"unbuild"
|
|
783
784
|
];
|
|
784
785
|
|
|
785
786
|
// ../powerlines/src/types/commands.ts
|
|
@@ -803,11 +804,12 @@ var PLUGIN_NON_HOOK_FIELDS = [
|
|
|
803
804
|
"dedupe",
|
|
804
805
|
"applyToEnvironment"
|
|
805
806
|
];
|
|
806
|
-
var
|
|
807
|
+
var PLUGIN_HOOKS_FIELDS = [
|
|
807
808
|
...SUPPORTED_COMMANDS,
|
|
808
809
|
"config",
|
|
809
810
|
"configEnvironment",
|
|
810
811
|
"configResolved",
|
|
812
|
+
"types",
|
|
811
813
|
"buildStart",
|
|
812
814
|
"buildEnd",
|
|
813
815
|
"transform",
|
|
@@ -818,7 +820,7 @@ var KNOWN_HOOKS = [
|
|
|
818
820
|
|
|
819
821
|
// ../powerlines/src/plugin-utils/helpers.ts
|
|
820
822
|
function isPlugin(value) {
|
|
821
|
-
return isSetObject.isSetObject(value) && "name" in value && isSetString.isSetString(value.name) && (isUndefined.isUndefined(value.api) || "api" in value && isSetObject.isSetObject(value.api)) && (isUndefined.isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction.isFunction(value.applyToEnvironment)) && (isUndefined.isUndefined(value.dedupe) || "dedupe" in value && isFunction.isFunction(value.dedupe)) &&
|
|
823
|
+
return isSetObject.isSetObject(value) && "name" in value && isSetString.isSetString(value.name) && (isUndefined.isUndefined(value.api) || "api" in value && isSetObject.isSetObject(value.api)) && (isUndefined.isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction.isFunction(value.applyToEnvironment)) && (isUndefined.isUndefined(value.dedupe) || "dedupe" in value && isFunction.isFunction(value.dedupe)) && PLUGIN_HOOKS_FIELDS.every((hook) => isUndefined.isUndefined(value[hook]) || hook in value && (isPluginHookFunction(value[hook]) || hook === "config" && isSetObject.isSetObject(value[hook]))) && BUILDER_VARIANTS.every((variant) => isUndefined.isUndefined(value[variant]) || variant in value && isSetObject.isSetObject(value[variant]));
|
|
822
824
|
}
|
|
823
825
|
chunkSHUYVCID_js.__name(isPlugin, "isPlugin");
|
|
824
826
|
function isPluginConfigObject(value) {
|
|
@@ -849,23 +851,31 @@ function getHookHandler(pluginHook) {
|
|
|
849
851
|
return isFunction.isFunction(pluginHook) ? pluginHook : pluginHook.handler;
|
|
850
852
|
}
|
|
851
853
|
chunkSHUYVCID_js.__name(getHookHandler, "getHookHandler");
|
|
852
|
-
function
|
|
853
|
-
return
|
|
854
|
+
function isUnpluginHookKey(keys) {
|
|
855
|
+
return UNPLUGIN_BUILDER_VARIANTS.some((variant) => keys.startsWith(`${variant}:`));
|
|
856
|
+
}
|
|
857
|
+
chunkSHUYVCID_js.__name(isUnpluginHookKey, "isUnpluginHookKey");
|
|
858
|
+
function isPluginHookField(keys) {
|
|
859
|
+
return !isUnpluginHookKey(keys) && PLUGIN_HOOKS_FIELDS.includes(keys);
|
|
860
|
+
}
|
|
861
|
+
chunkSHUYVCID_js.__name(isPluginHookField, "isPluginHookField");
|
|
862
|
+
function isUnpluginHookField(field) {
|
|
863
|
+
return !isPluginHookField(field) && UNPLUGIN_BUILDER_VARIANTS.includes(field);
|
|
854
864
|
}
|
|
855
|
-
chunkSHUYVCID_js.__name(
|
|
865
|
+
chunkSHUYVCID_js.__name(isUnpluginHookField, "isUnpluginHookField");
|
|
856
866
|
function checkDedupe(plugin, plugins) {
|
|
857
867
|
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction.isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
858
868
|
}
|
|
859
869
|
chunkSHUYVCID_js.__name(checkDedupe, "checkDedupe");
|
|
860
870
|
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
861
|
-
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin))) {
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
}
|
|
871
|
+
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin).filter(Boolean))) {
|
|
872
|
+
const handler = /* @__PURE__ */ chunkSHUYVCID_js.__name((...args) => getHookHandler(pluginHook).apply(context, args), "handler");
|
|
873
|
+
if (!handler) {
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
hooksList.push({
|
|
866
877
|
plugin,
|
|
867
|
-
|
|
868
|
-
handler: getHookHandler(pluginHook).bind(context)
|
|
878
|
+
handler
|
|
869
879
|
});
|
|
870
880
|
}
|
|
871
881
|
}
|
|
@@ -3678,6 +3688,10 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3678
3688
|
}, []);
|
|
3679
3689
|
}
|
|
3680
3690
|
};
|
|
3691
|
+
function isUnpluginBuilderVariant(str) {
|
|
3692
|
+
return isSetString.isSetString(str) && UNPLUGIN_BUILDER_VARIANTS.includes(str);
|
|
3693
|
+
}
|
|
3694
|
+
chunkSHUYVCID_js.__name(isUnpluginBuilderVariant, "isUnpluginBuilderVariant");
|
|
3681
3695
|
function createPluginContext(plugin, environment) {
|
|
3682
3696
|
const normalizeMessage = /* @__PURE__ */ chunkSHUYVCID_js.__name((message) => {
|
|
3683
3697
|
return isString.isString(message) ? message : message.message;
|
|
@@ -3816,30 +3830,66 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
3816
3830
|
});
|
|
3817
3831
|
this.#hooks = Object.keys(resolvedPlugin).filter((key) => !PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
|
|
3818
3832
|
const hook = key;
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
ret[hook] ??= {
|
|
3833
|
+
if (isPluginHookField(hook)) {
|
|
3834
|
+
const pluginHook = resolvedPlugin[hook];
|
|
3835
|
+
if (!isPluginHook(pluginHook)) {
|
|
3836
|
+
return ret;
|
|
3837
|
+
}
|
|
3838
|
+
ret[hook] ??= {
|
|
3839
|
+
preEnforced: [],
|
|
3840
|
+
preOrdered: [],
|
|
3841
|
+
normal: [],
|
|
3842
|
+
postEnforced: [],
|
|
3843
|
+
postOrdered: []
|
|
3844
|
+
};
|
|
3825
3845
|
if (resolvedPlugin.enforce) {
|
|
3826
|
-
|
|
3827
|
-
|
|
3846
|
+
const hookListOrder2 = `${resolvedPlugin.enforce}Enforced`;
|
|
3847
|
+
ret[hook][hookListOrder2] ??= [];
|
|
3848
|
+
const bucket = ret[hook][hookListOrder2];
|
|
3849
|
+
addPluginHook(context, resolvedPlugin, pluginHook, bucket);
|
|
3828
3850
|
return ret;
|
|
3829
3851
|
}
|
|
3830
3852
|
if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
|
|
3831
3853
|
ret[hook].normal ??= [];
|
|
3832
|
-
|
|
3854
|
+
const bucket = ret[hook].normal;
|
|
3855
|
+
addPluginHook(context, resolvedPlugin, pluginHook, bucket);
|
|
3856
|
+
return ret;
|
|
3857
|
+
}
|
|
3858
|
+
const hookListOrder = `${pluginHook.order}Ordered`;
|
|
3859
|
+
ret[hook][hookListOrder] ??= [];
|
|
3860
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][hookListOrder]);
|
|
3861
|
+
return ret;
|
|
3862
|
+
} else if (isUnpluginHookField(hook)) {
|
|
3863
|
+
const unpluginPlugin = resolvedPlugin[hook];
|
|
3864
|
+
if (!isSetObject.isSetObject(unpluginPlugin)) {
|
|
3833
3865
|
return ret;
|
|
3834
3866
|
}
|
|
3835
|
-
|
|
3836
|
-
|
|
3867
|
+
for (const field of Object.keys(unpluginPlugin)) {
|
|
3868
|
+
const variantField = field;
|
|
3869
|
+
const pluginHook = unpluginPlugin[variantField];
|
|
3870
|
+
if (!isPluginHook(pluginHook)) {
|
|
3871
|
+
continue;
|
|
3872
|
+
}
|
|
3873
|
+
ret[hook] ??= {};
|
|
3874
|
+
ret[hook][variantField] ??= {
|
|
3875
|
+
preEnforced: [],
|
|
3876
|
+
preOrdered: [],
|
|
3877
|
+
normal: [],
|
|
3878
|
+
postEnforced: [],
|
|
3879
|
+
postOrdered: []
|
|
3880
|
+
};
|
|
3881
|
+
if (resolvedPlugin.enforce) {
|
|
3882
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField][`${resolvedPlugin.enforce}Enforced`]);
|
|
3883
|
+
return ret;
|
|
3884
|
+
}
|
|
3885
|
+
if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
|
|
3886
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField].normal);
|
|
3887
|
+
return ret;
|
|
3888
|
+
}
|
|
3889
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField][`${pluginHook.order}Ordered`]);
|
|
3890
|
+
}
|
|
3837
3891
|
} else {
|
|
3838
|
-
|
|
3839
|
-
ret[hook].push({
|
|
3840
|
-
plugin: resolvedPlugin,
|
|
3841
|
-
hook: getHookHandler(pluginHook).bind(context)
|
|
3842
|
-
});
|
|
3892
|
+
this.warn(`Unknown plugin hook field: ${String(hook)}`);
|
|
3843
3893
|
}
|
|
3844
3894
|
return ret;
|
|
3845
3895
|
}, this.hooks);
|
|
@@ -3847,89 +3897,89 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
3847
3897
|
/**
|
|
3848
3898
|
* Retrieves the hook handlers for a specific hook name
|
|
3849
3899
|
*/
|
|
3850
|
-
selectHooks(
|
|
3900
|
+
selectHooks(key, options) {
|
|
3851
3901
|
const result = [];
|
|
3852
|
-
if (
|
|
3853
|
-
|
|
3854
|
-
|
|
3902
|
+
if (isUnpluginHookKey(key)) {
|
|
3903
|
+
const variant = String(key).split(":")[0];
|
|
3904
|
+
if (isUnpluginBuilderVariant(variant)) {
|
|
3905
|
+
const hooks = this.hooks[variant];
|
|
3906
|
+
if (hooks) {
|
|
3907
|
+
const field = String(key).split(":")[1];
|
|
3908
|
+
if (field && hooks[field]) {
|
|
3909
|
+
const fieldHooks = hooks[field];
|
|
3910
|
+
if (options?.order) {
|
|
3911
|
+
const mapHooksToResult = /* @__PURE__ */ chunkSHUYVCID_js.__name((hooksList) => hooksList.map((hook) => {
|
|
3912
|
+
const plugin = this.plugins.find((p) => p.plugin.name === hook.plugin.name);
|
|
3913
|
+
if (!plugin) {
|
|
3914
|
+
throw new Error(`Could not find plugin context for plugin "${hook.plugin.name}".`);
|
|
3915
|
+
}
|
|
3916
|
+
return {
|
|
3917
|
+
handler: hook.handler,
|
|
3918
|
+
plugin: hook.plugin,
|
|
3919
|
+
context: plugin.context
|
|
3920
|
+
};
|
|
3921
|
+
}), "mapHooksToResult");
|
|
3922
|
+
if (options?.order === "pre") {
|
|
3923
|
+
result.push(...mapHooksToResult(fieldHooks.preOrdered ?? []));
|
|
3924
|
+
result.push(...mapHooksToResult(fieldHooks.preEnforced ?? []));
|
|
3925
|
+
} else if (options?.order === "post") {
|
|
3926
|
+
result.push(...mapHooksToResult(fieldHooks.postOrdered ?? []));
|
|
3927
|
+
result.push(...mapHooksToResult(fieldHooks.postEnforced ?? []));
|
|
3928
|
+
} else {
|
|
3929
|
+
result.push(...mapHooksToResult(fieldHooks.normal ?? []));
|
|
3930
|
+
}
|
|
3931
|
+
} else {
|
|
3932
|
+
result.push(...this.selectHooks(key, {
|
|
3933
|
+
order: "pre"
|
|
3934
|
+
}));
|
|
3935
|
+
result.push(...this.selectHooks(key, {
|
|
3936
|
+
order: "normal"
|
|
3937
|
+
}));
|
|
3938
|
+
result.push(...this.selectHooks(key, {
|
|
3939
|
+
order: "post"
|
|
3940
|
+
}));
|
|
3941
|
+
}
|
|
3942
|
+
}
|
|
3943
|
+
}
|
|
3944
|
+
}
|
|
3945
|
+
} else if (isPluginHookField(key)) {
|
|
3946
|
+
if (this.hooks[key]) {
|
|
3947
|
+
const fieldHooks = this.hooks[key];
|
|
3855
3948
|
if (options?.order) {
|
|
3949
|
+
const mapHooksToResult = /* @__PURE__ */ chunkSHUYVCID_js.__name((hooksList) => hooksList.map((hook) => {
|
|
3950
|
+
const plugin = this.plugins.find((p) => p.plugin.name === hook.plugin.name);
|
|
3951
|
+
if (!plugin) {
|
|
3952
|
+
throw new Error(`Could not find plugin context for plugin "${hook.plugin.name}".`);
|
|
3953
|
+
}
|
|
3954
|
+
return {
|
|
3955
|
+
handler: hook.handler,
|
|
3956
|
+
plugin: hook.plugin,
|
|
3957
|
+
context: plugin.context
|
|
3958
|
+
};
|
|
3959
|
+
}), "mapHooksToResult");
|
|
3856
3960
|
if (options?.order === "pre") {
|
|
3857
|
-
result.push(...(
|
|
3858
|
-
|
|
3859
|
-
if (!plugin) {
|
|
3860
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3861
|
-
}
|
|
3862
|
-
return {
|
|
3863
|
-
handle: h.handler,
|
|
3864
|
-
context: plugin.context
|
|
3865
|
-
};
|
|
3866
|
-
}));
|
|
3867
|
-
result.push(...(hooks.preEnforced ?? []).map((h) => {
|
|
3868
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3869
|
-
if (!plugin) {
|
|
3870
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3871
|
-
}
|
|
3872
|
-
return {
|
|
3873
|
-
handle: h.handler,
|
|
3874
|
-
context: plugin.context
|
|
3875
|
-
};
|
|
3876
|
-
}));
|
|
3961
|
+
result.push(...mapHooksToResult(fieldHooks.preOrdered ?? []));
|
|
3962
|
+
result.push(...mapHooksToResult(fieldHooks.preEnforced ?? []));
|
|
3877
3963
|
} else if (options?.order === "post") {
|
|
3878
|
-
result.push(...(
|
|
3879
|
-
|
|
3880
|
-
if (!plugin) {
|
|
3881
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3882
|
-
}
|
|
3883
|
-
return {
|
|
3884
|
-
handle: h.handler,
|
|
3885
|
-
context: plugin.context
|
|
3886
|
-
};
|
|
3887
|
-
}));
|
|
3888
|
-
result.push(...(hooks.postEnforced ?? []).map((h) => {
|
|
3889
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3890
|
-
if (!plugin) {
|
|
3891
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3892
|
-
}
|
|
3893
|
-
return {
|
|
3894
|
-
handle: h.handler,
|
|
3895
|
-
context: plugin.context
|
|
3896
|
-
};
|
|
3897
|
-
}));
|
|
3964
|
+
result.push(...mapHooksToResult(fieldHooks.postOrdered ?? []));
|
|
3965
|
+
result.push(...mapHooksToResult(fieldHooks.postEnforced ?? []));
|
|
3898
3966
|
} else {
|
|
3899
|
-
result.push(...(
|
|
3900
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3901
|
-
if (!plugin) {
|
|
3902
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3903
|
-
}
|
|
3904
|
-
return {
|
|
3905
|
-
handle: h.handler,
|
|
3906
|
-
context: plugin.context
|
|
3907
|
-
};
|
|
3908
|
-
}));
|
|
3967
|
+
result.push(...mapHooksToResult(fieldHooks.normal ?? []));
|
|
3909
3968
|
}
|
|
3910
3969
|
} else {
|
|
3911
|
-
result.push(...this.selectHooks(
|
|
3970
|
+
result.push(...this.selectHooks(key, {
|
|
3912
3971
|
order: "pre"
|
|
3913
3972
|
}));
|
|
3914
|
-
result.push(...this.selectHooks(
|
|
3973
|
+
result.push(...this.selectHooks(key, {
|
|
3915
3974
|
order: "normal"
|
|
3916
3975
|
}));
|
|
3917
|
-
result.push(...this.selectHooks(
|
|
3976
|
+
result.push(...this.selectHooks(key, {
|
|
3918
3977
|
order: "post"
|
|
3919
3978
|
}));
|
|
3920
3979
|
}
|
|
3921
|
-
} else {
|
|
3922
|
-
result.push(...this.hooks[hook].map((h) => {
|
|
3923
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3924
|
-
if (!plugin) {
|
|
3925
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3926
|
-
}
|
|
3927
|
-
return {
|
|
3928
|
-
handle: h.handler,
|
|
3929
|
-
context: plugin.context
|
|
3930
|
-
};
|
|
3931
|
-
}));
|
|
3932
3980
|
}
|
|
3981
|
+
} else {
|
|
3982
|
+
throw new Error(`Unknown plugin hook key: ${String(key)}`);
|
|
3933
3983
|
}
|
|
3934
3984
|
return result;
|
|
3935
3985
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkB6MNKOLR_js = require('./chunk-B6MNKOLR.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
var defu = require('defu');
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ async function executorFn(context, api) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
22
|
-
var executor =
|
|
22
|
+
var executor = chunkB6MNKOLR_js.withExecutor("prepare", executorFn);
|
|
23
23
|
var executor_default = executor;
|
|
24
24
|
|
|
25
25
|
exports.executorFn = executorFn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkB6MNKOLR_js = require('./chunk-B6MNKOLR.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
|
|
6
6
|
// src/executors/clean/executor.ts
|
|
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
14
|
-
var executor =
|
|
14
|
+
var executor = chunkB6MNKOLR_js.withExecutor("clean", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkB6MNKOLR_js = require('./chunk-B6MNKOLR.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
|
|
6
6
|
// src/executors/docs/executor.ts
|
|
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
14
|
-
var executor =
|
|
14
|
+
var executor = chunkB6MNKOLR_js.withExecutor("docs", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkB6MNKOLR_js = require('./chunk-B6MNKOLR.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
var defu = require('defu');
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ async function executorFn(context, api) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
22
|
-
var executor =
|
|
22
|
+
var executor = chunkB6MNKOLR_js.withExecutor("build", executorFn);
|
|
23
23
|
var executor_default = executor;
|
|
24
24
|
|
|
25
25
|
exports.executorFn = executorFn;
|