@powerlines/nx 0.12.0 → 0.12.2

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 (38) hide show
  1. package/dist/src/base/base-executor.d.mts +1 -1
  2. package/dist/src/base/base-executor.d.mts.map +1 -1
  3. package/dist/src/base/base-executor.d.ts +1 -1
  4. package/dist/src/base/base-executor.d.ts.map +1 -1
  5. package/dist/src/base/base-executor.js +3 -3
  6. package/dist/src/base/base-executor.mjs +2 -1
  7. package/dist/src/base/base-executor.mjs.map +1 -1
  8. package/dist/src/{base-executor-N_ZgvzpA.d.ts → base-executor-Bo1I1Mia.d.mts} +2 -2
  9. package/dist/src/{base-executor-BOTlYnaD.d.mts.map → base-executor-Bo1I1Mia.d.mts.map} +1 -1
  10. package/dist/src/{base-executor-DH33Fd1U.js → base-executor-D58_SILz.js} +3 -3
  11. package/dist/src/{base-executor-dn4QVqZ4.mjs → base-executor-DEKCcRWh.mjs} +3 -2
  12. package/dist/src/base-executor-DEKCcRWh.mjs.map +1 -0
  13. package/dist/src/{base-executor-BOTlYnaD.d.mts → base-executor-DqRh2b_2.d.ts} +2 -2
  14. package/dist/src/{base-executor-N_ZgvzpA.d.ts.map → base-executor-DqRh2b_2.d.ts.map} +1 -1
  15. package/dist/src/executors/build/executor.d.mts +2 -2
  16. package/dist/src/executors/build/executor.d.ts +1 -1
  17. package/dist/src/executors/build/executor.js +1 -1
  18. package/dist/src/executors/build/executor.mjs +1 -1
  19. package/dist/src/executors/clean/executor.d.mts +2 -2
  20. package/dist/src/executors/clean/executor.d.ts +1 -1
  21. package/dist/src/executors/clean/executor.js +1 -1
  22. package/dist/src/executors/clean/executor.mjs +1 -1
  23. package/dist/src/executors/docs/executor.d.mts +2 -2
  24. package/dist/src/executors/docs/executor.d.ts +1 -1
  25. package/dist/src/executors/docs/executor.js +1 -1
  26. package/dist/src/executors/docs/executor.mjs +1 -1
  27. package/dist/src/executors/lint/executor.d.mts +2 -2
  28. package/dist/src/executors/lint/executor.d.ts +1 -1
  29. package/dist/src/executors/lint/executor.js +1 -1
  30. package/dist/src/executors/lint/executor.mjs +1 -1
  31. package/dist/src/executors/prepare/executor.d.mts +2 -2
  32. package/dist/src/executors/prepare/executor.d.ts +1 -1
  33. package/dist/src/executors/prepare/executor.js +1 -1
  34. package/dist/src/executors/prepare/executor.mjs +1 -1
  35. package/dist/src/helpers/plugin-utilities.js +1 -1
  36. package/dist/src/helpers/plugin-utilities.mjs +1 -1
  37. package/package.json +9 -9
  38. package/dist/src/base-executor-dn4QVqZ4.mjs.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { BaseExecutorSchema } from "./base-executor.schema.mjs";
2
- import PowerlinesAPI, { InlineConfig, PowerlinesCommand } from "powerlines";
3
2
  import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
4
3
  import { StormWorkspaceConfig } from "@storm-software/config/types";
5
4
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
+ import { InlineConfig, PowerlinesAPI, PowerlinesCommand } from "powerlines";
6
6
 
7
7
  //#region src/base/base-executor.d.ts
8
8
  type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.d.mts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;KAiCY,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,aAAA,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":";;;;;;;KAkCY,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,aAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
@@ -2,7 +2,7 @@ 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 PowerlinesAPI, { InlineConfig, PowerlinesCommand } from "powerlines";
5
+ import { InlineConfig, PowerlinesAPI, PowerlinesCommand } from "powerlines";
6
6
 
7
7
  //#region src/base/base-executor.d.ts
8
8
  type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.d.ts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;KAiCY,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,aAAA,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":";;;;;;;KAkCY,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,aAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
@@ -5,8 +5,7 @@ let _storm_software_workspace_tools_base_base_executor = require("@storm-softwar
5
5
  let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
6
6
  let defu = require("defu");
7
7
  defu = require_runtime.__toESM(defu);
8
- let powerlines = require("powerlines");
9
- powerlines = require_runtime.__toESM(powerlines);
8
+ let jiti = require("jiti");
10
9
 
11
10
  //#region src/base/base-executor.ts
12
11
  /**
@@ -24,7 +23,8 @@ function withExecutor(command, executorFn) {
24
23
  if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
25
24
  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.");
26
25
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
27
- const api = await powerlines.default.from(workspaceConfig.workspaceRoot, (0, defu.default)({
26
+ const { PowerlinesAPI } = await (0, jiti.createJiti)(context.root, { cache: false }).import("powerlines");
27
+ const api = await PowerlinesAPI.from(workspaceConfig.workspaceRoot, (0, defu.default)({
28
28
  configFile: options.configFile ?? options.config,
29
29
  output: {
30
30
  path: options.outputPath,
@@ -2,7 +2,7 @@ import { writeError } from "@storm-software/config-tools/logger";
2
2
  import { withRunExecutor } from "@storm-software/workspace-tools/base/base-executor";
3
3
  import { isError } from "@stryke/type-checks/is-error";
4
4
  import defu from "defu";
5
- import PowerlinesAPI from "powerlines";
5
+ import { createJiti } from "jiti";
6
6
 
7
7
  //#region src/base/base-executor.ts
8
8
  /**
@@ -20,6 +20,7 @@ function withExecutor(command, executorFn) {
20
20
  if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
21
21
  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.");
22
22
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
23
+ const { PowerlinesAPI } = await createJiti(context.root, { cache: false }).import("powerlines");
23
24
  const api = await PowerlinesAPI.from(workspaceConfig.workspaceRoot, defu({
24
25
  configFile: options.configFile ?? options.config,
25
26
  output: {
@@ -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 { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport type {\n InitialUserConfig,\n InlineConfig,\n PowerlinesCommand\n} from \"powerlines\";\nimport PowerlinesAPI from \"powerlines\";\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: PowerlinesAPI\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 api = await PowerlinesAPI.from(\n workspaceConfig.workspaceRoot,\n defu(\n {\n configFile: options.configFile ?? options.config,\n output: {\n path: options.outputPath,\n copy: { path: options.copyPath, assets: options.assets },\n format: options.format,\n sourceMap: options.sourceMap\n },\n resolve: {\n external: options.external,\n noExternal: options.noExternal,\n skipNodeModulesBundle: options.skipNodeModulesBundle\n },\n root: projectConfig.root,\n projectType: projectConfig.projectType,\n sourceRoot: projectConfig.sourceRoot\n },\n options,\n {\n name: context.projectName\n }\n ) as InitialUserConfig\n );\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n inlineConfig: {\n command,\n configFile: options.configFile || options.config\n },\n command\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 } finally {\n await api.finalize();\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAsDA,SAAgB,aAId,SACA,YAQkC;AAClC,QAAO,gBACL,cAAc,QAAQ,oBACtB,OACE,SACA,SACA,oBACmD;AACnD,MAAI,CAAC,QAAQ,YACX,OAAM,IAAI,MACR,6DACD;AAGH,MACE,CAAC,QAAQ,eACT,CAAC,QAAQ,wBAAwB,YACjC,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,gBACjD,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,cAAc,KAE/D,OAAM,IAAI,MACR,wEACD;EAGH,MAAM,gBACJ,QAAQ,uBAAuB,SAAS,QAAQ;EAElD,MAAM,MAAM,MAAM,cAAc,KAC9B,gBAAgB,eAChB,KACE;GACE,YAAY,QAAQ,cAAc,QAAQ;GAC1C,QAAQ;IACN,MAAM,QAAQ;IACd,MAAM;KAAE,MAAM,QAAQ;KAAU,QAAQ,QAAQ;KAAQ;IACxD,QAAQ,QAAQ;IAChB,WAAW,QAAQ;IACpB;GACD,SAAS;IACP,UAAU,QAAQ;IAClB,YAAY,QAAQ;IACpB,uBAAuB,QAAQ;IAChC;GACD,MAAM,cAAc;GACpB,aAAa,cAAc;GAC3B,YAAY,cAAc;GAC3B,EACD,SACA,EACE,MAAM,QAAQ,aACf,CACF,CACF;AAED,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA,cAAc;KACZ;KACA,YAAY,QAAQ,cAAc,QAAQ;KAC3C;IACD;IACD,EACD,QACD,EACD,IACD,CACF;WACM,OAAO;AACd,cACE,oDACE,QACD,qBACC,QAAQ,MAAM,GACV,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,kBAEP;AAED,UAAO,EAAE,SAAS,OAAO;YACjB;AACR,SAAM,IAAI,UAAU;;IAGxB;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,UAAO;KAEV;EACF,CACF"}
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 { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InitialUserConfig,\n InlineConfig,\n PowerlinesAPI,\n PowerlinesCommand\n} from \"powerlines\";\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: PowerlinesAPI\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, { cache: false });\n const { PowerlinesAPI } = await jiti.import<{\n PowerlinesAPI: typeof import(\"powerlines\").default;\n }>(\"powerlines\");\n\n const api = await PowerlinesAPI.from(\n workspaceConfig.workspaceRoot,\n defu(\n {\n configFile: options.configFile ?? options.config,\n output: {\n path: options.outputPath,\n copy: { path: options.copyPath, assets: options.assets },\n format: options.format,\n sourceMap: options.sourceMap\n },\n resolve: {\n external: options.external,\n noExternal: options.noExternal,\n skipNodeModulesBundle: options.skipNodeModulesBundle\n },\n root: projectConfig.root,\n projectType: projectConfig.projectType,\n sourceRoot: projectConfig.sourceRoot\n },\n options,\n {\n name: context.projectName\n }\n ) as InitialUserConfig\n );\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n inlineConfig: {\n command,\n configFile: options.configFile || options.config\n },\n command\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 } finally {\n await api.finalize();\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuDA,SAAgB,aAId,SACA,YAQkC;AAClC,QAAO,gBACL,cAAc,QAAQ,oBACtB,OACE,SACA,SACA,oBACmD;AACnD,MAAI,CAAC,QAAQ,YACX,OAAM,IAAI,MACR,6DACD;AAGH,MACE,CAAC,QAAQ,eACT,CAAC,QAAQ,wBAAwB,YACjC,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,gBACjD,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,cAAc,KAE/D,OAAM,IAAI,MACR,wEACD;EAGH,MAAM,gBACJ,QAAQ,uBAAuB,SAAS,QAAQ;EAGlD,MAAM,EAAE,kBAAkB,MADb,WAAW,QAAQ,MAAM,EAAE,OAAO,OAAO,CAAC,CAClB,OAElC,aAAa;EAEhB,MAAM,MAAM,MAAM,cAAc,KAC9B,gBAAgB,eAChB,KACE;GACE,YAAY,QAAQ,cAAc,QAAQ;GAC1C,QAAQ;IACN,MAAM,QAAQ;IACd,MAAM;KAAE,MAAM,QAAQ;KAAU,QAAQ,QAAQ;KAAQ;IACxD,QAAQ,QAAQ;IAChB,WAAW,QAAQ;IACpB;GACD,SAAS;IACP,UAAU,QAAQ;IAClB,YAAY,QAAQ;IACpB,uBAAuB,QAAQ;IAChC;GACD,MAAM,cAAc;GACpB,aAAa,cAAc;GAC3B,YAAY,cAAc;GAC3B,EACD,SACA,EACE,MAAM,QAAQ,aACf,CACF,CACF;AAED,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA,cAAc;KACZ;KACA,YAAY,QAAQ,cAAc,QAAQ;KAC3C;IACD;IACD,EACD,QACD,EACD,IACD,CACF;WACM,OAAO;AACd,cACE,oDACE,QACD,qBACC,QAAQ,MAAM,GACV,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,kBAEP;AAED,UAAO,EAAE,SAAS,OAAO;YACjB;AACR,SAAM,IAAI,UAAU;;IAGxB;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,UAAO;KAEV;EACF,CACF"}
@@ -1,6 +1,6 @@
1
1
  import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
2
2
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
3
- import PowerlinesAPI, { InlineConfig, PowerlinesCommand } from "powerlines";
3
+ import { InlineConfig, PowerlinesCommand } from "powerlines";
4
4
  import { StormWorkspaceConfig } from "@storm-software/config/types";
5
5
 
6
6
  //#region src/base/base-executor.schema.d.ts
@@ -160,4 +160,4 @@ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCo
160
160
  };
161
161
  //#endregion
162
162
  export { PowerlinesExecutorContext as t };
163
- //# sourceMappingURL=base-executor-N_ZgvzpA.d.ts.map
163
+ //# sourceMappingURL=base-executor-Bo1I1Mia.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor-BOTlYnaD.d.mts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;;;;;EAUCG,MAAAA;EA4Ic;;;;;;;;;EAjIdC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;;EAWRK,QAAAA;;ACbD;;;;;;;EDuBCC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;;EAWTU,QAAAA;;;;;;;EAQAC,QAAAA,GAAWX,KAAAA;;;;;;;EAQXY,UAAAA,GAAaZ,KAAAA;;;;;;;EAQba,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASf,MAAAA;;;;;;;EAQTgB,MAAAA,GAASjB,KAAAA;IAAQI,KAAAA;IAAgBc,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;AAAAA;;;KCzHxE,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"}
1
+ {"version":3,"file":"base-executor-Bo1I1Mia.d.mts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;;;;;EAUCG,MAAAA;EA4Ic;;;;;;;;;EAjIdC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;;EAWRK,QAAAA;;ACZD;;;;;;;EDsBCC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;;EAWTU,QAAAA;;;;;;;EAQAC,QAAAA,GAAWX,KAAAA;;;;;;;EAQXY,UAAAA,GAAaZ,KAAAA;;;;;;;EAQba,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASf,MAAAA;;;;;;;EAQTgB,MAAAA,GAASjB,KAAAA;IAAQI,KAAAA;IAAgBc,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;AAAAA;;;KCxHxE,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"}
@@ -2,10 +2,9 @@ const require_chunk = require('./chunk-BE-pF4vm.js');
2
2
  let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
3
3
  let defu = require("defu");
4
4
  defu = require_chunk.__toESM(defu);
5
+ let jiti = require("jiti");
5
6
  let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
6
7
  let _storm_software_workspace_tools_base_base_executor = require("@storm-software/workspace-tools/base/base-executor");
7
- let powerlines = require("powerlines");
8
- powerlines = require_chunk.__toESM(powerlines);
9
8
 
10
9
  //#region src/base/base-executor.ts
11
10
  /**
@@ -23,7 +22,8 @@ function withExecutor(command, executorFn) {
23
22
  if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
24
23
  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.");
25
24
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
26
- const api = await powerlines.default.from(workspaceConfig.workspaceRoot, (0, defu.default)({
25
+ const { PowerlinesAPI } = await (0, jiti.createJiti)(context.root, { cache: false }).import("powerlines");
26
+ const api = await PowerlinesAPI.from(workspaceConfig.workspaceRoot, (0, defu.default)({
27
27
  configFile: options.configFile ?? options.config,
28
28
  output: {
29
29
  path: options.outputPath,
@@ -1,8 +1,8 @@
1
1
  import { isError } from "@stryke/type-checks/is-error";
2
2
  import defu from "defu";
3
+ import { createJiti } from "jiti";
3
4
  import { writeError } from "@storm-software/config-tools/logger";
4
5
  import { withRunExecutor } from "@storm-software/workspace-tools/base/base-executor";
5
- import PowerlinesAPI from "powerlines";
6
6
 
7
7
  //#region src/base/base-executor.ts
8
8
  /**
@@ -20,6 +20,7 @@ function withExecutor(command, executorFn) {
20
20
  if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
21
21
  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.");
22
22
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
23
+ const { PowerlinesAPI } = await createJiti(context.root, { cache: false }).import("powerlines");
23
24
  const api = await PowerlinesAPI.from(workspaceConfig.workspaceRoot, defu({
24
25
  configFile: options.configFile ?? options.config,
25
26
  output: {
@@ -69,4 +70,4 @@ ${error.stack}` : "Unknown error"}`);
69
70
 
70
71
  //#endregion
71
72
  export { withExecutor as t };
72
- //# sourceMappingURL=base-executor-dn4QVqZ4.mjs.map
73
+ //# sourceMappingURL=base-executor-DEKCcRWh.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor-DEKCcRWh.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 { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InitialUserConfig,\n InlineConfig,\n PowerlinesAPI,\n PowerlinesCommand\n} from \"powerlines\";\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: PowerlinesAPI\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, { cache: false });\n const { PowerlinesAPI } = await jiti.import<{\n PowerlinesAPI: typeof import(\"powerlines\").default;\n }>(\"powerlines\");\n\n const api = await PowerlinesAPI.from(\n workspaceConfig.workspaceRoot,\n defu(\n {\n configFile: options.configFile ?? options.config,\n output: {\n path: options.outputPath,\n copy: { path: options.copyPath, assets: options.assets },\n format: options.format,\n sourceMap: options.sourceMap\n },\n resolve: {\n external: options.external,\n noExternal: options.noExternal,\n skipNodeModulesBundle: options.skipNodeModulesBundle\n },\n root: projectConfig.root,\n projectType: projectConfig.projectType,\n sourceRoot: projectConfig.sourceRoot\n },\n options,\n {\n name: context.projectName\n }\n ) as InitialUserConfig\n );\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n inlineConfig: {\n command,\n configFile: options.configFile || options.config\n },\n command\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 } finally {\n await api.finalize();\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuDA,SAAgB,aAId,SACA,YAQkC;AAClC,QAAO,gBACL,cAAc,QAAQ,oBACtB,OACE,SACA,SACA,oBACmD;AACnD,MAAI,CAAC,QAAQ,YACX,OAAM,IAAI,MACR,6DACD;AAGH,MACE,CAAC,QAAQ,eACT,CAAC,QAAQ,wBAAwB,YACjC,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,gBACjD,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,cAAc,KAE/D,OAAM,IAAI,MACR,wEACD;EAGH,MAAM,gBACJ,QAAQ,uBAAuB,SAAS,QAAQ;EAGlD,MAAM,EAAE,kBAAkB,MADb,WAAW,QAAQ,MAAM,EAAE,OAAO,OAAO,CAAC,CAClB,OAElC,aAAa;EAEhB,MAAM,MAAM,MAAM,cAAc,KAC9B,gBAAgB,eAChB,KACE;GACE,YAAY,QAAQ,cAAc,QAAQ;GAC1C,QAAQ;IACN,MAAM,QAAQ;IACd,MAAM;KAAE,MAAM,QAAQ;KAAU,QAAQ,QAAQ;KAAQ;IACxD,QAAQ,QAAQ;IAChB,WAAW,QAAQ;IACpB;GACD,SAAS;IACP,UAAU,QAAQ;IAClB,YAAY,QAAQ;IACpB,uBAAuB,QAAQ;IAChC;GACD,MAAM,cAAc;GACpB,aAAa,cAAc;GAC3B,YAAY,cAAc;GAC3B,EACD,SACA,EACE,MAAM,QAAQ,aACf,CACF,CACF;AAED,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA,cAAc;KACZ;KACA,YAAY,QAAQ,cAAc,QAAQ;KAC3C;IACD;IACD,EACD,QACD,EACD,IACD,CACF;WACM,OAAO;AACd,cACE,oDACE,QACD,qBACC,QAAQ,MAAM,GACV,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,kBAEP;AAED,UAAO,EAAE,SAAS,OAAO;YACjB;AACR,SAAM,IAAI,UAAU;;IAGxB;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,UAAO;KAEV;EACF,CACF"}
@@ -1,6 +1,6 @@
1
1
  import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
2
- import PowerlinesAPI, { InlineConfig, PowerlinesCommand } from "powerlines";
3
2
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
3
+ import { InlineConfig, PowerlinesCommand } from "powerlines";
4
4
  import { StormWorkspaceConfig } from "@storm-software/config/types";
5
5
 
6
6
  //#region src/base/base-executor.schema.d.ts
@@ -160,4 +160,4 @@ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCo
160
160
  };
161
161
  //#endregion
162
162
  export { PowerlinesExecutorContext as t };
163
- //# sourceMappingURL=base-executor-BOTlYnaD.d.mts.map
163
+ //# sourceMappingURL=base-executor-DqRh2b_2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor-N_ZgvzpA.d.ts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;;;;;EAUCG,MAAAA;EA4Ic;;;;;;;;;EAjIdC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;;EAWRK,QAAAA;;ACbD;;;;;;;EDuBCC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;;EAWTU,QAAAA;;;;;;;EAQAC,QAAAA,GAAWX,KAAAA;;;;;;;EAQXY,UAAAA,GAAaZ,KAAAA;;;;;;;EAQba,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASf,MAAAA;;;;;;;EAQTgB,MAAAA,GAASjB,KAAAA;IAAQI,KAAAA;IAAgBc,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;AAAAA;;;KCzHxE,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"}
1
+ {"version":3,"file":"base-executor-DqRh2b_2.d.ts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;;;;;EAUCG,MAAAA;EA4Ic;;;;;;;;;EAjIdC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;;EAWRK,QAAAA;;ACZD;;;;;;;EDsBCC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;;EAWTU,QAAAA;;;;;;;EAQAC,QAAAA,GAAWX,KAAAA;;;;;;;EAQXY,UAAAA,GAAaZ,KAAAA;;;;;;;EAQba,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASf,MAAAA;;;;;;;EAQTgB,MAAAA,GAASjB,KAAAA;IAAQI,KAAAA;IAAgBc,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;AAAAA;;;KCxHxE,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"}
@@ -1,7 +1,7 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-BOTlYnaD.mjs";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-Bo1I1Mia.mjs";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
- import PowerlinesAPI from "powerlines";
4
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
+ import PowerlinesAPI from "powerlines";
5
5
 
6
6
  //#region src/executors/build/schema.d.ts
7
7
  // Generated by @storm-software/untyped
@@ -1,4 +1,4 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-N_ZgvzpA.js";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-DqRh2b_2.js";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
4
  import PowerlinesAPI from "powerlines";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
2
  const require_chunk = require('../../chunk-BE-pF4vm.js');
3
- const require_base_executor = require('../../base-executor-DH33Fd1U.js');
3
+ const require_base_executor = require('../../base-executor-D58_SILz.js');
4
4
  let defu = require("defu");
5
5
  defu = require_chunk.__toESM(defu);
6
6
 
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-dn4QVqZ4.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DEKCcRWh.mjs";
2
2
  import defu from "defu";
3
3
 
4
4
  //#region src/executors/build/executor.ts
@@ -1,7 +1,7 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-BOTlYnaD.mjs";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-Bo1I1Mia.mjs";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
- import PowerlinesAPI from "powerlines";
4
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
+ import PowerlinesAPI from "powerlines";
5
5
 
6
6
  //#region src/executors/clean/schema.d.ts
7
7
  // Generated by @storm-software/untyped
@@ -1,4 +1,4 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-N_ZgvzpA.js";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-DqRh2b_2.js";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
4
  import PowerlinesAPI from "powerlines";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
- const require_base_executor = require('../../base-executor-DH33Fd1U.js');
2
+ const require_base_executor = require('../../base-executor-D58_SILz.js');
3
3
 
4
4
  //#region src/executors/clean/executor.ts
5
5
  async function executorFn(context, api) {
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-dn4QVqZ4.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DEKCcRWh.mjs";
2
2
 
3
3
  //#region src/executors/clean/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1,7 +1,7 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-BOTlYnaD.mjs";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-Bo1I1Mia.mjs";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
- import PowerlinesAPI from "powerlines";
4
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
+ import PowerlinesAPI from "powerlines";
5
5
 
6
6
  //#region src/executors/docs/schema.d.ts
7
7
  // Generated by @storm-software/untyped
@@ -1,4 +1,4 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-N_ZgvzpA.js";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-DqRh2b_2.js";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
4
  import PowerlinesAPI from "powerlines";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
- const require_base_executor = require('../../base-executor-DH33Fd1U.js');
2
+ const require_base_executor = require('../../base-executor-D58_SILz.js');
3
3
 
4
4
  //#region src/executors/docs/executor.ts
5
5
  async function executorFn(context, api) {
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-dn4QVqZ4.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DEKCcRWh.mjs";
2
2
 
3
3
  //#region src/executors/docs/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1,7 +1,7 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-BOTlYnaD.mjs";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-Bo1I1Mia.mjs";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
- import PowerlinesAPI from "powerlines";
4
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
+ import PowerlinesAPI from "powerlines";
5
5
 
6
6
  //#region src/executors/lint/schema.d.ts
7
7
  // Generated by @storm-software/untyped
@@ -1,4 +1,4 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-N_ZgvzpA.js";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-DqRh2b_2.js";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
4
  import PowerlinesAPI from "powerlines";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
- const require_base_executor = require('../../base-executor-DH33Fd1U.js');
2
+ const require_base_executor = require('../../base-executor-D58_SILz.js');
3
3
 
4
4
  //#region src/executors/lint/executor.ts
5
5
  async function executorFn(context, api) {
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-dn4QVqZ4.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DEKCcRWh.mjs";
2
2
 
3
3
  //#region src/executors/lint/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1,7 +1,7 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-BOTlYnaD.mjs";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-Bo1I1Mia.mjs";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
- import PowerlinesAPI from "powerlines";
4
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
+ import PowerlinesAPI from "powerlines";
5
5
 
6
6
  //#region src/executors/prepare/schema.d.ts
7
7
  // Generated by @storm-software/untyped
@@ -1,4 +1,4 @@
1
- import { t as PowerlinesExecutorContext } from "../../base-executor-N_ZgvzpA.js";
1
+ import { t as PowerlinesExecutorContext } from "../../base-executor-DqRh2b_2.js";
2
2
  import { PromiseExecutor } from "@nx/devkit";
3
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
4
  import PowerlinesAPI from "powerlines";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
2
  const require_chunk = require('../../chunk-BE-pF4vm.js');
3
- const require_base_executor = require('../../base-executor-DH33Fd1U.js');
3
+ const require_base_executor = require('../../base-executor-D58_SILz.js');
4
4
  let defu = require("defu");
5
5
  defu = require_chunk.__toESM(defu);
6
6
 
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-dn4QVqZ4.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DEKCcRWh.mjs";
2
2
  import defu from "defu";
3
3
 
4
4
  //#region src/executors/prepare/executor.ts
@@ -4,6 +4,7 @@ const require_helpers_constants = require('./constants.js');
4
4
  let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
5
5
  let defu = require("defu");
6
6
  defu = require_runtime.__toESM(defu);
7
+ let jiti = require("jiti");
7
8
  let _nx_devkit = require("@nx/devkit");
8
9
  let _storm_software_workspace_tools_utils_nx_json = require("@storm-software/workspace-tools/utils/nx-json");
9
10
  let _storm_software_workspace_tools_utils_plugin_helpers = require("@storm-software/workspace-tools/utils/plugin-helpers");
@@ -17,7 +18,6 @@ let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case
17
18
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
18
19
  let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
19
20
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
20
- let jiti = require("jiti");
21
21
  let node_fs_promises = require("node:fs/promises");
22
22
  let nx_src_config_nx_json_js = require("nx/src/config/nx-json.js");
23
23
  let nx_src_utils_package_json_js = require("nx/src/utils/package-json.js");
@@ -1,6 +1,7 @@
1
1
  import { CONFIG_INPUTS } from "./constants.mjs";
2
2
  import { isError } from "@stryke/type-checks/is-error";
3
3
  import defu from "defu";
4
+ import { createJiti } from "jiti";
4
5
  import { createNodesFromFiles } from "@nx/devkit";
5
6
  import { withNamedInputs } from "@storm-software/workspace-tools/utils/nx-json";
6
7
  import { getProjectConfigFromProjectRoot, getProjectRoot, getRoot } from "@storm-software/workspace-tools/utils/plugin-helpers";
@@ -14,7 +15,6 @@ import { kebabCase } from "@stryke/string-format/kebab-case";
14
15
  import { titleCase } from "@stryke/string-format/title-case";
15
16
  import { isSetObject } from "@stryke/type-checks/is-set-object";
16
17
  import { isSetString } from "@stryke/type-checks/is-set-string";
17
- import { createJiti } from "jiti";
18
18
  import { readFile } from "node:fs/promises";
19
19
  import { readNxJson } from "nx/src/config/nx-json.js";
20
20
  import { readTargetsFromPackageJson } from "nx/src/utils/package-json.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/nx",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "description": "A Nx plugin to support Powerlines development in Nx monorepos.",
@@ -178,12 +178,12 @@
178
178
  "@storm-software/config": "^1.137.26",
179
179
  "@storm-software/config-tools": "^1.189.72",
180
180
  "@storm-software/workspace-tools": "^1.295.48",
181
- "@stryke/env": "^0.20.81",
182
- "@stryke/fs": "^0.33.64",
183
- "@stryke/hash": "^0.13.17",
184
- "@stryke/path": "^0.27.3",
185
- "@stryke/string-format": "^0.17.7",
186
- "@stryke/type-checks": "^0.6.0",
181
+ "@stryke/env": "^0.20.83",
182
+ "@stryke/fs": "^0.33.66",
183
+ "@stryke/hash": "^0.13.19",
184
+ "@stryke/path": "^0.27.4",
185
+ "@stryke/string-format": "^0.17.9",
186
+ "@stryke/type-checks": "^0.6.1",
187
187
  "defu": "^6.1.6",
188
188
  "jiti": "^2.6.1"
189
189
  },
@@ -196,7 +196,7 @@
196
196
  "eslint-flat-config-utils": "^2.1.4",
197
197
  "jsonc-eslint-parser": "^2.4.2",
198
198
  "nx": "22.6.4",
199
- "powerlines": "^0.42.28",
199
+ "powerlines": "^0.42.30",
200
200
  "untyped": "^1.5.2"
201
201
  },
202
202
  "peerDependencies": { "nx": ">=22.5.0", "powerlines": ">=0.39.2" },
@@ -207,5 +207,5 @@
207
207
  "publishConfig": { "access": "public" },
208
208
  "executors": "./executors.json",
209
209
  "generators": "./generators.json",
210
- "gitHead": "9e3382219bcbd57edea2a23e1e421a44b5acdd58"
210
+ "gitHead": "454fceda20c6f4dda53f6bc5901e5768ac253365"
211
211
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-executor-dn4QVqZ4.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 { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport type {\n InitialUserConfig,\n InlineConfig,\n PowerlinesCommand\n} from \"powerlines\";\nimport PowerlinesAPI from \"powerlines\";\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: PowerlinesAPI\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 api = await PowerlinesAPI.from(\n workspaceConfig.workspaceRoot,\n defu(\n {\n configFile: options.configFile ?? options.config,\n output: {\n path: options.outputPath,\n copy: { path: options.copyPath, assets: options.assets },\n format: options.format,\n sourceMap: options.sourceMap\n },\n resolve: {\n external: options.external,\n noExternal: options.noExternal,\n skipNodeModulesBundle: options.skipNodeModulesBundle\n },\n root: projectConfig.root,\n projectType: projectConfig.projectType,\n sourceRoot: projectConfig.sourceRoot\n },\n options,\n {\n name: context.projectName\n }\n ) as InitialUserConfig\n );\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n inlineConfig: {\n command,\n configFile: options.configFile || options.config\n },\n command\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 } finally {\n await api.finalize();\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAsDA,SAAgB,aAId,SACA,YAQkC;AAClC,QAAO,gBACL,cAAc,QAAQ,oBACtB,OACE,SACA,SACA,oBACmD;AACnD,MAAI,CAAC,QAAQ,YACX,OAAM,IAAI,MACR,6DACD;AAGH,MACE,CAAC,QAAQ,eACT,CAAC,QAAQ,wBAAwB,YACjC,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,gBACjD,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,cAAc,KAE/D,OAAM,IAAI,MACR,wEACD;EAGH,MAAM,gBACJ,QAAQ,uBAAuB,SAAS,QAAQ;EAElD,MAAM,MAAM,MAAM,cAAc,KAC9B,gBAAgB,eAChB,KACE;GACE,YAAY,QAAQ,cAAc,QAAQ;GAC1C,QAAQ;IACN,MAAM,QAAQ;IACd,MAAM;KAAE,MAAM,QAAQ;KAAU,QAAQ,QAAQ;KAAQ;IACxD,QAAQ,QAAQ;IAChB,WAAW,QAAQ;IACpB;GACD,SAAS;IACP,UAAU,QAAQ;IAClB,YAAY,QAAQ;IACpB,uBAAuB,QAAQ;IAChC;GACD,MAAM,cAAc;GACpB,aAAa,cAAc;GAC3B,YAAY,cAAc;GAC3B,EACD,SACA,EACE,MAAM,QAAQ,aACf,CACF,CACF;AAED,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA,cAAc;KACZ;KACA,YAAY,QAAQ,cAAc,QAAQ;KAC3C;IACD;IACD,EACD,QACD,EACD,IACD,CACF;WACM,OAAO;AACd,cACE,oDACE,QACD,qBACC,QAAQ,MAAM,GACV,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,kBAEP;AAED,UAAO,EAAE,SAAS,OAAO;YACjB;AACR,SAAM,IAAI,UAAU;;IAGxB;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,UAAO;KAEV;EACF,CACF"}