@powerlines/nx 0.11.294 → 0.11.296

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 (107) hide show
  1. package/dist/src/_virtual/_rolldown/runtime.js +29 -0
  2. package/dist/src/base/base-executor.d.mts +28 -2
  3. package/dist/src/base/base-executor.d.mts.map +1 -0
  4. package/dist/src/base/base-executor.d.ts +28 -2
  5. package/dist/src/base/base-executor.d.ts.map +1 -0
  6. package/dist/src/base/base-executor.js +3 -3
  7. package/dist/src/base/base-executor.untyped.d.mts +7 -2
  8. package/dist/src/base/base-executor.untyped.d.mts.map +1 -0
  9. package/dist/src/base/base-executor.untyped.d.ts +6 -2
  10. package/dist/src/base/base-executor.untyped.d.ts.map +1 -0
  11. package/dist/src/base/base-executor.untyped.js +1 -1
  12. package/dist/src/base/index.d.mts +1 -1
  13. package/dist/src/base/index.d.ts +1 -1
  14. package/dist/src/base-executor-BOTlYnaD.d.mts +163 -0
  15. package/dist/src/base-executor-BOTlYnaD.d.mts.map +1 -0
  16. package/dist/src/base-executor-DH33Fd1U.js +79 -0
  17. package/dist/src/base-executor-N_ZgvzpA.d.ts +163 -0
  18. package/dist/src/base-executor-N_ZgvzpA.d.ts.map +1 -0
  19. package/dist/src/base-executor-dn4QVqZ4.mjs +72 -0
  20. package/dist/src/base-executor-dn4QVqZ4.mjs.map +1 -0
  21. package/dist/src/base-executor.untyped-CWwiE6fo.mjs +162 -0
  22. package/dist/src/base-executor.untyped-CWwiE6fo.mjs.map +1 -0
  23. package/dist/src/base-executor.untyped-DwcuTgJP.js +167 -0
  24. package/dist/src/executors/build/executor.d.mts +2 -2
  25. package/dist/src/executors/build/executor.d.ts +1 -1
  26. package/dist/src/executors/build/executor.js +2 -2
  27. package/dist/src/executors/build/executor.mjs +1 -1
  28. package/dist/src/executors/build/untyped.js +1 -0
  29. package/dist/src/executors/build/untyped.mjs +1 -0
  30. package/dist/src/executors/build/untyped.mjs.map +1 -1
  31. package/dist/src/executors/clean/executor.d.mts +2 -2
  32. package/dist/src/executors/clean/executor.d.ts +1 -1
  33. package/dist/src/executors/clean/executor.js +2 -2
  34. package/dist/src/executors/clean/executor.mjs +1 -1
  35. package/dist/src/executors/clean/untyped.js +2 -2
  36. package/dist/src/executors/clean/untyped.mjs +1 -1
  37. package/dist/src/executors/docs/executor.d.mts +2 -2
  38. package/dist/src/executors/docs/executor.d.ts +1 -1
  39. package/dist/src/executors/docs/executor.js +2 -2
  40. package/dist/src/executors/docs/executor.mjs +1 -1
  41. package/dist/src/executors/docs/untyped.js +1 -0
  42. package/dist/src/executors/docs/untyped.mjs +1 -0
  43. package/dist/src/executors/docs/untyped.mjs.map +1 -1
  44. package/dist/src/executors/lint/executor.d.mts +2 -2
  45. package/dist/src/executors/lint/executor.d.ts +1 -1
  46. package/dist/src/executors/lint/executor.js +2 -2
  47. package/dist/src/executors/lint/executor.mjs +1 -1
  48. package/dist/src/executors/lint/untyped.js +1 -0
  49. package/dist/src/executors/lint/untyped.mjs +1 -0
  50. package/dist/src/executors/lint/untyped.mjs.map +1 -1
  51. package/dist/src/executors/prepare/executor.d.mts +2 -2
  52. package/dist/src/executors/prepare/executor.d.ts +1 -1
  53. package/dist/src/executors/prepare/executor.js +2 -2
  54. package/dist/src/executors/prepare/executor.mjs +1 -1
  55. package/dist/src/executors/prepare/untyped.js +2 -2
  56. package/dist/src/executors/prepare/untyped.mjs +1 -1
  57. package/dist/src/helpers/constants.d.mts +8 -2
  58. package/dist/src/helpers/constants.d.mts.map +1 -0
  59. package/dist/src/helpers/constants.d.ts +8 -2
  60. package/dist/src/helpers/constants.d.ts.map +1 -0
  61. package/dist/src/helpers/index.d.mts +2 -2
  62. package/dist/src/helpers/index.d.ts +2 -2
  63. package/dist/src/helpers/plugin-utilities.d.mts +57 -2
  64. package/dist/src/helpers/plugin-utilities.d.mts.map +1 -0
  65. package/dist/src/helpers/plugin-utilities.d.ts +57 -2
  66. package/dist/src/helpers/plugin-utilities.d.ts.map +1 -0
  67. package/dist/src/helpers/plugin-utilities.js +2 -2
  68. package/dist/src/helpers/plugin-utilities.mjs +2 -2
  69. package/dist/src/helpers/plugin-utilities.mjs.map +1 -1
  70. package/dist/src/index.d.mts +4 -4
  71. package/dist/src/index.d.ts +4 -4
  72. package/dist/src/index.js +0 -1
  73. package/dist/src/index.mjs +0 -1
  74. package/dist/src/plugin/index.d.mts +241 -1
  75. package/dist/src/plugin/index.d.mts.map +1 -1
  76. package/dist/src/plugin/index.d.ts +241 -1
  77. package/dist/src/plugin/index.d.ts.map +1 -1
  78. package/dist/src/plugin/index.js +296 -2
  79. package/dist/src/plugin/index.mjs +293 -1
  80. package/dist/src/plugin/index.mjs.map +1 -1
  81. package/dist/src/types/index.d.mts +1 -1
  82. package/dist/src/types/index.d.ts +1 -1
  83. package/dist/src/types/plugin.d.mts +243 -2
  84. package/dist/src/types/plugin.d.mts.map +1 -0
  85. package/dist/src/types/plugin.d.ts +243 -2
  86. package/dist/src/types/plugin.d.ts.map +1 -0
  87. package/package.json +13 -13
  88. package/dist/src/base-executor-Bj63x9OE.d.ts +0 -28
  89. package/dist/src/base-executor-Bj63x9OE.d.ts.map +0 -1
  90. package/dist/src/base-executor-D6POztG2.d.mts +0 -28
  91. package/dist/src/base-executor-D6POztG2.d.mts.map +0 -1
  92. package/dist/src/base-executor.untyped-D4R6pki2.d.ts +0 -7
  93. package/dist/src/base-executor.untyped-D4R6pki2.d.ts.map +0 -1
  94. package/dist/src/base-executor.untyped-hmlG6oyC.d.mts +0 -7
  95. package/dist/src/base-executor.untyped-hmlG6oyC.d.mts.map +0 -1
  96. package/dist/src/constants-CbG11Mby.d.ts +0 -8
  97. package/dist/src/constants-CbG11Mby.d.ts.map +0 -1
  98. package/dist/src/constants-VDvVnoLC.d.mts +0 -8
  99. package/dist/src/constants-VDvVnoLC.d.mts.map +0 -1
  100. package/dist/src/plugin-B_ZGdX7U.d.mts +0 -243
  101. package/dist/src/plugin-B_ZGdX7U.d.mts.map +0 -1
  102. package/dist/src/plugin-DpyutMl2.d.ts +0 -243
  103. package/dist/src/plugin-DpyutMl2.d.ts.map +0 -1
  104. package/dist/src/plugin-utilities-Cg-Ccp4C.d.mts +0 -57
  105. package/dist/src/plugin-utilities-Cg-Ccp4C.d.mts.map +0 -1
  106. package/dist/src/plugin-utilities-CmfuC3TZ.d.ts +0 -57
  107. package/dist/src/plugin-utilities-CmfuC3TZ.d.ts.map +0 -1
@@ -0,0 +1,29 @@
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 ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
@@ -1,2 +1,28 @@
1
- import { n as withExecutor, t as PowerlinesExecutorContext } from "../base-executor-D6POztG2.mjs";
2
- export { PowerlinesExecutorContext, withExecutor };
1
+ import { BaseExecutorSchema } from "./base-executor.schema.mjs";
2
+ import PowerlinesAPI, { InlineConfig, PowerlinesCommand } from "powerlines";
3
+ import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
4
+ import { StormWorkspaceConfig } from "@storm-software/config/types";
5
+ import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
6
+
7
+ //#region src/base/base-executor.d.ts
8
+ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
9
+ projectName: string;
10
+ command: TCommand;
11
+ options: TExecutorSchema;
12
+ inlineConfig: InlineConfig;
13
+ workspaceConfig: StormWorkspaceConfig;
14
+ };
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
+ * @returns A Promise that resolves to the result of the executor function.
24
+ */
25
+ declare function withExecutor<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: TCommand, executorFn: (context: PowerlinesExecutorContext<TCommand, TExecutorSchema>, api: PowerlinesAPI) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
26
+ //#endregion
27
+ export { PowerlinesExecutorContext, withExecutor };
28
+ //# 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":";;;;;;;KAiCY,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,aAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
@@ -1,2 +1,28 @@
1
- import { n as withExecutor, t as PowerlinesExecutorContext } from "../base-executor-Bj63x9OE.js";
2
- export { PowerlinesExecutorContext, withExecutor };
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 PowerlinesAPI, { InlineConfig, PowerlinesCommand } from "powerlines";
6
+
7
+ //#region src/base/base-executor.d.ts
8
+ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
9
+ projectName: string;
10
+ command: TCommand;
11
+ options: TExecutorSchema;
12
+ inlineConfig: InlineConfig;
13
+ workspaceConfig: StormWorkspaceConfig;
14
+ };
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
+ * @returns A Promise that resolves to the result of the executor function.
24
+ */
25
+ declare function withExecutor<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: TCommand, executorFn: (context: PowerlinesExecutorContext<TCommand, TExecutorSchema>, api: PowerlinesAPI) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
26
+ //#endregion
27
+ export { PowerlinesExecutorContext, withExecutor };
28
+ //# 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":";;;;;;;KAiCY,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,aAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_chunk = require('../chunk-BE-pF4vm.js');
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.js');
3
3
  let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
4
4
  let _storm_software_workspace_tools_base_base_executor = require("@storm-software/workspace-tools/base/base-executor");
5
5
  let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
6
6
  let defu = require("defu");
7
- defu = require_chunk.__toESM(defu);
7
+ defu = require_runtime.__toESM(defu);
8
8
  let powerlines = require("powerlines");
9
- powerlines = require_chunk.__toESM(powerlines);
9
+ powerlines = require_runtime.__toESM(powerlines);
10
10
 
11
11
  //#region src/base/base-executor.ts
12
12
  /**
@@ -1,2 +1,7 @@
1
- import { t as _default } from "../base-executor.untyped-hmlG6oyC.mjs";
2
- export { _default as default };
1
+ import * as untyped from "untyped";
2
+
3
+ //#region src/base/base-executor.untyped.d.ts
4
+ declare const _default: untyped.SchemaDefinition;
5
+ //#endregion
6
+ export { _default as default };
7
+ //# sourceMappingURL=base-executor.untyped.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor.untyped.d.mts","names":[],"sources":["../../../src/base/base-executor.untyped.ts"],"mappings":""}
@@ -1,2 +1,6 @@
1
- import { t as _default } from "../base-executor.untyped-D4R6pki2.js";
2
- export = _default;
1
+ import * as untyped from "untyped";
2
+
3
+ //#region src/base/base-executor.untyped.d.ts
4
+ declare const _default: untyped.SchemaDefinition;
5
+ export = _default;
6
+ //# sourceMappingURL=base-executor.untyped.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor.untyped.d.ts","names":[],"sources":["../../../src/base/base-executor.untyped.ts"],"mappings":""}
@@ -1,4 +1,4 @@
1
- const require_chunk = require('../chunk-BE-pF4vm.js');
1
+ const require_runtime = require('../_virtual/_rolldown/runtime.js');
2
2
  let untyped = require("untyped");
3
3
 
4
4
  //#region src/base/base-executor.untyped.ts
@@ -1,2 +1,2 @@
1
- import { n as withExecutor, t as PowerlinesExecutorContext } from "../base-executor-D6POztG2.mjs";
1
+ import { PowerlinesExecutorContext, withExecutor } from "./base-executor.mjs";
2
2
  export { PowerlinesExecutorContext, withExecutor };
@@ -1,2 +1,2 @@
1
- import { n as withExecutor, t as PowerlinesExecutorContext } from "../base-executor-Bj63x9OE.js";
1
+ import { PowerlinesExecutorContext, withExecutor } from "./base-executor.js";
2
2
  export { PowerlinesExecutorContext, withExecutor };
@@ -0,0 +1,163 @@
1
+ import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
2
+ import PowerlinesAPI, { InlineConfig, PowerlinesCommand } from "powerlines";
3
+ import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
4
+ import { StormWorkspaceConfig } from "@storm-software/config/types";
5
+
6
+ //#region src/base/base-executor.schema.d.ts
7
+ // Generated by @storm-software/untyped
8
+ // Do not edit this file directly
9
+ interface BaseExecutorSchema {
10
+ /**
11
+ * Powerlines Configuration File
12
+ *
13
+ * The path to the Powerlines configuration file. Alias for `configFile`.
14
+ *
15
+ * @default "{projectRoot}/powerlines.config.ts"
16
+ *
17
+ * @format path
18
+ */
19
+ config?: string;
20
+ /**
21
+ * Powerlines Configuration File
22
+ *
23
+ * The path to the Powerlines configuration file. Alias for `config`.
24
+ *
25
+ * @default "{projectRoot}/powerlines.config.ts"
26
+ *
27
+ * @format path
28
+ */
29
+ configFile?: string;
30
+ /**
31
+ * Input Entry File(s)
32
+ *
33
+ * The entry file(s) that serve as the input for the project
34
+ *
35
+ *
36
+ * @format path
37
+ */
38
+ input?: Array<string>;
39
+ /**
40
+ * TSConfig Path
41
+ *
42
+ * The path to the tsconfig file
43
+ *
44
+ * @default "{projectRoot}/tsconfig.json"
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
+ * Format
76
+ *
77
+ * The format to build
78
+ *
79
+ * @default ["cjs","esm"]
80
+ */
81
+ format?: Array<string>;
82
+ /**
83
+ * Platform
84
+ *
85
+ * The platform to build
86
+ *
87
+ * @default "neutral"
88
+ *
89
+ * @enum neutral,node,browser
90
+ */
91
+ platform?: string;
92
+ /**
93
+ * External
94
+ *
95
+ * The external dependencies
96
+ *
97
+ */
98
+ external?: Array<any>;
99
+ /**
100
+ * No External
101
+ *
102
+ * The dependencies that should not be treated as external
103
+ *
104
+ */
105
+ noExternal?: Array<any>;
106
+ /**
107
+ * Skip Node Modules Bundle
108
+ *
109
+ * Skip bundling node_modules during the build process (if required)
110
+ *
111
+ */
112
+ skipNodeModulesBundle?: boolean;
113
+ /**
114
+ * Mode
115
+ *
116
+ * The build mode
117
+ *
118
+ *
119
+ * @enum development,test,production
120
+ */
121
+ mode?: string;
122
+ /**
123
+ * Log Level
124
+ *
125
+ * The log level to use for the build process
126
+ *
127
+ *
128
+ * @enum fatal,error,warn,success,info,debug,trace,silent
129
+ */
130
+ logLevel?: string;
131
+ /**
132
+ * Define
133
+ *
134
+ * The `define` values
135
+ *
136
+ */
137
+ define?: Record<string, string>;
138
+ /**
139
+ * Assets
140
+ *
141
+ * The `assets` values
142
+ *
143
+ */
144
+ assets?: Array<{
145
+ input?: string;
146
+ output?: string;
147
+ glob: string;
148
+ ignore?: string[];
149
+ dot?: boolean;
150
+ }>;
151
+ }
152
+ //#endregion
153
+ //#region src/base/base-executor.d.ts
154
+ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
155
+ projectName: string;
156
+ command: TCommand;
157
+ options: TExecutorSchema;
158
+ inlineConfig: InlineConfig;
159
+ workspaceConfig: StormWorkspaceConfig;
160
+ };
161
+ //#endregion
162
+ export { PowerlinesExecutorContext as t };
163
+ //# sourceMappingURL=base-executor-BOTlYnaD.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor-BOTlYnaD.d.mts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;;;;;EAUCG,MAAAA;EA4Ic;;;;;;;;;EAjIdC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;;EAWRK,QAAAA;;ACbD;;;;;;;EDuBCC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;;EAWTU,QAAAA;;;;;;;EAQAC,QAAAA,GAAWX,KAAAA;;;;;;;EAQXY,UAAAA,GAAaZ,KAAAA;;;;;;;EAQba,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASf,MAAAA;;;;;;;EAQTgB,MAAAA,GAASjB,KAAAA;IAAQI,KAAAA;IAAgBc,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;AAAAA;;;KCzHxE,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA"}
@@ -0,0 +1,79 @@
1
+ const require_chunk = require('./chunk-BE-pF4vm.js');
2
+ let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
3
+ let defu = require("defu");
4
+ defu = require_chunk.__toESM(defu);
5
+ let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
6
+ let _storm_software_workspace_tools_base_base_executor = require("@storm-software/workspace-tools/base/base-executor");
7
+ let powerlines = require("powerlines");
8
+ powerlines = require_chunk.__toESM(powerlines);
9
+
10
+ //#region src/base/base-executor.ts
11
+ /**
12
+ * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
13
+ *
14
+ * @remarks
15
+ * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.
16
+ *
17
+ * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
18
+ * @param executorFn - The function that will be executed when the command is run.
19
+ * @returns A Promise that resolves to the result of the executor function.
20
+ */
21
+ function withExecutor(command, executorFn) {
22
+ return (0, _storm_software_workspace_tools_base_base_executor.withRunExecutor)(`Powerlines ${command} command executor`, async (options, context, workspaceConfig) => {
23
+ if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
24
+ if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
25
+ const projectConfig = context.projectsConfigurations.projects[context.projectName];
26
+ const api = await powerlines.default.from(workspaceConfig.workspaceRoot, (0, defu.default)({
27
+ configFile: options.configFile ?? options.config,
28
+ output: {
29
+ path: options.outputPath,
30
+ copy: {
31
+ path: options.copyPath,
32
+ assets: options.assets
33
+ },
34
+ format: options.format,
35
+ sourceMap: options.sourceMap
36
+ },
37
+ resolve: {
38
+ external: options.external,
39
+ noExternal: options.noExternal,
40
+ skipNodeModulesBundle: options.skipNodeModulesBundle
41
+ },
42
+ root: projectConfig.root,
43
+ projectType: projectConfig.projectType,
44
+ sourceRoot: projectConfig.sourceRoot
45
+ }, options, { name: context.projectName }));
46
+ try {
47
+ return await Promise.resolve(executorFn((0, defu.default)({
48
+ projectName: context.projectName,
49
+ options,
50
+ workspaceConfig,
51
+ inlineConfig: {
52
+ command,
53
+ configFile: options.configFile || options.config
54
+ },
55
+ command
56
+ }, context), api));
57
+ } catch (error) {
58
+ (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}
59
+
60
+ ${error.stack}` : "Unknown error"}`);
61
+ return { success: false };
62
+ } finally {
63
+ await api.finalize();
64
+ }
65
+ }, {
66
+ skipReadingConfig: false,
67
+ hooks: { applyDefaultOptions: (options) => {
68
+ return options;
69
+ } }
70
+ });
71
+ }
72
+
73
+ //#endregion
74
+ Object.defineProperty(exports, 'withExecutor', {
75
+ enumerable: true,
76
+ get: function () {
77
+ return withExecutor;
78
+ }
79
+ });
@@ -0,0 +1,163 @@
1
+ import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
2
+ import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
3
+ import PowerlinesAPI, { InlineConfig, PowerlinesCommand } from "powerlines";
4
+ import { StormWorkspaceConfig } from "@storm-software/config/types";
5
+
6
+ //#region src/base/base-executor.schema.d.ts
7
+ // Generated by @storm-software/untyped
8
+ // Do not edit this file directly
9
+ interface BaseExecutorSchema {
10
+ /**
11
+ * Powerlines Configuration File
12
+ *
13
+ * The path to the Powerlines configuration file. Alias for `configFile`.
14
+ *
15
+ * @default "{projectRoot}/powerlines.config.ts"
16
+ *
17
+ * @format path
18
+ */
19
+ config?: string;
20
+ /**
21
+ * Powerlines Configuration File
22
+ *
23
+ * The path to the Powerlines configuration file. Alias for `config`.
24
+ *
25
+ * @default "{projectRoot}/powerlines.config.ts"
26
+ *
27
+ * @format path
28
+ */
29
+ configFile?: string;
30
+ /**
31
+ * Input Entry File(s)
32
+ *
33
+ * The entry file(s) that serve as the input for the project
34
+ *
35
+ *
36
+ * @format path
37
+ */
38
+ input?: Array<string>;
39
+ /**
40
+ * TSConfig Path
41
+ *
42
+ * The path to the tsconfig file
43
+ *
44
+ * @default "{projectRoot}/tsconfig.json"
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
+ * Format
76
+ *
77
+ * The format to build
78
+ *
79
+ * @default ["cjs","esm"]
80
+ */
81
+ format?: Array<string>;
82
+ /**
83
+ * Platform
84
+ *
85
+ * The platform to build
86
+ *
87
+ * @default "neutral"
88
+ *
89
+ * @enum neutral,node,browser
90
+ */
91
+ platform?: string;
92
+ /**
93
+ * External
94
+ *
95
+ * The external dependencies
96
+ *
97
+ */
98
+ external?: Array<any>;
99
+ /**
100
+ * No External
101
+ *
102
+ * The dependencies that should not be treated as external
103
+ *
104
+ */
105
+ noExternal?: Array<any>;
106
+ /**
107
+ * Skip Node Modules Bundle
108
+ *
109
+ * Skip bundling node_modules during the build process (if required)
110
+ *
111
+ */
112
+ skipNodeModulesBundle?: boolean;
113
+ /**
114
+ * Mode
115
+ *
116
+ * The build mode
117
+ *
118
+ *
119
+ * @enum development,test,production
120
+ */
121
+ mode?: string;
122
+ /**
123
+ * Log Level
124
+ *
125
+ * The log level to use for the build process
126
+ *
127
+ *
128
+ * @enum fatal,error,warn,success,info,debug,trace,silent
129
+ */
130
+ logLevel?: string;
131
+ /**
132
+ * Define
133
+ *
134
+ * The `define` values
135
+ *
136
+ */
137
+ define?: Record<string, string>;
138
+ /**
139
+ * Assets
140
+ *
141
+ * The `assets` values
142
+ *
143
+ */
144
+ assets?: Array<{
145
+ input?: string;
146
+ output?: string;
147
+ glob: string;
148
+ ignore?: string[];
149
+ dot?: boolean;
150
+ }>;
151
+ }
152
+ //#endregion
153
+ //#region src/base/base-executor.d.ts
154
+ type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
155
+ projectName: string;
156
+ command: TCommand;
157
+ options: TExecutorSchema;
158
+ inlineConfig: InlineConfig;
159
+ workspaceConfig: StormWorkspaceConfig;
160
+ };
161
+ //#endregion
162
+ export { PowerlinesExecutorContext as t };
163
+ //# sourceMappingURL=base-executor-N_ZgvzpA.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor-N_ZgvzpA.d.ts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;;;;;EAUCG,MAAAA;EA4Ic;;;;;;;;;EAjIdC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;;EAWRK,QAAAA;;ACbD;;;;;;;EDuBCC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAAST,KAAAA;;;;;;;;;;EAWTU,QAAAA;;;;;;;EAQAC,QAAAA,GAAWX,KAAAA;;;;;;;EAQXY,UAAAA,GAAaZ,KAAAA;;;;;;;EAQba,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASf,MAAAA;;;;;;;EAQTgB,MAAAA,GAASjB,KAAAA;IAAQI,KAAAA;IAAgBc,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;AAAAA;;;KCzHxE,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA"}
@@ -0,0 +1,72 @@
1
+ import { isError } from "@stryke/type-checks/is-error";
2
+ import defu from "defu";
3
+ import { writeError } from "@storm-software/config-tools/logger";
4
+ import { withRunExecutor } from "@storm-software/workspace-tools/base/base-executor";
5
+ import PowerlinesAPI from "powerlines";
6
+
7
+ //#region src/base/base-executor.ts
8
+ /**
9
+ * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
10
+ *
11
+ * @remarks
12
+ * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.
13
+ *
14
+ * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
15
+ * @param executorFn - The function that will be executed when the command is run.
16
+ * @returns A Promise that resolves to the result of the executor function.
17
+ */
18
+ function withExecutor(command, executorFn) {
19
+ return withRunExecutor(`Powerlines ${command} command executor`, async (options, context, workspaceConfig) => {
20
+ if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
21
+ if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
22
+ const projectConfig = context.projectsConfigurations.projects[context.projectName];
23
+ const api = await PowerlinesAPI.from(workspaceConfig.workspaceRoot, defu({
24
+ configFile: options.configFile ?? options.config,
25
+ output: {
26
+ path: options.outputPath,
27
+ copy: {
28
+ path: options.copyPath,
29
+ assets: options.assets
30
+ },
31
+ format: options.format,
32
+ sourceMap: options.sourceMap
33
+ },
34
+ resolve: {
35
+ external: options.external,
36
+ noExternal: options.noExternal,
37
+ skipNodeModulesBundle: options.skipNodeModulesBundle
38
+ },
39
+ root: projectConfig.root,
40
+ projectType: projectConfig.projectType,
41
+ sourceRoot: projectConfig.sourceRoot
42
+ }, options, { name: context.projectName }));
43
+ try {
44
+ return await Promise.resolve(executorFn(defu({
45
+ projectName: context.projectName,
46
+ options,
47
+ workspaceConfig,
48
+ inlineConfig: {
49
+ command,
50
+ configFile: options.configFile || options.config
51
+ },
52
+ command
53
+ }, context), api));
54
+ } catch (error) {
55
+ writeError(`An error occurred while executing the Powerlines ${command} command executor: ${isError(error) ? `${error.message}
56
+
57
+ ${error.stack}` : "Unknown error"}`);
58
+ return { success: false };
59
+ } finally {
60
+ await api.finalize();
61
+ }
62
+ }, {
63
+ skipReadingConfig: false,
64
+ hooks: { applyDefaultOptions: (options) => {
65
+ return options;
66
+ } }
67
+ });
68
+ }
69
+
70
+ //#endregion
71
+ export { withExecutor as t };
72
+ //# sourceMappingURL=base-executor-dn4QVqZ4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-executor-dn4QVqZ4.mjs","names":[],"sources":["../../src/base/base-executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport type {\n InitialUserConfig,\n InlineConfig,\n PowerlinesCommand\n} from \"powerlines\";\nimport PowerlinesAPI from \"powerlines\";\nimport { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type PowerlinesExecutorContext<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n> = ExecutorContext & {\n projectName: string;\n command: TCommand;\n options: TExecutorSchema;\n inlineConfig: InlineConfig;\n workspaceConfig: StormWorkspaceConfig;\n};\n\n/**\n * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.\n *\n * @param command - The command that the executor will handle (e.g., \"new\", \"prepare\", \"build\", etc.).\n * @param executorFn - The function that will be executed when the command is run.\n * @returns A Promise that resolves to the result of the executor function.\n */\nexport function withExecutor<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n>(\n command: TCommand,\n executorFn: (\n context: PowerlinesExecutorContext<TCommand, TExecutorSchema>,\n api: PowerlinesAPI\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Powerlines ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const api = await PowerlinesAPI.from(\n workspaceConfig.workspaceRoot,\n defu(\n {\n configFile: options.configFile ?? options.config,\n output: {\n path: options.outputPath,\n copy: { path: options.copyPath, assets: options.assets },\n format: options.format,\n sourceMap: options.sourceMap\n },\n resolve: {\n external: options.external,\n noExternal: options.noExternal,\n skipNodeModulesBundle: options.skipNodeModulesBundle\n },\n root: projectConfig.root,\n projectType: projectConfig.projectType,\n sourceRoot: projectConfig.sourceRoot\n },\n options,\n {\n name: context.projectName\n }\n ) as InitialUserConfig\n );\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n inlineConfig: {\n command,\n configFile: options.configFile || options.config\n },\n command\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Powerlines ${\n command\n } command executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n } finally {\n await api.finalize();\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAsDA,SAAgB,aAId,SACA,YAQkC;AAClC,QAAO,gBACL,cAAc,QAAQ,oBACtB,OACE,SACA,SACA,oBACmD;AACnD,MAAI,CAAC,QAAQ,YACX,OAAM,IAAI,MACR,6DACD;AAGH,MACE,CAAC,QAAQ,eACT,CAAC,QAAQ,wBAAwB,YACjC,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,gBACjD,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,cAAc,KAE/D,OAAM,IAAI,MACR,wEACD;EAGH,MAAM,gBACJ,QAAQ,uBAAuB,SAAS,QAAQ;EAElD,MAAM,MAAM,MAAM,cAAc,KAC9B,gBAAgB,eAChB,KACE;GACE,YAAY,QAAQ,cAAc,QAAQ;GAC1C,QAAQ;IACN,MAAM,QAAQ;IACd,MAAM;KAAE,MAAM,QAAQ;KAAU,QAAQ,QAAQ;KAAQ;IACxD,QAAQ,QAAQ;IAChB,WAAW,QAAQ;IACpB;GACD,SAAS;IACP,UAAU,QAAQ;IAClB,YAAY,QAAQ;IACpB,uBAAuB,QAAQ;IAChC;GACD,MAAM,cAAc;GACpB,aAAa,cAAc;GAC3B,YAAY,cAAc;GAC3B,EACD,SACA,EACE,MAAM,QAAQ,aACf,CACF,CACF;AAED,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA,cAAc;KACZ;KACA,YAAY,QAAQ,cAAc,QAAQ;KAC3C;IACD;IACD,EACD,QACD,EACD,IACD,CACF;WACM,OAAO;AACd,cACE,oDACE,QACD,qBACC,QAAQ,MAAM,GACV,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,kBAEP;AAED,UAAO,EAAE,SAAS,OAAO;YACjB;AACR,SAAM,IAAI,UAAU;;IAGxB;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,UAAO;KAEV;EACF,CACF"}