@powerlines/nx 0.12.29 → 0.12.31

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 (73) hide show
  1. package/dist/src/base/base-executor.d.mts.map +1 -1
  2. package/dist/src/base/base-executor.d.ts.map +1 -1
  3. package/dist/src/base/base-executor.js +6 -5
  4. package/dist/src/base/base-executor.mjs +6 -5
  5. package/dist/src/base/base-executor.mjs.map +1 -1
  6. package/dist/src/base/base-executor.schema.d.mts +0 -4
  7. package/dist/src/base/base-executor.schema.d.mts.map +1 -1
  8. package/dist/src/base/base-executor.schema.d.ts +0 -4
  9. package/dist/src/base/base-executor.schema.d.ts.map +1 -1
  10. package/dist/src/base/base-executor.schema.json +4 -12
  11. package/dist/src/base/base-executor.untyped.js +28 -40
  12. package/dist/src/base/base-executor.untyped.mjs +28 -40
  13. package/dist/src/base/base-executor.untyped.mjs.map +1 -1
  14. package/dist/src/{base-executor-tBEl5AWE.js → base-executor-BNRPo3ZJ.js} +6 -5
  15. package/dist/src/{base-executor-iHU-fU0G.d.ts → base-executor-C6crUvpJ.d.mts} +1 -5
  16. package/dist/src/base-executor-C6crUvpJ.d.mts.map +1 -0
  17. package/dist/src/{base-executor-LiCOQirA.d.mts → base-executor-ChK_tQvQ.d.ts} +1 -5
  18. package/dist/src/base-executor-ChK_tQvQ.d.ts.map +1 -0
  19. package/dist/src/{base-executor-Chnlp8E6.mjs → base-executor-P8R4MeC_.mjs} +7 -6
  20. package/dist/src/base-executor-P8R4MeC_.mjs.map +1 -0
  21. package/dist/src/{base-executor.untyped-CWwiE6fo.mjs → base-executor.untyped-CLAuFeBO.mjs} +29 -41
  22. package/dist/src/base-executor.untyped-CLAuFeBO.mjs.map +1 -0
  23. package/dist/src/{base-executor.untyped-DwcuTgJP.js → base-executor.untyped-Ck6Mm8fr.js} +28 -40
  24. package/dist/src/executors/build/executor.d.mts +1 -5
  25. package/dist/src/executors/build/executor.d.mts.map +1 -1
  26. package/dist/src/executors/build/executor.d.ts +1 -5
  27. package/dist/src/executors/build/executor.d.ts.map +1 -1
  28. package/dist/src/executors/build/executor.js +1 -1
  29. package/dist/src/executors/build/executor.mjs +1 -1
  30. package/dist/src/executors/build/schema.d.ts +0 -4
  31. package/dist/src/executors/build/schema.json +4 -12
  32. package/dist/src/executors/clean/executor.d.mts +1 -5
  33. package/dist/src/executors/clean/executor.d.mts.map +1 -1
  34. package/dist/src/executors/clean/executor.d.ts +1 -5
  35. package/dist/src/executors/clean/executor.d.ts.map +1 -1
  36. package/dist/src/executors/clean/executor.js +1 -1
  37. package/dist/src/executors/clean/executor.mjs +1 -1
  38. package/dist/src/executors/clean/schema.d.ts +0 -4
  39. package/dist/src/executors/clean/schema.json +4 -12
  40. package/dist/src/executors/clean/untyped.js +1 -1
  41. package/dist/src/executors/clean/untyped.mjs +1 -1
  42. package/dist/src/executors/docs/executor.d.mts +1 -5
  43. package/dist/src/executors/docs/executor.d.mts.map +1 -1
  44. package/dist/src/executors/docs/executor.d.ts +1 -5
  45. package/dist/src/executors/docs/executor.d.ts.map +1 -1
  46. package/dist/src/executors/docs/executor.js +1 -1
  47. package/dist/src/executors/docs/executor.mjs +1 -1
  48. package/dist/src/executors/docs/schema.d.ts +0 -4
  49. package/dist/src/executors/docs/schema.json +4 -12
  50. package/dist/src/executors/lint/executor.d.mts +1 -5
  51. package/dist/src/executors/lint/executor.d.mts.map +1 -1
  52. package/dist/src/executors/lint/executor.d.ts +1 -5
  53. package/dist/src/executors/lint/executor.d.ts.map +1 -1
  54. package/dist/src/executors/lint/executor.js +1 -1
  55. package/dist/src/executors/lint/executor.mjs +1 -1
  56. package/dist/src/executors/lint/schema.d.ts +0 -4
  57. package/dist/src/executors/lint/schema.json +4 -12
  58. package/dist/src/executors/prepare/executor.d.mts +1 -5
  59. package/dist/src/executors/prepare/executor.d.mts.map +1 -1
  60. package/dist/src/executors/prepare/executor.d.ts +1 -5
  61. package/dist/src/executors/prepare/executor.d.ts.map +1 -1
  62. package/dist/src/executors/prepare/executor.js +1 -1
  63. package/dist/src/executors/prepare/executor.mjs +1 -1
  64. package/dist/src/executors/prepare/executor.mjs.map +1 -1
  65. package/dist/src/executors/prepare/schema.d.ts +0 -4
  66. package/dist/src/executors/prepare/schema.json +4 -12
  67. package/dist/src/executors/prepare/untyped.js +1 -1
  68. package/dist/src/executors/prepare/untyped.mjs +1 -1
  69. package/package.json +3 -3
  70. package/dist/src/base-executor-Chnlp8E6.mjs.map +0 -1
  71. package/dist/src/base-executor-LiCOQirA.d.mts.map +0 -1
  72. package/dist/src/base-executor-iHU-fU0G.d.ts.map +0 -1
  73. package/dist/src/base-executor.untyped-CWwiE6fo.mjs.map +0 -1
@@ -1 +1 @@
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,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":";;;;;;;KAmCY,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 +1 @@
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,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":";;;;;;;KAmCY,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"}
@@ -29,15 +29,18 @@ function withExecutor(command, executorFn) {
29
29
  const api = await createEngine((0, defu.default)({
30
30
  cwd: workspaceConfig.workspaceRoot,
31
31
  root: projectConfig.root,
32
- configFile: options.configFile ?? options.config
32
+ configFile: options.configFile || options.config
33
33
  }, options, { name: context.projectName }));
34
34
  try {
35
35
  return await Promise.resolve(executorFn((0, defu.default)({
36
36
  projectName: context.projectName,
37
37
  options,
38
38
  workspaceConfig,
39
- inlineConfig: {
39
+ command,
40
+ inlineConfig: (0, defu.default)({
40
41
  command,
42
+ configFile: options.configFile,
43
+ description: projectConfig.metadata?.description,
41
44
  projectType: projectConfig.projectType,
42
45
  output: {
43
46
  path: options.outputPath ? (0, _stryke_path_replace.replacePath)((0, _stryke_path_replace.replacePath)(options.outputPath, workspaceConfig.workspaceRoot), projectConfig.root) : void 0,
@@ -45,7 +48,6 @@ function withExecutor(command, executorFn) {
45
48
  path: options.copyPath ? (0, _stryke_path_replace.replacePath)((0, _stryke_path_replace.replacePath)(options.copyPath, workspaceConfig.workspaceRoot), projectConfig.root) : void 0,
46
49
  assets: options.assets
47
50
  },
48
- format: options.format,
49
51
  sourceMap: options.sourceMap
50
52
  },
51
53
  resolve: {
@@ -53,8 +55,7 @@ function withExecutor(command, executorFn) {
53
55
  noExternal: options.noExternal,
54
56
  skipNodeModulesBundle: options.skipNodeModulesBundle
55
57
  }
56
- },
57
- command
58
+ }, options)
58
59
  }, context), api));
59
60
  } catch (error) {
60
61
  (0, _storm_software_config_tools_logger.writeError)(`An error occurred while executing the Powerlines ${command} command executor: ${(0, _stryke_type_checks_is_error.isError)(error) ? `${error.message}
@@ -26,15 +26,18 @@ function withExecutor(command, executorFn) {
26
26
  const api = await createEngine(defu({
27
27
  cwd: workspaceConfig.workspaceRoot,
28
28
  root: projectConfig.root,
29
- configFile: options.configFile ?? options.config
29
+ configFile: options.configFile || options.config
30
30
  }, options, { name: context.projectName }));
31
31
  try {
32
32
  return await Promise.resolve(executorFn(defu({
33
33
  projectName: context.projectName,
34
34
  options,
35
35
  workspaceConfig,
36
- inlineConfig: {
36
+ command,
37
+ inlineConfig: defu({
37
38
  command,
39
+ configFile: options.configFile,
40
+ description: projectConfig.metadata?.description,
38
41
  projectType: projectConfig.projectType,
39
42
  output: {
40
43
  path: options.outputPath ? replacePath(replacePath(options.outputPath, workspaceConfig.workspaceRoot), projectConfig.root) : void 0,
@@ -42,7 +45,6 @@ function withExecutor(command, executorFn) {
42
45
  path: options.copyPath ? replacePath(replacePath(options.copyPath, workspaceConfig.workspaceRoot), projectConfig.root) : void 0,
43
46
  assets: options.assets
44
47
  },
45
- format: options.format,
46
48
  sourceMap: options.sourceMap
47
49
  },
48
50
  resolve: {
@@ -50,8 +52,7 @@ function withExecutor(command, executorFn) {
50
52
  noExternal: options.noExternal,
51
53
  skipNodeModulesBundle: options.skipNodeModulesBundle
52
54
  }
53
- },
54
- command
55
+ }, options)
55
56
  }, context), api));
56
57
  } catch (error) {
57
58
  writeError(`An error occurred while executing the Powerlines ${command} command executor: ${isError(error) ? `${error.message}
@@ -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 { replacePath } from \"@stryke/path/replace\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InlineConfig,\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 { createEngine } = await jiti.import<{\n createEngine: typeof import(\"powerlines\").createEngine;\n }>(jiti.esmResolve(\"powerlines\"));\n\n const api = await createEngine(\n defu(\n {\n cwd: workspaceConfig.workspaceRoot,\n root: projectConfig.root,\n configFile: options.configFile ?? options.config\n },\n options,\n {\n name: context.projectName\n }\n )\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 projectType: projectConfig.projectType,\n output: {\n path: options.outputPath\n ? replacePath(\n replacePath(\n options.outputPath,\n workspaceConfig.workspaceRoot\n ),\n projectConfig.root\n )\n : undefined,\n copy: {\n path: options.copyPath\n ? replacePath(\n replacePath(\n options.copyPath,\n workspaceConfig.workspaceRoot\n ),\n projectConfig.root\n )\n : undefined,\n assets: options.assets\n },\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 } as InlineConfig,\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;EAElD,MAAM,OAAO,WAAW,QAAQ,MAAM,EAAE,OAAO,OAAO,CAAC;EACvD,MAAM,EAAE,iBAAiB,MAAM,KAAK,OAEjC,KAAK,WAAW,aAAa,CAAC;EAEjC,MAAM,MAAM,MAAM,aAChB,KACE;GACE,KAAK,gBAAgB;GACrB,MAAM,cAAc;GACpB,YAAY,QAAQ,cAAc,QAAQ;GAC3C,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,aAAa,cAAc;KAC3B,QAAQ;MACN,MAAM,QAAQ,aACV,YACE,YACE,QAAQ,YACR,gBAAgB,cACjB,EACD,cAAc,KACf,GACD;MACJ,MAAM;OACJ,MAAM,QAAQ,WACV,YACE,YACE,QAAQ,UACR,gBAAgB,cACjB,EACD,cAAc,KACf,GACD;OACJ,QAAQ,QAAQ;OACjB;MACD,QAAQ,QAAQ;MAChB,WAAW,QAAQ;MACpB;KACD,SAAS;MACP,UAAU,QAAQ;MAClB,YAAY,QAAQ;MACpB,uBAAuB,QAAQ;MAChC;KACF;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 { replacePath } from \"@stryke/path/replace\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InlineConfig,\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 { createEngine } = await jiti.import<{\n createEngine: typeof import(\"powerlines\").createEngine;\n }>(jiti.esmResolve(\"powerlines\"));\n\n const api = await createEngine(\n defu(\n {\n cwd: workspaceConfig.workspaceRoot,\n root: projectConfig.root,\n configFile: options.configFile || options.config\n },\n options,\n {\n name: context.projectName\n }\n )\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 command,\n configFile: options.configFile,\n description: projectConfig.metadata?.description,\n projectType: projectConfig.projectType,\n output: {\n path: options.outputPath\n ? replacePath(\n replacePath(\n options.outputPath,\n workspaceConfig.workspaceRoot\n ),\n projectConfig.root\n )\n : undefined,\n copy: {\n path: options.copyPath\n ? replacePath(\n replacePath(\n options.copyPath,\n workspaceConfig.workspaceRoot\n ),\n projectConfig.root\n )\n : undefined,\n assets: options.assets\n },\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve: {\n external: options.external,\n noExternal: options.noExternal,\n skipNodeModulesBundle: options.skipNodeModulesBundle\n }\n },\n options\n )\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":";;;;;;;;;;;;;;;;;;AAwDA,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,iBAAiB,MAAM,KAAK,OAEjC,KAAK,WAAW,aAAa,CAAC;EAEjC,MAAM,MAAM,MAAM,aAChB,KACE;GACE,KAAK,gBAAgB;GACrB,MAAM,cAAc;GACpB,YAAY,QAAQ,cAAc,QAAQ;GAC3C,EACD,SACA,EACE,MAAM,QAAQ,aACf,CACF,CACF;AAED,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA;IACA,cAAc,KACZ;KACE;KACA,YAAY,QAAQ;KACpB,aAAa,cAAc,UAAU;KACrC,aAAa,cAAc;KAC3B,QAAQ;MACN,MAAM,QAAQ,aACV,YACE,YACE,QAAQ,YACR,gBAAgB,cACjB,EACD,cAAc,KACf,GACD;MACJ,MAAM;OACJ,MAAM,QAAQ,WACV,YACE,YACE,QAAQ,UACR,gBAAgB,cACjB,EACD,cAAc,KACf,GACD;OACJ,QAAQ,QAAQ;OACjB;MACD,WAAW,QAAQ;MACpB;KACD,SAAS;MACP,UAAU,QAAQ;MAClB,YAAY,QAAQ;MACpB,uBAAuB,QAAQ;MAChC;KACF,EACD,QACD;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;YACjB;AACR,SAAM,IAAI,UAAU;;IAGxB;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,UAAO;KAEV;EACF,CACF"}
@@ -7,7 +7,6 @@ interface BaseExecutorSchema {
7
7
  *
8
8
  * The path to the Powerlines configuration file. Alias for `configFile`.
9
9
  *
10
- * @default "{projectRoot}/powerlines.config.ts"
11
10
  *
12
11
  * @format path
13
12
  */
@@ -17,7 +16,6 @@ interface BaseExecutorSchema {
17
16
  *
18
17
  * The path to the Powerlines configuration file. Alias for `config`.
19
18
  *
20
- * @default "{projectRoot}/powerlines.config.ts"
21
19
  *
22
20
  * @format path
23
21
  */
@@ -36,7 +34,6 @@ interface BaseExecutorSchema {
36
34
  *
37
35
  * The path to the tsconfig file
38
36
  *
39
- * @default "{projectRoot}/tsconfig.json"
40
37
  *
41
38
  * @format path
42
39
  */
@@ -79,7 +76,6 @@ interface BaseExecutorSchema {
79
76
  *
80
77
  * The platform to build
81
78
  *
82
- * @default "neutral"
83
79
  *
84
80
  * @enum neutral,node,browser
85
81
  */
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.schema.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"],"mappings":";;;UAIiBA,kBAAAA;;;;;;;;;;EAUhBG,MAAAA;;;;;;;;;;EAWAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;;EAWRK,QAAAA;;;;;;;;;EAUAC,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"}
1
+ {"version":3,"file":"base-executor.schema.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"],"mappings":";;;UAIiBA,kBAAAA;;;;;;;;;EAShBG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;EAUTU,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"}
@@ -7,7 +7,6 @@ interface BaseExecutorSchema {
7
7
  *
8
8
  * The path to the Powerlines configuration file. Alias for `configFile`.
9
9
  *
10
- * @default "{projectRoot}/powerlines.config.ts"
11
10
  *
12
11
  * @format path
13
12
  */
@@ -17,7 +16,6 @@ interface BaseExecutorSchema {
17
16
  *
18
17
  * The path to the Powerlines configuration file. Alias for `config`.
19
18
  *
20
- * @default "{projectRoot}/powerlines.config.ts"
21
19
  *
22
20
  * @format path
23
21
  */
@@ -36,7 +34,6 @@ interface BaseExecutorSchema {
36
34
  *
37
35
  * The path to the tsconfig file
38
36
  *
39
- * @default "{projectRoot}/tsconfig.json"
40
37
  *
41
38
  * @format path
42
39
  */
@@ -79,7 +76,6 @@ interface BaseExecutorSchema {
79
76
  *
80
77
  * The platform to build
81
78
  *
82
- * @default "neutral"
83
79
  *
84
80
  * @enum neutral,node,browser
85
81
  */
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.schema.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"],"mappings":";;;UAIiBA,kBAAAA;;;;;;;;;;EAUhBG,MAAAA;;;;;;;;;;EAWAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;;EAWRK,QAAAA;;;;;;;;;EAUAC,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"}
1
+ {"version":3,"file":"base-executor.schema.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"],"mappings":";;;UAIiBA,kBAAAA;;;;;;;;;EAShBG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;EAUTU,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"}
@@ -9,16 +9,14 @@
9
9
  "type": "string",
10
10
  "format": "path",
11
11
  "description": "The path to the Powerlines configuration file. Alias for `configFile`.",
12
- "id": "#config",
13
- "default": "{projectRoot}/powerlines.config.ts"
12
+ "id": "#config"
14
13
  },
15
14
  "configFile": {
16
15
  "title": "Powerlines Configuration File",
17
16
  "type": "string",
18
17
  "format": "path",
19
18
  "description": "The path to the Powerlines configuration file. Alias for `config`.",
20
- "id": "#configFile",
21
- "default": "{projectRoot}/powerlines.config.ts"
19
+ "id": "#configFile"
22
20
  },
23
21
  "input": {
24
22
  "title": "Input Entry File(s)",
@@ -35,8 +33,7 @@
35
33
  "type": "string",
36
34
  "format": "path",
37
35
  "description": "The path to the tsconfig file",
38
- "id": "#tsconfig",
39
- "default": "{projectRoot}/tsconfig.json"
36
+ "id": "#tsconfig"
40
37
  },
41
38
  "outputPath": {
42
39
  "title": "Output Path",
@@ -97,8 +94,7 @@
97
94
  "node",
98
95
  "browser"
99
96
  ],
100
- "id": "#platform",
101
- "default": "neutral"
97
+ "id": "#platform"
102
98
  },
103
99
  "external": {
104
100
  "title": "External",
@@ -172,15 +168,11 @@
172
168
  },
173
169
  "type": "object",
174
170
  "default": {
175
- "config": "{projectRoot}/powerlines.config.ts",
176
- "configFile": "{projectRoot}/powerlines.config.ts",
177
- "tsconfig": "{projectRoot}/tsconfig.json",
178
171
  "copyPath": {},
179
172
  "format": [
180
173
  "cjs",
181
174
  "esm"
182
175
  ],
183
- "platform": "neutral",
184
176
  "external": [],
185
177
  "noExternal": [],
186
178
  "define": {},
@@ -9,24 +9,18 @@ var base_executor_untyped_default = (0, untyped.defineUntypedSchema)({
9
9
  description: "A shared/base schema type definition for Powerlines executors",
10
10
  required: []
11
11
  },
12
- config: {
13
- $schema: {
14
- title: "Powerlines Configuration File",
15
- type: "string",
16
- format: "path",
17
- description: "The path to the Powerlines configuration file. Alias for `configFile`."
18
- },
19
- $default: "{projectRoot}/powerlines.config.ts"
20
- },
21
- configFile: {
22
- $schema: {
23
- title: "Powerlines Configuration File",
24
- type: "string",
25
- format: "path",
26
- description: "The path to the Powerlines configuration file. Alias for `config`."
27
- },
28
- $default: "{projectRoot}/powerlines.config.ts"
29
- },
12
+ config: { $schema: {
13
+ title: "Powerlines Configuration File",
14
+ type: "string",
15
+ format: "path",
16
+ description: "The path to the Powerlines configuration file. Alias for `configFile`."
17
+ } },
18
+ configFile: { $schema: {
19
+ title: "Powerlines Configuration File",
20
+ type: "string",
21
+ format: "path",
22
+ description: "The path to the Powerlines configuration file. Alias for `config`."
23
+ } },
30
24
  input: { $schema: {
31
25
  title: "Input Entry File(s)",
32
26
  format: "path",
@@ -34,15 +28,12 @@ var base_executor_untyped_default = (0, untyped.defineUntypedSchema)({
34
28
  description: "The entry file(s) that serve as the input for the project",
35
29
  items: { type: "string" }
36
30
  } },
37
- tsconfig: {
38
- $schema: {
39
- title: "TSConfig Path",
40
- type: "string",
41
- format: "path",
42
- description: "The path to the tsconfig file"
43
- },
44
- $default: "{projectRoot}/tsconfig.json"
45
- },
31
+ tsconfig: { $schema: {
32
+ title: "TSConfig Path",
33
+ type: "string",
34
+ format: "path",
35
+ description: "The path to the tsconfig file"
36
+ } },
46
37
  outputPath: { $schema: {
47
38
  title: "Output Path",
48
39
  type: "string",
@@ -81,19 +72,16 @@ var base_executor_untyped_default = (0, untyped.defineUntypedSchema)({
81
72
  },
82
73
  $resolve: (val = ["cjs", "esm"]) => [].concat(val)
83
74
  },
84
- platform: {
85
- $schema: {
86
- title: "Platform",
87
- type: "string",
88
- description: "The platform to build",
89
- enum: [
90
- "neutral",
91
- "node",
92
- "browser"
93
- ]
94
- },
95
- $default: "neutral"
96
- },
75
+ platform: { $schema: {
76
+ title: "Platform",
77
+ type: "string",
78
+ description: "The platform to build",
79
+ enum: [
80
+ "neutral",
81
+ "node",
82
+ "browser"
83
+ ]
84
+ } },
97
85
  external: {
98
86
  $schema: {
99
87
  title: "External",
@@ -8,24 +8,18 @@ var base_executor_untyped_default = defineUntypedSchema({
8
8
  description: "A shared/base schema type definition for Powerlines executors",
9
9
  required: []
10
10
  },
11
- config: {
12
- $schema: {
13
- title: "Powerlines Configuration File",
14
- type: "string",
15
- format: "path",
16
- description: "The path to the Powerlines configuration file. Alias for `configFile`."
17
- },
18
- $default: "{projectRoot}/powerlines.config.ts"
19
- },
20
- configFile: {
21
- $schema: {
22
- title: "Powerlines Configuration File",
23
- type: "string",
24
- format: "path",
25
- description: "The path to the Powerlines configuration file. Alias for `config`."
26
- },
27
- $default: "{projectRoot}/powerlines.config.ts"
28
- },
11
+ config: { $schema: {
12
+ title: "Powerlines Configuration File",
13
+ type: "string",
14
+ format: "path",
15
+ description: "The path to the Powerlines configuration file. Alias for `configFile`."
16
+ } },
17
+ configFile: { $schema: {
18
+ title: "Powerlines Configuration File",
19
+ type: "string",
20
+ format: "path",
21
+ description: "The path to the Powerlines configuration file. Alias for `config`."
22
+ } },
29
23
  input: { $schema: {
30
24
  title: "Input Entry File(s)",
31
25
  format: "path",
@@ -33,15 +27,12 @@ var base_executor_untyped_default = defineUntypedSchema({
33
27
  description: "The entry file(s) that serve as the input for the project",
34
28
  items: { type: "string" }
35
29
  } },
36
- tsconfig: {
37
- $schema: {
38
- title: "TSConfig Path",
39
- type: "string",
40
- format: "path",
41
- description: "The path to the tsconfig file"
42
- },
43
- $default: "{projectRoot}/tsconfig.json"
44
- },
30
+ tsconfig: { $schema: {
31
+ title: "TSConfig Path",
32
+ type: "string",
33
+ format: "path",
34
+ description: "The path to the tsconfig file"
35
+ } },
45
36
  outputPath: { $schema: {
46
37
  title: "Output Path",
47
38
  type: "string",
@@ -80,19 +71,16 @@ var base_executor_untyped_default = defineUntypedSchema({
80
71
  },
81
72
  $resolve: (val = ["cjs", "esm"]) => [].concat(val)
82
73
  },
83
- platform: {
84
- $schema: {
85
- title: "Platform",
86
- type: "string",
87
- description: "The platform to build",
88
- enum: [
89
- "neutral",
90
- "node",
91
- "browser"
92
- ]
93
- },
94
- $default: "neutral"
95
- },
74
+ platform: { $schema: {
75
+ title: "Platform",
76
+ type: "string",
77
+ description: "The platform to build",
78
+ enum: [
79
+ "neutral",
80
+ "node",
81
+ "browser"
82
+ ]
83
+ } },
96
84
  external: {
97
85
  $schema: {
98
86
  title: "External",
@@ -1 +1 @@
1
- {"version":3,"file":"base-executor.untyped.mjs","names":[],"sources":["../../../src/base/base-executor.untyped.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { defineUntypedSchema } from \"untyped\";\n\nexport default defineUntypedSchema({\n $schema: {\n id: \"BaseExecutorSchema\",\n title: \"Base Executor\",\n description:\n \"A shared/base schema type definition for Powerlines executors\",\n required: []\n },\n config: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `configFile`.\"\n },\n $default: \"{projectRoot}/powerlines.config.ts\"\n },\n configFile: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `config`.\"\n },\n $default: \"{projectRoot}/powerlines.config.ts\"\n },\n input: {\n $schema: {\n title: \"Input Entry File(s)\",\n format: \"path\",\n type: \"array\",\n description: \"The entry file(s) that serve as the input for the project\",\n items: { type: \"string\" }\n }\n },\n tsconfig: {\n $schema: {\n title: \"TSConfig Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the tsconfig file\"\n },\n $default: \"{projectRoot}/tsconfig.json\"\n },\n outputPath: {\n $schema: {\n title: \"Output Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the output directory for the build artifacts\"\n }\n },\n copyPath: {\n $schema: {\n title: \"Copy Path\",\n description: \"A directory path to copy the build artifacts into\",\n oneOf: [\n { type: \"string\", format: \"path\" },\n { type: \"boolean\", enum: [false] }\n ]\n }\n },\n sourceMap: {\n $schema: {\n title: \"Sourcemap\",\n type: \"boolean\",\n description: \"Generate a sourcemap\"\n }\n },\n format: {\n $schema: {\n title: \"Format\",\n type: \"array\",\n description: \"The format to build\",\n items: {\n type: \"string\",\n enum: [\"cjs\", \"esm\", \"iife\"]\n }\n },\n $resolve: (val: string[] = [\"cjs\", \"esm\"]) => ([] as string[]).concat(val)\n },\n platform: {\n $schema: {\n title: \"Platform\",\n type: \"string\",\n description: \"The platform to build\",\n enum: [\"neutral\", \"node\", \"browser\"]\n },\n $default: \"neutral\"\n },\n external: {\n $schema: {\n title: \"External\",\n type: \"array\",\n description: \"The external dependencies\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n noExternal: {\n $schema: {\n title: \"No External\",\n type: \"array\",\n description: \"The dependencies that should not be treated as external\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n skipNodeModulesBundle: {\n $schema: {\n title: \"Skip Node Modules Bundle\",\n type: \"boolean\",\n description:\n \"Skip bundling node_modules during the build process (if required)\"\n }\n },\n mode: {\n $schema: {\n title: \"Mode\",\n type: \"string\",\n description: \"The build mode\",\n enum: [\"development\", \"test\", \"production\"]\n }\n },\n logLevel: {\n $schema: {\n title: \"Log Level\",\n type: \"string\",\n description: \"The log level to use for the build process\",\n enum: [\n \"fatal\",\n \"error\",\n \"warn\",\n \"success\",\n \"info\",\n \"debug\",\n \"trace\",\n \"silent\"\n ]\n }\n },\n define: {\n $schema: {\n title: \"Define\",\n type: \"object\",\n tsType: \"Record<string, string>\",\n description: \"The `define` values\"\n },\n $resolve: (val: Record<string, string> = {}) => val,\n $default: {}\n },\n assets: {\n $schema: {\n title: \"Assets\",\n type: \"any\",\n tsType:\n \"Array<{ input?: string; output?: string; glob: string; ignore?: string[]; dot?: boolean; }>\",\n description: \"The `assets` values\"\n }\n }\n});\n"],"mappings":";;;AAoBA,oCAAe,oBAAoB;CACjC,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aACE;EACF,UAAU,EAAE;EACb;CACD,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aACE;GACH;EACD,UAAU;EACX;CACD,YAAY;EACV,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aACE;GACH;EACD,UAAU;EACX;CACD,OAAO,EACL,SAAS;EACP,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa;EACb,OAAO,EAAE,MAAM,UAAU;EAC1B,EACF;CACD,UAAU;EACR,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aAAa;GACd;EACD,UAAU;EACX;CACD,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;EACd,EACF;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,aAAa;EACb,OAAO,CACL;GAAE,MAAM;GAAU,QAAQ;GAAQ,EAClC;GAAE,MAAM;GAAW,MAAM,CAAC,MAAM;GAAE,CACnC;EACF,EACF;CACD,WAAW,EACT,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACd,EACF;CACD,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,MAAM;KAAC;KAAO;KAAO;KAAO;IAC7B;GACF;EACD,WAAW,MAAgB,CAAC,OAAO,MAAM,KAAM,EAAE,CAAc,OAAO,IAAI;EAC3E;CACD,UAAU;EACR,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACb,MAAM;IAAC;IAAW;IAAQ;IAAU;GACrC;EACD,UAAU;EACX;CACD,UAAU;EACR,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACd;EACD,WAAW,MAAgB,EAAE,KAAM,EAAE,CAAc,OAAO,IAAI;EAC/D;CACD,YAAY;EACV,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACd;EACD,WAAW,MAAgB,EAAE,KAAM,EAAE,CAAc,OAAO,IAAI;EAC/D;CACD,uBAAuB,EACrB,SAAS;EACP,OAAO;EACP,MAAM;EACN,aACE;EACH,EACF;CACD,MAAM,EACJ,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GAAC;GAAe;GAAQ;GAAa;EAC5C,EACF;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,EACF;CACD,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aAAa;GACd;EACD,WAAW,MAA8B,EAAE,KAAK;EAChD,UAAU,EAAE;EACb;CACD,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,QACE;EACF,aAAa;EACd,EACF;CACF,CAAC"}
1
+ {"version":3,"file":"base-executor.untyped.mjs","names":[],"sources":["../../../src/base/base-executor.untyped.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { defineUntypedSchema } from \"untyped\";\n\nexport default defineUntypedSchema({\n $schema: {\n id: \"BaseExecutorSchema\",\n title: \"Base Executor\",\n description:\n \"A shared/base schema type definition for Powerlines executors\",\n required: []\n },\n config: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `configFile`.\"\n }\n },\n configFile: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `config`.\"\n }\n },\n input: {\n $schema: {\n title: \"Input Entry File(s)\",\n format: \"path\",\n type: \"array\",\n description: \"The entry file(s) that serve as the input for the project\",\n items: { type: \"string\" }\n }\n },\n tsconfig: {\n $schema: {\n title: \"TSConfig Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the tsconfig file\"\n }\n },\n outputPath: {\n $schema: {\n title: \"Output Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the output directory for the build artifacts\"\n }\n },\n copyPath: {\n $schema: {\n title: \"Copy Path\",\n description: \"A directory path to copy the build artifacts into\",\n oneOf: [\n { type: \"string\", format: \"path\" },\n { type: \"boolean\", enum: [false] }\n ]\n }\n },\n sourceMap: {\n $schema: {\n title: \"Sourcemap\",\n type: \"boolean\",\n description: \"Generate a sourcemap\"\n }\n },\n format: {\n $schema: {\n title: \"Format\",\n type: \"array\",\n description: \"The format to build\",\n items: {\n type: \"string\",\n enum: [\"cjs\", \"esm\", \"iife\"]\n }\n },\n $resolve: (val: string[] = [\"cjs\", \"esm\"]) => ([] as string[]).concat(val)\n },\n platform: {\n $schema: {\n title: \"Platform\",\n type: \"string\",\n description: \"The platform to build\",\n enum: [\"neutral\", \"node\", \"browser\"]\n }\n },\n external: {\n $schema: {\n title: \"External\",\n type: \"array\",\n description: \"The external dependencies\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n noExternal: {\n $schema: {\n title: \"No External\",\n type: \"array\",\n description: \"The dependencies that should not be treated as external\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n skipNodeModulesBundle: {\n $schema: {\n title: \"Skip Node Modules Bundle\",\n type: \"boolean\",\n description:\n \"Skip bundling node_modules during the build process (if required)\"\n }\n },\n mode: {\n $schema: {\n title: \"Mode\",\n type: \"string\",\n description: \"The build mode\",\n enum: [\"development\", \"test\", \"production\"]\n }\n },\n logLevel: {\n $schema: {\n title: \"Log Level\",\n type: \"string\",\n description: \"The log level to use for the build process\",\n enum: [\n \"fatal\",\n \"error\",\n \"warn\",\n \"success\",\n \"info\",\n \"debug\",\n \"trace\",\n \"silent\"\n ]\n }\n },\n define: {\n $schema: {\n title: \"Define\",\n type: \"object\",\n tsType: \"Record<string, string>\",\n description: \"The `define` values\"\n },\n $resolve: (val: Record<string, string> = {}) => val,\n $default: {}\n },\n assets: {\n $schema: {\n title: \"Assets\",\n type: \"any\",\n tsType:\n \"Array<{ input?: string; output?: string; glob: string; ignore?: string[]; dot?: boolean; }>\",\n description: \"The `assets` values\"\n }\n }\n});\n"],"mappings":";;;AAoBA,oCAAe,oBAAoB;CACjC,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aACE;EACF,UAAU,EAAE;EACb;CACD,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aACE;EACH,EACF;CACD,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aACE;EACH,EACF;CACD,OAAO,EACL,SAAS;EACP,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa;EACb,OAAO,EAAE,MAAM,UAAU;EAC1B,EACF;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;EACd,EACF;CACD,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;EACd,EACF;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,aAAa;EACb,OAAO,CACL;GAAE,MAAM;GAAU,QAAQ;GAAQ,EAClC;GAAE,MAAM;GAAW,MAAM,CAAC,MAAM;GAAE,CACnC;EACF,EACF;CACD,WAAW,EACT,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACd,EACF;CACD,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,MAAM;KAAC;KAAO;KAAO;KAAO;IAC7B;GACF;EACD,WAAW,MAAgB,CAAC,OAAO,MAAM,KAAM,EAAE,CAAc,OAAO,IAAI;EAC3E;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GAAC;GAAW;GAAQ;GAAU;EACrC,EACF;CACD,UAAU;EACR,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACd;EACD,WAAW,MAAgB,EAAE,KAAM,EAAE,CAAc,OAAO,IAAI;EAC/D;CACD,YAAY;EACV,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACd;EACD,WAAW,MAAgB,EAAE,KAAM,EAAE,CAAc,OAAO,IAAI;EAC/D;CACD,uBAAuB,EACrB,SAAS;EACP,OAAO;EACP,MAAM;EACN,aACE;EACH,EACF;CACD,MAAM,EACJ,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GAAC;GAAe;GAAQ;GAAa;EAC5C,EACF;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACb,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,EACF;CACD,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,QAAQ;GACR,aAAa;GACd;EACD,WAAW,MAA8B,EAAE,KAAK;EAChD,UAAU,EAAE;EACb;CACD,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,QACE;EACF,aAAa;EACd,EACF;CACF,CAAC"}
@@ -28,15 +28,18 @@ function withExecutor(command, executorFn) {
28
28
  const api = await createEngine((0, defu.default)({
29
29
  cwd: workspaceConfig.workspaceRoot,
30
30
  root: projectConfig.root,
31
- configFile: options.configFile ?? options.config
31
+ configFile: options.configFile || options.config
32
32
  }, options, { name: context.projectName }));
33
33
  try {
34
34
  return await Promise.resolve(executorFn((0, defu.default)({
35
35
  projectName: context.projectName,
36
36
  options,
37
37
  workspaceConfig,
38
- inlineConfig: {
38
+ command,
39
+ inlineConfig: (0, defu.default)({
39
40
  command,
41
+ configFile: options.configFile,
42
+ description: projectConfig.metadata?.description,
40
43
  projectType: projectConfig.projectType,
41
44
  output: {
42
45
  path: options.outputPath ? (0, _stryke_path_replace.replacePath)((0, _stryke_path_replace.replacePath)(options.outputPath, workspaceConfig.workspaceRoot), projectConfig.root) : void 0,
@@ -44,7 +47,6 @@ function withExecutor(command, executorFn) {
44
47
  path: options.copyPath ? (0, _stryke_path_replace.replacePath)((0, _stryke_path_replace.replacePath)(options.copyPath, workspaceConfig.workspaceRoot), projectConfig.root) : void 0,
45
48
  assets: options.assets
46
49
  },
47
- format: options.format,
48
50
  sourceMap: options.sourceMap
49
51
  },
50
52
  resolve: {
@@ -52,8 +54,7 @@ function withExecutor(command, executorFn) {
52
54
  noExternal: options.noExternal,
53
55
  skipNodeModulesBundle: options.skipNodeModulesBundle
54
56
  }
55
- },
56
- command
57
+ }, options)
57
58
  }, context), api));
58
59
  } catch (error) {
59
60
  (0, _storm_software_config_tools_logger.writeError)(`An error occurred while executing the Powerlines ${command} command executor: ${(0, _stryke_type_checks_is_error.isError)(error) ? `${error.message}
@@ -12,7 +12,6 @@ interface BaseExecutorSchema {
12
12
  *
13
13
  * The path to the Powerlines configuration file. Alias for `configFile`.
14
14
  *
15
- * @default "{projectRoot}/powerlines.config.ts"
16
15
  *
17
16
  * @format path
18
17
  */
@@ -22,7 +21,6 @@ interface BaseExecutorSchema {
22
21
  *
23
22
  * The path to the Powerlines configuration file. Alias for `config`.
24
23
  *
25
- * @default "{projectRoot}/powerlines.config.ts"
26
24
  *
27
25
  * @format path
28
26
  */
@@ -41,7 +39,6 @@ interface BaseExecutorSchema {
41
39
  *
42
40
  * The path to the tsconfig file
43
41
  *
44
- * @default "{projectRoot}/tsconfig.json"
45
42
  *
46
43
  * @format path
47
44
  */
@@ -84,7 +81,6 @@ interface BaseExecutorSchema {
84
81
  *
85
82
  * The platform to build
86
83
  *
87
- * @default "neutral"
88
84
  *
89
85
  * @enum neutral,node,browser
90
86
  */
@@ -160,4 +156,4 @@ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCo
160
156
  };
161
157
  //#endregion
162
158
  export { PowerlinesExecutorContext as t };
163
- //# sourceMappingURL=base-executor-iHU-fU0G.d.ts.map
159
+ //# sourceMappingURL=base-executor-C6crUvpJ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor-C6crUvpJ.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;;;;;;;EASCG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;EA2GsF;;;;ACnHvF;;;;EDkBCC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;EAUTU,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;;;KCnHxE,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"}
@@ -12,7 +12,6 @@ interface BaseExecutorSchema {
12
12
  *
13
13
  * The path to the Powerlines configuration file. Alias for `configFile`.
14
14
  *
15
- * @default "{projectRoot}/powerlines.config.ts"
16
15
  *
17
16
  * @format path
18
17
  */
@@ -22,7 +21,6 @@ interface BaseExecutorSchema {
22
21
  *
23
22
  * The path to the Powerlines configuration file. Alias for `config`.
24
23
  *
25
- * @default "{projectRoot}/powerlines.config.ts"
26
24
  *
27
25
  * @format path
28
26
  */
@@ -41,7 +39,6 @@ interface BaseExecutorSchema {
41
39
  *
42
40
  * The path to the tsconfig file
43
41
  *
44
- * @default "{projectRoot}/tsconfig.json"
45
42
  *
46
43
  * @format path
47
44
  */
@@ -84,7 +81,6 @@ interface BaseExecutorSchema {
84
81
  *
85
82
  * The platform to build
86
83
  *
87
- * @default "neutral"
88
84
  *
89
85
  * @enum neutral,node,browser
90
86
  */
@@ -160,4 +156,4 @@ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCo
160
156
  };
161
157
  //#endregion
162
158
  export { PowerlinesExecutorContext as t };
163
- //# sourceMappingURL=base-executor-LiCOQirA.d.mts.map
159
+ //# sourceMappingURL=base-executor-ChK_tQvQ.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor-ChK_tQvQ.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;;;;;;;EASCG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;EA2GsF;;;;ACnHvF;;;;EDkBCC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;EAUTU,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;;;KCnHxE,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"}