@powerlines/nx 0.13.233 → 0.13.234

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 (155) hide show
  1. package/dist/src/_virtual/_rolldown/runtime.js +28 -0
  2. package/dist/src/base/base-executor.d.mts +60 -0
  3. package/dist/src/base/base-executor.d.mts.map +1 -0
  4. package/dist/src/base/base-executor.d.ts +60 -0
  5. package/dist/src/base/base-executor.d.ts.map +1 -0
  6. package/dist/src/base/base-executor.js +118 -0
  7. package/dist/src/base/base-executor.mjs +116 -0
  8. package/dist/src/base/base-executor.mjs.map +1 -0
  9. package/dist/src/base/base-executor.schema.d.js +0 -0
  10. package/dist/src/base/base-executor.schema.d.mts +167 -0
  11. package/dist/src/base/base-executor.schema.d.mts.map +1 -0
  12. package/dist/src/base/base-executor.schema.d.ts +164 -175
  13. package/dist/src/base/base-executor.schema.d.ts.map +1 -0
  14. package/dist/src/base/base-executor.untyped.d.mts +5 -0
  15. package/dist/src/base/base-executor.untyped.d.mts.map +1 -0
  16. package/dist/src/base/base-executor.untyped.d.ts +4 -0
  17. package/dist/src/base/base-executor.untyped.d.ts.map +1 -0
  18. package/dist/src/base/base-executor.untyped.js +176 -0
  19. package/dist/src/base/base-executor.untyped.mjs +177 -0
  20. package/dist/src/base/base-executor.untyped.mjs.map +1 -0
  21. package/dist/src/base/index.d.mts +2 -0
  22. package/dist/src/base/index.d.ts +2 -0
  23. package/dist/src/base/index.js +5 -0
  24. package/dist/src/base/index.mjs +4 -0
  25. package/dist/src/base-executor-BTwUZeOz.js +122 -0
  26. package/dist/src/base-executor-HCD7M10I.mjs +116 -0
  27. package/dist/src/base-executor-HCD7M10I.mjs.map +1 -0
  28. package/dist/src/base-executor.untyped-B9Vk-kJC.mjs +177 -0
  29. package/dist/src/base-executor.untyped-B9Vk-kJC.mjs.map +1 -0
  30. package/dist/src/base-executor.untyped-DZhWL1zT.js +181 -0
  31. package/dist/src/executors/build/executor.d.mts +194 -0
  32. package/dist/src/executors/build/executor.d.mts.map +1 -0
  33. package/dist/src/executors/build/executor.d.ts +193 -0
  34. package/dist/src/executors/build/executor.d.ts.map +1 -0
  35. package/dist/src/executors/build/executor.js +11 -0
  36. package/dist/src/executors/build/executor.mjs +12 -0
  37. package/dist/src/executors/build/executor.mjs.map +1 -0
  38. package/dist/src/executors/build/untyped.d.mts +5 -0
  39. package/dist/src/executors/build/untyped.d.mts.map +1 -0
  40. package/dist/src/executors/build/untyped.d.ts +4 -0
  41. package/dist/src/executors/build/untyped.d.ts.map +1 -0
  42. package/dist/src/executors/build/untyped.js +24 -0
  43. package/dist/src/executors/build/untyped.mjs +25 -0
  44. package/dist/src/executors/build/untyped.mjs.map +1 -0
  45. package/dist/src/executors/clean/executor.d.mts +171 -0
  46. package/dist/src/executors/clean/executor.d.mts.map +1 -0
  47. package/dist/src/executors/clean/executor.d.ts +170 -0
  48. package/dist/src/executors/clean/executor.d.ts.map +1 -0
  49. package/dist/src/executors/clean/executor.js +11 -0
  50. package/dist/src/executors/clean/executor.mjs +12 -0
  51. package/dist/src/executors/clean/executor.mjs.map +1 -0
  52. package/dist/src/executors/clean/untyped.d.mts +5 -0
  53. package/dist/src/executors/clean/untyped.d.mts.map +1 -0
  54. package/dist/src/executors/clean/untyped.d.ts +4 -0
  55. package/dist/src/executors/clean/untyped.d.ts.map +1 -0
  56. package/dist/src/executors/clean/untyped.js +16 -0
  57. package/dist/src/executors/clean/untyped.mjs +17 -0
  58. package/dist/src/executors/clean/untyped.mjs.map +1 -0
  59. package/dist/src/executors/docs/executor.d.mts +185 -0
  60. package/dist/src/executors/docs/executor.d.mts.map +1 -0
  61. package/dist/src/executors/docs/executor.d.ts +184 -0
  62. package/dist/src/executors/docs/executor.d.ts.map +1 -0
  63. package/dist/src/executors/docs/executor.js +11 -0
  64. package/dist/src/executors/docs/executor.mjs +12 -0
  65. package/dist/src/executors/docs/executor.mjs.map +1 -0
  66. package/dist/src/executors/docs/untyped.d.mts +5 -0
  67. package/dist/src/executors/docs/untyped.d.mts.map +1 -0
  68. package/dist/src/executors/docs/untyped.d.ts +4 -0
  69. package/dist/src/executors/docs/untyped.d.ts.map +1 -0
  70. package/dist/src/executors/docs/untyped.js +16 -0
  71. package/dist/src/executors/docs/untyped.mjs +17 -0
  72. package/dist/src/executors/docs/untyped.mjs.map +1 -0
  73. package/dist/src/executors/lint/executor.d.mts +185 -0
  74. package/dist/src/executors/lint/executor.d.mts.map +1 -0
  75. package/dist/src/executors/lint/executor.d.ts +184 -0
  76. package/dist/src/executors/lint/executor.d.ts.map +1 -0
  77. package/dist/src/executors/lint/executor.js +11 -0
  78. package/dist/src/executors/lint/executor.mjs +12 -0
  79. package/dist/src/executors/lint/executor.mjs.map +1 -0
  80. package/dist/src/executors/lint/untyped.d.mts +5 -0
  81. package/dist/src/executors/lint/untyped.d.mts.map +1 -0
  82. package/dist/src/executors/lint/untyped.d.ts +4 -0
  83. package/dist/src/executors/lint/untyped.d.ts.map +1 -0
  84. package/dist/src/executors/lint/untyped.js +16 -0
  85. package/dist/src/executors/lint/untyped.mjs +17 -0
  86. package/dist/src/executors/lint/untyped.mjs.map +1 -0
  87. package/dist/src/executors/prepare/executor.d.mts +185 -0
  88. package/dist/src/executors/prepare/executor.d.mts.map +1 -0
  89. package/dist/src/executors/prepare/executor.d.ts +184 -0
  90. package/dist/src/executors/prepare/executor.d.ts.map +1 -0
  91. package/dist/src/executors/prepare/executor.js +11 -0
  92. package/dist/src/executors/prepare/executor.mjs +12 -0
  93. package/dist/src/executors/prepare/executor.mjs.map +1 -0
  94. package/dist/src/executors/prepare/untyped.d.mts +5 -0
  95. package/dist/src/executors/prepare/untyped.d.mts.map +1 -0
  96. package/dist/src/executors/prepare/untyped.d.ts +4 -0
  97. package/dist/src/executors/prepare/untyped.d.ts.map +1 -0
  98. package/dist/src/executors/prepare/untyped.js +26 -0
  99. package/dist/src/executors/prepare/untyped.mjs +27 -0
  100. package/dist/src/executors/prepare/untyped.mjs.map +1 -0
  101. package/dist/src/generators/sync/generator.d.mts +7 -0
  102. package/dist/src/generators/sync/generator.d.mts.map +1 -0
  103. package/dist/src/generators/sync/generator.d.ts +7 -0
  104. package/dist/src/generators/sync/generator.d.ts.map +1 -0
  105. package/dist/src/generators/sync/generator.js +11 -0
  106. package/dist/src/generators/sync/generator.mjs +10 -0
  107. package/dist/src/generators/sync/generator.mjs.map +1 -0
  108. package/dist/src/generators/sync/untyped.d.mts +5 -0
  109. package/dist/src/generators/sync/untyped.d.mts.map +1 -0
  110. package/dist/src/generators/sync/untyped.d.ts +4 -0
  111. package/dist/src/generators/sync/untyped.d.ts.map +1 -0
  112. package/dist/src/generators/sync/untyped.js +22 -0
  113. package/dist/src/generators/sync/untyped.mjs +23 -0
  114. package/dist/src/generators/sync/untyped.mjs.map +1 -0
  115. package/dist/src/helpers/constants.d.mts +8 -0
  116. package/dist/src/helpers/constants.d.mts.map +1 -0
  117. package/dist/src/helpers/constants.d.ts +8 -0
  118. package/dist/src/helpers/constants.d.ts.map +1 -0
  119. package/dist/src/helpers/constants.js +34 -0
  120. package/dist/src/helpers/constants.mjs +34 -0
  121. package/dist/src/helpers/constants.mjs.map +1 -0
  122. package/dist/src/helpers/index.d.mts +3 -0
  123. package/dist/src/helpers/index.d.ts +3 -0
  124. package/dist/src/helpers/index.js +8 -0
  125. package/dist/src/helpers/index.mjs +4 -0
  126. package/dist/src/helpers/plugin-utilities.d.mts +56 -0
  127. package/dist/src/helpers/plugin-utilities.d.mts.map +1 -0
  128. package/dist/src/helpers/plugin-utilities.d.ts +56 -0
  129. package/dist/src/helpers/plugin-utilities.d.ts.map +1 -0
  130. package/dist/src/helpers/plugin-utilities.js +255 -0
  131. package/dist/src/helpers/plugin-utilities.mjs +251 -0
  132. package/dist/src/helpers/plugin-utilities.mjs.map +1 -0
  133. package/dist/src/index.d.mts +7 -0
  134. package/dist/src/index.d.ts +7 -0
  135. package/dist/src/index.js +12 -0
  136. package/dist/src/index.mjs +7 -0
  137. package/dist/src/plugin/index.d.mts +291 -0
  138. package/dist/src/plugin/index.d.mts.map +1 -0
  139. package/dist/src/plugin/index.d.ts +291 -0
  140. package/dist/src/plugin/index.d.ts.map +1 -0
  141. package/dist/src/plugin/index.js +288 -0
  142. package/dist/src/plugin/index.mjs +286 -0
  143. package/dist/src/plugin/index.mjs.map +1 -0
  144. package/dist/src/rolldown-runtime-C24Yb2bl.js +33 -0
  145. package/dist/src/types/index.d.mts +2 -0
  146. package/dist/src/types/index.d.ts +2 -0
  147. package/dist/src/types/index.js +0 -0
  148. package/dist/src/types/index.mjs +1 -0
  149. package/dist/src/types/plugin.d.mts +288 -0
  150. package/dist/src/types/plugin.d.mts.map +1 -0
  151. package/dist/src/types/plugin.d.ts +288 -0
  152. package/dist/src/types/plugin.d.ts.map +1 -0
  153. package/dist/src/types/plugin.js +0 -0
  154. package/dist/src/types/plugin.mjs +1 -0
  155. package/package.json +3 -4
@@ -0,0 +1,28 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+ exports.__toESM = __toESM;
@@ -0,0 +1,60 @@
1
+ import { BaseExecutorSchema } from "./base-executor.schema.mjs";
2
+ import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
3
+ import { StormWorkspaceConfig } from "@storm-software/config/types";
4
+ import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
+ import { DeepPartial } from "@stryke/types/base";
6
+ import { ExecutionOptions, FrameworkOptions, InlineConfig } from "powerlines";
7
+ //#region src/base/base-executor.d.ts
8
+ type PowerlinesExecutorContext<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
9
+ projectName: string;
10
+ command: string;
11
+ options: TExecutorSchema;
12
+ inlineConfig: InlineConfig;
13
+ workspaceConfig: StormWorkspaceConfig;
14
+ };
15
+ type PowerlinesExecutorApi = (inlineConfig: InlineConfig) => Promise<void>;
16
+ interface WithExecutorOptions {
17
+ /**
18
+ * The import path for the executor API module, which is used to dynamically import the API function that will be called during execution. This value should be a string representing the module path, and it defaults to "powerlines/api" if not provided. The specified module should export a default function that matches the expected signature for the executor API, which will be invoked with the execution parameters when the executor is run.
19
+ *
20
+ * @defaultValue "powerlines/api"
21
+ */
22
+ importPath?: string;
23
+ /**
24
+ * Default options to be merged with the execution options, which can be used to provide default values for certain execution parameters or to override specific options for all executions of the executor. This value should be an object that matches the shape of the `ExecutionOptions` type, and it will be merged with the options provided during execution to create the final set of options that will be passed to the executor API function.
25
+ *
26
+ * @remarks
27
+ * This can be useful for setting default values for options that are commonly used across multiple executions, or for providing a consistent set of options for all executions of the executor without requiring the caller to specify them each time.
28
+ */
29
+ defaultOptions?: DeepPartial<ExecutionOptions>;
30
+ /**
31
+ * Details about the framework being used in the current execution, which can be used by plugins and other parts of the system to customize behavior based on the framework.
32
+ *
33
+ * @remarks
34
+ * This should only be used by framework plugins to ensure the correct framework name is applied
35
+ *
36
+ * @defaultValue
37
+ * ```ts
38
+ * {
39
+ * name: "powerlines",
40
+ * orgId: "storm-software"
41
+ * }
42
+ * ```
43
+ */
44
+ framework?: FrameworkOptions;
45
+ }
46
+ /**
47
+ * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
48
+ *
49
+ * @remarks
50
+ * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.
51
+ *
52
+ * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
53
+ * @param executorFn - The function that will be executed when the command is run.
54
+ * @param options - Additional options for configuring the executor, such as the import path for the API module and default execution options.
55
+ * @returns A Promise that resolves to the result of the executor function.
56
+ */
57
+ declare function withExecutor<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: string, executorFn: (context: PowerlinesExecutorContext<TExecutorSchema>, api: PowerlinesExecutorApi) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined, options?: WithExecutorOptions): PromiseExecutor<TExecutorSchema>;
58
+ //#endregion
59
+ export { PowerlinesExecutorApi, PowerlinesExecutorContext, WithExecutorOptions, withExecutor };
60
+ //# sourceMappingURL=base-executor.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor.d.mts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;KA4CY,0BACV,wBAAwB,qBAAqB,sBAC3C;EACF;EACA;EACA,SAAS;EACT,cAAc;EACd,iBAAiB;;KAGP,yBACV,cAAc,iBACX;UAEY;;;;;;EAMf;;;;;;;EAQA,iBAAiB,YAAY;;;;;;;;;;;;;;;EAgB7B,YAAY;;;;;;;;;;;;;iBAcE,aACd,wBAAwB,qBAAqB,oBAE7C,iBACA,aACE,SAAS,0BAA0B,kBACnC,KAAK,0BAEH,QAAQ,yCACR,uCAGJ,UAAS,sBACR,gBAAgB"}
@@ -0,0 +1,60 @@
1
+ import { BaseExecutorSchema } from "./base-executor.schema.js";
2
+ import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
3
+ import { StormWorkspaceConfig } from "@storm-software/config/types";
4
+ import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
+ import { DeepPartial } from "@stryke/types/base";
6
+ import { ExecutionOptions, FrameworkOptions, InlineConfig } from "powerlines";
7
+ //#region src/base/base-executor.d.ts
8
+ type PowerlinesExecutorContext<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
9
+ projectName: string;
10
+ command: string;
11
+ options: TExecutorSchema;
12
+ inlineConfig: InlineConfig;
13
+ workspaceConfig: StormWorkspaceConfig;
14
+ };
15
+ type PowerlinesExecutorApi = (inlineConfig: InlineConfig) => Promise<void>;
16
+ interface WithExecutorOptions {
17
+ /**
18
+ * The import path for the executor API module, which is used to dynamically import the API function that will be called during execution. This value should be a string representing the module path, and it defaults to "powerlines/api" if not provided. The specified module should export a default function that matches the expected signature for the executor API, which will be invoked with the execution parameters when the executor is run.
19
+ *
20
+ * @defaultValue "powerlines/api"
21
+ */
22
+ importPath?: string;
23
+ /**
24
+ * Default options to be merged with the execution options, which can be used to provide default values for certain execution parameters or to override specific options for all executions of the executor. This value should be an object that matches the shape of the `ExecutionOptions` type, and it will be merged with the options provided during execution to create the final set of options that will be passed to the executor API function.
25
+ *
26
+ * @remarks
27
+ * This can be useful for setting default values for options that are commonly used across multiple executions, or for providing a consistent set of options for all executions of the executor without requiring the caller to specify them each time.
28
+ */
29
+ defaultOptions?: DeepPartial<ExecutionOptions>;
30
+ /**
31
+ * Details about the framework being used in the current execution, which can be used by plugins and other parts of the system to customize behavior based on the framework.
32
+ *
33
+ * @remarks
34
+ * This should only be used by framework plugins to ensure the correct framework name is applied
35
+ *
36
+ * @defaultValue
37
+ * ```ts
38
+ * {
39
+ * name: "powerlines",
40
+ * orgId: "storm-software"
41
+ * }
42
+ * ```
43
+ */
44
+ framework?: FrameworkOptions;
45
+ }
46
+ /**
47
+ * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
48
+ *
49
+ * @remarks
50
+ * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.
51
+ *
52
+ * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
53
+ * @param executorFn - The function that will be executed when the command is run.
54
+ * @param options - Additional options for configuring the executor, such as the import path for the API module and default execution options.
55
+ * @returns A Promise that resolves to the result of the executor function.
56
+ */
57
+ declare function withExecutor<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: string, executorFn: (context: PowerlinesExecutorContext<TExecutorSchema>, api: PowerlinesExecutorApi) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined, options?: WithExecutorOptions): PromiseExecutor<TExecutorSchema>;
58
+ //#endregion
59
+ export { PowerlinesExecutorApi, PowerlinesExecutorContext, WithExecutorOptions, withExecutor };
60
+ //# sourceMappingURL=base-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor.d.ts","names":[],"sources":["../../../src/base/base-executor.ts"],"mappings":";;;;;;;KA4CY,0BACV,wBAAwB,qBAAqB,sBAC3C;EACF;EACA;EACA,SAAS;EACT,cAAc;EACd,iBAAiB;;KAGP,yBACV,cAAc,iBACX;UAEY;;;;;;EAMf;;;;;;;EAQA,iBAAiB,YAAY;;;;;;;;;;;;;;;EAgB7B,YAAY;;;;;;;;;;;;;iBAcE,aACd,wBAAwB,qBAAqB,oBAE7C,iBACA,aACE,SAAS,0BAA0B,kBACnC,KAAK,0BAEH,QAAQ,yCACR,uCAGJ,UAAS,sBACR,gBAAgB"}
@@ -0,0 +1,118 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.js');
3
+ let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
4
+ let _storm_software_workspace_tools_base_base_executor = require("@storm-software/workspace-tools/base/base-executor");
5
+ let _stryke_helpers_omit = require("@stryke/helpers/omit");
6
+ let _stryke_path_join = require("@stryke/path/join");
7
+ let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
8
+ let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
+ let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
10
+ let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
11
+ let _stryke_type_checks_is_set_array = require("@stryke/type-checks/is-set-array");
12
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
13
+ let defu = require("defu");
14
+ defu = require_runtime.__toESM(defu);
15
+ let jiti = require("jiti");
16
+
17
+ //#region src/base/base-executor.ts
18
+ /**
19
+ * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
20
+ *
21
+ * @remarks
22
+ * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.
23
+ *
24
+ * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
25
+ * @param executorFn - The function that will be executed when the command is run.
26
+ * @param options - Additional options for configuring the executor, such as the import path for the API module and default execution options.
27
+ * @returns A Promise that resolves to the result of the executor function.
28
+ */
29
+ function withExecutor(command, executorFn, options = {}) {
30
+ const { importPath = "powerlines/api", defaultOptions = {}, framework = {} } = options;
31
+ framework.name ??= "powerlines";
32
+ framework.orgId ??= "storm-software";
33
+ return (0, _storm_software_workspace_tools_base_base_executor.withRunExecutor)(`${(0, _stryke_string_format_title_case.titleCase)(framework.name)} - ${(0, _stryke_string_format_title_case.titleCase)(command)} executor`, async (options, context, workspaceConfig) => {
34
+ if (!context.projectName) throw new Error(`The ${(0, _stryke_string_format_title_case.titleCase)(framework.name)} - ${(0, _stryke_string_format_title_case.titleCase)(command)} executor requires \`projectName\` on the context object.`);
35
+ if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error(`The ${(0, _stryke_string_format_title_case.titleCase)(framework.name)} - ${(0, _stryke_string_format_title_case.titleCase)(command)} executor requires \`projectsConfigurations\` on the context object.`);
36
+ const projectConfig = context.projectsConfigurations.projects[context.projectName];
37
+ const jiti$1 = (0, jiti.createJiti)(context.root, {
38
+ cache: false,
39
+ tsconfigPaths: true
40
+ });
41
+ const [{ formatExecutionId, getName }, api] = await Promise.all([jiti$1.import("powerlines/plugin-utils"), jiti$1.import(jiti$1.esmResolve(importPath)).then((mod) => mod.default)]);
42
+ try {
43
+ return await Promise.resolve(executorFn((0, defu.default)({
44
+ projectName: context.projectName,
45
+ options,
46
+ workspaceConfig,
47
+ command,
48
+ inlineConfig: (0, defu.default)({
49
+ command,
50
+ root: projectConfig.root,
51
+ configFile: options.configFile || options.config,
52
+ configIndex: options.configIndex,
53
+ projectType: projectConfig.projectType,
54
+ mode: options.mode,
55
+ output: {
56
+ path: options.outputPath,
57
+ copy: options.copyPath === false ? false : {
58
+ path: options.copyPath,
59
+ assets: options.assets
60
+ },
61
+ minify: options.minify,
62
+ sourceMap: options.sourceMap
63
+ },
64
+ resolve: (0, _stryke_type_checks_is_set_array.isSetArray)(options.external) || (0, _stryke_type_checks_is_set_array.isSetArray)(options.noExternal) || (0, _stryke_type_checks_is_set.isSet)(options.skipNodeModulesBundle) ? {
65
+ external: (0, _stryke_type_checks_is_set_array.isSetArray)(options.external) ? options.external : void 0,
66
+ noExternal: (0, _stryke_type_checks_is_set_array.isSetArray)(options.noExternal) ? options.noExternal : void 0,
67
+ skipNodeModulesBundle: (0, _stryke_type_checks_is_set.isSet)(options.skipNodeModulesBundle) ? options.skipNodeModulesBundle : void 0
68
+ } : void 0,
69
+ define: (0, _stryke_type_checks_is_set_object.isSetObject)(options.define) ? options.define : void 0,
70
+ assets: (0, _stryke_type_checks_is_set_object.isSetObject)(options.assets) ? options.assets : void 0
71
+ }, (0, _stryke_helpers_omit.omit)(options, [
72
+ "config",
73
+ "configFile",
74
+ "outputPath",
75
+ "copyPath",
76
+ "sourceMap",
77
+ "minify",
78
+ "format",
79
+ "external",
80
+ "noExternal",
81
+ "skipNodeModulesBundle",
82
+ "mode",
83
+ "define",
84
+ "assets"
85
+ ]))
86
+ }, context), async (inlineConfig) => {
87
+ const name = inlineConfig.name || context.projectName || await getName(context.root, projectConfig.root);
88
+ return api({
89
+ options: (0, defu.default)(defaultOptions, {
90
+ name,
91
+ executionId: formatExecutionId(name, command, options.configIndex ?? 0),
92
+ cwd: context.root,
93
+ root: projectConfig.root,
94
+ configFile: options.configFile || options.config || (0, _stryke_path_join.joinPaths)(projectConfig.root, `${(0, _stryke_string_format_kebab_case.kebabCase)(framework.name)}.config.ts`),
95
+ configIndex: options.configIndex,
96
+ framework
97
+ }),
98
+ command,
99
+ inlineConfig
100
+ });
101
+ }));
102
+ } catch (error) {
103
+ (0, _storm_software_config_tools_logger.writeError)(`An error occurred while executing the ${(0, _stryke_string_format_title_case.titleCase)(framework.name)} - ${(0, _stryke_string_format_title_case.titleCase)(command)} executor: ${(0, _stryke_type_checks_is_error.isError)(error) ? `${error.message}
104
+
105
+ ${error.stack}` : "Unknown error"}`);
106
+ return { success: false };
107
+ }
108
+ }, {
109
+ skipReadingConfig: false,
110
+ hooks: { applyDefaultOptions: (options) => {
111
+ options.copyPath ??= "dist/{projectRoot}";
112
+ return options;
113
+ } }
114
+ });
115
+ }
116
+
117
+ //#endregion
118
+ exports.withExecutor = withExecutor;
@@ -0,0 +1,116 @@
1
+ import { writeError } from "@storm-software/config-tools/logger";
2
+ import { withRunExecutor } from "@storm-software/workspace-tools/base/base-executor";
3
+ import { omit } from "@stryke/helpers/omit";
4
+ import { joinPaths } from "@stryke/path/join";
5
+ import { kebabCase } from "@stryke/string-format/kebab-case";
6
+ import { titleCase } from "@stryke/string-format/title-case";
7
+ import { isError } from "@stryke/type-checks/is-error";
8
+ import { isSet } from "@stryke/type-checks/is-set";
9
+ import { isSetArray } from "@stryke/type-checks/is-set-array";
10
+ import { isSetObject } from "@stryke/type-checks/is-set-object";
11
+ import defu from "defu";
12
+ import { createJiti } from "jiti";
13
+
14
+ //#region src/base/base-executor.ts
15
+ /**
16
+ * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
17
+ *
18
+ * @remarks
19
+ * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.
20
+ *
21
+ * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
22
+ * @param executorFn - The function that will be executed when the command is run.
23
+ * @param options - Additional options for configuring the executor, such as the import path for the API module and default execution options.
24
+ * @returns A Promise that resolves to the result of the executor function.
25
+ */
26
+ function withExecutor(command, executorFn, options = {}) {
27
+ const { importPath = "powerlines/api", defaultOptions = {}, framework = {} } = options;
28
+ framework.name ??= "powerlines";
29
+ framework.orgId ??= "storm-software";
30
+ return withRunExecutor(`${titleCase(framework.name)} - ${titleCase(command)} executor`, async (options, context, workspaceConfig) => {
31
+ if (!context.projectName) throw new Error(`The ${titleCase(framework.name)} - ${titleCase(command)} executor requires \`projectName\` on the context object.`);
32
+ if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error(`The ${titleCase(framework.name)} - ${titleCase(command)} executor requires \`projectsConfigurations\` on the context object.`);
33
+ const projectConfig = context.projectsConfigurations.projects[context.projectName];
34
+ const jiti = createJiti(context.root, {
35
+ cache: false,
36
+ tsconfigPaths: true
37
+ });
38
+ const [{ formatExecutionId, getName }, api] = await Promise.all([jiti.import("powerlines/plugin-utils"), jiti.import(jiti.esmResolve(importPath)).then((mod) => mod.default)]);
39
+ try {
40
+ return await Promise.resolve(executorFn(defu({
41
+ projectName: context.projectName,
42
+ options,
43
+ workspaceConfig,
44
+ command,
45
+ inlineConfig: defu({
46
+ command,
47
+ root: projectConfig.root,
48
+ configFile: options.configFile || options.config,
49
+ configIndex: options.configIndex,
50
+ projectType: projectConfig.projectType,
51
+ mode: options.mode,
52
+ output: {
53
+ path: options.outputPath,
54
+ copy: options.copyPath === false ? false : {
55
+ path: options.copyPath,
56
+ assets: options.assets
57
+ },
58
+ minify: options.minify,
59
+ sourceMap: options.sourceMap
60
+ },
61
+ resolve: isSetArray(options.external) || isSetArray(options.noExternal) || isSet(options.skipNodeModulesBundle) ? {
62
+ external: isSetArray(options.external) ? options.external : void 0,
63
+ noExternal: isSetArray(options.noExternal) ? options.noExternal : void 0,
64
+ skipNodeModulesBundle: isSet(options.skipNodeModulesBundle) ? options.skipNodeModulesBundle : void 0
65
+ } : void 0,
66
+ define: isSetObject(options.define) ? options.define : void 0,
67
+ assets: isSetObject(options.assets) ? options.assets : void 0
68
+ }, omit(options, [
69
+ "config",
70
+ "configFile",
71
+ "outputPath",
72
+ "copyPath",
73
+ "sourceMap",
74
+ "minify",
75
+ "format",
76
+ "external",
77
+ "noExternal",
78
+ "skipNodeModulesBundle",
79
+ "mode",
80
+ "define",
81
+ "assets"
82
+ ]))
83
+ }, context), async (inlineConfig) => {
84
+ const name = inlineConfig.name || context.projectName || await getName(context.root, projectConfig.root);
85
+ return api({
86
+ options: defu(defaultOptions, {
87
+ name,
88
+ executionId: formatExecutionId(name, command, options.configIndex ?? 0),
89
+ cwd: context.root,
90
+ root: projectConfig.root,
91
+ configFile: options.configFile || options.config || joinPaths(projectConfig.root, `${kebabCase(framework.name)}.config.ts`),
92
+ configIndex: options.configIndex,
93
+ framework
94
+ }),
95
+ command,
96
+ inlineConfig
97
+ });
98
+ }));
99
+ } catch (error) {
100
+ writeError(`An error occurred while executing the ${titleCase(framework.name)} - ${titleCase(command)} executor: ${isError(error) ? `${error.message}
101
+
102
+ ${error.stack}` : "Unknown error"}`);
103
+ return { success: false };
104
+ }
105
+ }, {
106
+ skipReadingConfig: false,
107
+ hooks: { applyDefaultOptions: (options) => {
108
+ options.copyPath ??= "dist/{projectRoot}";
109
+ return options;
110
+ } }
111
+ });
112
+ }
113
+
114
+ //#endregion
115
+ export { withExecutor };
116
+ //# sourceMappingURL=base-executor.mjs.map
@@ -0,0 +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 type { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport type { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport type { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { DeepPartial } from \"@stryke/types/base\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n ExecutionApiParams,\n ExecutionOptions,\n FrameworkOptions,\n InlineConfig,\n Mode,\n OutputConfig\n} from \"powerlines\";\nimport type { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type PowerlinesExecutorContext<\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n> = ExecutorContext & {\n projectName: string;\n command: string;\n options: TExecutorSchema;\n inlineConfig: InlineConfig;\n workspaceConfig: StormWorkspaceConfig;\n};\n\nexport type PowerlinesExecutorApi = (\n inlineConfig: InlineConfig\n) => Promise<void>;\n\nexport interface WithExecutorOptions {\n /**\n * The import path for the executor API module, which is used to dynamically import the API function that will be called during execution. This value should be a string representing the module path, and it defaults to \"powerlines/api\" if not provided. The specified module should export a default function that matches the expected signature for the executor API, which will be invoked with the execution parameters when the executor is run.\n *\n * @defaultValue \"powerlines/api\"\n */\n importPath?: string;\n\n /**\n * Default options to be merged with the execution options, which can be used to provide default values for certain execution parameters or to override specific options for all executions of the executor. This value should be an object that matches the shape of the `ExecutionOptions` type, and it will be merged with the options provided during execution to create the final set of options that will be passed to the executor API function.\n *\n * @remarks\n * This can be useful for setting default values for options that are commonly used across multiple executions, or for providing a consistent set of options for all executions of the executor without requiring the caller to specify them each time.\n */\n defaultOptions?: DeepPartial<ExecutionOptions>;\n\n /**\n * Details about the framework being used in the current execution, which can be used by plugins and other parts of the system to customize behavior based on the framework.\n *\n * @remarks\n * This should only be used by framework plugins to ensure the correct framework name is applied\n *\n * @defaultValue\n * ```ts\n * {\n * name: \"powerlines\",\n * orgId: \"storm-software\"\n * }\n * ```\n */\n framework?: FrameworkOptions;\n}\n\n/**\n * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.\n *\n * @param command - The command that the executor will handle (e.g., \"new\", \"prepare\", \"build\", etc.).\n * @param executorFn - The function that will be executed when the command is run.\n * @param options - Additional options for configuring the executor, such as the import path for the API module and default execution options.\n * @returns A Promise that resolves to the result of the executor function.\n */\nexport function withExecutor<\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n>(\n command: string,\n executorFn: (\n context: PowerlinesExecutorContext<TExecutorSchema>,\n api: PowerlinesExecutorApi\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined,\n options: WithExecutorOptions = {}\n): PromiseExecutor<TExecutorSchema> {\n const {\n importPath = \"powerlines/api\",\n defaultOptions = {},\n framework = {} as FrameworkOptions\n } = options;\n\n framework.name ??= \"powerlines\";\n framework.orgId ??= \"storm-software\";\n\n return withRunExecutor(\n `${titleCase(framework.name)} - ${titleCase(command)} executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n `The ${titleCase(framework.name)} - ${titleCase(\n command\n )} executor requires \\`projectName\\` on the context object.`\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n `The ${titleCase(framework.name)} - ${titleCase(\n command\n )} executor requires \\`projectsConfigurations\\` on the context object.`\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, {\n cache: false,\n tsconfigPaths: true\n });\n // Load via jiti — static require() of powerlines/plugin-utils fails when Nx\n // registers ts-node + tsconfig paths (maps to ESM .ts source under type:module).\n const [{ formatExecutionId, getName }, api] = await Promise.all([\n jiti.import<{\n formatExecutionId: (\n projectName: string,\n command: string,\n configIndex?: number\n ) => string;\n getName: (cwd: string, root: string) => Promise<string>;\n }>(\"powerlines/plugin-utils\"),\n jiti\n .import<{\n default: (params: ExecutionApiParams) => Promise<void>;\n }>(jiti.esmResolve(importPath))\n .then(mod => mod.default)\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 root: projectConfig.root,\n configFile: options.configFile || options.config,\n configIndex: options.configIndex,\n projectType: projectConfig.projectType,\n mode: options.mode as Mode,\n output: {\n path: options.outputPath,\n copy:\n options.copyPath === false\n ? false\n : {\n path: options.copyPath,\n assets: options.assets\n },\n minify: options.minify,\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve:\n isSetArray(options.external) ||\n isSetArray(options.noExternal) ||\n isSet(options.skipNodeModulesBundle)\n ? {\n external: isSetArray(options.external)\n ? options.external\n : undefined,\n noExternal: isSetArray(options.noExternal)\n ? options.noExternal\n : undefined,\n skipNodeModulesBundle: isSet(\n options.skipNodeModulesBundle\n )\n ? options.skipNodeModulesBundle\n : undefined\n }\n : undefined,\n define: isSetObject(options.define)\n ? options.define\n : undefined,\n assets: isSetObject(options.assets)\n ? options.assets\n : undefined\n },\n omit(options, [\n \"config\",\n \"configFile\",\n \"outputPath\",\n \"copyPath\",\n \"sourceMap\",\n \"minify\",\n \"format\",\n \"external\",\n \"noExternal\",\n \"skipNodeModulesBundle\",\n \"mode\",\n \"define\",\n \"assets\"\n ])\n ) as InlineConfig\n },\n context\n ),\n async (inlineConfig: InlineConfig) => {\n const name =\n inlineConfig.name ||\n context.projectName ||\n (await getName(context.root, projectConfig.root));\n\n return api({\n options: defu(defaultOptions, {\n name,\n executionId: formatExecutionId(\n name,\n command,\n options.configIndex ?? 0\n ),\n cwd: context.root,\n root: projectConfig.root,\n configFile:\n options.configFile ||\n options.config ||\n joinPaths(\n projectConfig.root,\n `${kebabCase(framework.name)}.config.ts`\n ),\n configIndex: options.configIndex,\n framework\n }) as ExecutionOptions,\n command,\n inlineConfig\n });\n }\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the ${titleCase(\n framework.name\n )} - ${titleCase(command)} executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options.copyPath ??= \"dist/{projectRoot}\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":"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"}
File without changes
@@ -0,0 +1,167 @@
1
+ //#region src/base/base-executor.schema.d.ts
2
+ // Generated by @storm-software/untyped
3
+ // Do not edit this file directly
4
+ interface BaseExecutorSchema {
5
+ /**
6
+ * Powerlines Configuration File
7
+ *
8
+ * The path to the Powerlines configuration file. Alias for `configFile`.
9
+ *
10
+ *
11
+ * @format path
12
+ */
13
+ config?: string;
14
+ /**
15
+ * Powerlines Configuration File
16
+ *
17
+ * The path to the Powerlines configuration file. Alias for `config`.
18
+ *
19
+ *
20
+ * @format path
21
+ */
22
+ configFile?: string;
23
+ /**
24
+ * Powerlines Configuration Index
25
+ *
26
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
27
+ *
28
+ * @default 0
29
+ */
30
+ configIndex?: number;
31
+ /**
32
+ * Input Entry File(s)
33
+ *
34
+ * The entry file(s) that serve as the input for the project
35
+ *
36
+ *
37
+ * @format path
38
+ */
39
+ input?: Array<string>;
40
+ /**
41
+ * TSConfig Path
42
+ *
43
+ * The path to the tsconfig file
44
+ *
45
+ *
46
+ * @format path
47
+ */
48
+ tsconfig?: string;
49
+ /**
50
+ * Output Path
51
+ *
52
+ * The path to the output directory for the build artifacts
53
+ *
54
+ *
55
+ * @format path
56
+ */
57
+ outputPath?: string;
58
+ /**
59
+ * Copy Path
60
+ *
61
+ * A directory path to copy the build artifacts into
62
+ *
63
+ *
64
+ * @oneOf [object Object],[object Object]
65
+ */
66
+ copyPath?: any;
67
+ /**
68
+ * Sourcemap
69
+ *
70
+ * Generate a sourcemap
71
+ *
72
+ */
73
+ sourceMap?: boolean;
74
+ /**
75
+ * Minify
76
+ *
77
+ * Minify the output
78
+ *
79
+ */
80
+ minify?: boolean;
81
+ /**
82
+ * Format
83
+ *
84
+ * The format to build
85
+ *
86
+ * @default ["cjs","esm"]
87
+ */
88
+ format?: Array<string>;
89
+ /**
90
+ * Platform
91
+ *
92
+ * The platform to build
93
+ *
94
+ *
95
+ * @enum neutral,node,browser
96
+ */
97
+ platform?: string;
98
+ /**
99
+ * External
100
+ *
101
+ * The external dependencies
102
+ *
103
+ */
104
+ external?: Array<any>;
105
+ /**
106
+ * No External
107
+ *
108
+ * The dependencies that should not be treated as external
109
+ *
110
+ */
111
+ noExternal?: Array<any>;
112
+ /**
113
+ * Skip Node Modules Bundle
114
+ *
115
+ * Skip bundling node_modules during the build process (if required)
116
+ *
117
+ */
118
+ skipNodeModulesBundle?: boolean;
119
+ /**
120
+ * Mode
121
+ *
122
+ * The build mode
123
+ *
124
+ *
125
+ * @enum development,test,production
126
+ */
127
+ mode?: string;
128
+ /**
129
+ * Log Level
130
+ *
131
+ * The log level to use for the build process
132
+ *
133
+ *
134
+ * @enum fatal,error,warn,success,info,debug,trace,silent
135
+ */
136
+ logLevel?: string;
137
+ /**
138
+ * Define
139
+ *
140
+ * The `define` values
141
+ *
142
+ */
143
+ define?: Record<string, string>;
144
+ /**
145
+ * Assets
146
+ *
147
+ * The `assets` values
148
+ *
149
+ */
150
+ assets?: Array<{
151
+ input?: string;
152
+ output?: string;
153
+ glob: string;
154
+ ignore?: string[];
155
+ dot?: boolean;
156
+ }>;
157
+ /**
158
+ * Additional Arguments
159
+ *
160
+ * The additional arguments provided during execution of the command
161
+ *
162
+ */
163
+ additionalArgs?: Record<string, string>;
164
+ }
165
+ //#endregion
166
+ export { BaseExecutorSchema };
167
+ //# sourceMappingURL=base-executor.schema.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor.schema.d.mts","names":[],"sources":["../../../src/base/base-executor.schema.d.ts"],"mappings":";;;UAIiB;;;;;;;;;EAShB;;;;;;;;;EAUA;;;;;;;;EASA;;;;;;;;;EAUA,QAAQ;;;;;;;;;EAUR;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;;;EAQA;;;;;;;EAQA;;;;;;;;EASA,SAAS;;;;;;;;;EAUT;;;;;;;EAQA,WAAW;;;;;;;EAQX,aAAa;;;;;;;EAQb;;;;;;;;;EAUA;;;;;;;;;EAUA;;;;;;;EAQA,SAAS;;;;;;;EAQT,SAAS;IAAQ;IAAgB;IAAiB;IAAc;IAAmB;;;;;;;;EAQnF,iBAAiB"}