@shell-shock/nx 0.0.82 → 0.0.84

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 (76) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/base/base-executor.schema.d.ts +9 -0
  3. package/dist/base/base-executor.schema.json +8 -0
  4. package/dist/base-executor-B48XZipC.js +27 -0
  5. package/dist/base-executor-ChtjGl_i.mjs +23 -0
  6. package/dist/base-executor-ChtjGl_i.mjs.map +1 -0
  7. package/dist/chunk-C_NdSu1c.js +34 -0
  8. package/dist/executors/build/executor.d.mts +8 -0
  9. package/dist/executors/build/executor.d.mts.map +1 -1
  10. package/dist/executors/build/executor.d.ts +8 -0
  11. package/dist/executors/build/executor.d.ts.map +1 -1
  12. package/dist/executors/build/executor.js +4 -4
  13. package/dist/executors/build/executor.mjs +2 -3
  14. package/dist/executors/build/executor.mjs.map +1 -1
  15. package/dist/executors/build/schema.d.ts +9 -0
  16. package/dist/executors/build/schema.json +8 -0
  17. package/dist/executors/clean/executor.d.mts +8 -0
  18. package/dist/executors/clean/executor.d.mts.map +1 -1
  19. package/dist/executors/clean/executor.d.ts +8 -0
  20. package/dist/executors/clean/executor.d.ts.map +1 -1
  21. package/dist/executors/clean/executor.js +2 -3
  22. package/dist/executors/clean/executor.mjs +2 -3
  23. package/dist/executors/clean/executor.mjs.map +1 -1
  24. package/dist/executors/clean/schema.d.ts +9 -0
  25. package/dist/executors/clean/schema.json +8 -0
  26. package/dist/executors/docs/executor.d.mts +8 -0
  27. package/dist/executors/docs/executor.d.mts.map +1 -1
  28. package/dist/executors/docs/executor.d.ts +8 -0
  29. package/dist/executors/docs/executor.d.ts.map +1 -1
  30. package/dist/executors/docs/executor.js +2 -4
  31. package/dist/executors/docs/executor.mjs +2 -3
  32. package/dist/executors/docs/executor.mjs.map +1 -1
  33. package/dist/executors/docs/schema.d.ts +9 -0
  34. package/dist/executors/docs/schema.json +8 -0
  35. package/dist/executors/lint/executor.d.mts +8 -0
  36. package/dist/executors/lint/executor.d.mts.map +1 -1
  37. package/dist/executors/lint/executor.d.ts +8 -0
  38. package/dist/executors/lint/executor.d.ts.map +1 -1
  39. package/dist/executors/lint/executor.js +2 -4
  40. package/dist/executors/lint/executor.mjs +2 -3
  41. package/dist/executors/lint/executor.mjs.map +1 -1
  42. package/dist/executors/lint/schema.d.ts +9 -0
  43. package/dist/executors/lint/schema.json +8 -0
  44. package/dist/executors/prepare/executor.d.mts +8 -0
  45. package/dist/executors/prepare/executor.d.mts.map +1 -1
  46. package/dist/executors/prepare/executor.d.ts +8 -0
  47. package/dist/executors/prepare/executor.d.ts.map +1 -1
  48. package/dist/executors/prepare/executor.js +4 -4
  49. package/dist/executors/prepare/executor.mjs +2 -3
  50. package/dist/executors/prepare/executor.mjs.map +1 -1
  51. package/dist/executors/prepare/schema.d.ts +9 -0
  52. package/dist/executors/prepare/schema.json +8 -0
  53. package/dist/index.d.mts +16 -20
  54. package/dist/index.d.mts.map +1 -1
  55. package/dist/index.d.ts +17 -20
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +3 -2
  58. package/dist/index.mjs +1 -1
  59. package/dist/index.mjs.map +1 -1
  60. package/dist/plugin/index.d.mts +2 -287
  61. package/dist/plugin/index.d.mts.map +1 -1
  62. package/dist/plugin/index.d.ts +2 -287
  63. package/dist/plugin/index.d.ts.map +1 -1
  64. package/dist/plugin/index.js +55 -892
  65. package/dist/plugin/index.mjs +55 -892
  66. package/dist/plugin/index.mjs.map +1 -1
  67. package/docs/api/base-executor.schema.md +10 -0
  68. package/docs/api/build/schema.md +10 -0
  69. package/docs/api/clean/schema.md +10 -0
  70. package/docs/api/docs/schema.md +10 -0
  71. package/docs/api/lint/schema.md +10 -0
  72. package/docs/api/prepare/schema.md +10 -0
  73. package/package.json +22 -23
  74. package/dist/base-executor-BKs5qTWJ.js +0 -117
  75. package/dist/base-executor-DUy51uSh.mjs +0 -79
  76. package/dist/base-executor-DUy51uSh.mjs.map +0 -1
@@ -23,6 +23,15 @@ export interface LintExecutorSchema {
23
23
  */
24
24
  configFile?: string,
25
25
 
26
+ /**
27
+ * Powerlines Configuration Index
28
+ *
29
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
30
+ *
31
+ * @default 0
32
+ */
33
+ configIndex?: number,
34
+
26
35
  /**
27
36
  * Input Entry File(s)
28
37
  *
@@ -18,6 +18,13 @@
18
18
  "description": "The path to the Powerlines configuration file. Alias for `config`.",
19
19
  "id": "#configFile"
20
20
  },
21
+ "configIndex": {
22
+ "title": "Powerlines Configuration Index",
23
+ "type": "number",
24
+ "description": "The index in the Powerlines configuration file to use (if an array of configurations are provided).",
25
+ "id": "#configIndex",
26
+ "default": 0
27
+ },
21
28
  "input": {
22
29
  "title": "Input Entry File(s)",
23
30
  "format": "path",
@@ -194,6 +201,7 @@
194
201
  },
195
202
  "type": "object",
196
203
  "default": {
204
+ "configIndex": 0,
197
205
  "copyPath": {},
198
206
  "format": [
199
207
  "cjs",
@@ -22,6 +22,14 @@ interface PrepareExecutorSchema {
22
22
  * @format path
23
23
  */
24
24
  configFile?: string;
25
+ /**
26
+ * Powerlines Configuration Index
27
+ *
28
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
29
+ *
30
+ * @default 0
31
+ */
32
+ configIndex?: number;
25
33
  /**
26
34
  * Input Entry File(s)
27
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.mts","names":["PrepareExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs","autoInstall","skipCache"],"sources":["../../../src/executors/prepare/schema.d.ts","../../../src/executors/prepare/executor.ts"],"mappings":";;;;;UAIiBA,qBAAAA;;;;;;;;;EAShBG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;;;;;;;;ACnBqD;ED6BrDC,UAAAA;ECP8B;;;;;;;;EDiB9BC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAASV,KAAAA;;;;;;;;;EAUTW,QAAAA;;;;;;;EAQAC,QAAAA,GAAWZ,KAAAA;;;;;;;EAQXa,UAAAA,GAAab,KAAAA;;;;;;;EAQbc,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAShB,MAAAA;;;;;;;EAQTiB,MAAAA,GAASlB,KAAAA;IAAQI,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBtB,MAAAA;;;;;;;EAQjBuB,WAAAA;;;;;;;EAQAC,SAAAA;AAAAA;;;cCxIK,QAAA,EAAU,eAAA,CAAgB,qBAAA"}
1
+ {"version":3,"file":"executor.d.mts","names":["config","configFile","configIndex","input","Array","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","Record","assets","output","glob","ignore","dot","additionalArgs","autoInstall","skipCache"],"sources":["../../../src/executors/prepare/schema.d.ts","../../../src/executors/prepare/executor.ts"],"mappings":""}
@@ -22,6 +22,14 @@ interface PrepareExecutorSchema {
22
22
  * @format path
23
23
  */
24
24
  configFile?: string;
25
+ /**
26
+ * Powerlines Configuration Index
27
+ *
28
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
29
+ *
30
+ * @default 0
31
+ */
32
+ configIndex?: number;
25
33
  /**
26
34
  * Input Entry File(s)
27
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","names":["PrepareExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs","autoInstall","skipCache"],"sources":["../../../src/executors/prepare/schema.d.ts","../../../src/executors/prepare/executor.ts"],"mappings":";;;;;UAIiBA,qBAAAA;;;;;;;;;EAShBG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;;;;;;;;ACnBqD;ED6BrDC,UAAAA;ECP8B;;;;;;;;EDiB9BC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAASV,KAAAA;;;;;;;;;EAUTW,QAAAA;;;;;;;EAQAC,QAAAA,GAAWZ,KAAAA;;;;;;;EAQXa,UAAAA,GAAab,KAAAA;;;;;;;EAQbc,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAShB,MAAAA;;;;;;;EAQTiB,MAAAA,GAASlB,KAAAA;IAAQI,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBtB,MAAAA;;;;;;;EAQjBuB,WAAAA;;;;;;;EAQAC,SAAAA;AAAAA;;;cCxIK,QAAA,EAAU,eAAA,CAAgB,qBAAA;AAAA"}
1
+ {"version":3,"file":"executor.d.ts","names":["config","configFile","configIndex","input","Array","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","Record","assets","output","glob","ignore","dot","additionalArgs","autoInstall","skipCache"],"sources":["../../../src/executors/prepare/schema.d.ts","../../../src/executors/prepare/executor.ts"],"mappings":";;;;;UAIiB,qBAAA;;;;;;;;;EAShBA,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;EASAC,WAAAA;;;;;;;;;EAUAC,KAAAA,GAAQ,KAAA;;;;;;AAqJC;;;EA3ITE,QAAAA;ECH2D;;;AADP;;;;;EDcpDC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAAS,KAAA;;;;;;;;;EAUTC,QAAAA;;;;;;;EAQAC,QAAAA,GAAW,KAAA;;;;;;;EAQXC,UAAAA,GAAa,KAAA;;;;;;;EAQbC,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAS,MAAA;;;;;;;EAQTE,MAAAA,GAAS,KAAA;IAAQhB,KAAAA;IAAgBiB,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiB,MAAA;;;;;;;EAQjBC,WAAAA;;;;;;;EAQAC,SAAAA;AAAAA;;;cC/IK,QAAA,EAAU,eAAe,CAAC,qBAAA;AAAA"}
@@ -1,11 +1,11 @@
1
- const require_base_executor = require('../../base-executor-BKs5qTWJ.js');
1
+ const require_chunk = require('../../chunk-C_NdSu1c.js');
2
+ const require_base_executor = require('../../base-executor-B48XZipC.js');
2
3
  let defu = require("defu");
3
- defu = require_base_executor.__toESM(defu);
4
+ defu = require_chunk.__toESM(defu);
4
5
 
5
6
  //#region src/executors/prepare/executor.ts
6
7
  async function executorFn(context, api) {
7
- await api.prepare((0, defu.default)({
8
- command: "prepare",
8
+ await api((0, defu.default)({
9
9
  skipCache: context.options.skipCache,
10
10
  autoInstall: context.options.autoInstall
11
11
  }, context.inlineConfig));
@@ -1,10 +1,9 @@
1
- import { t as withExecutor } from "../../base-executor-DUy51uSh.mjs";
1
+ import { t as withExecutor } from "../../base-executor-ChtjGl_i.mjs";
2
2
  import defu from "defu";
3
3
 
4
4
  //#region src/executors/prepare/executor.ts
5
5
  async function executorFn(context, api) {
6
- await api.prepare(defu({
7
- command: "prepare",
6
+ await api(defu({
8
7
  skipCache: context.options.skipCache,
9
8
  autoInstall: context.options.autoInstall
10
9
  }, context.inlineConfig));
@@ -1 +1 @@
1
- {"version":3,"file":"executor.mjs","names":[],"sources":["../../../src/executors/prepare/executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\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/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { PromiseExecutor } from \"@nx/devkit\";\nimport type { ShellShockAPI } from \"@shell-shock/core\";\nimport type { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport defu from \"defu\";\nimport type { ShellShockExecutorContext } from \"../../base/base-executor\";\nimport { withExecutor } from \"../../base/base-executor\";\nimport type { PrepareExecutorSchema } from \"./schema\";\n\nasync function executorFn(\n context: ShellShockExecutorContext<\"prepare\", PrepareExecutorSchema>,\n api: ShellShockAPI\n): Promise<BaseExecutorResult> {\n await api.prepare(\n defu(\n {\n command: \"prepare\",\n skipCache: context.options.skipCache,\n autoInstall: context.options.autoInstall\n },\n context.inlineConfig\n )\n );\n\n return {\n success: true\n };\n}\n\nconst executor: PromiseExecutor<PrepareExecutorSchema> = withExecutor<\n \"prepare\",\n PrepareExecutorSchema\n>(\"prepare\", executorFn);\n\nexport default executor;\n"],"mappings":";;;;AA0BA,eAAe,WACb,SACA,KAC6B;AAC7B,OAAM,IAAI,QACR,KACE;EACE,SAAS;EACT,WAAW,QAAQ,QAAQ;EAC3B,aAAa,QAAQ,QAAQ;EAC9B,EACD,QAAQ,aACT,CACF;AAED,QAAO,EACL,SAAS,MACV;;AAGH,MAAM,WAAmD,aAGvD,WAAW,WAAW"}
1
+ {"version":3,"file":"executor.mjs","names":[],"sources":[],"mappings":""}
@@ -23,6 +23,15 @@ export interface PrepareExecutorSchema {
23
23
  */
24
24
  configFile?: string,
25
25
 
26
+ /**
27
+ * Powerlines Configuration Index
28
+ *
29
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
30
+ *
31
+ * @default 0
32
+ */
33
+ configIndex?: number,
34
+
26
35
  /**
27
36
  * Input Entry File(s)
28
37
  *
@@ -18,6 +18,13 @@
18
18
  "description": "The path to the Powerlines configuration file. Alias for `config`.",
19
19
  "id": "#configFile"
20
20
  },
21
+ "configIndex": {
22
+ "title": "Powerlines Configuration Index",
23
+ "type": "number",
24
+ "description": "The index in the Powerlines configuration file to use (if an array of configurations are provided).",
25
+ "id": "#configIndex",
26
+ "default": 0
27
+ },
21
28
  "input": {
22
29
  "title": "Input Entry File(s)",
23
30
  "format": "path",
@@ -194,6 +201,7 @@
194
201
  },
195
202
  "type": "object",
196
203
  "default": {
204
+ "configIndex": 0,
197
205
  "copyPath": {},
198
206
  "format": [
199
207
  "cjs",
package/dist/index.d.mts CHANGED
@@ -1,8 +1,6 @@
1
- import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
2
- import { ShellShockAPI } from "@shell-shock/core";
3
- import { StormWorkspaceConfig } from "@storm-software/config/types";
1
+ import { PowerlinesExecutorApi, PowerlinesExecutorContext } from "@powerlines/nx/base/base-executor";
2
+ import { PromiseExecutor } from "@nx/devkit";
4
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
- import { InlineConfig, PowerlinesCommand } from "powerlines";
6
4
 
7
5
  //#region src/base/base-executor.schema.d.ts
8
6
  // Generated by powerlines
@@ -26,6 +24,14 @@ interface BaseExecutorSchema {
26
24
  * @format path
27
25
  */
28
26
  configFile?: string;
27
+ /**
28
+ * Powerlines Configuration Index
29
+ *
30
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
31
+ *
32
+ * @default 0
33
+ */
34
+ configIndex?: number;
29
35
  /**
30
36
  * Input Entry File(s)
31
37
  *
@@ -162,24 +168,14 @@ interface BaseExecutorSchema {
162
168
  }
163
169
  //#endregion
164
170
  //#region src/base/base-executor.d.ts
165
- type ShellShockExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
166
- projectName: string;
167
- command: TCommand;
168
- options: TExecutorSchema;
169
- inlineConfig: InlineConfig;
170
- workspaceConfig: StormWorkspaceConfig;
171
- };
172
171
  /**
173
- * A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.
174
- *
175
- * @remarks
176
- * This function is designed to simplify the creation of Shell Shock executors by providing a consistent interface and error handling.
172
+ * A higher-order function that wraps a Powerlines executor function, providing a consistent interface for Nx executors in the Shell Shock project. This function abstracts away the integration details with Powerlines, allowing developers to focus on implementing the core logic of their executors.
177
173
  *
178
- * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
179
- * @param executorFn - The function that will be executed when the command is run.
180
- * @returns A Promise that resolves to the result of the executor function.
174
+ * @param command - The name of the command that this executor will handle (e.g., "build", "lint").
175
+ * @param executorFn - The actual executor function that contains the logic to be executed. It receives a PowerlinesExecutorContext and PowerlinesExecutorApi as parameters.
176
+ * @returns A PromiseExecutor function that can be used as an Nx executor.
181
177
  */
182
- declare function withExecutor<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: TCommand, executorFn: (context: ShellShockExecutorContext<TCommand, TExecutorSchema>, api: ShellShockAPI) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
178
+ declare function withExecutor<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: string, executorFn: (context: PowerlinesExecutorContext<TExecutorSchema>, api: PowerlinesExecutorApi) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
183
179
  //#endregion
184
- export { ShellShockExecutorContext, withExecutor };
180
+ export { withExecutor };
185
181
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs"],"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;;;;;;;;;EAUAC,UAAAA;EClBD;;;;;;;;ED4BCC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;ACvBD;EDgCCC,MAAAA,GAASV,KAAAA;;;;;;;;;EAUTW,QAAAA;;;;;;;EAQAC,QAAAA,GAAWZ,KAAAA;;;;;;;EAQXa,UAAAA,GAAab,KAAAA;;;;;;;EAQbc,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAShB,MAAAA;;;;;;;EAQTiB,MAAAA,GAASlB,KAAAA;IAAQI,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBtB,MAAAA;AAAAA;;;KCnIN,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,aAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
1
+ {"version":3,"file":"index.d.mts","names":["config","configFile","configIndex","input","Array","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","Record","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../src/base/base-executor.schema.d.ts","../src/base/base-executor.ts"],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
2
- import { ShellShockAPI } from "@shell-shock/core";
3
- import { StormWorkspaceConfig } from "@storm-software/config/types";
1
+ import { PromiseExecutor } from "@nx/devkit";
2
+ import { PowerlinesExecutorApi, PowerlinesExecutorContext } from "@powerlines/nx/base/base-executor";
4
3
  import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
- import { InlineConfig, PowerlinesCommand } from "powerlines";
4
+
6
5
  //#region src/base/base-executor.schema.d.ts
7
6
  // Generated by powerlines
8
7
  // Do not edit this file directly
@@ -25,6 +24,14 @@ interface BaseExecutorSchema {
25
24
  * @format path
26
25
  */
27
26
  configFile?: string;
27
+ /**
28
+ * Powerlines Configuration Index
29
+ *
30
+ * The index in the Powerlines configuration file to use (if an array of configurations are provided).
31
+ *
32
+ * @default 0
33
+ */
34
+ configIndex?: number;
28
35
  /**
29
36
  * Input Entry File(s)
30
37
  *
@@ -161,24 +168,14 @@ interface BaseExecutorSchema {
161
168
  }
162
169
  //#endregion
163
170
  //#region src/base/base-executor.d.ts
164
- type ShellShockExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
165
- projectName: string;
166
- command: TCommand;
167
- options: TExecutorSchema;
168
- inlineConfig: InlineConfig;
169
- workspaceConfig: StormWorkspaceConfig;
170
- };
171
171
  /**
172
- * A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.
173
- *
174
- * @remarks
175
- * This function is designed to simplify the creation of Shell Shock executors by providing a consistent interface and error handling.
172
+ * A higher-order function that wraps a Powerlines executor function, providing a consistent interface for Nx executors in the Shell Shock project. This function abstracts away the integration details with Powerlines, allowing developers to focus on implementing the core logic of their executors.
176
173
  *
177
- * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
178
- * @param executorFn - The function that will be executed when the command is run.
179
- * @returns A Promise that resolves to the result of the executor function.
174
+ * @param command - The name of the command that this executor will handle (e.g., "build", "lint").
175
+ * @param executorFn - The actual executor function that contains the logic to be executed. It receives a PowerlinesExecutorContext and PowerlinesExecutorApi as parameters.
176
+ * @returns A PromiseExecutor function that can be used as an Nx executor.
180
177
  */
181
- declare function withExecutor<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: TCommand, executorFn: (context: ShellShockExecutorContext<TCommand, TExecutorSchema>, api: ShellShockAPI) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
178
+ declare function withExecutor<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: string, executorFn: (context: PowerlinesExecutorContext<TExecutorSchema>, api: PowerlinesExecutorApi) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
182
179
  //#endregion
183
- export { ShellShockExecutorContext, withExecutor };
180
+ export { withExecutor };
184
181
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs"],"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;;;;;;;;;EAUAC,UAAAA;EClBD;;;;;;;;ED4BCC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;ACvBD;EDgCCC,MAAAA,GAASV,KAAAA;;;;;;;;;EAUTW,QAAAA;;;;;;;EAQAC,QAAAA,GAAWZ,KAAAA;;;;;;;EAQXa,UAAAA,GAAab,KAAAA;;;;;;;EAQbc,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAShB,MAAAA;;;;;;;EAQTiB,MAAAA,GAASlB,KAAAA;IAAQI,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBtB,MAAAA;AAAAA;;;KCnIN,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA;;;;;;;;;;;iBAaH,YAAA,kBACG,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,CAAA,CAE7C,OAAA,EAAS,QAAA,EACT,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,QAAA,EAAU,eAAA,GAC7C,GAAA,EAAK,aAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
1
+ {"version":3,"file":"index.d.ts","names":["config","configFile","configIndex","input","Array","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","Record","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../src/base/base-executor.schema.d.ts","../src/base/base-executor.ts"],"mappings":";;;;;;;UAIiB,kBAAA;EAAjB;;;;;;;;EASCA,MAAAA;EAkKuB;;;;;;;;EAxJvBC,UAAAA;;;;;;;;EASAC,WAAAA;;;;;;;;;EAUAC,KAAAA,GAAQ,KAAA;;;;;;AAqIe;;;EA3HvBE,QAAAA;EClB2B;;;;;;;;ED4B3BC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;AClCiC;;;;ED0CjCC,MAAAA;;;;;;;;EASAC,MAAAA,GAAS,KAAA;;;;;;;;;EAUTC,QAAAA;;;;;;;EAQAC,QAAAA,GAAW,KAAA;;;;;;;EAQXC,UAAAA,GAAa,KAAA;;;;;;;EAQbC,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAS,MAAA;;;;;;;EAQTE,MAAAA,GAAS,KAAA;IAAQhB,KAAAA;IAAgBiB,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiB,MAAA;AAAA;;;;AA3KlB;;;;;;iBC8BgB,YAAA,yBACU,kBAAA,GAAqB,kBAAA,EAE7C,OAAA,UACA,UAAA,GACE,OAAA,EAAS,yBAAA,CAA0B,eAAA,GACnC,GAAA,EAAK,qBAAA,KAEH,OAAA,CAAQ,kBAAA,uBACR,kBAAA,sBAGH,eAAA,CAAgB,eAAA"}
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_base_executor = require('./base-executor-BKs5qTWJ.js');
2
+ const require_chunk = require('./chunk-C_NdSu1c.js');
3
+ const require_base_executor = require('./base-executor-B48XZipC.js');
3
4
  let _powerlines_nx_base_base_executor_untyped = require("@powerlines/nx/base/base-executor.untyped");
4
- _powerlines_nx_base_base_executor_untyped = require_base_executor.__toESM(_powerlines_nx_base_base_executor_untyped);
5
+ _powerlines_nx_base_base_executor_untyped = require_chunk.__toESM(_powerlines_nx_base_base_executor_untyped);
5
6
  let untyped = require("untyped");
6
7
 
7
8
  //#region src/base/base-executor.untyped.ts
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as withExecutor } from "./base-executor-DUy51uSh.mjs";
1
+ import { t as withExecutor } from "./base-executor-ChtjGl_i.mjs";
2
2
  import baseExecutorSchema from "@powerlines/nx/base/base-executor.untyped";
3
3
  import { defineUntypedSchema } from "untyped";
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/base/base-executor.untyped.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\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/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport baseExecutorSchema from \"@powerlines/nx/base/base-executor.untyped\";\nimport { defineUntypedSchema } from \"untyped\";\n\nexport default defineUntypedSchema({\n ...baseExecutorSchema,\n $schema: {\n id: \"BaseExecutorSchema\",\n title: \"Base Executor\",\n description:\n \"A shared/base schema type definition for Shell Shock executors\",\n required: []\n }\n});\n"],"mappings":";;;;;AAqBA,oCAAe,oBAAoB;CACjC,GAAG;CACH,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aACE;EACF,UAAU,EAAE;EACb;CACF,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
@@ -1,291 +1,6 @@
1
1
  import { CreateNodesV2 } from "@nx/devkit";
2
- //#region ../../node_modules/.pnpm/@powerlines+nx@0.13.39_fc99eff9622fa5d3f6bd2e5db9585b9b/node_modules/@powerlines/nx/dist/src/types/plugin.d.mts
3
- //#region src/types/plugin.d.ts
4
- interface NxPluginOptions {
5
- /**
6
- * Configuration options for the clean target added by the Nx plugin
7
- */
8
- clean?: false | {
9
- /**
10
- * The name of the clean target to use when cleaning the project
11
- *
12
- * @defaultValue "clean"
13
- */
14
- targetName?: string;
15
- /**
16
- * An indicator to control the behavior of Nx caching for the target
17
- *
18
- * @defaultValue true
19
- */
20
- cache?: boolean;
21
- /**
22
- * The name of the clean configuration to use when cleaning the project
23
- *
24
- * @defaultValue "production"
25
- */
26
- defaultConfiguration?: "production" | "test" | "development";
27
- /**
28
- * An array specifying any other target identifiers the clean target depends on
29
- *
30
- * @defaultValue ["^clean"]
31
- */
32
- dependsOn?: string[];
33
- /**
34
- * An array specifying any input files or globs to consider when determining if the clean target needs to be re-run
35
- */
36
- inputs?: string[] | "production" | "allProjectFiles" | "sharedGlobals" | "testing" | "linting" | "documentation" | "rust" | "typescript";
37
- /**
38
- * An array specifying the output files or globs generated by the clean target
39
- */
40
- outputs?: string[];
41
- /**
42
- * The executor to use for the clean target
43
- *
44
- * @defaultValue "\@powerlines/nx:clean"
45
- */
46
- executor?: string;
47
- };
48
- /**
49
- * Configuration options for the prepare target added by the Nx plugin
50
- */
51
- prepare?: false | {
52
- /**
53
- * The name of the prepare target to use when preparing the project
54
- *
55
- * @defaultValue "prepare"
56
- */
57
- targetName?: string;
58
- /**
59
- * An indicator to control the behavior of Nx caching for the target
60
- *
61
- * @defaultValue true
62
- */
63
- cache?: boolean;
64
- /**
65
- * The name of the prepare configuration to use when preparing the project
66
- *
67
- * @defaultValue "production"
68
- */
69
- defaultConfiguration?: "production" | "test" | "development";
70
- /**
71
- * An array specifying any other target identifiers the prepare target depends on
72
- *
73
- * @defaultValue ["^build", "clean"]
74
- */
75
- dependsOn?: string[];
76
- /**
77
- * An array specifying any input files or globs to consider when determining if the prepare target needs to be re-run
78
- */
79
- inputs?: string[] | "production" | "allProjectFiles" | "sharedGlobals" | "testing" | "linting" | "documentation" | "rust" | "typescript";
80
- /**
81
- * An array specifying the output files or globs generated by the prepare target
82
- */
83
- outputs?: string[];
84
- /**
85
- * The executor to use for the prepare target
86
- *
87
- * @defaultValue "\@powerlines/nx:prepare"
88
- */
89
- executor?: string;
90
- };
91
- /**
92
- * Configuration options for the lint target added by the Nx plugin
93
- */
94
- lint?: false | {
95
- /**
96
- * The name of the lint target to use when linting the project
97
- *
98
- * @defaultValue "lint"
99
- */
100
- targetName?: string;
101
- /**
102
- * An indicator to control the behavior of Nx caching for the target
103
- *
104
- * @defaultValue true
105
- */
106
- cache?: boolean;
107
- /**
108
- * The name of the lint configuration to use when linting the project
109
- *
110
- * @defaultValue "production"
111
- */
112
- defaultConfiguration?: "production" | "test" | "development";
113
- /**
114
- * An array specifying any other target identifiers the lint target depends on
115
- *
116
- * @defaultValue ["^lint"]
117
- */
118
- dependsOn?: string[];
119
- /**
120
- * An array specifying any input files or globs to consider when determining if the lint target needs to be re-run
121
- */
122
- inputs?: string[] | "production" | "allProjectFiles" | "sharedGlobals" | "testing" | "linting" | "documentation" | "rust" | "typescript";
123
- /**
124
- * An array specifying the output files or globs generated by the lint target
125
- */
126
- outputs?: string[];
127
- /**
128
- * The executor to use for the lint target
129
- *
130
- * @defaultValue "\@powerlines/nx:lint"
131
- */
132
- executor?: string;
133
- };
134
- /**
135
- * Configuration options for the build target added by the Nx plugin
136
- */
137
- build?: false | {
138
- /**
139
- * The name of the build target to use when building the project
140
- *
141
- * @defaultValue "build"
142
- */
143
- targetName?: string;
144
- /**
145
- * An indicator to control the behavior of Nx caching for the target
146
- *
147
- * @defaultValue true
148
- */
149
- cache?: boolean;
150
- /**
151
- * The name of the build configuration to use when building the project
152
- *
153
- * @defaultValue "production"
154
- */
155
- defaultConfiguration?: "production" | "test" | "development";
156
- /**
157
- * An array specifying any other target identifiers the build target depends on
158
- *
159
- * @defaultValue ["^build"]
160
- */
161
- dependsOn?: string[];
162
- /**
163
- * An array specifying any input files or globs to consider when determining if the build target needs to be re-run
164
- */
165
- inputs?: string[] | "production" | "allProjectFiles" | "sharedGlobals" | "testing" | "linting" | "documentation" | "rust" | "typescript";
166
- /**
167
- * An array specifying the output files or globs generated by the build target
168
- */
169
- outputs?: string[];
170
- /**
171
- * The executor to use for the build target
172
- *
173
- * @defaultValue "\@powerlines/nx:build"
174
- */
175
- executor?: string;
176
- };
177
- /**
178
- * Configuration options for the docs target added by the Nx plugin
179
- */
180
- docs?: false | {
181
- /**
182
- * The name of the docs target to use when generating documentation for the project
183
- *
184
- * @defaultValue "docs"
185
- */
186
- targetName?: string;
187
- /**
188
- * An indicator to control the behavior of Nx caching for the target
189
- *
190
- * @defaultValue true
191
- */
192
- cache?: boolean;
193
- /**
194
- * The name of the docs configuration to use when generating documentation for the project
195
- *
196
- * @defaultValue "production"
197
- */
198
- defaultConfiguration?: "production" | "test" | "development";
199
- /**
200
- * An array specifying any other target identifiers the docs target depends on
201
- *
202
- * @defaultValue ["^docs", "build"]
203
- */
204
- dependsOn?: string[];
205
- /**
206
- * An array specifying any input files or globs to consider when determining if the docs target needs to be re-run
207
- */
208
- inputs?: string[] | "production" | "allProjectFiles" | "sharedGlobals" | "testing" | "linting" | "documentation" | "rust" | "typescript";
209
- /**
210
- * An array specifying the output files or globs generated by the docs target
211
- */
212
- outputs?: string[];
213
- /**
214
- * The executor to use for the docs target
215
- *
216
- * @defaultValue "\@powerlines/nx:docs"
217
- */
218
- executor?: string;
219
- };
220
- /**
221
- * Configuration options for the deploy target added by the Nx plugin
222
- */
223
- deploy?: false | {
224
- /**
225
- * The name of the deploy target to use when deploying the project
226
- *
227
- * @defaultValue "deploy"
228
- */
229
- targetName?: string;
230
- /**
231
- * An indicator to control the behavior of Nx caching for the target
232
- *
233
- * @defaultValue false
234
- */
235
- cache?: boolean;
236
- /**
237
- * The name of the deploy configuration to use when deploying the project
238
- *
239
- * @defaultValue "production"
240
- */
241
- defaultConfiguration?: "production" | "test" | "development";
242
- /**
243
- * An array specifying any other target identifiers the deploy target depends on
244
- *
245
- * @defaultValue ["^deploy", "build"]
246
- */
247
- dependsOn?: string[];
248
- /**
249
- * An array specifying any input files or globs to consider when determining if the deploy target needs to be re-run
250
- */
251
- inputs?: string[] | "production" | "allProjectFiles" | "sharedGlobals" | "rust" | "typescript";
252
- /**
253
- * An array specifying the output files or globs generated by the deploy target
254
- */
255
- outputs?: string[];
256
- /**
257
- * The executor to use for the deploy target
258
- *
259
- * @defaultValue "\@powerlines/nx:deploy"
260
- */
261
- executor?: string;
262
- };
263
- /**
264
- * Whether to enable verbose logging for the Nx plugin.
265
- *
266
- * @remarks
267
- * If enabled, the plugin will log more detailed information about its operations, which can be useful for debugging and troubleshooting.
268
- *
269
- * @defaultValue false
270
- */
271
- verboseOutput?: boolean;
272
- /**
273
- * Enable resolver debug logging for the plugin
274
- *
275
- * @defaultValue false
276
- */
277
- debug?: boolean;
278
- /**
279
- * An indicator to control the behavior of Nx caching for all of the targets
280
- *
281
- * @remarks
282
- * The `cache` value on the target specific options will override the value provided in this field.
283
- *
284
- * @defaultValue true
285
- */
286
- cache?: boolean;
287
- } //#endregion
288
- //#endregion
2
+ import { NxPluginOptions } from "@powerlines/nx";
3
+
289
4
  //#region src/plugin/index.d.ts
290
5
  declare const createNodesV2: CreateNodesV2<NxPluginOptions>;
291
6
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["NxPluginOptions","clean","targetName","cache","defaultConfiguration","dependsOn","inputs","outputs","executor","prepare","lint","build","docs","deploy","verboseOutput","debug"],"sources":["../../../../node_modules/.pnpm/@powerlines+nx@0.13.39_fc99eff9622fa5d3f6bd2e5db9585b9b/node_modules/@powerlines/nx/dist/src/types/plugin.d.mts","../../src/plugin/index.ts"],"x_google_ignoreList":[0],"mappings":";;;UACUA,eAAAA;;;;EAIRC,KAAAA;IAJQD;;;;;IAUNE,UAAAA;IAMAC;;;;;IAAAA,KAAAA;IA+BFM;;;;;IAzBEL,oBAAAA;IAyDAG;;;;;IAnDAF,SAAAA;IAsFAA;;;IAlFAC,MAAAA;IAqGFK;;;IAjGEJ,OAAAA;IAyHAF;;;;;IAnHAG,QAAAA;EAAAA;EAwJAJ;;;EAnJFK,OAAAA;IAuKED;;;;;IAjKAN,UAAAA;IAkMAI;;;;;IA5LAH,KAAAA;IA+NG;;;;;IAzNHC,oBAAAA;ICzCA;;;;;ID+CAC,SAAAA;;;;IAIAC,MAAAA;;;;IAIAC,OAAAA;;;;;;IAMAC,QAAAA;EAAAA;;;;EAKFE,IAAAA;;;;;;IAMER,UAAAA;;;;;;IAMAC,KAAAA;;;;;;IAMAC,oBAAAA;;;;;;IAMAC,SAAAA;;;;IAIAC,MAAAA;;;;IAIAC,OAAAA;;;;;;IAMAC,QAAAA;EAAAA;;;;EAKFG,KAAAA;;;;;;IAMET,UAAAA;;;;;;IAMAC,KAAAA;;;;;;IAMAC,oBAAAA;;;;;;IAMAC,SAAAA;;;;IAIAC,MAAAA;;;;IAIAC,OAAAA;;;;;;IAMAC,QAAAA;EAAAA;;;;EAKFI,IAAAA;;;;;;IAMEV,UAAAA;;;;;;IAMAC,KAAAA;;;;;;IAMAC,oBAAAA;;;;;;IAMAC,SAAAA;;;;IAIAC,MAAAA;;;;IAIAC,OAAAA;;;;;;IAMAC,QAAAA;EAAAA;;;;EAKFK,MAAAA;;;;;;IAMEX,UAAAA;;;;;;IAMAC,KAAAA;;;;;;IAMAC,oBAAAA;;;;;;IAMAC,SAAAA;;;;IAIAC,MAAAA;;;;IAIAC,OAAAA;;;;;;IAMAC,QAAAA;EAAAA;;;;;;;;;EAUFM,aAAAA;;;;;;EAMAC,KAAAA;;;;;;;;;EASAZ,KAAAA;AAAAA;;;cCrQW,aAAA,EAAe,aAAA,CAAc,eAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/plugin/index.ts"],"mappings":""}