@powerlines/nx 0.13.66 → 0.13.68

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.
@@ -2,7 +2,8 @@ import { BaseExecutorSchema } from "./base-executor.schema.mjs";
2
2
  import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
3
3
  import { StormWorkspaceConfig } from "@storm-software/config/types";
4
4
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
- import { InlineConfig, PowerlinesCommand, PowerlinesEngine } from "powerlines";
5
+ import { InlineConfig, PowerlinesCommand } from "powerlines";
6
+ import { PowerlinesEngine } from "powerlines/engine";
6
7
 
7
8
  //#region src/base/base-executor.d.ts
8
9
  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":";;;;;;;KAuCY,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,gBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
1
+ {"version":3,"file":"base-executor.d.mts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;;KAuCY,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,gBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
@@ -2,7 +2,8 @@ import { BaseExecutorSchema } from "./base-executor.schema.js";
2
2
  import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
3
3
  import { StormWorkspaceConfig } from "@storm-software/config/types";
4
4
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
- import { InlineConfig, PowerlinesCommand, PowerlinesEngine } from "powerlines";
5
+ import { InlineConfig, PowerlinesCommand } from "powerlines";
6
+ import { PowerlinesEngine } from "powerlines/engine";
6
7
 
7
8
  //#region src/base/base-executor.d.ts
8
9
  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":";;;;;;;KAuCY,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,gBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
1
+ {"version":3,"file":"base-executor.d.ts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;;KAuCY,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,gBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
@@ -28,7 +28,7 @@ function withExecutor(command, executorFn) {
28
28
  if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
29
29
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
30
30
  const jiti$1 = (0, jiti.createJiti)(context.root, { cache: false });
31
- const { createPowerlines } = await jiti$1.import(jiti$1.esmResolve("powerlines"));
31
+ const { createPowerlines } = await jiti$1.import(jiti$1.esmResolve("powerlines/engine"));
32
32
  const api = await createPowerlines({
33
33
  cwd: context.root,
34
34
  root: projectConfig.root
@@ -25,7 +25,7 @@ function withExecutor(command, executorFn) {
25
25
  if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
26
26
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
27
27
  const jiti = createJiti(context.root, { cache: false });
28
- const { createPowerlines } = await jiti.import(jiti.esmResolve("powerlines"));
28
+ const { createPowerlines } = await jiti.import(jiti.esmResolve("powerlines/engine"));
29
29
  const api = await createPowerlines({
30
30
  cwd: context.root,
31
31
  root: projectConfig.root
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.mjs","names":[],"sources":["../../../src/base/base-executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InlineConfig,\n Mode,\n OutputConfig,\n PowerlinesCommand,\n PowerlinesEngine\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: PowerlinesEngine\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Powerlines ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, { cache: false });\n const { createPowerlines } = await jiti.import<{\n createPowerlines: typeof import(\"powerlines\").createPowerlines;\n }>(jiti.esmResolve(\"powerlines\"));\n\n const api = await createPowerlines({\n cwd: context.root,\n root: projectConfig.root\n });\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n command,\n inlineConfig: defu(\n {\n name: context.projectName,\n command,\n root: projectConfig.root,\n configFile: options.configFile || options.config,\n projectType: projectConfig.projectType,\n mode: options.mode as Mode,\n output: {\n path: options.outputPath,\n copy:\n options.copyPath === false\n ? false\n : {\n path: options.copyPath,\n assets: options.assets\n },\n minify: options.minify,\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve:\n isSetArray(options.external) ||\n isSetArray(options.noExternal) ||\n isSet(options.skipNodeModulesBundle)\n ? {\n external: isSetArray(options.external)\n ? options.external\n : undefined,\n noExternal: isSetArray(options.noExternal)\n ? options.noExternal\n : undefined,\n skipNodeModulesBundle: isSet(\n options.skipNodeModulesBundle\n )\n ? options.skipNodeModulesBundle\n : undefined\n }\n : undefined,\n define: isSetObject(options.define)\n ? options.define\n : undefined,\n assets: isSetObject(options.assets)\n ? options.assets\n : undefined\n },\n omit(options, [\n \"config\",\n \"configFile\",\n \"outputPath\",\n \"copyPath\",\n \"sourceMap\",\n \"minify\",\n \"format\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"mode\",\n \"define\",\n \"assets\"\n ])\n ) as InlineConfig\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Powerlines ${\n command\n } command executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options.copyPath ??= \"dist/{projectRoot}\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4DA,SAAgB,aAId,SACA,YAQkC;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,Q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Q,MAAM,GACV,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,kBAEP;AAED,UAAO,EAAE,SAAS,OAAO;;IAG7B;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,WAAQ,aAAa;AAErB,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 { omit } from \"@stryke/helpers/omit\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InlineConfig,\n Mode,\n OutputConfig,\n PowerlinesCommand\n} from \"powerlines\";\nimport type { PowerlinesEngine } from \"powerlines/engine\";\nimport { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type PowerlinesExecutorContext<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n> = ExecutorContext & {\n projectName: string;\n command: TCommand;\n options: TExecutorSchema;\n inlineConfig: InlineConfig;\n workspaceConfig: StormWorkspaceConfig;\n};\n\n/**\n * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.\n *\n * @param command - The command that the executor will handle (e.g., \"new\", \"prepare\", \"build\", etc.).\n * @param executorFn - The function that will be executed when the command is run.\n * @returns A Promise that resolves to the result of the executor function.\n */\nexport function withExecutor<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n>(\n command: TCommand,\n executorFn: (\n context: PowerlinesExecutorContext<TCommand, TExecutorSchema>,\n api: PowerlinesEngine\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Powerlines ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, { cache: false });\n const { createPowerlines } = await jiti.import<{\n createPowerlines: typeof import(\"powerlines/engine\").createPowerlines;\n }>(jiti.esmResolve(\"powerlines/engine\"));\n\n const api = await createPowerlines({\n cwd: context.root,\n root: projectConfig.root\n });\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n command,\n inlineConfig: defu(\n {\n name: context.projectName,\n command,\n root: projectConfig.root,\n configFile: options.configFile || options.config,\n projectType: projectConfig.projectType,\n mode: options.mode as Mode,\n output: {\n path: options.outputPath,\n copy:\n options.copyPath === false\n ? false\n : {\n path: options.copyPath,\n assets: options.assets\n },\n minify: options.minify,\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve:\n isSetArray(options.external) ||\n isSetArray(options.noExternal) ||\n isSet(options.skipNodeModulesBundle)\n ? {\n external: isSetArray(options.external)\n ? options.external\n : undefined,\n noExternal: isSetArray(options.noExternal)\n ? options.noExternal\n : undefined,\n skipNodeModulesBundle: isSet(\n options.skipNodeModulesBundle\n )\n ? options.skipNodeModulesBundle\n : undefined\n }\n : undefined,\n define: isSetObject(options.define)\n ? options.define\n : undefined,\n assets: isSetObject(options.assets)\n ? options.assets\n : undefined\n },\n omit(options, [\n \"config\",\n \"configFile\",\n \"outputPath\",\n \"copyPath\",\n \"sourceMap\",\n \"minify\",\n \"format\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"mode\",\n \"define\",\n \"assets\"\n ])\n ) as InlineConfig\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Powerlines ${\n command\n } command executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options.copyPath ??= \"dist/{projectRoot}\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4DA,SAAgB,aAId,SACA,YAQkC;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,uBAA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Q;;EAE/B,MAAM,UACQ,kBAEP;AAED,UAAO,EAAE,SAAS,OAAO;;IAG7B;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,WAAQ,aAAa;AAErB,UAAO;KAEV;EACF,CACF"}
@@ -25,7 +25,7 @@ function withExecutor(command, executorFn) {
25
25
  if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
26
26
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
27
27
  const jiti = createJiti(context.root, { cache: false });
28
- const { createPowerlines } = await jiti.import(jiti.esmResolve("powerlines"));
28
+ const { createPowerlines } = await jiti.import(jiti.esmResolve("powerlines/engine"));
29
29
  const api = await createPowerlines({
30
30
  cwd: context.root,
31
31
  root: projectConfig.root
@@ -92,4 +92,4 @@ ${error.stack}` : "Unknown error"}`);
92
92
 
93
93
  //#endregion
94
94
  export { withExecutor as t };
95
- //# sourceMappingURL=base-executor-QMaDYqZn.mjs.map
95
+ //# sourceMappingURL=base-executor-DlhT5y9h.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor-DlhT5y9h.mjs","names":[],"sources":["../../src/base/base-executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InlineConfig,\n Mode,\n OutputConfig,\n PowerlinesCommand\n} from \"powerlines\";\nimport type { PowerlinesEngine } from \"powerlines/engine\";\nimport { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type PowerlinesExecutorContext<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n> = ExecutorContext & {\n projectName: string;\n command: TCommand;\n options: TExecutorSchema;\n inlineConfig: InlineConfig;\n workspaceConfig: StormWorkspaceConfig;\n};\n\n/**\n * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.\n *\n * @param command - The command that the executor will handle (e.g., \"new\", \"prepare\", \"build\", etc.).\n * @param executorFn - The function that will be executed when the command is run.\n * @returns A Promise that resolves to the result of the executor function.\n */\nexport function withExecutor<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n>(\n command: TCommand,\n executorFn: (\n context: PowerlinesExecutorContext<TCommand, TExecutorSchema>,\n api: PowerlinesEngine\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Powerlines ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, { cache: false });\n const { createPowerlines } = await jiti.import<{\n createPowerlines: typeof import(\"powerlines/engine\").createPowerlines;\n }>(jiti.esmResolve(\"powerlines/engine\"));\n\n const api = await createPowerlines({\n cwd: context.root,\n root: projectConfig.root\n });\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n command,\n inlineConfig: defu(\n {\n name: context.projectName,\n command,\n root: projectConfig.root,\n configFile: options.configFile || options.config,\n projectType: projectConfig.projectType,\n mode: options.mode as Mode,\n output: {\n path: options.outputPath,\n copy:\n options.copyPath === false\n ? false\n : {\n path: options.copyPath,\n assets: options.assets\n },\n minify: options.minify,\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve:\n isSetArray(options.external) ||\n isSetArray(options.noExternal) ||\n isSet(options.skipNodeModulesBundle)\n ? {\n external: isSetArray(options.external)\n ? options.external\n : undefined,\n noExternal: isSetArray(options.noExternal)\n ? options.noExternal\n : undefined,\n skipNodeModulesBundle: isSet(\n options.skipNodeModulesBundle\n )\n ? options.skipNodeModulesBundle\n : undefined\n }\n : undefined,\n define: isSetObject(options.define)\n ? options.define\n : undefined,\n assets: isSetObject(options.assets)\n ? options.assets\n : undefined\n },\n omit(options, [\n \"config\",\n \"configFile\",\n \"outputPath\",\n \"copyPath\",\n \"sourceMap\",\n \"minify\",\n \"format\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"mode\",\n \"define\",\n \"assets\"\n ])\n ) as InlineConfig\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Powerlines ${\n command\n } command executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options.copyPath ??= \"dist/{projectRoot}\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4DA,SAAgB,aAId,SACA,YAQkC;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,OAAO,WAAW,QAAQ,MAAM,EAAE,OAAO,OAAO,CAAC;EACvD,MAAM,EAAE,qBAAqB,MAAM,KAAK,OAErC,KAAK,WAAW,oBAAoB,CAAC;EAExC,MAAM,MAAM,MAAM,iBAAiB;GACjC,KAAK,QAAQ;GACb,MAAM,cAAc;GACrB,CAAC;AAEF,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA;IACA,cAAc,KACZ;KACE,MAAM,QAAQ;KACd;KACA,MAAM,cAAc;KACpB,YAAY,QAAQ,cAAc,QAAQ;KAC1C,aAAa,cAAc;KAC3B,MAAM,QAAQ;KACd,QAAQ;MACN,MAAM,QAAQ;MACd,MACE,QAAQ,aAAa,QACjB,QACA;OACE,MAAM,QAAQ;OACd,QAAQ,QAAQ;OACjB;MACP,QAAQ,QAAQ;MAChB,WAAW,QAAQ;MACpB;KACD,SACE,WAAW,QAAQ,SAAS,IAC5B,WAAW,QAAQ,WAAW,IAC9B,MAAM,QAAQ,sBAAsB,GAChC;MACE,UAAU,WAAW,QAAQ,SAAS,GAClC,QAAQ,WACR;MACJ,YAAY,WAAW,QAAQ,WAAW,GACtC,QAAQ,aACR;MACJ,uBAAuB,MACrB,QAAQ,sBACT,GACG,QAAQ,wBACR;MACL,GACD;KACN,QAAQ,YAAY,QAAQ,OAAO,GAC/B,QAAQ,SACR;KACJ,QAAQ,YAAY,QAAQ,OAAO,GAC/B,QAAQ,SACR;KACL,EACD,KAAK,SAAS;KACZ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACD,CAAC,CACH;IACF,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;;IAG7B;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,WAAQ,aAAa;AAErB,UAAO;KAEV;EACF,CACF"}
@@ -27,7 +27,7 @@ function withExecutor(command, executorFn) {
27
27
  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.");
28
28
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
29
29
  const jiti$1 = (0, jiti.createJiti)(context.root, { cache: false });
30
- const { createPowerlines } = await jiti$1.import(jiti$1.esmResolve("powerlines"));
30
+ const { createPowerlines } = await jiti$1.import(jiti$1.esmResolve("powerlines/engine"));
31
31
  const api = await createPowerlines({
32
32
  cwd: context.root,
33
33
  root: projectConfig.root
@@ -1,4 +1,4 @@
1
- const require_base_executor = require('../../base-executor-CYB3QQu6.js');
1
+ const require_base_executor = require('../../base-executor-FxB6c-wO.js');
2
2
 
3
3
  //#region src/executors/build/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-QMaDYqZn.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DlhT5y9h.mjs";
2
2
 
3
3
  //#region src/executors/build/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1 +1 @@
1
- {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/build/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport type { BuildExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"build\", BuildExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.build(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<BuildExecutorSchema> = withExecutor<\n \"build\",\n BuildExecutorSchema\n>(\"build\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,MAAM,QAAQ,aAAa;AAErC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAiD,aAGrD,SAAS,WAAW"}
1
+ {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/build/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines/engine\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport type { BuildExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"build\", BuildExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.build(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<BuildExecutorSchema> = withExecutor<\n \"build\",\n BuildExecutorSchema\n>(\"build\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,MAAM,QAAQ,aAAa;AAErC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAiD,aAGrD,SAAS,WAAW"}
@@ -1,4 +1,4 @@
1
- const require_base_executor = require('../../base-executor-CYB3QQu6.js');
1
+ const require_base_executor = require('../../base-executor-FxB6c-wO.js');
2
2
 
3
3
  //#region src/executors/clean/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-QMaDYqZn.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DlhT5y9h.mjs";
2
2
 
3
3
  //#region src/executors/clean/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1 +1 @@
1
- {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/clean/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport type { CleanExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"clean\", CleanExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.clean(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<CleanExecutorSchema> = withExecutor<\n \"clean\",\n CleanExecutorSchema\n>(\"clean\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,MAAM,QAAQ,aAAa;AAErC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAiD,aAGrD,SAAS,WAAW"}
1
+ {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/clean/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines/engine\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport type { CleanExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"clean\", CleanExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.clean(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<CleanExecutorSchema> = withExecutor<\n \"clean\",\n CleanExecutorSchema\n>(\"clean\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,MAAM,QAAQ,aAAa;AAErC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAiD,aAGrD,SAAS,WAAW"}
@@ -1,4 +1,4 @@
1
- const require_base_executor = require('../../base-executor-CYB3QQu6.js');
1
+ const require_base_executor = require('../../base-executor-FxB6c-wO.js');
2
2
 
3
3
  //#region src/executors/docs/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-QMaDYqZn.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DlhT5y9h.mjs";
2
2
 
3
3
  //#region src/executors/docs/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1 +1 @@
1
- {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/docs/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport type { DocsExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"docs\", DocsExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.docs(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<DocsExecutorSchema> = withExecutor<\n \"docs\",\n DocsExecutorSchema\n>(\"docs\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,KAAK,QAAQ,aAAa;AAEpC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAgD,aAGpD,QAAQ,WAAW"}
1
+ {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/docs/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines/engine\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport type { DocsExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"docs\", DocsExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.docs(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<DocsExecutorSchema> = withExecutor<\n \"docs\",\n DocsExecutorSchema\n>(\"docs\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,KAAK,QAAQ,aAAa;AAEpC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAgD,aAGpD,QAAQ,WAAW"}
@@ -1,4 +1,4 @@
1
- const require_base_executor = require('../../base-executor-CYB3QQu6.js');
1
+ const require_base_executor = require('../../base-executor-FxB6c-wO.js');
2
2
 
3
3
  //#region src/executors/lint/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-QMaDYqZn.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DlhT5y9h.mjs";
2
2
 
3
3
  //#region src/executors/lint/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1 +1 @@
1
- {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/lint/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport type { LintExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"lint\", LintExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.lint(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<LintExecutorSchema> = withExecutor<\n \"lint\",\n LintExecutorSchema\n>(\"lint\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,KAAK,QAAQ,aAAa;AAEpC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAgD,aAGpD,QAAQ,WAAW"}
1
+ {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/lint/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines/engine\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport type { LintExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"lint\", LintExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.lint(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<LintExecutorSchema> = withExecutor<\n \"lint\",\n LintExecutorSchema\n>(\"lint\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,KAAK,QAAQ,aAAa;AAEpC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAgD,aAGpD,QAAQ,WAAW"}
@@ -1,4 +1,4 @@
1
- const require_base_executor = require('../../base-executor-CYB3QQu6.js');
1
+ const require_base_executor = require('../../base-executor-FxB6c-wO.js');
2
2
 
3
3
  //#region src/executors/prepare/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "../../base-executor-QMaDYqZn.mjs";
1
+ import { t as withExecutor } from "../../base-executor-DlhT5y9h.mjs";
2
2
 
3
3
  //#region src/executors/prepare/executor.ts
4
4
  async function executorFn(context, api) {
@@ -1 +1 @@
1
- {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/prepare/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport { PrepareExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"prepare\", PrepareExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.prepare(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<PrepareExecutorSchema> = withExecutor<\n \"prepare\",\n PrepareExecutorSchema\n>(\"prepare\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,QAAQ,QAAQ,aAAa;AAEvC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAmD,aAGvD,WAAW,WAAW"}
1
+ {"version":3,"file":"executor.mjs","names":[],"sources":["../../../../src/executors/prepare/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 { PromiseExecutor } from \"@nx/devkit\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport type { PowerlinesEngine } from \"powerlines/engine\";\nimport {\n PowerlinesExecutorContext,\n withExecutor\n} from \"../../base/base-executor\";\nimport { PrepareExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: PowerlinesExecutorContext<\"prepare\", PrepareExecutorSchema>,\n api: PowerlinesEngine\n): Promise<BaseExecutorResult> {\n await api.prepare(context.inlineConfig);\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<PrepareExecutorSchema> = withExecutor<\n \"prepare\",\n PrepareExecutorSchema\n>(\"prepare\", executorFn);\n\nexport default executor;\n"],"mappings":";;;AA2BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,QAAQ,QAAQ,aAAa;AAEvC,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAmD,aAGvD,WAAW,WAAW"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/nx",
3
- "version": "0.13.66",
3
+ "version": "0.13.68",
4
4
  "private": false,
5
5
  "description": "A Nx plugin to support Powerlines development in Nx monorepos.",
6
6
  "repository": {
@@ -185,7 +185,7 @@
185
185
  "@stryke/path": "^0.29.3",
186
186
  "@stryke/string-format": "^0.17.18",
187
187
  "@stryke/type-checks": "^0.6.9",
188
- "powerlines": "^0.47.28",
188
+ "powerlines": "^0.47.30",
189
189
  "defu": "^6.1.7",
190
190
  "jiti": "^2.7.0"
191
191
  },
@@ -205,5 +205,5 @@
205
205
  "publishConfig": { "access": "public" },
206
206
  "executors": "./executors.json",
207
207
  "generators": "./generators.json",
208
- "gitHead": "42960678257e089a5a86f7b7f4fb714f6eacaef2"
208
+ "gitHead": "3ea953f52abd046f1d1f28920d1a7758b91570f1"
209
209
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-executor-QMaDYqZn.mjs","names":[],"sources":["../../src/base/base-executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InlineConfig,\n Mode,\n OutputConfig,\n PowerlinesCommand,\n PowerlinesEngine\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: PowerlinesEngine\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Powerlines ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, { cache: false });\n const { createPowerlines } = await jiti.import<{\n createPowerlines: typeof import(\"powerlines\").createPowerlines;\n }>(jiti.esmResolve(\"powerlines\"));\n\n const api = await createPowerlines({\n cwd: context.root,\n root: projectConfig.root\n });\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n command,\n inlineConfig: defu(\n {\n name: context.projectName,\n command,\n root: projectConfig.root,\n configFile: options.configFile || options.config,\n projectType: projectConfig.projectType,\n mode: options.mode as Mode,\n output: {\n path: options.outputPath,\n copy:\n options.copyPath === false\n ? false\n : {\n path: options.copyPath,\n assets: options.assets\n },\n minify: options.minify,\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve:\n isSetArray(options.external) ||\n isSetArray(options.noExternal) ||\n isSet(options.skipNodeModulesBundle)\n ? {\n external: isSetArray(options.external)\n ? options.external\n : undefined,\n noExternal: isSetArray(options.noExternal)\n ? options.noExternal\n : undefined,\n skipNodeModulesBundle: isSet(\n options.skipNodeModulesBundle\n )\n ? options.skipNodeModulesBundle\n : undefined\n }\n : undefined,\n define: isSetObject(options.define)\n ? options.define\n : undefined,\n assets: isSetObject(options.assets)\n ? options.assets\n : undefined\n },\n omit(options, [\n \"config\",\n \"configFile\",\n \"outputPath\",\n \"copyPath\",\n \"sourceMap\",\n \"minify\",\n \"format\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"mode\",\n \"define\",\n \"assets\"\n ])\n ) as InlineConfig\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Powerlines ${\n command\n } command executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options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