@powerlines/nx 0.13.126 → 0.13.128

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 (79) hide show
  1. package/dist/src/_virtual/_rolldown/runtime.js +14 -0
  2. package/dist/src/_virtual/_rolldown/runtime.mjs +28 -0
  3. package/dist/src/base/base-executor.d.mts +1 -1
  4. package/dist/src/base/base-executor.d.mts.map +1 -1
  5. package/dist/src/base/base-executor.d.ts.map +1 -1
  6. package/dist/src/base/base-executor.js +2 -2
  7. package/dist/src/base/base-executor.mjs +5 -2
  8. package/dist/src/base/base-executor.mjs.map +1 -1
  9. package/dist/src/base/base-executor.schema.d.mts.map +1 -1
  10. package/dist/src/base/base-executor.schema.d.ts.map +1 -1
  11. package/dist/src/base/base-executor.test.d.mts +2 -0
  12. package/dist/src/base/base-executor.test.d.ts +1 -0
  13. package/dist/src/base/base-executor.test.js +25 -0
  14. package/dist/src/base/base-executor.test.mjs +33 -0
  15. package/dist/src/base/base-executor.test.mjs.map +1 -0
  16. package/dist/src/base/base-executor.untyped.js +10 -1
  17. package/dist/src/base/base-executor.untyped.mjs +168 -162
  18. package/dist/src/base/base-executor.untyped.mjs.map +1 -1
  19. package/dist/src/base/base-executor.untyped.test.d.mts +2 -0
  20. package/dist/src/base/base-executor.untyped.test.d.ts +1 -0
  21. package/dist/src/base/base-executor.untyped.test.js +23 -0
  22. package/dist/src/base/base-executor.untyped.test.mjs +31 -0
  23. package/dist/src/base/base-executor.untyped.test.mjs.map +1 -0
  24. package/dist/src/base/index.mjs +9 -3
  25. package/dist/src/base/index.mjs.map +1 -0
  26. package/dist/src/{base-executor-CHEFLBQ-.js → base-executor-BzcSvyaJ.js} +2 -2
  27. package/dist/src/{base-executor-B1RffQX6.mjs → base-executor-nribES6I.mjs} +2 -2
  28. package/dist/src/base-executor-nribES6I.mjs.map +1 -0
  29. package/dist/src/executors/build/executor.d.mts.map +1 -1
  30. package/dist/src/executors/build/executor.d.ts.map +1 -1
  31. package/dist/src/executors/build/executor.js +1 -1
  32. package/dist/src/executors/build/executor.mjs +1 -1
  33. package/dist/src/executors/clean/executor.d.mts.map +1 -1
  34. package/dist/src/executors/clean/executor.d.ts.map +1 -1
  35. package/dist/src/executors/clean/executor.js +1 -1
  36. package/dist/src/executors/clean/executor.mjs +1 -1
  37. package/dist/src/executors/docs/executor.d.mts.map +1 -1
  38. package/dist/src/executors/docs/executor.d.ts.map +1 -1
  39. package/dist/src/executors/docs/executor.js +1 -1
  40. package/dist/src/executors/docs/executor.mjs +1 -1
  41. package/dist/src/executors/lint/executor.d.mts.map +1 -1
  42. package/dist/src/executors/lint/executor.d.ts.map +1 -1
  43. package/dist/src/executors/lint/executor.js +1 -1
  44. package/dist/src/executors/lint/executor.mjs +1 -1
  45. package/dist/src/executors/prepare/executor.d.mts.map +1 -1
  46. package/dist/src/executors/prepare/executor.d.ts.map +1 -1
  47. package/dist/src/executors/prepare/executor.js +1 -1
  48. package/dist/src/executors/prepare/executor.mjs +1 -1
  49. package/dist/src/helpers/constants.mjs +33 -30
  50. package/dist/src/helpers/constants.mjs.map +1 -1
  51. package/dist/src/helpers/constants.test.d.mts +2 -0
  52. package/dist/src/helpers/constants.test.d.ts +1 -0
  53. package/dist/src/helpers/constants.test.js +35 -0
  54. package/dist/src/helpers/constants.test.mjs +43 -0
  55. package/dist/src/helpers/constants.test.mjs.map +1 -0
  56. package/dist/src/helpers/index.mjs +9 -3
  57. package/dist/src/helpers/index.mjs.map +1 -0
  58. package/dist/src/helpers/plugin-utilities.d.mts.map +1 -1
  59. package/dist/src/helpers/plugin-utilities.d.ts.map +1 -1
  60. package/dist/src/helpers/plugin-utilities.mjs +7 -2
  61. package/dist/src/helpers/plugin-utilities.mjs.map +1 -1
  62. package/dist/src/helpers/plugin-utilities.test.d.mts +2 -0
  63. package/dist/src/helpers/plugin-utilities.test.d.ts +1 -0
  64. package/dist/src/helpers/plugin-utilities.test.js +50 -0
  65. package/dist/src/helpers/plugin-utilities.test.mjs +59 -0
  66. package/dist/src/helpers/plugin-utilities.test.mjs.map +1 -0
  67. package/dist/src/index.mjs +4 -3
  68. package/dist/src/types/index.mjs +8 -1
  69. package/dist/src/types/index.mjs.map +1 -0
  70. package/dist/src/types/plugin.js +13 -0
  71. package/dist/src/types/plugin.mjs +10 -1
  72. package/dist/src/types/plugin.mjs.map +1 -0
  73. package/dist/src/types/plugin.test.d.mts +2 -0
  74. package/dist/src/types/plugin.test.d.ts +1 -0
  75. package/dist/src/types/plugin.test.js +23 -0
  76. package/dist/src/types/plugin.test.mjs +31 -0
  77. package/dist/src/types/plugin.test.mjs.map +1 -0
  78. package/package.json +18 -18
  79. package/dist/src/base-executor-B1RffQX6.mjs.map +0 -1
@@ -13,6 +13,19 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
13
  var __getOwnPropNames = Object.getOwnPropertyNames;
14
14
  var __getProtoOf = Object.getPrototypeOf;
15
15
  var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __exportAll = (all, no_symbols) => {
17
+ let target = {};
18
+ for (var name in all) {
19
+ __defProp(target, name, {
20
+ get: all[name],
21
+ enumerable: true
22
+ });
23
+ }
24
+ if (!no_symbols) {
25
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
26
+ }
27
+ return target;
28
+ };
16
29
  var __copyProps = (to, from, except, desc) => {
17
30
  if (from && typeof from === "object" || typeof from === "function") {
18
31
  for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
@@ -34,4 +47,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
47
 
35
48
  //#endregion
36
49
 
50
+ exports.__exportAll = __exportAll;
37
51
  exports.__toESM = __toESM;
@@ -0,0 +1,28 @@
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
+
9
+ //#region \0rolldown/runtime.js
10
+ var __defProp = Object.defineProperty;
11
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
12
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
13
+ var __exportAll = (all, no_symbols) => {
14
+ let target = {};
15
+ for (var name in all) {
16
+ __defProp(target, name, {
17
+ get: all[name],
18
+ enumerable: true
19
+ });
20
+ }
21
+ if (!no_symbols) {
22
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
23
+ }
24
+ return target;
25
+ };
26
+
27
+ //#endregion
28
+ export { __commonJSMin, __esmMin, __exportAll };
@@ -1,11 +1,11 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { BaseExecutorSchema } from "./base-executor.schema.mjs";
4
- import { ExecutionOptions, FrameworkOptions, InlineConfig } from "powerlines";
5
4
  import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
6
5
  import { StormWorkspaceConfig } from "@storm-software/config/types";
7
6
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
8
7
  import { DeepPartial } from "@stryke/types/base";
8
+ import { ExecutionOptions, FrameworkOptions, InlineConfig } from "powerlines";
9
9
 
10
10
  //#region src/base/base-executor.d.ts
11
11
  type PowerlinesExecutorContext<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.d.mts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;;;;KA6CY,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;AAAA,UAEK,mBAAA;;AAdjB;;;;EAoBE,UAAA;EAlBE;;;;;;EA0BF,cAAA,GAAiB,WAAA,CAAY,gBAAA;EA3BL;;;;;;;;;;;;AAMa;AAGvC;EAkCE,SAAA,GAAY,gBAAA;AAAA;;;;;;AAhCF;AAEZ;;;;;iBA4CgB,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,OAAA,GAAS,mBAAA,GACR,eAAA,CAAgB,eAAA"}
1
+ {"version":3,"file":"base-executor.d.mts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;;;;KA6CY,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;AAAA,UAEK,mBAAA;;AAdjB;;;;EAoBE,UAAA;EAlBE;;;;;;EA0BF,cAAA,GAAiB,WAAA,CAAY,gBAAA;EA3BL;;;;;;;;;;;;AAMa;AAGvC;EAkCE,SAAA,GAAY,gBAAA;AAAA;;;;;;AAhCF;AAEZ;;;;;iBA4CgB,YAAA,yBACU,kBAAA,GAAqB,kBAAA,EAE7C,OAAA,UACA,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,eAAA,GACnC,GAAA,EAAK,qBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,qBAGJ,OAAA,GAAS,mBAAA,GACR,eAAA,CAAgB,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.d.ts","names":[],"sources":["../../../src/base/base-executor.ts"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,CAAQ,kBAAA,uBACR,kBAAA,qBAGJ,OAAA,GAAS,mBAAA,GACR,eAAA,CAAgB,eAAA"}
@@ -21,7 +21,7 @@ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-obje
21
21
  let defu = require("defu");
22
22
  defu = require_runtime.__toESM(defu);
23
23
  let jiti = require("jiti");
24
- let powerlines = require("powerlines");
24
+ let powerlines_plugin_utils = require("powerlines/plugin-utils");
25
25
 
26
26
  //#region src/base/base-executor.ts
27
27
  /**
@@ -95,7 +95,7 @@ function withExecutor(command, executorFn, options = {}) {
95
95
  ]))
96
96
  }, context), async (inlineConfig) => api({
97
97
  options: (0, defu.default)(defaultOptions, {
98
- executionId: (0, powerlines.formatExecutionId)(inlineConfig.name || context.projectName || projectConfig.root, command, options.configIndex ?? 0),
98
+ executionId: (0, powerlines_plugin_utils.formatExecutionId)(inlineConfig.name || context.projectName || projectConfig.root, command, options.configIndex ?? 0),
99
99
  cwd: context.root,
100
100
  root: projectConfig.root,
101
101
  configFile: options.configFile || options.config || (0, _stryke_path_join.joinPaths)(projectConfig.root, `${(0, _stryke_string_format_kebab_case.kebabCase)(framework.name)}.config.ts`),
@@ -6,6 +6,7 @@ import __tsdown_shims_url from 'node:url'
6
6
  const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
+ import { __esmMin } from "../_virtual/_rolldown/runtime.mjs";
9
10
  import { writeError } from "@storm-software/config-tools/logger";
10
11
  import { withRunExecutor } from "@storm-software/workspace-tools/base/base-executor";
11
12
  import { omit } from "@stryke/helpers/omit";
@@ -18,7 +19,7 @@ import { isSetArray } from "@stryke/type-checks/is-set-array";
18
19
  import { isSetObject } from "@stryke/type-checks/is-set-object";
19
20
  import defu from "defu";
20
21
  import { createJiti } from "jiti";
21
- import { formatExecutionId } from "powerlines";
22
+ import { formatExecutionId } from "powerlines/plugin-utils";
22
23
 
23
24
  //#region src/base/base-executor.ts
24
25
  /**
@@ -116,7 +117,9 @@ ${error.stack}` : "Unknown error"}`);
116
117
  } }
117
118
  });
118
119
  }
120
+ var init_base_executor = __esmMin((() => {}));
119
121
 
120
122
  //#endregion
121
- export { withExecutor };
123
+ init_base_executor();
124
+ export { init_base_executor, withExecutor };
122
125
  //# sourceMappingURL=base-executor.mjs.map
@@ -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 { joinPaths } from \"@stryke/path/join\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\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 FrameworkOptions,\n InlineConfig,\n Mode,\n OutputConfig\n} from \"powerlines\";\nimport { formatExecutionId } 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\nexport interface WithExecutorOptions {\n /**\n * The import path for the executor API module, which is used to dynamically import the API function that will be called during execution. This value should be a string representing the module path, and it defaults to \"powerlines/api\" if not provided. The specified module should export a default function that matches the expected signature for the executor API, which will be invoked with the execution parameters when the executor is run.\n *\n * @defaultValue \"powerlines/api\"\n */\n importPath?: string;\n\n /**\n * Default options to be merged with the execution options, which can be used to provide default values for certain execution parameters or to override specific options for all executions of the executor. This value should be an object that matches the shape of the `ExecutionOptions` type, and it will be merged with the options provided during execution to create the final set of options that will be passed to the executor API function.\n *\n * @remarks\n * This can be useful for setting default values for options that are commonly used across multiple executions, or for providing a consistent set of options for all executions of the executor without requiring the caller to specify them each time.\n */\n defaultOptions?: DeepPartial<ExecutionOptions>;\n\n /**\n * Details about the framework being used in the current execution, which can be used by plugins and other parts of the system to customize behavior based on the framework.\n *\n * @remarks\n * This should only be used by framework plugins to ensure the correct framework name is applied\n *\n * @defaultValue\n * ```ts\n * {\n * name: \"powerlines\",\n * orgId: \"storm-software\"\n * }\n * ```\n */\n framework?: FrameworkOptions;\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 * @param options - Additional options for configuring the executor, such as the import path for the API module and default 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 options: WithExecutorOptions = {}\n): PromiseExecutor<TExecutorSchema> {\n const {\n importPath = \"powerlines/api\",\n defaultOptions = {},\n framework = {} as FrameworkOptions\n } = options;\n\n framework.name ??= \"powerlines\";\n framework.orgId ??= \"storm-software\";\n\n return withRunExecutor(\n `${titleCase(framework.name)} - ${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 ${titleCase(framework.name)} - ${titleCase(\n command\n )} 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 ${titleCase(framework.name)} - ${titleCase(\n command\n )} 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(importPath))\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 options: defu(defaultOptions, {\n executionId: formatExecutionId(\n inlineConfig.name ||\n context.projectName ||\n projectConfig.root,\n command,\n options.configIndex ?? 0\n ),\n cwd: context.root,\n root: projectConfig.root,\n configFile:\n options.configFile ||\n options.config ||\n joinPaths(\n projectConfig.root,\n `${kebabCase(framework.name)}.config.ts`\n ),\n configIndex: options.configIndex,\n framework\n }) as ExecutionOptions,\n command,\n inlineConfig\n })\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the ${titleCase(\n framework.name\n )} - ${titleCase(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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA,SAAgB,aAGd,SACA,YAQA,U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B,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;IACF,SAAS,KAAK,gBAAgB;KAC5B,aAAa,kBACX,aAAa,QACX,QAAQ,eACR,cAAc,MAChB,SACA,QAAQ,eAAe,CACzB;KACA,KAAK,QAAQ;KACb,MAAM,cAAc;KACpB,YACE,QAAQ,cACR,QAAQ,UACR,UACE,cAAc,MACd,GAAG,UAAU,UAAU,IAAI,EAAE,WAC/B;KACF,aAAa,QAAQ;KACrB;IACF,CAAC;IACD;IACA;GACF,CAAC,CACL,CACF;EACF,SAAS,OAAO;GACd,WACE,yCAAyC,UACvC,UAAU,IACZ,EAAE,KAAK,UAAU,OAAO,EAAE,aACxB,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 type { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport type { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport type { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\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 FrameworkOptions,\n InlineConfig,\n Mode,\n OutputConfig\n} from \"powerlines\";\nimport { formatExecutionId } from \"powerlines/plugin-utils\";\nimport type { 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\nexport interface WithExecutorOptions {\n /**\n * The import path for the executor API module, which is used to dynamically import the API function that will be called during execution. This value should be a string representing the module path, and it defaults to \"powerlines/api\" if not provided. The specified module should export a default function that matches the expected signature for the executor API, which will be invoked with the execution parameters when the executor is run.\n *\n * @defaultValue \"powerlines/api\"\n */\n importPath?: string;\n\n /**\n * Default options to be merged with the execution options, which can be used to provide default values for certain execution parameters or to override specific options for all executions of the executor. This value should be an object that matches the shape of the `ExecutionOptions` type, and it will be merged with the options provided during execution to create the final set of options that will be passed to the executor API function.\n *\n * @remarks\n * This can be useful for setting default values for options that are commonly used across multiple executions, or for providing a consistent set of options for all executions of the executor without requiring the caller to specify them each time.\n */\n defaultOptions?: DeepPartial<ExecutionOptions>;\n\n /**\n * Details about the framework being used in the current execution, which can be used by plugins and other parts of the system to customize behavior based on the framework.\n *\n * @remarks\n * This should only be used by framework plugins to ensure the correct framework name is applied\n *\n * @defaultValue\n * ```ts\n * {\n * name: \"powerlines\",\n * orgId: \"storm-software\"\n * }\n * ```\n */\n framework?: FrameworkOptions;\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 * @param options - Additional options for configuring the executor, such as the import path for the API module and default 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 options: WithExecutorOptions = {}\n): PromiseExecutor<TExecutorSchema> {\n const {\n importPath = \"powerlines/api\",\n defaultOptions = {},\n framework = {} as FrameworkOptions\n } = options;\n\n framework.name ??= \"powerlines\";\n framework.orgId ??= \"storm-software\";\n\n return withRunExecutor(\n `${titleCase(framework.name)} - ${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 ${titleCase(framework.name)} - ${titleCase(\n command\n )} 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 ${titleCase(framework.name)} - ${titleCase(\n command\n )} 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(importPath))\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 options: defu(defaultOptions, {\n executionId: formatExecutionId(\n inlineConfig.name ||\n context.projectName ||\n projectConfig.root,\n command,\n options.configIndex ?? 0\n ),\n cwd: context.root,\n root: projectConfig.root,\n configFile:\n options.configFile ||\n options.config ||\n joinPaths(\n projectConfig.root,\n `${kebabCase(framework.name)}.config.ts`\n ),\n configIndex: options.configIndex,\n framework\n }) as ExecutionOptions,\n command,\n inlineConfig\n })\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the ${titleCase(\n framework.name\n )} - ${titleCase(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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuGA,SAAgB,aAGd,SACA,YAQA,UAA+B,CAAC,GACE;CAClC,MAAM,EACJ,aAAa,kBACb,iBAAiB,CAAC,GAClB,YAAY,CAAC,MACX;CAEJ,UAAU,SAAS;CACnB,UAAU,UAAU;CAEpB,OAAO,gBACL,GAAG,UAAU,UAAU,IAAI,EAAE,KAAK,UAAU,OAAO,EAAE,YACrD,OACE,SACA,SACA,oBACmD;EACnD,IAAI,CAAC,QAAQ,aACX,MAAM,IAAI,MACR,OAAO,UAAU,UAAU,IAAI,EAAE,KAAK,UACpC,OACF,EAAE,0DACJ;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,OAAO,UAAU,UAAU,IAAI,EAA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AK,QAAQ;KACb,MAAM,cAAc;KACpB,YACE,QAAQ,cACR,QAAQ,UACR,UACE,cAAc,MACd,GAAG,UAAU,UAAU,IAAI,EAAE,WAC/B;KACF,aAAa,QAAQ;KACrB;IACF,CAAC;IACD;IACA;GACF,CAAC,CACL,CACF;EACF,SAAS,OAAO;GACd,WACE,yCAAyC,UACvC,UAAU,IACZ,EAAE,KAAK,UAAU,OAAO,EAAE,aACxB,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 +1 @@
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"}
1
+ {"version":3,"file":"base-executor.schema.d.mts","names":["config","configFile","configIndex","input","Array","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","Record","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../../../src/base/base-executor.schema.d.ts"],"mappings":";;;;;UAIiB,kBAAA;;;;;AAAjB;;;;EASCA,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;EASAC,WAAAA;;;;;;;;;EAUAC,KAAAA,GAAQ,KAAA;;;;;;;;;EAURE,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAAS,KAAA;;;;;;;;;EAUTC,QAAAA;;;;;;;EAQAC,QAAAA,GAAW,KAAA;;;;;;;EAQXC,UAAAA,GAAa,KAAA;;;;;;;EAQbC,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAS,MAAA;;;;;;;EAQTE,MAAAA,GAAS,KAAA;IAAQhB,KAAAA;IAAgBiB,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiB,MAAA;AAAA"}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"base-executor.schema.d.ts","names":["config","configFile","configIndex","input","Array","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","Record","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../../../src/base/base-executor.schema.d.ts"],"mappings":";;;UAIiB,kBAAA;;;;;;;;;EAShBA,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;EASAC,WAAAA;;;;;;;;;EAUAC,KAAAA,GAAQ,KAAA;EAqIe;AAAA;;;;;;;EA3HvBE,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAAS,KAAA;;;;;;;;;EAUTC,QAAAA;;;;;;;EAQAC,QAAAA,GAAW,KAAA;;;;;;;EAQXC,UAAAA,GAAa,KAAA;;;;;;;EAQbC,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAS,MAAA;;;;;;;EAQTE,MAAAA,GAAS,KAAA;IAAQhB,KAAAA;IAAgBiB,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiB,MAAA;AAAA"}
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,25 @@
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
+
9
+ const require_base_base_executor = require('./base-executor.js');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/base/base-executor.test.ts
13
+ (0, vitest.describe)("withExecutor", () => {
14
+ (0, vitest.it)("is a function", () => {
15
+ (0, vitest.expect)(typeof require_base_base_executor.withExecutor).toBe("function");
16
+ });
17
+ (0, vitest.it)("returns a function when called with options", () => {
18
+ (0, vitest.expect)(typeof require_base_base_executor.withExecutor("build", () => void 0, { importPath: "powerlines/api" })).toBe("function");
19
+ });
20
+ (0, vitest.it)("accepts an empty options object", () => {
21
+ (0, vitest.expect)(() => require_base_base_executor.withExecutor("build", () => void 0, {})).not.toThrow();
22
+ });
23
+ });
24
+
25
+ //#endregion
@@ -0,0 +1,33 @@
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
+
9
+ import { __commonJSMin } from "../_virtual/_rolldown/runtime.mjs";
10
+ import { init_base_executor, withExecutor } from "./base-executor.mjs";
11
+ import { describe, expect, it } from "vitest";
12
+
13
+ //#region src/base/base-executor.test.ts
14
+ var require_base_executor_test = /* @__PURE__ */ __commonJSMin((() => {
15
+ init_base_executor();
16
+ describe("withExecutor", () => {
17
+ it("is a function", () => {
18
+ expect(typeof withExecutor).toBe("function");
19
+ });
20
+ it("returns a function when called with options", () => {
21
+ expect(typeof withExecutor("build", () => void 0, { importPath: "powerlines/api" })).toBe("function");
22
+ });
23
+ it("accepts an empty options object", () => {
24
+ expect(() => withExecutor("build", () => void 0, {})).not.toThrow();
25
+ });
26
+ });
27
+ }));
28
+
29
+ //#endregion
30
+ export default require_base_executor_test();
31
+
32
+ export { };
33
+ //# sourceMappingURL=base-executor.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor.test.mjs","names":[],"sources":["../../../src/base/base-executor.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { withExecutor } from \"./base-executor\";\n\ndescribe(\"withExecutor\", () => {\n it(\"is a function\", () => {\n expect(typeof withExecutor).toBe(\"function\");\n });\n\n it(\"returns a function when called with options\", () => {\n const result = withExecutor(\"build\", () => undefined, { importPath: \"powerlines/api\" });\n expect(typeof result).toBe(\"function\");\n });\n\n it(\"accepts an empty options object\", () => {\n expect(() => withExecutor(\"build\", () => undefined, {})).not.toThrow();\n });\n});\n"],"mappings":";;;;;;;;;;;;;;oBAC8C;CAE9C,SAAS,sBAAsB;EAC7B,GAAG,uBAAuB;GACxB,OAAO,OAAO,YAAY,EAAE,KAAK,UAAU;EAC7C,CAAC;EAED,GAAG,qDAAqD;GAEtD,OAAO,OADQ,aAAa,eAAe,QAAW,EAAE,YAAY,iBAAiB,CAClE,CAAC,EAAE,KAAK,UAAU;EACvC,CAAC;EAED,GAAG,yCAAyC;GAC1C,aAAa,aAAa,eAAe,QAAW,CAAC,CAAC,CAAC,EAAE,IAAI,QAAQ;EACvE,CAAC;CACH,CAAC"}
@@ -6,9 +6,12 @@ import __tsdown_shims_url from 'node:url'
6
6
  const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
+ const require_runtime = require('../_virtual/_rolldown/runtime.js');
9
11
  let untyped = require("untyped");
10
12
 
11
13
  //#region src/base/base-executor.untyped.ts
14
+ var base_executor_untyped_exports = /* @__PURE__ */ require_runtime.__exportAll({ default: () => base_executor_untyped_default });
12
15
  var base_executor_untyped_default = (0, untyped.defineUntypedSchema)({
13
16
  $schema: {
14
17
  id: "BaseExecutorSchema",
@@ -181,4 +184,10 @@ var base_executor_untyped_default = (0, untyped.defineUntypedSchema)({
181
184
  });
182
185
 
183
186
  //#endregion
184
- module.exports = base_executor_untyped_default;
187
+ Object.defineProperty(exports, 'base_executor_untyped_exports', {
188
+ enumerable: true,
189
+ get: function () {
190
+ return base_executor_untyped_exports;
191
+ }
192
+ });
193
+ exports.default = base_executor_untyped_default;