@powerlines/nx 0.13.123 → 0.13.124

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.
Files changed (107) hide show
  1. package/dist/src/_virtual/_rolldown/runtime.js +8 -0
  2. package/dist/src/base/base-executor.d.mts +10 -6
  3. package/dist/src/base/base-executor.d.mts.map +1 -1
  4. package/dist/src/base/base-executor.d.ts +8 -6
  5. package/dist/src/base/base-executor.d.ts.map +1 -1
  6. package/dist/src/base/base-executor.js +33 -12
  7. package/dist/src/base/base-executor.mjs +33 -12
  8. package/dist/src/base/base-executor.mjs.map +1 -1
  9. package/dist/src/base/base-executor.schema.d.js +8 -0
  10. package/dist/src/base/base-executor.schema.d.mts +10 -0
  11. package/dist/src/base/base-executor.schema.d.mts.map +1 -1
  12. package/dist/src/base/base-executor.schema.d.ts +8 -0
  13. package/dist/src/base/base-executor.schema.d.ts.map +1 -1
  14. package/dist/src/base/base-executor.schema.json +8 -0
  15. package/dist/src/base/base-executor.untyped.d.mts +2 -0
  16. package/dist/src/base/base-executor.untyped.js +16 -0
  17. package/dist/src/base/base-executor.untyped.mjs +16 -0
  18. package/dist/src/base/base-executor.untyped.mjs.map +1 -1
  19. package/dist/src/base/index.d.mts +4 -2
  20. package/dist/src/base/index.d.ts +2 -2
  21. package/dist/src/base/index.js +8 -0
  22. package/dist/src/base/index.mjs +8 -0
  23. package/dist/src/{base-executor-PMYAhCeu.mjs → base-executor-0AtMZrSx.mjs} +26 -13
  24. package/dist/src/base-executor-0AtMZrSx.mjs.map +1 -0
  25. package/dist/src/{base-executor-dUv0-dn8.js → base-executor-BIhn6u5E.js} +25 -12
  26. package/dist/src/{base-executor.untyped-DBsxePrL.mjs → base-executor.untyped-B9Vk-kJC.mjs} +9 -1
  27. package/dist/src/base-executor.untyped-B9Vk-kJC.mjs.map +1 -0
  28. package/dist/src/{base-executor.untyped-Dglj9LU1.js → base-executor.untyped-DZhWL1zT.js} +8 -0
  29. package/dist/src/executors/build/executor.d.mts +8 -0
  30. package/dist/src/executors/build/executor.d.mts.map +1 -1
  31. package/dist/src/executors/build/executor.d.ts +8 -0
  32. package/dist/src/executors/build/executor.d.ts.map +1 -1
  33. package/dist/src/executors/build/executor.js +2 -2
  34. package/dist/src/executors/build/executor.mjs +2 -2
  35. package/dist/src/executors/build/executor.mjs.map +1 -1
  36. package/dist/src/executors/build/schema.d.ts +9 -0
  37. package/dist/src/executors/build/schema.json +8 -0
  38. package/dist/src/executors/clean/executor.d.mts +8 -0
  39. package/dist/src/executors/clean/executor.d.mts.map +1 -1
  40. package/dist/src/executors/clean/executor.d.ts +8 -0
  41. package/dist/src/executors/clean/executor.d.ts.map +1 -1
  42. package/dist/src/executors/clean/executor.js +2 -2
  43. package/dist/src/executors/clean/executor.mjs +2 -2
  44. package/dist/src/executors/clean/executor.mjs.map +1 -1
  45. package/dist/src/executors/clean/schema.d.ts +9 -0
  46. package/dist/src/executors/clean/schema.json +8 -0
  47. package/dist/src/executors/clean/untyped.js +1 -1
  48. package/dist/src/executors/clean/untyped.mjs +1 -1
  49. package/dist/src/executors/docs/executor.d.mts +8 -0
  50. package/dist/src/executors/docs/executor.d.mts.map +1 -1
  51. package/dist/src/executors/docs/executor.d.ts +8 -0
  52. package/dist/src/executors/docs/executor.d.ts.map +1 -1
  53. package/dist/src/executors/docs/executor.js +2 -2
  54. package/dist/src/executors/docs/executor.mjs +2 -2
  55. package/dist/src/executors/docs/executor.mjs.map +1 -1
  56. package/dist/src/executors/docs/schema.d.ts +9 -0
  57. package/dist/src/executors/docs/schema.json +8 -0
  58. package/dist/src/executors/lint/executor.d.mts +8 -0
  59. package/dist/src/executors/lint/executor.d.mts.map +1 -1
  60. package/dist/src/executors/lint/executor.d.ts +8 -0
  61. package/dist/src/executors/lint/executor.d.ts.map +1 -1
  62. package/dist/src/executors/lint/executor.js +2 -2
  63. package/dist/src/executors/lint/executor.mjs +2 -2
  64. package/dist/src/executors/lint/executor.mjs.map +1 -1
  65. package/dist/src/executors/lint/schema.d.ts +9 -0
  66. package/dist/src/executors/lint/schema.json +8 -0
  67. package/dist/src/executors/prepare/executor.d.mts +8 -0
  68. package/dist/src/executors/prepare/executor.d.mts.map +1 -1
  69. package/dist/src/executors/prepare/executor.d.ts +8 -0
  70. package/dist/src/executors/prepare/executor.d.ts.map +1 -1
  71. package/dist/src/executors/prepare/executor.js +2 -2
  72. package/dist/src/executors/prepare/executor.mjs +2 -2
  73. package/dist/src/executors/prepare/executor.mjs.map +1 -1
  74. package/dist/src/executors/prepare/schema.d.ts +9 -0
  75. package/dist/src/executors/prepare/schema.json +8 -0
  76. package/dist/src/executors/prepare/untyped.js +1 -1
  77. package/dist/src/executors/prepare/untyped.mjs +1 -1
  78. package/dist/src/helpers/constants.d.mts +2 -0
  79. package/dist/src/helpers/constants.d.mts.map +1 -1
  80. package/dist/src/helpers/constants.js +8 -0
  81. package/dist/src/helpers/constants.mjs +8 -0
  82. package/dist/src/helpers/constants.mjs.map +1 -1
  83. package/dist/src/helpers/index.d.mts +2 -0
  84. package/dist/src/helpers/index.js +8 -0
  85. package/dist/src/helpers/index.mjs +8 -0
  86. package/dist/src/helpers/plugin-utilities.d.mts +2 -0
  87. package/dist/src/helpers/plugin-utilities.d.mts.map +1 -1
  88. package/dist/src/helpers/plugin-utilities.js +15 -1
  89. package/dist/src/helpers/plugin-utilities.mjs +15 -1
  90. package/dist/src/helpers/plugin-utilities.mjs.map +1 -1
  91. package/dist/src/index.d.mts +4 -2
  92. package/dist/src/index.d.ts +2 -2
  93. package/dist/src/index.js +8 -0
  94. package/dist/src/index.mjs +8 -0
  95. package/dist/src/plugin/index.js +6 -0
  96. package/dist/src/plugin/index.mjs +6 -0
  97. package/dist/src/plugin/index.mjs.map +1 -1
  98. package/dist/src/types/index.d.mts +2 -0
  99. package/dist/src/types/index.js +8 -0
  100. package/dist/src/types/index.mjs +8 -0
  101. package/dist/src/types/plugin.d.mts +2 -0
  102. package/dist/src/types/plugin.d.mts.map +1 -1
  103. package/dist/src/types/plugin.js +8 -0
  104. package/dist/src/types/plugin.mjs +8 -0
  105. package/package.json +15 -14
  106. package/dist/src/base-executor-PMYAhCeu.mjs.map +0 -1
  107. package/dist/src/base-executor.untyped-DBsxePrL.mjs.map +0 -1
@@ -1,3 +1,11 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
1
9
  //#region \0rolldown/runtime.js
2
10
  var __create = Object.create;
3
11
  var __defProp = Object.defineProperty;
@@ -1,18 +1,21 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
1
3
  import { BaseExecutorSchema } from "./base-executor.schema.mjs";
2
4
  import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
3
5
  import { StormWorkspaceConfig } from "@storm-software/config/types";
4
6
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
- import { InlineConfig, PowerlinesCommand } from "powerlines";
6
- import { PowerlinesEngine } from "powerlines/engine";
7
+ import { DeepPartial } from "@stryke/types/base";
8
+ import { ExecutionOptions, InlineConfig } from "powerlines";
7
9
 
8
10
  //#region src/base/base-executor.d.ts
9
- type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
11
+ type PowerlinesExecutorContext<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
10
12
  projectName: string;
11
- command: TCommand;
13
+ command: string;
12
14
  options: TExecutorSchema;
13
15
  inlineConfig: InlineConfig;
14
16
  workspaceConfig: StormWorkspaceConfig;
15
17
  };
18
+ type PowerlinesExecutorApi = (inlineConfig: InlineConfig) => Promise<void>;
16
19
  /**
17
20
  * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
18
21
  *
@@ -21,9 +24,10 @@ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCo
21
24
  *
22
25
  * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
23
26
  * @param executorFn - The function that will be executed when the command is run.
27
+ * @param defaultOptions - Default options to be merged with the execution options.
24
28
  * @returns A Promise that resolves to the result of the executor function.
25
29
  */
26
- declare function withExecutor<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: TCommand, executorFn: (context: PowerlinesExecutorContext<TCommand, TExecutorSchema>, api: PowerlinesEngine) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
30
+ declare function withExecutor<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: string, executorFn: (context: PowerlinesExecutorContext<TExecutorSchema>, api: PowerlinesExecutorApi) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined, defaultOptions?: DeepPartial<ExecutionOptions>): PromiseExecutor<TExecutorSchema>;
27
31
  //#endregion
28
- export { PowerlinesExecutorContext, withExecutor };
32
+ export { PowerlinesExecutorApi, PowerlinesExecutorContext, withExecutor };
29
33
  //# sourceMappingURL=base-executor.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.d.mts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;;KAuCY,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,gBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
1
+ {"version":3,"file":"base-executor.d.mts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;;;;KA0CY,yBAAA,yBACc,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA;EACA,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;AAAA,KAGP,qBAAA,IACV,YAAA,EAAc,YAAA,KACX,OAAO;;;AAZZ;;;;;;;;;iBAyBgB,YAAA,yBACU,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,UACA,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,eAAA,GACnC,GAAA,EAAK,qBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,qBAGJ,cAAA,GAAgB,WAAA,CAAY,gBAAA,IAC3B,eAAA,CAAgB,eAAA"}
@@ -2,17 +2,18 @@ import { BaseExecutorSchema } from "./base-executor.schema.js";
2
2
  import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
3
3
  import { StormWorkspaceConfig } from "@storm-software/config/types";
4
4
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
- import { InlineConfig, PowerlinesCommand } from "powerlines";
6
- import { PowerlinesEngine } from "powerlines/engine";
5
+ import { DeepPartial } from "@stryke/types/base";
6
+ import { ExecutionOptions, InlineConfig } from "powerlines";
7
7
 
8
8
  //#region src/base/base-executor.d.ts
9
- type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
9
+ type PowerlinesExecutorContext<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
10
10
  projectName: string;
11
- command: TCommand;
11
+ command: string;
12
12
  options: TExecutorSchema;
13
13
  inlineConfig: InlineConfig;
14
14
  workspaceConfig: StormWorkspaceConfig;
15
15
  };
16
+ type PowerlinesExecutorApi = (inlineConfig: InlineConfig) => Promise<void>;
16
17
  /**
17
18
  * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
18
19
  *
@@ -21,9 +22,10 @@ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCo
21
22
  *
22
23
  * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
23
24
  * @param executorFn - The function that will be executed when the command is run.
25
+ * @param defaultOptions - Default options to be merged with the execution options.
24
26
  * @returns A Promise that resolves to the result of the executor function.
25
27
  */
26
- declare function withExecutor<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: TCommand, executorFn: (context: PowerlinesExecutorContext<TCommand, TExecutorSchema>, api: PowerlinesEngine) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
28
+ declare function withExecutor<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: string, executorFn: (context: PowerlinesExecutorContext<TExecutorSchema>, api: PowerlinesExecutorApi) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined, defaultOptions?: DeepPartial<ExecutionOptions>): PromiseExecutor<TExecutorSchema>;
27
29
  //#endregion
28
- export { PowerlinesExecutorContext, withExecutor };
30
+ export { PowerlinesExecutorApi, PowerlinesExecutorContext, withExecutor };
29
31
  //# sourceMappingURL=base-executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.d.ts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;;KAuCY,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,gBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
1
+ {"version":3,"file":"base-executor.d.ts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;;KA0CY,yBAAA,yBACc,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA;EACA,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;AAAA,KAGP,qBAAA,IACV,YAAA,EAAc,YAAA,KACX,OAAO;;;;;;;;;;;;iBAaI,YAAA,yBACU,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,UACA,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,eAAA,GACnC,GAAA,EAAK,qBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,qBAGJ,cAAA,GAAgB,WAAA,CAAY,gBAAA,IAC3B,eAAA,CAAgB,eAAA"}
@@ -1,8 +1,18 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
1
9
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
10
  const require_runtime = require('../_virtual/_rolldown/runtime.js');
3
11
  let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
4
12
  let _storm_software_workspace_tools_base_base_executor = require("@storm-software/workspace-tools/base/base-executor");
5
13
  let _stryke_helpers_omit = require("@stryke/helpers/omit");
14
+ let _stryke_path_join = require("@stryke/path/join");
15
+ let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
6
16
  let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
7
17
  let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
8
18
  let _stryke_type_checks_is_set_array = require("@stryke/type-checks/is-set-array");
@@ -20,23 +30,19 @@ let jiti = require("jiti");
20
30
  *
21
31
  * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
22
32
  * @param executorFn - The function that will be executed when the command is run.
33
+ * @param defaultOptions - Default options to be merged with the execution options.
23
34
  * @returns A Promise that resolves to the result of the executor function.
24
35
  */
25
- function withExecutor(command, executorFn) {
26
- return (0, _storm_software_workspace_tools_base_base_executor.withRunExecutor)(`Powerlines ${command} command executor`, async (options, context, workspaceConfig) => {
27
- if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
28
- if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
36
+ function withExecutor(command, executorFn, defaultOptions = {}) {
37
+ return (0, _storm_software_workspace_tools_base_base_executor.withRunExecutor)(`Powerlines - ${(0, _stryke_string_format_title_case.titleCase)(command)} executor`, async (options, context, workspaceConfig) => {
38
+ if (!context.projectName) throw new Error(`The Powerlines - ${(0, _stryke_string_format_title_case.titleCase)(command)} executor requires \`projectName\` on the context object.`);
39
+ if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error(`The Powerlines - ${(0, _stryke_string_format_title_case.titleCase)(command)} executor requires \`projectsConfigurations\` on the context object.`);
29
40
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
30
41
  const jiti$1 = (0, jiti.createJiti)(context.root, {
31
42
  cache: false,
32
- interopDefault: true,
33
43
  tsconfigPaths: true
34
44
  });
35
- const { createPowerlines } = await jiti$1.import(jiti$1.esmResolve("powerlines/engine"));
36
- const api = await createPowerlines({
37
- cwd: context.root,
38
- root: projectConfig.root
39
- });
45
+ const api = await jiti$1.import(jiti$1.esmResolve("powerlines/api")).then((mod) => mod.default);
40
46
  try {
41
47
  return await Promise.resolve(executorFn((0, defu.default)({
42
48
  projectName: context.projectName,
@@ -48,6 +54,7 @@ function withExecutor(command, executorFn) {
48
54
  command,
49
55
  root: projectConfig.root,
50
56
  configFile: options.configFile || options.config,
57
+ configIndex: options.configIndex,
51
58
  projectType: projectConfig.projectType,
52
59
  mode: options.mode,
53
60
  output: {
@@ -81,9 +88,23 @@ function withExecutor(command, executorFn) {
81
88
  "define",
82
89
  "assets"
83
90
  ]))
84
- }, context), api));
91
+ }, context), async (inlineConfig) => api({
92
+ options: (0, defu.default)(defaultOptions, {
93
+ executionId: `${context.projectName}-${command}-${options.configIndex}`,
94
+ cwd: context.root,
95
+ root: projectConfig.root,
96
+ configFile: options.configFile || options.config || (0, _stryke_path_join.joinPaths)(projectConfig.root, "powerlines.config.ts"),
97
+ configIndex: options.configIndex,
98
+ framework: {
99
+ name: "powerlines",
100
+ orgId: "storm-software"
101
+ }
102
+ }),
103
+ command,
104
+ inlineConfig
105
+ })));
85
106
  } catch (error) {
86
- (0, _storm_software_config_tools_logger.writeError)(`An error occurred while executing the Powerlines ${command} command executor: ${(0, _stryke_type_checks_is_error.isError)(error) ? `${error.message}
107
+ (0, _storm_software_config_tools_logger.writeError)(`An error occurred while executing the Powerlines - ${(0, _stryke_string_format_title_case.titleCase)(command)} executor: ${(0, _stryke_type_checks_is_error.isError)(error) ? `${error.message}
87
108
 
88
109
  ${error.stack}` : "Unknown error"}`);
89
110
  return { success: false };
@@ -1,6 +1,16 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
1
9
  import { writeError } from "@storm-software/config-tools/logger";
2
10
  import { withRunExecutor } from "@storm-software/workspace-tools/base/base-executor";
3
11
  import { omit } from "@stryke/helpers/omit";
12
+ import { joinPaths } from "@stryke/path/join";
13
+ import { titleCase } from "@stryke/string-format/title-case";
4
14
  import { isError } from "@stryke/type-checks/is-error";
5
15
  import { isSet } from "@stryke/type-checks/is-set";
6
16
  import { isSetArray } from "@stryke/type-checks/is-set-array";
@@ -17,23 +27,19 @@ import { createJiti } from "jiti";
17
27
  *
18
28
  * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
19
29
  * @param executorFn - The function that will be executed when the command is run.
30
+ * @param defaultOptions - Default options to be merged with the execution options.
20
31
  * @returns A Promise that resolves to the result of the executor function.
21
32
  */
22
- function withExecutor(command, executorFn) {
23
- return withRunExecutor(`Powerlines ${command} command executor`, async (options, context, workspaceConfig) => {
24
- if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
25
- if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
33
+ function withExecutor(command, executorFn, defaultOptions = {}) {
34
+ return withRunExecutor(`Powerlines - ${titleCase(command)} executor`, async (options, context, workspaceConfig) => {
35
+ if (!context.projectName) throw new Error(`The Powerlines - ${titleCase(command)} executor requires \`projectName\` on the context object.`);
36
+ if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error(`The Powerlines - ${titleCase(command)} executor requires \`projectsConfigurations\` on the context object.`);
26
37
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
27
38
  const jiti = createJiti(context.root, {
28
39
  cache: false,
29
- interopDefault: true,
30
40
  tsconfigPaths: true
31
41
  });
32
- const { createPowerlines } = await jiti.import(jiti.esmResolve("powerlines/engine"));
33
- const api = await createPowerlines({
34
- cwd: context.root,
35
- root: projectConfig.root
36
- });
42
+ const api = await jiti.import(jiti.esmResolve("powerlines/api")).then((mod) => mod.default);
37
43
  try {
38
44
  return await Promise.resolve(executorFn(defu({
39
45
  projectName: context.projectName,
@@ -45,6 +51,7 @@ function withExecutor(command, executorFn) {
45
51
  command,
46
52
  root: projectConfig.root,
47
53
  configFile: options.configFile || options.config,
54
+ configIndex: options.configIndex,
48
55
  projectType: projectConfig.projectType,
49
56
  mode: options.mode,
50
57
  output: {
@@ -78,9 +85,23 @@ function withExecutor(command, executorFn) {
78
85
  "define",
79
86
  "assets"
80
87
  ]))
81
- }, context), api));
88
+ }, context), async (inlineConfig) => api({
89
+ options: defu(defaultOptions, {
90
+ executionId: `${context.projectName}-${command}-${options.configIndex}`,
91
+ cwd: context.root,
92
+ root: projectConfig.root,
93
+ configFile: options.configFile || options.config || joinPaths(projectConfig.root, "powerlines.config.ts"),
94
+ configIndex: options.configIndex,
95
+ framework: {
96
+ name: "powerlines",
97
+ orgId: "storm-software"
98
+ }
99
+ }),
100
+ command,
101
+ inlineConfig
102
+ })));
82
103
  } catch (error) {
83
- writeError(`An error occurred while executing the Powerlines ${command} command executor: ${isError(error) ? `${error.message}
104
+ writeError(`An error occurred while executing the Powerlines - ${titleCase(command)} executor: ${isError(error) ? `${error.message}
84
105
 
85
106
  ${error.stack}` : "Unknown error"}`);
86
107
  return { success: false };
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.mjs","names":[],"sources":["../../../src/base/base-executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InlineConfig,\n Mode,\n OutputConfig,\n PowerlinesCommand\n} from \"powerlines\";\nimport type { PowerlinesEngine } from \"powerlines/engine\";\nimport { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type PowerlinesExecutorContext<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n> = ExecutorContext & {\n projectName: string;\n command: TCommand;\n options: TExecutorSchema;\n inlineConfig: InlineConfig;\n workspaceConfig: StormWorkspaceConfig;\n};\n\n/**\n * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.\n *\n * @param command - The command that the executor will handle (e.g., \"new\", \"prepare\", \"build\", etc.).\n * @param executorFn - The function that will be executed when the command is run.\n * @returns A Promise that resolves to the result of the executor function.\n */\nexport function withExecutor<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n>(\n command: TCommand,\n executorFn: (\n context: PowerlinesExecutorContext<TCommand, TExecutorSchema>,\n api: PowerlinesEngine\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Powerlines ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, {\n cache: false,\n interopDefault: true,\n tsconfigPaths: true\n });\n const { createPowerlines } = await jiti.import<{\n createPowerlines: typeof import(\"powerlines/engine\").createPowerlines;\n }>(jiti.esmResolve(\"powerlines/engine\"));\n\n const api = await createPowerlines({\n cwd: context.root,\n root: projectConfig.root\n });\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n command,\n inlineConfig: defu(\n {\n name: context.projectName,\n command,\n root: projectConfig.root,\n configFile: options.configFile || options.config,\n projectType: projectConfig.projectType,\n mode: options.mode as Mode,\n output: {\n path: options.outputPath,\n copy:\n options.copyPath === false\n ? false\n : {\n path: options.copyPath,\n assets: options.assets\n },\n minify: options.minify,\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve:\n isSetArray(options.external) ||\n isSetArray(options.noExternal) ||\n isSet(options.skipNodeModulesBundle)\n ? {\n external: isSetArray(options.external)\n ? options.external\n : undefined,\n noExternal: isSetArray(options.noExternal)\n ? options.noExternal\n : undefined,\n skipNodeModulesBundle: isSet(\n options.skipNodeModulesBundle\n )\n ? options.skipNodeModulesBundle\n : undefined\n }\n : undefined,\n define: isSetObject(options.define)\n ? options.define\n : undefined,\n assets: isSetObject(options.assets)\n ? options.assets\n : undefined\n },\n omit(options, [\n \"config\",\n \"configFile\",\n \"outputPath\",\n \"copyPath\",\n \"sourceMap\",\n \"minify\",\n \"format\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"mode\",\n \"define\",\n \"assets\"\n ])\n ) as InlineConfig\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Powerlines ${\n command\n } command executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options.copyPath ??= \"dist/{projectRoot}\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4DA,SAAgB,aAId,SACA,YAQkC;CAClC,OAAO,gBACL,cAAc,QAAQ,oBACtB,OACE,SACA,SACA,oBACmD;EACnD,IAAI,CAAC,QAAQ,aACX,MAAM,IAAI,MACR,4DACF;EAGF,IACE,CAAC,QAAQ,eACT,CAAC,QAAQ,wBAAwB,YACjC,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,gBACjD,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,cAAc,MAE/D,MAAM,IAAI,MACR,uEACF;EAGF,MAAM,gBACJ,QAAQ,uBAAuB,SAAS,QAAQ;EAElD,MAAM,OAAO,WAAW,QAAQ,MAAM;GACpC,OAAO;GACP,gBAAgB;GAChB,eAAe;EACjB,CAAC;EACD,MAAM,EAAE,qBAAqB,MAAM,KAAK,OAErC,KAAK,WAAW,mBAAmB,CAAC;EAEvC,MAAM,MAAM,MAAM,iBAAiB;GACjC,KAAK,QAAQ;GACb,MAAM,cAAc;EACtB,CAAC;EAED,IAAI;GACF,OAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA;IACA,cAAc,KACZ;KACE,MAAM,QAAQ;KACd;KACA,MAAM,cAAc;KACpB,YAAY,QAAQ,cAAc,QAAQ;KAC1C,aAAa,cAAc;KAC3B,MAAM,QAAQ;KACd,QAAQ;MACN,MAAM,QAAQ;MACd,MACE,QAAQ,aAAa,QACjB,QACA;OACE,MAAM,QAAQ;OACd,QAAQ,QAAQ;MAClB;MACN,QAAQ,QAAQ;MAChB,WAAW,QAAQ;KACrB;KACA,SACE,WAAW,QAAQ,QAAQ,KAC3B,WAAW,QAAQ,UAAU,KAC7B,MAAM,QAAQ,qBAAqB,IAC/B;MACE,UAAU,WAAW,QAAQ,QAAQ,IACjC,QAAQ,WACR;MACJ,YAAY,WAAW,QAAQ,UAAU,IACrC,QAAQ,aACR;MACJ,uBAAuB,MACrB,QAAQ,qBACV,IACI,QAAQ,wBACR;KACN,IACA;KACN,QAAQ,YAAY,QAAQ,MAAM,IAC9B,QAAQ,SACR;KACJ,QAAQ,YAAY,QAAQ,MAAM,IAC9B,QAAQ,SACR;IACN,GACA,KAAK,SAAS;KACZ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACF,CAAC,CACH;GACF,GACA,OACF,GACA,GACF,CACF;EACF,SAAS,OAAO;GACd,WACE,oDACE,QACD,qBACC,QAAQ,KAAK,IACT,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,iBAER;GAEA,OAAO,EAAE,SAAS,MAAM;EAC1B;CACF,GACA;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;GAC1D,QAAQ,aAAa;GAErB,OAAO;EACT,EACF;CACF,CACF;AACF"}
1
+ {"version":3,"file":"base-executor.mjs","names":[],"sources":["../../../src/base/base-executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { DeepPartial } from \"@stryke/types/base\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n ExecutionApiParams,\n ExecutionOptions,\n InlineConfig,\n Mode,\n OutputConfig\n} from \"powerlines\";\nimport { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type PowerlinesExecutorContext<\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n> = ExecutorContext & {\n projectName: string;\n command: string;\n options: TExecutorSchema;\n inlineConfig: InlineConfig;\n workspaceConfig: StormWorkspaceConfig;\n};\n\nexport type PowerlinesExecutorApi = (\n inlineConfig: InlineConfig\n) => Promise<void>;\n\n/**\n * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.\n *\n * @param command - The command that the executor will handle (e.g., \"new\", \"prepare\", \"build\", etc.).\n * @param executorFn - The function that will be executed when the command is run.\n * @param defaultOptions - Default options to be merged with the execution options.\n * @returns A Promise that resolves to the result of the executor function.\n */\nexport function withExecutor<\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n>(\n command: string,\n executorFn: (\n context: PowerlinesExecutorContext<TExecutorSchema>,\n api: PowerlinesExecutorApi\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined,\n defaultOptions: DeepPartial<ExecutionOptions> = {}\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Powerlines - ${titleCase(command)} executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n `The Powerlines - ${titleCase(command)} executor requires \\`projectName\\` on the context object.`\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n `The Powerlines - ${titleCase(command)} executor requires \\`projectsConfigurations\\` on the context object.`\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, {\n cache: false,\n tsconfigPaths: true\n });\n const api = await jiti\n .import<{\n default: (params: ExecutionApiParams) => Promise<void>;\n }>(jiti.esmResolve(\"powerlines/api\"))\n .then(mod => mod.default);\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n command,\n inlineConfig: defu(\n {\n name: context.projectName,\n command,\n root: projectConfig.root,\n configFile: options.configFile || options.config,\n configIndex: options.configIndex,\n projectType: projectConfig.projectType,\n mode: options.mode as Mode,\n output: {\n path: options.outputPath,\n copy:\n options.copyPath === false\n ? false\n : {\n path: options.copyPath,\n assets: options.assets\n },\n minify: options.minify,\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve:\n isSetArray(options.external) ||\n isSetArray(options.noExternal) ||\n isSet(options.skipNodeModulesBundle)\n ? {\n external: isSetArray(options.external)\n ? options.external\n : undefined,\n noExternal: isSetArray(options.noExternal)\n ? options.noExternal\n : undefined,\n skipNodeModulesBundle: isSet(\n options.skipNodeModulesBundle\n )\n ? options.skipNodeModulesBundle\n : undefined\n }\n : undefined,\n define: isSetObject(options.define)\n ? options.define\n : undefined,\n assets: isSetObject(options.assets)\n ? options.assets\n : undefined\n },\n omit(options, [\n \"config\",\n \"configFile\",\n \"outputPath\",\n \"copyPath\",\n \"sourceMap\",\n \"minify\",\n \"format\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"mode\",\n \"define\",\n \"assets\"\n ])\n ) as InlineConfig\n },\n context\n ),\n async (inlineConfig: InlineConfig) =>\n api({\n // eslint-disable-next-line ts/no-unnecessary-type-assertion\n options: defu(defaultOptions, {\n executionId: `${context.projectName}-${command}-${options.configIndex}`,\n cwd: context.root,\n root: projectConfig.root,\n configFile:\n options.configFile ||\n options.config ||\n joinPaths(projectConfig.root, \"powerlines.config.ts\"),\n configIndex: options.configIndex,\n framework: {\n name: \"powerlines\",\n orgId: \"storm-software\"\n }\n }) as ExecutionOptions,\n command,\n inlineConfig\n })\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Powerlines - ${titleCase(\n command\n )} executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options.copyPath ??= \"dist/{projectRoot}\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,SAAgB,aAGd,SACA,YAQA,iBAAgD,CAAC,GACf;CAClC,OAAO,gBACL,gBAAgB,UAAU,OAAO,EAAE,YACnC,OACE,SACA,SACA,oBACmD;EACnD,IAAI,CAAC,QAAQ,aACX,MAAM,IAAI,MACR,oBAAoB,UAAU,OAAO,EAAE,0DACzC;EAGF,IACE,CAAC,QAAQ,eACT,CAAC,QAAQ,wBAAwB,YACjC,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,gBACjD,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,cAAc,MAE/D,MAAM,IAAI,MACR,oBAAoB,UAAU,OAAO,EAAE,qEACzC;EAGF,MAAM,gBACJ,QAAQ,uBAAuB,SAAS,QAAQ;EAElD,MAAM,OAAO,WAAW,QAAQ,MAAM;GACpC,OAAO;GACP,eAAe;EACjB,CAAC;EACD,MAAM,MAAM,MAAM,KACf,OAEE,KAAK,WAAW,gBAAgB,CAAC,EACnC,MAAK,QAAO,IAAI,OAAO;EAE1B,IAAI;GACF,OAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA;IACA,cAAc,KACZ;KACE,MAAM,QAAQ;KACd;KACA,MAAM,cAAc;KACpB,YAAY,QAAQ,cAAc,QAAQ;KAC1C,aAAa,QAAQ;KACrB,aAAa,cAAc;KAC3B,MAAM,QAAQ;KACd,QAAQ;MACN,MAAM,QAAQ;MACd,MACE,QAAQ,aAAa,QACjB,QACA;OACE,MAAM,QAAQ;OACd,QAAQ,QAAQ;MAClB;MACN,QAAQ,QAAQ;MAChB,WAAW,QAAQ;KACrB;KACA,SACE,WAAW,QAAQ,QAAQ,KAC3B,WAAW,QAAQ,UAAU,KAC7B,MAAM,QAAQ,qBAAqB,IAC/B;MACE,UAAU,WAAW,QAAQ,QAAQ,IACjC,QAAQ,WACR;MACJ,YAAY,WAAW,QAAQ,UAAU,IACrC,QAAQ,aACR;MACJ,uBAAuB,MACrB,QAAQ,qBACV,IACI,QAAQ,wBACR;KACN,IACA;KACN,QAAQ,YAAY,QAAQ,MAAM,IAC9B,QAAQ,SACR;KACJ,QAAQ,YAAY,QAAQ,MAAM,IAC9B,QAAQ,SACR;IACN,GACA,KAAK,SAAS;KACZ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACF,CAAC,CACH;GACF,GACA,OACF,GACA,OAAO,iBACL,IAAI;IAEF,SAAS,KAAK,gBAAgB;KAC5B,aAAa,GAAG,QAAQ,YAAY,GAAG,QAAQ,GAAG,QAAQ;KAC1D,KAAK,QAAQ;KACb,MAAM,cAAc;KACpB,YACE,QAAQ,cACR,QAAQ,UACR,UAAU,cAAc,MAAM,sBAAsB;KACtD,aAAa,QAAQ;KACrB,WAAW;MACT,MAAM;MACN,OAAO;KACT;IACF,CAAC;IACD;IACA;GACF,CAAC,CACL,CACF;EACF,SAAS,OAAO;GACd,WACE,sDAAsD,UACpD,OACF,EAAE,aACA,QAAQ,KAAK,IACT,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,iBAER;GAEA,OAAO,EAAE,SAAS,MAAM;EAC1B;CACF,GACA;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;GAC1D,QAAQ,aAAa;GAErB,OAAO;EACT,EACF;CACF,CACF;AACF"}
@@ -0,0 +1,8 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
@@ -1,3 +1,5 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
1
3
  //#region src/base/base-executor.schema.d.ts
2
4
  // Generated by @storm-software/untyped
3
5
  // Do not edit this file directly
@@ -20,6 +22,14 @@ interface BaseExecutorSchema {
20
22
  * @format path
21
23
  */
22
24
  configFile?: string;
25
+ /**
26
+ * Powerlines Configuration Index
27
+ *
28
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
29
+ *
30
+ * @default 0
31
+ */
32
+ configIndex?: number;
23
33
  /**
24
34
  * Input Entry File(s)
25
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.schema.d.mts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../../../src/base/base-executor.schema.d.ts"],"mappings":";;;UAIiBA,kBAAAA;;;;;;;;;EAShBG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAASV,KAAAA;;;;;;;;;EAUTW,QAAAA;;;;;;;EAQAC,QAAAA,GAAWZ,KAAAA;;;;;;;EAQXa,UAAAA,GAAab,KAAAA;;;;;;;EAQbc,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAShB,MAAAA;;;;;;;EAQTiB,MAAAA,GAASlB,KAAAA;IAAQI,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBtB,MAAAA;AAAAA"}
1
+ {"version":3,"file":"base-executor.schema.d.mts","names":["BaseExecutorSchema","Array","Record","config","configFile","configIndex","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../../../src/base/base-executor.schema.d.ts"],"mappings":";;;;;UAIiBA,kBAAAA;;;;;AAAjB;;;;EASCG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;EASAC,WAAAA;;;;;;;;;EAUAC,KAAAA,GAAQL,KAAAA;;;;;;;;;EAURM,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAASX,KAAAA;;;;;;;;;EAUTY,QAAAA;;;;;;;EAQAC,QAAAA,GAAWb,KAAAA;;;;;;;EAQXc,UAAAA,GAAad,KAAAA;;;;;;;EAQbe,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASjB,MAAAA;;;;;;;EAQTkB,MAAAA,GAASnB,KAAAA;IAAQK,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBvB,MAAAA;AAAAA"}
@@ -20,6 +20,14 @@ interface BaseExecutorSchema {
20
20
  * @format path
21
21
  */
22
22
  configFile?: string;
23
+ /**
24
+ * Powerlines Configuration Index
25
+ *
26
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
27
+ *
28
+ * @default 0
29
+ */
30
+ configIndex?: number;
23
31
  /**
24
32
  * Input Entry File(s)
25
33
  *
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.schema.d.ts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../../../src/base/base-executor.schema.d.ts"],"mappings":";;;UAIiBA,kBAAAA;;;;;;;;;EAShBG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAASV,KAAAA;;;;;;;;;EAUTW,QAAAA;;;;;;;EAQAC,QAAAA,GAAWZ,KAAAA;;;;;;;EAQXa,UAAAA,GAAab,KAAAA;;;;;;;EAQbc,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAShB,MAAAA;;;;;;;EAQTiB,MAAAA,GAASlB,KAAAA;IAAQI,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBtB,MAAAA;AAAAA"}
1
+ {"version":3,"file":"base-executor.schema.d.ts","names":["BaseExecutorSchema","Array","Record","config","configFile","configIndex","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../../../src/base/base-executor.schema.d.ts"],"mappings":";;;UAIiBA,kBAAAA;;;;;;;;;EAShBG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;EASAC,WAAAA;;;;;;;;;EAUAC,KAAAA,GAAQL,KAAAA;EAqIe;AAAA;;;;;;;EA3HvBM,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAASX,KAAAA;;;;;;;;;EAUTY,QAAAA;;;;;;;EAQAC,QAAAA,GAAWb,KAAAA;;;;;;;EAQXc,UAAAA,GAAad,KAAAA;;;;;;;EAQbe,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASjB,MAAAA;;;;;;;EAQTkB,MAAAA,GAASnB,KAAAA;IAAQK,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBvB,MAAAA;AAAAA"}
@@ -18,6 +18,13 @@
18
18
  "description": "The path to the Powerlines configuration file. Alias for `config`.",
19
19
  "id": "#configFile"
20
20
  },
21
+ "configIndex": {
22
+ "title": "Powerlines Configuration Index",
23
+ "type": "number",
24
+ "description": "The index in the Powerlines configuration file to use (if an array of configurations are provided).",
25
+ "id": "#configIndex",
26
+ "default": 0
27
+ },
21
28
  "input": {
22
29
  "title": "Input Entry File(s)",
23
30
  "format": "path",
@@ -182,6 +189,7 @@
182
189
  },
183
190
  "type": "object",
184
191
  "default": {
192
+ "configIndex": 0,
185
193
  "copyPath": {},
186
194
  "format": [
187
195
  "cjs",
@@ -1,3 +1,5 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
1
3
  //#region src/base/base-executor.untyped.d.ts
2
4
  declare const _default: import("untyped").SchemaDefinition;
3
5
  //#endregion
@@ -1,3 +1,11 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
1
9
  let untyped = require("untyped");
2
10
 
3
11
  //#region src/base/base-executor.untyped.ts
@@ -20,6 +28,14 @@ var base_executor_untyped_default = (0, untyped.defineUntypedSchema)({
20
28
  format: "path",
21
29
  description: "The path to the Powerlines configuration file. Alias for `config`."
22
30
  } },
31
+ configIndex: {
32
+ $schema: {
33
+ title: "Powerlines Configuration Index",
34
+ type: "number",
35
+ description: "The index in the Powerlines configuration file to use (if an array of configurations are provided)."
36
+ },
37
+ $default: 0
38
+ },
23
39
  input: { $schema: {
24
40
  title: "Input Entry File(s)",
25
41
  format: "path",
@@ -1,3 +1,11 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
1
9
  import { defineUntypedSchema } from "untyped";
2
10
 
3
11
  //#region src/base/base-executor.untyped.ts
@@ -20,6 +28,14 @@ var base_executor_untyped_default = defineUntypedSchema({
20
28
  format: "path",
21
29
  description: "The path to the Powerlines configuration file. Alias for `config`."
22
30
  } },
31
+ configIndex: {
32
+ $schema: {
33
+ title: "Powerlines Configuration Index",
34
+ type: "number",
35
+ description: "The index in the Powerlines configuration file to use (if an array of configurations are provided)."
36
+ },
37
+ $default: 0
38
+ },
23
39
  input: { $schema: {
24
40
  title: "Input Entry File(s)",
25
41
  format: "path",
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.untyped.mjs","names":[],"sources":["../../../src/base/base-executor.untyped.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { defineUntypedSchema } from \"untyped\";\n\nexport default defineUntypedSchema({\n $schema: {\n id: \"BaseExecutorSchema\",\n title: \"Base Executor\",\n description:\n \"A shared/base schema type definition for Powerlines executors\",\n required: []\n },\n config: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `configFile`.\"\n }\n },\n configFile: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `config`.\"\n }\n },\n input: {\n $schema: {\n title: \"Input Entry File(s)\",\n format: \"path\",\n type: \"array\",\n description: \"The entry file(s) that serve as the input for the project\",\n items: { type: \"string\" }\n }\n },\n tsconfig: {\n $schema: {\n title: \"TSConfig Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the tsconfig file\"\n }\n },\n outputPath: {\n $schema: {\n title: \"Output Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the output directory for the build artifacts\"\n }\n },\n copyPath: {\n $schema: {\n title: \"Copy Path\",\n description: \"A directory path to copy the build artifacts into\",\n oneOf: [\n { type: \"string\", format: \"path\" },\n { type: \"boolean\", enum: [false] }\n ]\n }\n },\n sourceMap: {\n $schema: {\n title: \"Sourcemap\",\n type: \"boolean\",\n description: \"Generate a sourcemap\"\n }\n },\n minify: {\n $schema: {\n title: \"Minify\",\n type: \"boolean\",\n description: \"Minify the output\"\n }\n },\n format: {\n $schema: {\n title: \"Format\",\n type: \"array\",\n description: \"The format to build\",\n items: {\n type: \"string\",\n enum: [\"cjs\", \"esm\", \"iife\"]\n }\n },\n $resolve: (val: string[] = [\"cjs\", \"esm\"]) =>\n val.filter(format => [\"cjs\", \"esm\", \"iife\"].includes(format))\n },\n platform: {\n $schema: {\n title: \"Platform\",\n type: \"string\",\n description: \"The platform to build\",\n enum: [\"neutral\", \"node\", \"browser\"]\n }\n },\n external: {\n $schema: {\n title: \"External\",\n type: \"array\",\n description: \"The external dependencies\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n noExternal: {\n $schema: {\n title: \"No External\",\n type: \"array\",\n description: \"The dependencies that should not be treated as external\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n skipNodeModulesBundle: {\n $schema: {\n title: \"Skip Node Modules Bundle\",\n type: \"boolean\",\n description:\n \"Skip bundling node_modules during the build process (if required)\"\n }\n },\n mode: {\n $schema: {\n title: \"Mode\",\n type: \"string\",\n description: \"The build mode\",\n enum: [\"development\", \"test\", \"production\"]\n }\n },\n logLevel: {\n $schema: {\n title: \"Log Level\",\n type: \"string\",\n description: \"The log level to use for the build process\",\n enum: [\n \"fatal\",\n \"error\",\n \"warn\",\n \"success\",\n \"info\",\n \"debug\",\n \"trace\",\n \"silent\"\n ]\n }\n },\n define: {\n $schema: {\n title: \"Define\",\n type: \"object\",\n tsType: \"Record<string, string>\",\n description: \"The `define` values\"\n },\n $resolve: (val: Record<string, string> = {}) => val,\n $default: {}\n },\n assets: {\n $schema: {\n title: \"Assets\",\n type: \"any\",\n tsType:\n \"Array<{ input?: string; output?: string; glob: string; ignore?: string[]; dot?: boolean; }>\",\n description: \"The `assets` values\"\n }\n },\n additionalArgs: {\n $schema: {\n title: \"Additional Arguments\",\n type: \"object\",\n tsType: \"Record<string, string>\",\n description:\n \"The additional arguments provided during execution of the command\"\n },\n $resolve: (val: Record<string, string> = {}) => val,\n $default: {}\n }\n});\n"],"mappings":";;;AAoBA,oCAAe,oBAAoB;CACjC,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aACE;EACF,UAAU,CAAC;CACb;CACA,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aACE;CACJ,EACF;CACA,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aACE;CACJ,EACF;CACA,OAAO,EACL,SAAS;EACP,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa;EACb,OAAO,EAAE,MAAM,SAAS;CAC1B,EACF;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;CACf,EACF;CACA,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;CACf,EACF;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,aAAa;EACb,OAAO,CACL;GAAE,MAAM;GAAU,QAAQ;EAAO,GACjC;GAAE,MAAM;GAAW,MAAM,CAAC,KAAK;EAAE,CACnC;CACF,EACF;CACA,WAAW,EACT,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;CACf,EACF;CACA,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;CACf,EACF;CACA,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,MAAM;KAAC;KAAO;KAAO;IAAM;GAC7B;EACF;EACA,WAAW,MAAgB,CAAC,OAAO,KAAK,MACtC,IAAI,QAAO,WAAU;GAAC;GAAO;GAAO;EAAM,EAAE,SAAS,MAAM,CAAC;CAChE;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GAAC;GAAW;GAAQ;EAAS;CACrC,EACF;CACA,UAAU;EACR,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA,WAAW,MAAgB,CAAC,MAAO,CAAC,EAAe,OAAO,GAAG;CAC/D;CACA,YAAY;EACV,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA,WAAW,MAAgB,CAAC,MAAO,CAAC,EAAe,OAAO,GAAG;CAC/D;CACA,uBAAuB,EACrB,SAAS;EACP,OAAO;EACP,MAAM;EACN,aACE;CACJ,EACF;CACA,MAAM,EACJ,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GAAC;GAAe;GAAQ;EAAY;CAC5C,EACF;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF,EACF;CACA,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aAAa;EACf;EACA,WAAW,MAA8B,CAAC,MAAM;EAChD,UAAU,CAAC;CACb;CACA,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,QACE;EACF,aAAa;CACf,EACF;CACA,gBAAgB;EACd,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aACE;EACJ;EACA,WAAW,MAA8B,CAAC,MAAM;EAChD,UAAU,CAAC;CACb;AACF,CAAC"}
1
+ {"version":3,"file":"base-executor.untyped.mjs","names":[],"sources":["../../../src/base/base-executor.untyped.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { defineUntypedSchema } from \"untyped\";\n\nexport default defineUntypedSchema({\n $schema: {\n id: \"BaseExecutorSchema\",\n title: \"Base Executor\",\n description:\n \"A shared/base schema type definition for Powerlines executors\",\n required: []\n },\n config: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `configFile`.\"\n }\n },\n configFile: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `config`.\"\n }\n },\n configIndex: {\n $schema: {\n title: \"Powerlines Configuration Index\",\n type: \"number\",\n description:\n \"The index in the Powerlines configuration file to use (if an array of configurations are provided).\"\n },\n $default: 0\n },\n input: {\n $schema: {\n title: \"Input Entry File(s)\",\n format: \"path\",\n type: \"array\",\n description: \"The entry file(s) that serve as the input for the project\",\n items: { type: \"string\" }\n }\n },\n tsconfig: {\n $schema: {\n title: \"TSConfig Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the tsconfig file\"\n }\n },\n outputPath: {\n $schema: {\n title: \"Output Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the output directory for the build artifacts\"\n }\n },\n copyPath: {\n $schema: {\n title: \"Copy Path\",\n description: \"A directory path to copy the build artifacts into\",\n oneOf: [\n { type: \"string\", format: \"path\" },\n { type: \"boolean\", enum: [false] }\n ]\n }\n },\n sourceMap: {\n $schema: {\n title: \"Sourcemap\",\n type: \"boolean\",\n description: \"Generate a sourcemap\"\n }\n },\n minify: {\n $schema: {\n title: \"Minify\",\n type: \"boolean\",\n description: \"Minify the output\"\n }\n },\n format: {\n $schema: {\n title: \"Format\",\n type: \"array\",\n description: \"The format to build\",\n items: {\n type: \"string\",\n enum: [\"cjs\", \"esm\", \"iife\"]\n }\n },\n $resolve: (val: string[] = [\"cjs\", \"esm\"]) =>\n val.filter(format => [\"cjs\", \"esm\", \"iife\"].includes(format))\n },\n platform: {\n $schema: {\n title: \"Platform\",\n type: \"string\",\n description: \"The platform to build\",\n enum: [\"neutral\", \"node\", \"browser\"]\n }\n },\n external: {\n $schema: {\n title: \"External\",\n type: \"array\",\n description: \"The external dependencies\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n noExternal: {\n $schema: {\n title: \"No External\",\n type: \"array\",\n description: \"The dependencies that should not be treated as external\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n skipNodeModulesBundle: {\n $schema: {\n title: \"Skip Node Modules Bundle\",\n type: \"boolean\",\n description:\n \"Skip bundling node_modules during the build process (if required)\"\n }\n },\n mode: {\n $schema: {\n title: \"Mode\",\n type: \"string\",\n description: \"The build mode\",\n enum: [\"development\", \"test\", \"production\"]\n }\n },\n logLevel: {\n $schema: {\n title: \"Log Level\",\n type: \"string\",\n description: \"The log level to use for the build process\",\n enum: [\n \"fatal\",\n \"error\",\n \"warn\",\n \"success\",\n \"info\",\n \"debug\",\n \"trace\",\n \"silent\"\n ]\n }\n },\n define: {\n $schema: {\n title: \"Define\",\n type: \"object\",\n tsType: \"Record<string, string>\",\n description: \"The `define` values\"\n },\n $resolve: (val: Record<string, string> = {}) => val,\n $default: {}\n },\n assets: {\n $schema: {\n title: \"Assets\",\n type: \"any\",\n tsType:\n \"Array<{ input?: string; output?: string; glob: string; ignore?: string[]; dot?: boolean; }>\",\n description: \"The `assets` values\"\n }\n },\n additionalArgs: {\n $schema: {\n title: \"Additional Arguments\",\n type: \"object\",\n tsType: \"Record<string, string>\",\n description:\n \"The additional arguments provided during execution of the command\"\n },\n $resolve: (val: Record<string, string> = {}) => val,\n $default: {}\n }\n});\n"],"mappings":";;;;;;;;;;;AAoBA,oCAAe,oBAAoB;CACjC,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aACE;EACF,UAAU,CAAC;CACb;CACA,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aACE;CACJ,EACF;CACA,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aACE;CACJ,EACF;CACA,aAAa;EACX,SAAS;GACP,OAAO;GACP,MAAM;GACN,aACE;EACJ;EACA,UAAU;CACZ;CACA,OAAO,EACL,SAAS;EACP,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa;EACb,OAAO,EAAE,MAAM,SAAS;CAC1B,EACF;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;CACf,EACF;CACA,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;CACf,EACF;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,aAAa;EACb,OAAO,CACL;GAAE,MAAM;GAAU,QAAQ;EAAO,GACjC;GAAE,MAAM;GAAW,MAAM,CAAC,KAAK;EAAE,CACnC;CACF,EACF;CACA,WAAW,EACT,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;CACf,EACF;CACA,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;CACf,EACF;CACA,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,MAAM;KAAC;KAAO;KAAO;IAAM;GAC7B;EACF;EACA,WAAW,MAAgB,CAAC,OAAO,KAAK,MACtC,IAAI,QAAO,WAAU;GAAC;GAAO;GAAO;EAAM,EAAE,SAAS,MAAM,CAAC;CAChE;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GAAC;GAAW;GAAQ;EAAS;CACrC,EACF;CACA,UAAU;EACR,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA,WAAW,MAAgB,CAAC,MAAO,CAAC,EAAe,OAAO,GAAG;CAC/D;CACA,YAAY;EACV,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA,WAAW,MAAgB,CAAC,MAAO,CAAC,EAAe,OAAO,GAAG;CAC/D;CACA,uBAAuB,EACrB,SAAS;EACP,OAAO;EACP,MAAM;EACN,aACE;CACJ,EACF;CACA,MAAM,EACJ,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GAAC;GAAe;GAAQ;EAAY;CAC5C,EACF;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF,EACF;CACA,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aAAa;EACf;EACA,WAAW,MAA8B,CAAC,MAAM;EAChD,UAAU,CAAC;CACb;CACA,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,QACE;EACF,aAAa;CACf,EACF;CACA,gBAAgB;EACd,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aACE;EACJ;EACA,WAAW,MAA8B,CAAC,MAAM;EAChD,UAAU,CAAC;CACb;AACF,CAAC"}
@@ -1,2 +1,4 @@
1
- import { PowerlinesExecutorContext, withExecutor } from "./base-executor.mjs";
2
- export { PowerlinesExecutorContext, withExecutor };
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { PowerlinesExecutorApi, PowerlinesExecutorContext, withExecutor } from "./base-executor.mjs";
4
+ export { PowerlinesExecutorApi, PowerlinesExecutorContext, withExecutor };
@@ -1,2 +1,2 @@
1
- import { PowerlinesExecutorContext, withExecutor } from "./base-executor.js";
2
- export { PowerlinesExecutorContext, withExecutor };
1
+ import { PowerlinesExecutorApi, PowerlinesExecutorContext, withExecutor } from "./base-executor.js";
2
+ export { PowerlinesExecutorApi, PowerlinesExecutorContext, withExecutor };
@@ -1,3 +1,11 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
1
9
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
10
  const require_base_base_executor = require('./base-executor.js');
3
11
  require('./base-executor.untyped.js');
@@ -1,3 +1,11 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
1
9
  import { withExecutor } from "./base-executor.mjs";
2
10
  import "./base-executor.untyped.mjs";
3
11