@powerlines/nx 0.11.212 → 0.11.213
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 +6 -0
- package/dist/{chunk-OOHNZ6U5.mjs → chunk-2L7LQUW7.mjs} +1 -1
- package/dist/{chunk-YAU4VWTI.mjs → chunk-4Q7KKSSP.mjs} +1 -1
- package/dist/{chunk-CZMHZKJ2.js → chunk-5HX5ODZL.js} +206 -178
- package/dist/{chunk-T7X3ARNH.js → chunk-CYCHS4NN.js} +2 -2
- package/dist/{chunk-VPKY2ES2.mjs → chunk-QT7CACOY.mjs} +206 -178
- package/dist/{chunk-47EZNKRS.js → chunk-QW363SOJ.js} +2 -2
- package/dist/{chunk-IXWGWKQW.mjs → chunk-T2KY7MOS.mjs} +1 -1
- package/dist/{chunk-PIPXZTQ4.js → chunk-WDEO4VNY.js} +2 -2
- package/dist/{chunk-BPBARX7E.js → chunk-XF3QSVD5.js} +2 -2
- package/dist/{chunk-QSORNZHH.mjs → chunk-XOTD5XMS.mjs} +1 -1
- package/dist/{chunk-P7336MS6.mjs → chunk-YOXVEZPX.mjs} +1 -1
- package/dist/{chunk-ZDAXSLBQ.js → chunk-YW6VMUR2.js} +2 -2
- 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
|
@@ -30,6 +30,7 @@ import { hasFileExtension, findFilePath, findFileName, findFileExtensionSafe, fi
|
|
|
30
30
|
import { isParentPath } from '@stryke/path/is-parent-path';
|
|
31
31
|
import { prettyBytes } from '@stryke/string-format/pretty-bytes';
|
|
32
32
|
import { InMemoryFileSystemHost, Project, DiagnosticCategory } from 'ts-morph';
|
|
33
|
+
import { isUndefined } from '@stryke/type-checks/is-undefined';
|
|
33
34
|
import { getPackageName, hasPackageVersion, getPackageVersion } from '@stryke/string-format/package';
|
|
34
35
|
import { getObjectDiff } from '@donedeal0/superdiff';
|
|
35
36
|
import { readJsonFile, readJsonFileSync } from '@stryke/fs/json';
|
|
@@ -52,7 +53,6 @@ import { create } from 'flat-cache';
|
|
|
52
53
|
import { parse } from 'oxc-parser';
|
|
53
54
|
import { Agent, setGlobalDispatcher, interceptors, Response } from 'undici';
|
|
54
55
|
import { createJiti } from 'jiti';
|
|
55
|
-
import { isUndefined } from '@stryke/type-checks/is-undefined';
|
|
56
56
|
import { parseTypeDefinition } from '@stryke/convert/parse-type-definition';
|
|
57
57
|
import { isAbsolutePath } from '@stryke/path/is-type';
|
|
58
58
|
import * as $ from '@stryke/capnp';
|
|
@@ -76,7 +76,7 @@ import { resolve } from 'node:path';
|
|
|
76
76
|
|
|
77
77
|
// ../powerlines/package.json
|
|
78
78
|
var package_default = {
|
|
79
|
-
version: "0.38.
|
|
79
|
+
version: "0.38.52"};
|
|
80
80
|
var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
|
|
81
81
|
static {
|
|
82
82
|
__name(this, "VirtualFileSystemHost");
|
|
@@ -253,7 +253,175 @@ declare module "${moduleId}" {
|
|
|
253
253
|
return builtinModules;
|
|
254
254
|
}
|
|
255
255
|
__name(emitBuiltinTypes, "emitBuiltinTypes");
|
|
256
|
-
|
|
256
|
+
|
|
257
|
+
// ../powerlines/src/types/build.ts
|
|
258
|
+
var UNPLUGIN_BUILDER_VARIANTS = [
|
|
259
|
+
"rollup",
|
|
260
|
+
"webpack",
|
|
261
|
+
"rspack",
|
|
262
|
+
"vite",
|
|
263
|
+
"esbuild",
|
|
264
|
+
"farm",
|
|
265
|
+
"unloader",
|
|
266
|
+
"rolldown",
|
|
267
|
+
"bun"
|
|
268
|
+
];
|
|
269
|
+
var BUILDER_VARIANTS = [
|
|
270
|
+
...UNPLUGIN_BUILDER_VARIANTS,
|
|
271
|
+
"tsup",
|
|
272
|
+
"tsdown",
|
|
273
|
+
"unbuild"
|
|
274
|
+
];
|
|
275
|
+
|
|
276
|
+
// ../powerlines/src/types/commands.ts
|
|
277
|
+
var SUPPORTED_COMMANDS = [
|
|
278
|
+
"new",
|
|
279
|
+
"clean",
|
|
280
|
+
"prepare",
|
|
281
|
+
"lint",
|
|
282
|
+
"test",
|
|
283
|
+
"build",
|
|
284
|
+
"docs",
|
|
285
|
+
"deploy",
|
|
286
|
+
"finalize"
|
|
287
|
+
];
|
|
288
|
+
|
|
289
|
+
// ../powerlines/src/types/plugin.ts
|
|
290
|
+
var PLUGIN_NON_HOOK_FIELDS = [
|
|
291
|
+
"name",
|
|
292
|
+
"api",
|
|
293
|
+
"enforce",
|
|
294
|
+
"dedupe",
|
|
295
|
+
"applyToEnvironment"
|
|
296
|
+
];
|
|
297
|
+
var PLUGIN_HOOKS_FIELDS = [
|
|
298
|
+
...SUPPORTED_COMMANDS,
|
|
299
|
+
"config",
|
|
300
|
+
"configEnvironment",
|
|
301
|
+
"configResolved",
|
|
302
|
+
"types",
|
|
303
|
+
"buildStart",
|
|
304
|
+
"buildEnd",
|
|
305
|
+
"transform",
|
|
306
|
+
"load",
|
|
307
|
+
"resolveId",
|
|
308
|
+
"writeBundle"
|
|
309
|
+
];
|
|
310
|
+
|
|
311
|
+
// ../powerlines/src/plugin-utils/helpers.ts
|
|
312
|
+
function isPlugin(value) {
|
|
313
|
+
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]));
|
|
314
|
+
}
|
|
315
|
+
__name(isPlugin, "isPlugin");
|
|
316
|
+
function isPluginConfigObject(value) {
|
|
317
|
+
return isSetObject(value) && "plugin" in value && ((isSetString(value.plugin) || isFunction(value.plugin)) && "options" in value && isSetObject(value.options) || isPlugin(value.plugin));
|
|
318
|
+
}
|
|
319
|
+
__name(isPluginConfigObject, "isPluginConfigObject");
|
|
320
|
+
function isPluginConfigTuple(value) {
|
|
321
|
+
return Array.isArray(value) && (value.length === 1 || value.length === 2) && ((isSetString(value[0]) || isFunction(value[0])) && value.length > 1 && isSetObject(value[1]) || isPlugin(value[0]));
|
|
322
|
+
}
|
|
323
|
+
__name(isPluginConfigTuple, "isPluginConfigTuple");
|
|
324
|
+
function isPluginConfig(value) {
|
|
325
|
+
return isSetString(value) || isFunction(value) || isPlugin(value) || isPluginConfigObject(value) || isPluginConfigTuple(value) || Array.isArray(value) && value.every((item) => isPluginConfig(item));
|
|
326
|
+
}
|
|
327
|
+
__name(isPluginConfig, "isPluginConfig");
|
|
328
|
+
function isPluginHookObject(value) {
|
|
329
|
+
return isSetObject(value) && "handler" in value && isFunction(value.handler);
|
|
330
|
+
}
|
|
331
|
+
__name(isPluginHookObject, "isPluginHookObject");
|
|
332
|
+
function isPluginHookFunction(value) {
|
|
333
|
+
return isFunction(value) || isPluginHookObject(value);
|
|
334
|
+
}
|
|
335
|
+
__name(isPluginHookFunction, "isPluginHookFunction");
|
|
336
|
+
function isPluginHook(value) {
|
|
337
|
+
return isPluginHookFunction(value) || isPluginHookObject(value);
|
|
338
|
+
}
|
|
339
|
+
__name(isPluginHook, "isPluginHook");
|
|
340
|
+
function getHookHandler(pluginHook) {
|
|
341
|
+
return isFunction(pluginHook) ? pluginHook : pluginHook.handler;
|
|
342
|
+
}
|
|
343
|
+
__name(getHookHandler, "getHookHandler");
|
|
344
|
+
function isUnpluginHookKey(keys) {
|
|
345
|
+
return UNPLUGIN_BUILDER_VARIANTS.some((variant) => keys.startsWith(`${variant}:`));
|
|
346
|
+
}
|
|
347
|
+
__name(isUnpluginHookKey, "isUnpluginHookKey");
|
|
348
|
+
function isPluginHookField(keys) {
|
|
349
|
+
return !isUnpluginHookKey(keys) && PLUGIN_HOOKS_FIELDS.includes(keys);
|
|
350
|
+
}
|
|
351
|
+
__name(isPluginHookField, "isPluginHookField");
|
|
352
|
+
function isUnpluginHookField(field) {
|
|
353
|
+
return !isPluginHookField(field) && UNPLUGIN_BUILDER_VARIANTS.includes(field);
|
|
354
|
+
}
|
|
355
|
+
__name(isUnpluginHookField, "isUnpluginHookField");
|
|
356
|
+
function checkDedupe(plugin, plugins) {
|
|
357
|
+
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
358
|
+
}
|
|
359
|
+
__name(checkDedupe, "checkDedupe");
|
|
360
|
+
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
361
|
+
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin).filter(Boolean))) {
|
|
362
|
+
const handler = /* @__PURE__ */ __name((...args) => getHookHandler(pluginHook).apply(context, args), "handler");
|
|
363
|
+
if (!handler) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
hooksList.push({
|
|
367
|
+
plugin,
|
|
368
|
+
handler
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
__name(addPluginHook, "addPluginHook");
|
|
373
|
+
function findInvalidPluginConfig(config) {
|
|
374
|
+
if (isPluginConfig(config)) {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
if (Array.isArray(config)) {
|
|
378
|
+
const invalidItems = [];
|
|
379
|
+
config.forEach((item) => {
|
|
380
|
+
const invalid = findInvalidPluginConfig(item);
|
|
381
|
+
if (invalid) {
|
|
382
|
+
invalidItems.push(...invalid.map((i) => JSON.stringify(i, null, 2)));
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
return invalidItems.length > 0 ? invalidItems : null;
|
|
386
|
+
}
|
|
387
|
+
return [
|
|
388
|
+
JSON.stringify(config, null, 2)
|
|
389
|
+
];
|
|
390
|
+
}
|
|
391
|
+
__name(findInvalidPluginConfig, "findInvalidPluginConfig");
|
|
392
|
+
|
|
393
|
+
// ../powerlines/src/plugin-utils/merge.ts
|
|
394
|
+
createDefu((obj, key, value) => {
|
|
395
|
+
if (isPluginHook(obj[key]) && isPluginHook(value)) {
|
|
396
|
+
obj[key] = {
|
|
397
|
+
...obj[key],
|
|
398
|
+
...value,
|
|
399
|
+
handler: /* @__PURE__ */ __name(async (...params) => {
|
|
400
|
+
const [resultA, resultB] = await Promise.all([
|
|
401
|
+
// eslint-disable-next-line ts/no-unsafe-call
|
|
402
|
+
getHookHandler(obj[key])(...params),
|
|
403
|
+
// eslint-disable-next-line ts/no-unsafe-call
|
|
404
|
+
getHookHandler(value)(...params)
|
|
405
|
+
]);
|
|
406
|
+
return resultB && resultA ? defu7(resultA, resultB) : resultA || resultB;
|
|
407
|
+
}, "handler")
|
|
408
|
+
};
|
|
409
|
+
return true;
|
|
410
|
+
}
|
|
411
|
+
return false;
|
|
412
|
+
});
|
|
413
|
+
var mergeConfig = createDefu((obj, key, value) => {
|
|
414
|
+
if (isString(obj[key]) && isString(value)) {
|
|
415
|
+
if (isSetString(value)) {
|
|
416
|
+
obj[key] = value;
|
|
417
|
+
}
|
|
418
|
+
return true;
|
|
419
|
+
}
|
|
420
|
+
return false;
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
// ../powerlines/src/internal/helpers/hooks.ts
|
|
424
|
+
var mergeResultObjects = createDefu((obj, key, value) => {
|
|
257
425
|
if (isString(obj[key]) && isString(value)) {
|
|
258
426
|
obj[key] = `${obj[key] || ""}
|
|
259
427
|
${value || ""}`.trim();
|
|
@@ -261,6 +429,34 @@ ${value || ""}`.trim();
|
|
|
261
429
|
}
|
|
262
430
|
return false;
|
|
263
431
|
});
|
|
432
|
+
function mergeResults(currentResult, previousResults) {
|
|
433
|
+
if (isString(currentResult)) {
|
|
434
|
+
previousResults = [
|
|
435
|
+
`${isString(previousResults[0]) ? previousResults[0] || "" : ""}
|
|
436
|
+
${currentResult || ""}`.trim()
|
|
437
|
+
];
|
|
438
|
+
} else if (isObject(currentResult)) {
|
|
439
|
+
previousResults = [
|
|
440
|
+
mergeResultObjects(currentResult, previousResults[0] ?? {})
|
|
441
|
+
];
|
|
442
|
+
}
|
|
443
|
+
return previousResults;
|
|
444
|
+
}
|
|
445
|
+
__name(mergeResults, "mergeResults");
|
|
446
|
+
function mergeConfigs(currentResult, previousResults) {
|
|
447
|
+
if (isString(currentResult)) {
|
|
448
|
+
previousResults = [
|
|
449
|
+
`${isString(previousResults[0]) ? previousResults[0] || "" : ""}
|
|
450
|
+
${currentResult || ""}`.trim()
|
|
451
|
+
];
|
|
452
|
+
} else if (isObject(currentResult)) {
|
|
453
|
+
previousResults = [
|
|
454
|
+
mergeConfig(currentResult, previousResults[0] ?? {})
|
|
455
|
+
];
|
|
456
|
+
}
|
|
457
|
+
return previousResults;
|
|
458
|
+
}
|
|
459
|
+
__name(mergeConfigs, "mergeConfigs");
|
|
264
460
|
async function callHook(context, key, options, ...args) {
|
|
265
461
|
const hooks = context.selectHooks(key, options);
|
|
266
462
|
if (hooks.length > 0) {
|
|
@@ -301,19 +497,14 @@ async function callHook(context, key, options, ...args) {
|
|
|
301
497
|
...sequenceArgs
|
|
302
498
|
]));
|
|
303
499
|
if (result) {
|
|
304
|
-
if (options
|
|
500
|
+
if (options.result === "last") {
|
|
305
501
|
results = [
|
|
306
502
|
result
|
|
307
503
|
];
|
|
308
|
-
} else if (
|
|
309
|
-
results =
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
];
|
|
313
|
-
} else if (isObject(result)) {
|
|
314
|
-
results = [
|
|
315
|
-
mergeResults(result, results[0] ?? {})
|
|
316
|
-
];
|
|
504
|
+
} else if (options.result === "merge" && options.merge) {
|
|
505
|
+
results = options.merge(result, results);
|
|
506
|
+
} else {
|
|
507
|
+
results = mergeResults(result, results);
|
|
317
508
|
}
|
|
318
509
|
}
|
|
319
510
|
}
|
|
@@ -662,170 +853,6 @@ function createResolver(options) {
|
|
|
662
853
|
return baseResolver;
|
|
663
854
|
}
|
|
664
855
|
__name(createResolver, "createResolver");
|
|
665
|
-
|
|
666
|
-
// ../powerlines/src/types/build.ts
|
|
667
|
-
var UNPLUGIN_BUILDER_VARIANTS = [
|
|
668
|
-
"rollup",
|
|
669
|
-
"webpack",
|
|
670
|
-
"rspack",
|
|
671
|
-
"vite",
|
|
672
|
-
"esbuild",
|
|
673
|
-
"farm",
|
|
674
|
-
"unloader",
|
|
675
|
-
"rolldown",
|
|
676
|
-
"bun"
|
|
677
|
-
];
|
|
678
|
-
var BUILDER_VARIANTS = [
|
|
679
|
-
...UNPLUGIN_BUILDER_VARIANTS,
|
|
680
|
-
"tsup",
|
|
681
|
-
"tsdown",
|
|
682
|
-
"unbuild"
|
|
683
|
-
];
|
|
684
|
-
|
|
685
|
-
// ../powerlines/src/types/commands.ts
|
|
686
|
-
var SUPPORTED_COMMANDS = [
|
|
687
|
-
"new",
|
|
688
|
-
"clean",
|
|
689
|
-
"prepare",
|
|
690
|
-
"lint",
|
|
691
|
-
"test",
|
|
692
|
-
"build",
|
|
693
|
-
"docs",
|
|
694
|
-
"deploy",
|
|
695
|
-
"finalize"
|
|
696
|
-
];
|
|
697
|
-
|
|
698
|
-
// ../powerlines/src/types/plugin.ts
|
|
699
|
-
var PLUGIN_NON_HOOK_FIELDS = [
|
|
700
|
-
"name",
|
|
701
|
-
"api",
|
|
702
|
-
"enforce",
|
|
703
|
-
"dedupe",
|
|
704
|
-
"applyToEnvironment"
|
|
705
|
-
];
|
|
706
|
-
var PLUGIN_HOOKS_FIELDS = [
|
|
707
|
-
...SUPPORTED_COMMANDS,
|
|
708
|
-
"config",
|
|
709
|
-
"configEnvironment",
|
|
710
|
-
"configResolved",
|
|
711
|
-
"types",
|
|
712
|
-
"buildStart",
|
|
713
|
-
"buildEnd",
|
|
714
|
-
"transform",
|
|
715
|
-
"load",
|
|
716
|
-
"resolveId",
|
|
717
|
-
"writeBundle"
|
|
718
|
-
];
|
|
719
|
-
|
|
720
|
-
// ../powerlines/src/plugin-utils/helpers.ts
|
|
721
|
-
function isPlugin(value) {
|
|
722
|
-
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]));
|
|
723
|
-
}
|
|
724
|
-
__name(isPlugin, "isPlugin");
|
|
725
|
-
function isPluginConfigObject(value) {
|
|
726
|
-
return isSetObject(value) && "plugin" in value && ((isSetString(value.plugin) || isFunction(value.plugin)) && "options" in value && isSetObject(value.options) || isPlugin(value.plugin));
|
|
727
|
-
}
|
|
728
|
-
__name(isPluginConfigObject, "isPluginConfigObject");
|
|
729
|
-
function isPluginConfigTuple(value) {
|
|
730
|
-
return Array.isArray(value) && (value.length === 1 || value.length === 2) && ((isSetString(value[0]) || isFunction(value[0])) && value.length > 1 && isSetObject(value[1]) || isPlugin(value[0]));
|
|
731
|
-
}
|
|
732
|
-
__name(isPluginConfigTuple, "isPluginConfigTuple");
|
|
733
|
-
function isPluginConfig(value) {
|
|
734
|
-
return isSetString(value) || isFunction(value) || isPlugin(value) || isPluginConfigObject(value) || isPluginConfigTuple(value) || Array.isArray(value) && value.every((item) => isPluginConfig(item));
|
|
735
|
-
}
|
|
736
|
-
__name(isPluginConfig, "isPluginConfig");
|
|
737
|
-
function isPluginHookObject(value) {
|
|
738
|
-
return isSetObject(value) && "handler" in value && isFunction(value.handler);
|
|
739
|
-
}
|
|
740
|
-
__name(isPluginHookObject, "isPluginHookObject");
|
|
741
|
-
function isPluginHookFunction(value) {
|
|
742
|
-
return isFunction(value) || isPluginHookObject(value);
|
|
743
|
-
}
|
|
744
|
-
__name(isPluginHookFunction, "isPluginHookFunction");
|
|
745
|
-
function isPluginHook(value) {
|
|
746
|
-
return isPluginHookFunction(value) || isPluginHookObject(value);
|
|
747
|
-
}
|
|
748
|
-
__name(isPluginHook, "isPluginHook");
|
|
749
|
-
function getHookHandler(pluginHook) {
|
|
750
|
-
return isFunction(pluginHook) ? pluginHook : pluginHook.handler;
|
|
751
|
-
}
|
|
752
|
-
__name(getHookHandler, "getHookHandler");
|
|
753
|
-
function isUnpluginHookKey(keys) {
|
|
754
|
-
return UNPLUGIN_BUILDER_VARIANTS.some((variant) => keys.startsWith(`${variant}:`));
|
|
755
|
-
}
|
|
756
|
-
__name(isUnpluginHookKey, "isUnpluginHookKey");
|
|
757
|
-
function isPluginHookField(keys) {
|
|
758
|
-
return !isUnpluginHookKey(keys) && PLUGIN_HOOKS_FIELDS.includes(keys);
|
|
759
|
-
}
|
|
760
|
-
__name(isPluginHookField, "isPluginHookField");
|
|
761
|
-
function isUnpluginHookField(field) {
|
|
762
|
-
return !isPluginHookField(field) && UNPLUGIN_BUILDER_VARIANTS.includes(field);
|
|
763
|
-
}
|
|
764
|
-
__name(isUnpluginHookField, "isUnpluginHookField");
|
|
765
|
-
function checkDedupe(plugin, plugins) {
|
|
766
|
-
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
767
|
-
}
|
|
768
|
-
__name(checkDedupe, "checkDedupe");
|
|
769
|
-
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
770
|
-
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin).filter(Boolean))) {
|
|
771
|
-
const handler = /* @__PURE__ */ __name((...args) => getHookHandler(pluginHook).apply(context, args), "handler");
|
|
772
|
-
if (!handler) {
|
|
773
|
-
return;
|
|
774
|
-
}
|
|
775
|
-
hooksList.push({
|
|
776
|
-
plugin,
|
|
777
|
-
handler
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
__name(addPluginHook, "addPluginHook");
|
|
782
|
-
function findInvalidPluginConfig(config) {
|
|
783
|
-
if (isPluginConfig(config)) {
|
|
784
|
-
return null;
|
|
785
|
-
}
|
|
786
|
-
if (Array.isArray(config)) {
|
|
787
|
-
const invalidItems = [];
|
|
788
|
-
config.forEach((item) => {
|
|
789
|
-
const invalid = findInvalidPluginConfig(item);
|
|
790
|
-
if (invalid) {
|
|
791
|
-
invalidItems.push(...invalid.map((i) => JSON.stringify(i, null, 2)));
|
|
792
|
-
}
|
|
793
|
-
});
|
|
794
|
-
return invalidItems.length > 0 ? invalidItems : null;
|
|
795
|
-
}
|
|
796
|
-
return [
|
|
797
|
-
JSON.stringify(config, null, 2)
|
|
798
|
-
];
|
|
799
|
-
}
|
|
800
|
-
__name(findInvalidPluginConfig, "findInvalidPluginConfig");
|
|
801
|
-
createDefu((obj, key, value) => {
|
|
802
|
-
if (isPluginHook(obj[key]) && isPluginHook(value)) {
|
|
803
|
-
obj[key] = {
|
|
804
|
-
...obj[key],
|
|
805
|
-
...value,
|
|
806
|
-
handler: /* @__PURE__ */ __name(async (...params) => {
|
|
807
|
-
const [resultA, resultB] = await Promise.all([
|
|
808
|
-
// eslint-disable-next-line ts/no-unsafe-call
|
|
809
|
-
getHookHandler(obj[key])(...params),
|
|
810
|
-
// eslint-disable-next-line ts/no-unsafe-call
|
|
811
|
-
getHookHandler(value)(...params)
|
|
812
|
-
]);
|
|
813
|
-
return resultB && resultA ? defu7(resultA, resultB) : resultA || resultB;
|
|
814
|
-
}, "handler")
|
|
815
|
-
};
|
|
816
|
-
return true;
|
|
817
|
-
}
|
|
818
|
-
return false;
|
|
819
|
-
});
|
|
820
|
-
var mergeConfig = createDefu((obj, key, value) => {
|
|
821
|
-
if (isString(obj[key]) && isString(value)) {
|
|
822
|
-
if (isSetString(value)) {
|
|
823
|
-
obj[key] = value;
|
|
824
|
-
}
|
|
825
|
-
return true;
|
|
826
|
-
}
|
|
827
|
-
return false;
|
|
828
|
-
});
|
|
829
856
|
function replacePathTokens(context, path) {
|
|
830
857
|
if (!path) {
|
|
831
858
|
return path;
|
|
@@ -4367,7 +4394,8 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
4367
4394
|
const pluginConfig = await api.callHook("config", {
|
|
4368
4395
|
environment: await api.context.getEnvironment(),
|
|
4369
4396
|
sequential: true,
|
|
4370
|
-
result: "merge"
|
|
4397
|
+
result: "merge",
|
|
4398
|
+
merge: mergeConfigs
|
|
4371
4399
|
});
|
|
4372
4400
|
await api.context.withUserConfig(pluginConfig, {
|
|
4373
4401
|
isHighPriority: false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5HX5ODZL_js = require('./chunk-5HX5ODZL.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 = chunk5HX5ODZL_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 chunk5HX5ODZL_js = require('./chunk-5HX5ODZL.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 = chunk5HX5ODZL_js.withExecutor("build", 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 chunk5HX5ODZL_js = require('./chunk-5HX5ODZL.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 = chunk5HX5ODZL_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 chunk5HX5ODZL_js = require('./chunk-5HX5ODZL.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 = chunk5HX5ODZL_js.withExecutor("lint", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|
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 chunkYW6VMUR2_js = require('./chunk-YW6VMUR2.js');
|
|
5
|
+
var chunkCYCHS4NN_js = require('./chunk-CYCHS4NN.js');
|
|
6
|
+
var chunkWDEO4VNY_js = require('./chunk-WDEO4VNY.js');
|
|
7
|
+
var chunkQW363SOJ_js = require('./chunk-QW363SOJ.js');
|
|
8
|
+
var chunkXF3QSVD5_js = require('./chunk-XF3QSVD5.js');
|
|
9
|
+
require('./chunk-5HX5ODZL.js');
|
|
10
10
|
require('./chunk-NU3VTAH5.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 chunkYW6VMUR2_js.executor_default; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "prepare", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkCYCHS4NN_js.executor_default; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "build", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkWDEO4VNY_js.executor_default; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "clean", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkQW363SOJ_js.executor_default; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "docs", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkXF3QSVD5_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-2L7LQUW7.mjs';
|
|
3
|
+
export { executor_default as prepare } from './chunk-XOTD5XMS.mjs';
|
|
4
|
+
export { executor_default as build } from './chunk-YOXVEZPX.mjs';
|
|
5
|
+
export { executor_default as clean } from './chunk-4Q7KKSSP.mjs';
|
|
6
|
+
export { executor_default as docs } from './chunk-T2KY7MOS.mjs';
|
|
7
|
+
import './chunk-QT7CACOY.mjs';
|
|
8
8
|
import './chunk-AGZ4P3AS.mjs';
|
|
9
9
|
import './chunk-O6YSETKJ.mjs';
|
package/dist/index.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkWJP3FWAH_js = require('./chunk-WJP3FWAH.js');
|
|
4
4
|
require('./chunk-XO62WWX4.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
5
|
+
var chunkYW6VMUR2_js = require('./chunk-YW6VMUR2.js');
|
|
6
|
+
var chunkCYCHS4NN_js = require('./chunk-CYCHS4NN.js');
|
|
7
|
+
var chunkWDEO4VNY_js = require('./chunk-WDEO4VNY.js');
|
|
8
|
+
var chunkQW363SOJ_js = require('./chunk-QW363SOJ.js');
|
|
9
|
+
var chunkXF3QSVD5_js = require('./chunk-XF3QSVD5.js');
|
|
10
10
|
require('./chunk-N2YKXZ5R.js');
|
|
11
11
|
var chunkWUJKJGEW_js = require('./chunk-WUJKJGEW.js');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-5HX5ODZL.js');
|
|
13
13
|
require('./chunk-TWOXCXFE.js');
|
|
14
14
|
require('./chunk-NU3VTAH5.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 chunkYW6VMUR2_js.executor_default; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "prepare", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkCYCHS4NN_js.executor_default; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "build", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkWDEO4VNY_js.executor_default; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "clean", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkQW363SOJ_js.executor_default; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "docs", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkXF3QSVD5_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-ELBUYWVF.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-2L7LQUW7.mjs';
|
|
4
|
+
export { executor_default as prepare } from './chunk-XOTD5XMS.mjs';
|
|
5
|
+
export { executor_default as build } from './chunk-YOXVEZPX.mjs';
|
|
6
|
+
export { executor_default as clean } from './chunk-4Q7KKSSP.mjs';
|
|
7
|
+
export { executor_default as docs } from './chunk-T2KY7MOS.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-QT7CACOY.mjs';
|
|
11
11
|
import './chunk-ZYOL33SX.mjs';
|
|
12
12
|
import './chunk-AGZ4P3AS.mjs';
|
|
13
13
|
import './chunk-IC47MFKB.mjs';
|