@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
|
@@ -337,35 +337,32 @@ ${value || ""}`.trim();
|
|
|
337
337
|
}
|
|
338
338
|
return false;
|
|
339
339
|
});
|
|
340
|
-
async function callHook(context,
|
|
341
|
-
const
|
|
342
|
-
if (
|
|
343
|
-
context.log(LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk5.bold.cyanBright(`${
|
|
340
|
+
async function callHook(context, key, options, ...args) {
|
|
341
|
+
const hooks = context.selectHooks(key, options);
|
|
342
|
+
if (hooks.length > 0) {
|
|
343
|
+
context.log(LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk5.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)}`);
|
|
344
|
+
const invokeHook = /* @__PURE__ */ __name(async (hook, hookArgs) => {
|
|
345
|
+
return Reflect.apply(hook.handler, hook.context, hookArgs);
|
|
346
|
+
}, "invokeHook");
|
|
344
347
|
let results = [];
|
|
345
348
|
if (options?.sequential === false) {
|
|
346
|
-
results = await Promise.all(
|
|
347
|
-
if (!isFunction(handler
|
|
348
|
-
throw new Error(`Plugin hook handler for hook "${
|
|
349
|
+
results = await Promise.all(hooks.map(async (hook) => {
|
|
350
|
+
if (!isFunction(hook.handler)) {
|
|
351
|
+
throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
|
|
349
352
|
}
|
|
350
|
-
return
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
...args
|
|
354
|
-
])
|
|
355
|
-
);
|
|
353
|
+
return invokeHook(hook, [
|
|
354
|
+
...args
|
|
355
|
+
]);
|
|
356
356
|
}));
|
|
357
357
|
} else {
|
|
358
|
-
for (const
|
|
359
|
-
if (!isFunction(handler
|
|
360
|
-
throw new Error(`Plugin hook handler for hook "${
|
|
358
|
+
for (const hook of hooks) {
|
|
359
|
+
if (!isFunction(hook.handler)) {
|
|
360
|
+
throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
|
|
361
361
|
}
|
|
362
362
|
if (options?.result === "first" || options?.asNextParam === false) {
|
|
363
|
-
results.push(await Promise.resolve(
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
...args
|
|
367
|
-
])
|
|
368
|
-
));
|
|
363
|
+
results.push(await Promise.resolve(invokeHook(hook, [
|
|
364
|
+
...args
|
|
365
|
+
])));
|
|
369
366
|
if (options?.result === "first" && isSet(results[results.length - 1])) {
|
|
370
367
|
break;
|
|
371
368
|
}
|
|
@@ -376,12 +373,9 @@ async function callHook(context, hook, options, ...args) {
|
|
|
376
373
|
if (results.length > 0 && sequenceArgs.length > 0) {
|
|
377
374
|
sequenceArgs[0] = isFunction(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
|
|
378
375
|
}
|
|
379
|
-
const result = await Promise.resolve(
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
...sequenceArgs
|
|
383
|
-
])
|
|
384
|
-
);
|
|
376
|
+
const result = await Promise.resolve(invokeHook(hook, [
|
|
377
|
+
...sequenceArgs
|
|
378
|
+
]));
|
|
385
379
|
if (result) {
|
|
386
380
|
if (options?.result === "last") {
|
|
387
381
|
results = [
|
|
@@ -742,7 +736,7 @@ function createResolver(options) {
|
|
|
742
736
|
__name(createResolver, "createResolver");
|
|
743
737
|
|
|
744
738
|
// ../powerlines/src/types/build.ts
|
|
745
|
-
var
|
|
739
|
+
var UNPLUGIN_BUILDER_VARIANTS = [
|
|
746
740
|
"rollup",
|
|
747
741
|
"webpack",
|
|
748
742
|
"rspack",
|
|
@@ -750,7 +744,14 @@ var UNPLUGIN_BUILD_VARIANTS = [
|
|
|
750
744
|
"esbuild",
|
|
751
745
|
"farm",
|
|
752
746
|
"unloader",
|
|
753
|
-
"rolldown"
|
|
747
|
+
"rolldown",
|
|
748
|
+
"bun"
|
|
749
|
+
];
|
|
750
|
+
var BUILDER_VARIANTS = [
|
|
751
|
+
...UNPLUGIN_BUILDER_VARIANTS,
|
|
752
|
+
"tsup",
|
|
753
|
+
"tsdown",
|
|
754
|
+
"unbuild"
|
|
754
755
|
];
|
|
755
756
|
|
|
756
757
|
// ../powerlines/src/types/commands.ts
|
|
@@ -774,11 +775,12 @@ var PLUGIN_NON_HOOK_FIELDS = [
|
|
|
774
775
|
"dedupe",
|
|
775
776
|
"applyToEnvironment"
|
|
776
777
|
];
|
|
777
|
-
var
|
|
778
|
+
var PLUGIN_HOOKS_FIELDS = [
|
|
778
779
|
...SUPPORTED_COMMANDS,
|
|
779
780
|
"config",
|
|
780
781
|
"configEnvironment",
|
|
781
782
|
"configResolved",
|
|
783
|
+
"types",
|
|
782
784
|
"buildStart",
|
|
783
785
|
"buildEnd",
|
|
784
786
|
"transform",
|
|
@@ -789,7 +791,7 @@ var KNOWN_HOOKS = [
|
|
|
789
791
|
|
|
790
792
|
// ../powerlines/src/plugin-utils/helpers.ts
|
|
791
793
|
function isPlugin(value) {
|
|
792
|
-
return isSetObject(value) && "name" in value && isSetString(value.name) && (isUndefined(value.api) || "api" in value && isSetObject(value.api)) && (isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction(value.applyToEnvironment)) && (isUndefined(value.dedupe) || "dedupe" in value && isFunction(value.dedupe)) &&
|
|
794
|
+
return isSetObject(value) && "name" in value && isSetString(value.name) && (isUndefined(value.api) || "api" in value && isSetObject(value.api)) && (isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction(value.applyToEnvironment)) && (isUndefined(value.dedupe) || "dedupe" in value && isFunction(value.dedupe)) && PLUGIN_HOOKS_FIELDS.every((hook) => isUndefined(value[hook]) || hook in value && (isPluginHookFunction(value[hook]) || hook === "config" && isSetObject(value[hook]))) && BUILDER_VARIANTS.every((variant) => isUndefined(value[variant]) || variant in value && isSetObject(value[variant]));
|
|
793
795
|
}
|
|
794
796
|
__name(isPlugin, "isPlugin");
|
|
795
797
|
function isPluginConfigObject(value) {
|
|
@@ -820,23 +822,31 @@ function getHookHandler(pluginHook) {
|
|
|
820
822
|
return isFunction(pluginHook) ? pluginHook : pluginHook.handler;
|
|
821
823
|
}
|
|
822
824
|
__name(getHookHandler, "getHookHandler");
|
|
823
|
-
function
|
|
824
|
-
return
|
|
825
|
+
function isUnpluginHookKey(keys) {
|
|
826
|
+
return UNPLUGIN_BUILDER_VARIANTS.some((variant) => keys.startsWith(`${variant}:`));
|
|
827
|
+
}
|
|
828
|
+
__name(isUnpluginHookKey, "isUnpluginHookKey");
|
|
829
|
+
function isPluginHookField(keys) {
|
|
830
|
+
return !isUnpluginHookKey(keys) && PLUGIN_HOOKS_FIELDS.includes(keys);
|
|
831
|
+
}
|
|
832
|
+
__name(isPluginHookField, "isPluginHookField");
|
|
833
|
+
function isUnpluginHookField(field) {
|
|
834
|
+
return !isPluginHookField(field) && UNPLUGIN_BUILDER_VARIANTS.includes(field);
|
|
825
835
|
}
|
|
826
|
-
__name(
|
|
836
|
+
__name(isUnpluginHookField, "isUnpluginHookField");
|
|
827
837
|
function checkDedupe(plugin, plugins) {
|
|
828
838
|
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
829
839
|
}
|
|
830
840
|
__name(checkDedupe, "checkDedupe");
|
|
831
841
|
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
832
|
-
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin))) {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
}
|
|
842
|
+
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin).filter(Boolean))) {
|
|
843
|
+
const handler = /* @__PURE__ */ __name((...args) => getHookHandler(pluginHook).apply(context, args), "handler");
|
|
844
|
+
if (!handler) {
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
hooksList.push({
|
|
837
848
|
plugin,
|
|
838
|
-
|
|
839
|
-
handler: getHookHandler(pluginHook).bind(context)
|
|
849
|
+
handler
|
|
840
850
|
});
|
|
841
851
|
}
|
|
842
852
|
}
|
|
@@ -3649,6 +3659,10 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3649
3659
|
}, []);
|
|
3650
3660
|
}
|
|
3651
3661
|
};
|
|
3662
|
+
function isUnpluginBuilderVariant(str) {
|
|
3663
|
+
return isSetString(str) && UNPLUGIN_BUILDER_VARIANTS.includes(str);
|
|
3664
|
+
}
|
|
3665
|
+
__name(isUnpluginBuilderVariant, "isUnpluginBuilderVariant");
|
|
3652
3666
|
function createPluginContext(plugin, environment) {
|
|
3653
3667
|
const normalizeMessage = /* @__PURE__ */ __name((message) => {
|
|
3654
3668
|
return isString(message) ? message : message.message;
|
|
@@ -3787,30 +3801,66 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
3787
3801
|
});
|
|
3788
3802
|
this.#hooks = Object.keys(resolvedPlugin).filter((key) => !PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
|
|
3789
3803
|
const hook = key;
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
ret[hook] ??= {
|
|
3804
|
+
if (isPluginHookField(hook)) {
|
|
3805
|
+
const pluginHook = resolvedPlugin[hook];
|
|
3806
|
+
if (!isPluginHook(pluginHook)) {
|
|
3807
|
+
return ret;
|
|
3808
|
+
}
|
|
3809
|
+
ret[hook] ??= {
|
|
3810
|
+
preEnforced: [],
|
|
3811
|
+
preOrdered: [],
|
|
3812
|
+
normal: [],
|
|
3813
|
+
postEnforced: [],
|
|
3814
|
+
postOrdered: []
|
|
3815
|
+
};
|
|
3796
3816
|
if (resolvedPlugin.enforce) {
|
|
3797
|
-
|
|
3798
|
-
|
|
3817
|
+
const hookListOrder2 = `${resolvedPlugin.enforce}Enforced`;
|
|
3818
|
+
ret[hook][hookListOrder2] ??= [];
|
|
3819
|
+
const bucket = ret[hook][hookListOrder2];
|
|
3820
|
+
addPluginHook(context, resolvedPlugin, pluginHook, bucket);
|
|
3799
3821
|
return ret;
|
|
3800
3822
|
}
|
|
3801
3823
|
if (isFunction(pluginHook) || !pluginHook.order) {
|
|
3802
3824
|
ret[hook].normal ??= [];
|
|
3803
|
-
|
|
3825
|
+
const bucket = ret[hook].normal;
|
|
3826
|
+
addPluginHook(context, resolvedPlugin, pluginHook, bucket);
|
|
3827
|
+
return ret;
|
|
3828
|
+
}
|
|
3829
|
+
const hookListOrder = `${pluginHook.order}Ordered`;
|
|
3830
|
+
ret[hook][hookListOrder] ??= [];
|
|
3831
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][hookListOrder]);
|
|
3832
|
+
return ret;
|
|
3833
|
+
} else if (isUnpluginHookField(hook)) {
|
|
3834
|
+
const unpluginPlugin = resolvedPlugin[hook];
|
|
3835
|
+
if (!isSetObject(unpluginPlugin)) {
|
|
3804
3836
|
return ret;
|
|
3805
3837
|
}
|
|
3806
|
-
|
|
3807
|
-
|
|
3838
|
+
for (const field of Object.keys(unpluginPlugin)) {
|
|
3839
|
+
const variantField = field;
|
|
3840
|
+
const pluginHook = unpluginPlugin[variantField];
|
|
3841
|
+
if (!isPluginHook(pluginHook)) {
|
|
3842
|
+
continue;
|
|
3843
|
+
}
|
|
3844
|
+
ret[hook] ??= {};
|
|
3845
|
+
ret[hook][variantField] ??= {
|
|
3846
|
+
preEnforced: [],
|
|
3847
|
+
preOrdered: [],
|
|
3848
|
+
normal: [],
|
|
3849
|
+
postEnforced: [],
|
|
3850
|
+
postOrdered: []
|
|
3851
|
+
};
|
|
3852
|
+
if (resolvedPlugin.enforce) {
|
|
3853
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField][`${resolvedPlugin.enforce}Enforced`]);
|
|
3854
|
+
return ret;
|
|
3855
|
+
}
|
|
3856
|
+
if (isFunction(pluginHook) || !pluginHook.order) {
|
|
3857
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField].normal);
|
|
3858
|
+
return ret;
|
|
3859
|
+
}
|
|
3860
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField][`${pluginHook.order}Ordered`]);
|
|
3861
|
+
}
|
|
3808
3862
|
} else {
|
|
3809
|
-
|
|
3810
|
-
ret[hook].push({
|
|
3811
|
-
plugin: resolvedPlugin,
|
|
3812
|
-
hook: getHookHandler(pluginHook).bind(context)
|
|
3813
|
-
});
|
|
3863
|
+
this.warn(`Unknown plugin hook field: ${String(hook)}`);
|
|
3814
3864
|
}
|
|
3815
3865
|
return ret;
|
|
3816
3866
|
}, this.hooks);
|
|
@@ -3818,89 +3868,89 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
3818
3868
|
/**
|
|
3819
3869
|
* Retrieves the hook handlers for a specific hook name
|
|
3820
3870
|
*/
|
|
3821
|
-
selectHooks(
|
|
3871
|
+
selectHooks(key, options) {
|
|
3822
3872
|
const result = [];
|
|
3823
|
-
if (
|
|
3824
|
-
|
|
3825
|
-
|
|
3873
|
+
if (isUnpluginHookKey(key)) {
|
|
3874
|
+
const variant = String(key).split(":")[0];
|
|
3875
|
+
if (isUnpluginBuilderVariant(variant)) {
|
|
3876
|
+
const hooks = this.hooks[variant];
|
|
3877
|
+
if (hooks) {
|
|
3878
|
+
const field = String(key).split(":")[1];
|
|
3879
|
+
if (field && hooks[field]) {
|
|
3880
|
+
const fieldHooks = hooks[field];
|
|
3881
|
+
if (options?.order) {
|
|
3882
|
+
const mapHooksToResult = /* @__PURE__ */ __name((hooksList) => hooksList.map((hook) => {
|
|
3883
|
+
const plugin = this.plugins.find((p) => p.plugin.name === hook.plugin.name);
|
|
3884
|
+
if (!plugin) {
|
|
3885
|
+
throw new Error(`Could not find plugin context for plugin "${hook.plugin.name}".`);
|
|
3886
|
+
}
|
|
3887
|
+
return {
|
|
3888
|
+
handler: hook.handler,
|
|
3889
|
+
plugin: hook.plugin,
|
|
3890
|
+
context: plugin.context
|
|
3891
|
+
};
|
|
3892
|
+
}), "mapHooksToResult");
|
|
3893
|
+
if (options?.order === "pre") {
|
|
3894
|
+
result.push(...mapHooksToResult(fieldHooks.preOrdered ?? []));
|
|
3895
|
+
result.push(...mapHooksToResult(fieldHooks.preEnforced ?? []));
|
|
3896
|
+
} else if (options?.order === "post") {
|
|
3897
|
+
result.push(...mapHooksToResult(fieldHooks.postOrdered ?? []));
|
|
3898
|
+
result.push(...mapHooksToResult(fieldHooks.postEnforced ?? []));
|
|
3899
|
+
} else {
|
|
3900
|
+
result.push(...mapHooksToResult(fieldHooks.normal ?? []));
|
|
3901
|
+
}
|
|
3902
|
+
} else {
|
|
3903
|
+
result.push(...this.selectHooks(key, {
|
|
3904
|
+
order: "pre"
|
|
3905
|
+
}));
|
|
3906
|
+
result.push(...this.selectHooks(key, {
|
|
3907
|
+
order: "normal"
|
|
3908
|
+
}));
|
|
3909
|
+
result.push(...this.selectHooks(key, {
|
|
3910
|
+
order: "post"
|
|
3911
|
+
}));
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3914
|
+
}
|
|
3915
|
+
}
|
|
3916
|
+
} else if (isPluginHookField(key)) {
|
|
3917
|
+
if (this.hooks[key]) {
|
|
3918
|
+
const fieldHooks = this.hooks[key];
|
|
3826
3919
|
if (options?.order) {
|
|
3920
|
+
const mapHooksToResult = /* @__PURE__ */ __name((hooksList) => hooksList.map((hook) => {
|
|
3921
|
+
const plugin = this.plugins.find((p) => p.plugin.name === hook.plugin.name);
|
|
3922
|
+
if (!plugin) {
|
|
3923
|
+
throw new Error(`Could not find plugin context for plugin "${hook.plugin.name}".`);
|
|
3924
|
+
}
|
|
3925
|
+
return {
|
|
3926
|
+
handler: hook.handler,
|
|
3927
|
+
plugin: hook.plugin,
|
|
3928
|
+
context: plugin.context
|
|
3929
|
+
};
|
|
3930
|
+
}), "mapHooksToResult");
|
|
3827
3931
|
if (options?.order === "pre") {
|
|
3828
|
-
result.push(...(
|
|
3829
|
-
|
|
3830
|
-
if (!plugin) {
|
|
3831
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3832
|
-
}
|
|
3833
|
-
return {
|
|
3834
|
-
handle: h.handler,
|
|
3835
|
-
context: plugin.context
|
|
3836
|
-
};
|
|
3837
|
-
}));
|
|
3838
|
-
result.push(...(hooks.preEnforced ?? []).map((h) => {
|
|
3839
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3840
|
-
if (!plugin) {
|
|
3841
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3842
|
-
}
|
|
3843
|
-
return {
|
|
3844
|
-
handle: h.handler,
|
|
3845
|
-
context: plugin.context
|
|
3846
|
-
};
|
|
3847
|
-
}));
|
|
3932
|
+
result.push(...mapHooksToResult(fieldHooks.preOrdered ?? []));
|
|
3933
|
+
result.push(...mapHooksToResult(fieldHooks.preEnforced ?? []));
|
|
3848
3934
|
} else if (options?.order === "post") {
|
|
3849
|
-
result.push(...(
|
|
3850
|
-
|
|
3851
|
-
if (!plugin) {
|
|
3852
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3853
|
-
}
|
|
3854
|
-
return {
|
|
3855
|
-
handle: h.handler,
|
|
3856
|
-
context: plugin.context
|
|
3857
|
-
};
|
|
3858
|
-
}));
|
|
3859
|
-
result.push(...(hooks.postEnforced ?? []).map((h) => {
|
|
3860
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3861
|
-
if (!plugin) {
|
|
3862
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3863
|
-
}
|
|
3864
|
-
return {
|
|
3865
|
-
handle: h.handler,
|
|
3866
|
-
context: plugin.context
|
|
3867
|
-
};
|
|
3868
|
-
}));
|
|
3935
|
+
result.push(...mapHooksToResult(fieldHooks.postOrdered ?? []));
|
|
3936
|
+
result.push(...mapHooksToResult(fieldHooks.postEnforced ?? []));
|
|
3869
3937
|
} else {
|
|
3870
|
-
result.push(...(
|
|
3871
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3872
|
-
if (!plugin) {
|
|
3873
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3874
|
-
}
|
|
3875
|
-
return {
|
|
3876
|
-
handle: h.handler,
|
|
3877
|
-
context: plugin.context
|
|
3878
|
-
};
|
|
3879
|
-
}));
|
|
3938
|
+
result.push(...mapHooksToResult(fieldHooks.normal ?? []));
|
|
3880
3939
|
}
|
|
3881
3940
|
} else {
|
|
3882
|
-
result.push(...this.selectHooks(
|
|
3941
|
+
result.push(...this.selectHooks(key, {
|
|
3883
3942
|
order: "pre"
|
|
3884
3943
|
}));
|
|
3885
|
-
result.push(...this.selectHooks(
|
|
3944
|
+
result.push(...this.selectHooks(key, {
|
|
3886
3945
|
order: "normal"
|
|
3887
3946
|
}));
|
|
3888
|
-
result.push(...this.selectHooks(
|
|
3947
|
+
result.push(...this.selectHooks(key, {
|
|
3889
3948
|
order: "post"
|
|
3890
3949
|
}));
|
|
3891
3950
|
}
|
|
3892
|
-
} else {
|
|
3893
|
-
result.push(...this.hooks[hook].map((h) => {
|
|
3894
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3895
|
-
if (!plugin) {
|
|
3896
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3897
|
-
}
|
|
3898
|
-
return {
|
|
3899
|
-
handle: h.handler,
|
|
3900
|
-
context: plugin.context
|
|
3901
|
-
};
|
|
3902
|
-
}));
|
|
3903
3951
|
}
|
|
3952
|
+
} else {
|
|
3953
|
+
throw new Error(`Unknown plugin hook key: ${String(key)}`);
|
|
3904
3954
|
}
|
|
3905
3955
|
return result;
|
|
3906
3956
|
}
|
package/dist/executors.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./chunk-XO62WWX4.js');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
4
|
+
var chunk2Q4BMQLY_js = require('./chunk-2Q4BMQLY.js');
|
|
5
|
+
var chunkCILJ5XPL_js = require('./chunk-CILJ5XPL.js');
|
|
6
|
+
var chunkOTBB6AI2_js = require('./chunk-OTBB6AI2.js');
|
|
7
|
+
var chunkCTYYVUVH_js = require('./chunk-CTYYVUVH.js');
|
|
8
|
+
var chunkDZVTDZLD_js = require('./chunk-DZVTDZLD.js');
|
|
9
|
+
require('./chunk-B6MNKOLR.js');
|
|
10
10
|
require('./chunk-DQI2I5KK.js');
|
|
11
11
|
require('./chunk-SHUYVCID.js');
|
|
12
12
|
|
|
@@ -14,21 +14,21 @@ require('./chunk-SHUYVCID.js');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "lint", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk2Q4BMQLY_js.executor_default; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "prepare", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkCILJ5XPL_js.executor_default; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "build", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkOTBB6AI2_js.executor_default; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "clean", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkCTYYVUVH_js.executor_default; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "docs", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkDZVTDZLD_js.executor_default; }
|
|
34
34
|
});
|
package/dist/executors.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './chunk-UV4HQO3Y.mjs';
|
|
2
|
-
export { executor_default as lint } from './chunk-
|
|
3
|
-
export { executor_default as prepare } from './chunk-
|
|
4
|
-
export { executor_default as build } from './chunk-
|
|
5
|
-
export { executor_default as clean } from './chunk-
|
|
6
|
-
export { executor_default as docs } from './chunk-
|
|
7
|
-
import './chunk-
|
|
2
|
+
export { executor_default as lint } from './chunk-GVL5WYYV.mjs';
|
|
3
|
+
export { executor_default as prepare } from './chunk-LFD5A3H7.mjs';
|
|
4
|
+
export { executor_default as build } from './chunk-424UJRUF.mjs';
|
|
5
|
+
export { executor_default as clean } from './chunk-EWKNXKSM.mjs';
|
|
6
|
+
export { executor_default as docs } from './chunk-OZNOZMYS.mjs';
|
|
7
|
+
import './chunk-XC3DAHO3.mjs';
|
|
8
8
|
import './chunk-OVX2CEXQ.mjs';
|
|
9
9
|
import './chunk-O6YSETKJ.mjs';
|
package/dist/index.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkTNFRQNSW_js = require('./chunk-TNFRQNSW.js');
|
|
4
4
|
require('./chunk-XO62WWX4.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
5
|
+
var chunk2Q4BMQLY_js = require('./chunk-2Q4BMQLY.js');
|
|
6
|
+
var chunkCILJ5XPL_js = require('./chunk-CILJ5XPL.js');
|
|
7
|
+
var chunkOTBB6AI2_js = require('./chunk-OTBB6AI2.js');
|
|
8
|
+
var chunkCTYYVUVH_js = require('./chunk-CTYYVUVH.js');
|
|
9
|
+
var chunkDZVTDZLD_js = require('./chunk-DZVTDZLD.js');
|
|
10
10
|
require('./chunk-N2YKXZ5R.js');
|
|
11
11
|
var chunkWUJKJGEW_js = require('./chunk-WUJKJGEW.js');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-B6MNKOLR.js');
|
|
13
13
|
require('./chunk-QSMJD4CD.js');
|
|
14
14
|
require('./chunk-DQI2I5KK.js');
|
|
15
15
|
require('./chunk-IQVSZEQ6.js');
|
|
@@ -23,23 +23,23 @@ Object.defineProperty(exports, "createNodesV2", {
|
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "lint", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk2Q4BMQLY_js.executor_default; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "prepare", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkCILJ5XPL_js.executor_default; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "build", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkOTBB6AI2_js.executor_default; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "clean", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkCTYYVUVH_js.executor_default; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "docs", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkDZVTDZLD_js.executor_default; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "sync", {
|
|
45
45
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { createNodesV2 } from './chunk-KPZS6OF5.mjs';
|
|
2
2
|
import './chunk-UV4HQO3Y.mjs';
|
|
3
|
-
export { executor_default as lint } from './chunk-
|
|
4
|
-
export { executor_default as prepare } from './chunk-
|
|
5
|
-
export { executor_default as build } from './chunk-
|
|
6
|
-
export { executor_default as clean } from './chunk-
|
|
7
|
-
export { executor_default as docs } from './chunk-
|
|
3
|
+
export { executor_default as lint } from './chunk-GVL5WYYV.mjs';
|
|
4
|
+
export { executor_default as prepare } from './chunk-LFD5A3H7.mjs';
|
|
5
|
+
export { executor_default as build } from './chunk-424UJRUF.mjs';
|
|
6
|
+
export { executor_default as clean } from './chunk-EWKNXKSM.mjs';
|
|
7
|
+
export { executor_default as docs } from './chunk-OZNOZMYS.mjs';
|
|
8
8
|
import './chunk-23KFTIT2.mjs';
|
|
9
9
|
export { generator_default as sync, generatorFn as syncGenerator } from './chunk-326QB2VK.mjs';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-XC3DAHO3.mjs';
|
|
11
11
|
import './chunk-LK4PXBKI.mjs';
|
|
12
12
|
import './chunk-OVX2CEXQ.mjs';
|
|
13
13
|
import './chunk-IC47MFKB.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkB6MNKOLR_js = require('../../chunk-B6MNKOLR.js');
|
|
4
4
|
require('../../chunk-DQI2I5KK.js');
|
|
5
5
|
require('../../chunk-SHUYVCID.js');
|
|
6
6
|
|
|
@@ -8,5 +8,5 @@ require('../../chunk-SHUYVCID.js');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "withExecutor", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkB6MNKOLR_js.withExecutor; }
|
|
12
12
|
});
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../../chunk-
|
|
5
|
+
var chunkOTBB6AI2_js = require('../../../chunk-OTBB6AI2.js');
|
|
6
|
+
require('../../../chunk-B6MNKOLR.js');
|
|
7
7
|
require('../../../chunk-DQI2I5KK.js');
|
|
8
8
|
require('../../../chunk-SHUYVCID.js');
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ require('../../../chunk-SHUYVCID.js');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "default", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkOTBB6AI2_js.executor_default; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "executorFn", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkOTBB6AI2_js.executorFn; }
|
|
19
19
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { executor_default as default, executorFn } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
export { executor_default as default, executorFn } from '../../../chunk-424UJRUF.mjs';
|
|
2
|
+
import '../../../chunk-XC3DAHO3.mjs';
|
|
3
3
|
import '../../../chunk-OVX2CEXQ.mjs';
|
|
4
4
|
import '../../../chunk-O6YSETKJ.mjs';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../../chunk-
|
|
5
|
+
var chunkCTYYVUVH_js = require('../../../chunk-CTYYVUVH.js');
|
|
6
|
+
require('../../../chunk-B6MNKOLR.js');
|
|
7
7
|
require('../../../chunk-DQI2I5KK.js');
|
|
8
8
|
require('../../../chunk-SHUYVCID.js');
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ require('../../../chunk-SHUYVCID.js');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "default", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkCTYYVUVH_js.executor_default; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "executorFn", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkCTYYVUVH_js.executorFn; }
|
|
19
19
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { executor_default as default, executorFn } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
export { executor_default as default, executorFn } from '../../../chunk-EWKNXKSM.mjs';
|
|
2
|
+
import '../../../chunk-XC3DAHO3.mjs';
|
|
3
3
|
import '../../../chunk-OVX2CEXQ.mjs';
|
|
4
4
|
import '../../../chunk-O6YSETKJ.mjs';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../../chunk-
|
|
5
|
+
var chunkDZVTDZLD_js = require('../../../chunk-DZVTDZLD.js');
|
|
6
|
+
require('../../../chunk-B6MNKOLR.js');
|
|
7
7
|
require('../../../chunk-DQI2I5KK.js');
|
|
8
8
|
require('../../../chunk-SHUYVCID.js');
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ require('../../../chunk-SHUYVCID.js');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "default", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkDZVTDZLD_js.executor_default; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "executorFn", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkDZVTDZLD_js.executorFn; }
|
|
19
19
|
});
|