@shell-shock/nx 0.0.43 → 0.0.47

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 (144) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +1 -1
  3. package/dist/{src/executors/lint/schema.d.ts → base/base-executor.schema.d.ts} +26 -13
  4. package/dist/{src/base → base}/base-executor.schema.json +40 -2
  5. package/dist/{base-executor-Tb7NcSc4.mjs → base-executor-DojAZA0w.mjs} +2 -2
  6. package/dist/base-executor-DojAZA0w.mjs.map +1 -0
  7. package/dist/{src/base-executor-B_1n4Nst.js → base-executor-KUL9jD5R.js} +1 -1
  8. package/dist/chunk-BCHjMept.mjs +3 -0
  9. package/dist/executors/build/executor.d.mts +34 -6
  10. package/dist/executors/build/executor.d.mts.map +1 -1
  11. package/dist/executors/build/executor.d.ts +34 -7
  12. package/dist/executors/build/executor.d.ts.map +1 -1
  13. package/dist/executors/build/executor.js +2 -4
  14. package/dist/executors/build/executor.mjs +2 -2
  15. package/dist/executors/build/executor.mjs.map +1 -1
  16. package/dist/executors/build/schema.d.ts +30 -1
  17. package/dist/executors/build/schema.json +40 -2
  18. package/dist/executors/clean/executor.d.mts +34 -6
  19. package/dist/executors/clean/executor.d.mts.map +1 -1
  20. package/dist/executors/clean/executor.d.ts +34 -7
  21. package/dist/executors/clean/executor.d.ts.map +1 -1
  22. package/dist/executors/clean/executor.js +2 -4
  23. package/dist/executors/clean/executor.mjs +2 -2
  24. package/dist/executors/clean/executor.mjs.map +1 -1
  25. package/dist/executors/clean/schema.d.ts +30 -1
  26. package/dist/executors/clean/schema.json +40 -2
  27. package/dist/executors/docs/executor.d.mts +34 -6
  28. package/dist/executors/docs/executor.d.mts.map +1 -1
  29. package/dist/executors/docs/executor.d.ts +34 -7
  30. package/dist/executors/docs/executor.d.ts.map +1 -1
  31. package/dist/executors/docs/executor.js +2 -4
  32. package/dist/executors/docs/executor.mjs +2 -2
  33. package/dist/executors/docs/executor.mjs.map +1 -1
  34. package/dist/executors/docs/schema.d.ts +30 -1
  35. package/dist/executors/docs/schema.json +40 -2
  36. package/dist/executors/lint/executor.d.mts +34 -6
  37. package/dist/executors/lint/executor.d.mts.map +1 -1
  38. package/dist/executors/lint/executor.d.ts +34 -7
  39. package/dist/executors/lint/executor.d.ts.map +1 -1
  40. package/dist/executors/lint/executor.js +2 -4
  41. package/dist/executors/lint/executor.mjs +2 -2
  42. package/dist/executors/lint/executor.mjs.map +1 -1
  43. package/dist/executors/lint/schema.d.ts +30 -1
  44. package/dist/executors/lint/schema.json +40 -2
  45. package/dist/executors/prepare/executor.d.mts +34 -6
  46. package/dist/executors/prepare/executor.d.mts.map +1 -1
  47. package/dist/executors/prepare/executor.d.ts +34 -7
  48. package/dist/executors/prepare/executor.d.ts.map +1 -1
  49. package/dist/executors/prepare/executor.js +2 -4
  50. package/dist/executors/prepare/executor.mjs +2 -2
  51. package/dist/executors/prepare/executor.mjs.map +1 -1
  52. package/dist/executors/prepare/schema.d.ts +30 -1
  53. package/dist/executors/prepare/schema.json +40 -2
  54. package/dist/index.d.mts +175 -2
  55. package/dist/index.d.mts.map +1 -0
  56. package/dist/index.d.ts +175 -2
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +1 -1
  59. package/dist/index.mjs +1 -1
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/plugin/index.d.mts +242 -1
  62. package/dist/plugin/index.d.mts.map +1 -1
  63. package/dist/plugin/index.d.ts +242 -1
  64. package/dist/plugin/index.d.ts.map +1 -1
  65. package/dist/plugin/index.js +1221 -3
  66. package/dist/plugin/index.mjs +1191 -1
  67. package/dist/plugin/index.mjs.map +1 -1
  68. package/docs/api/base-executor.schema.md +31 -1
  69. package/docs/api/build/schema.md +31 -1
  70. package/docs/api/clean/schema.md +31 -1
  71. package/docs/api/docs/schema.md +31 -1
  72. package/docs/api/lint/schema.md +31 -1
  73. package/docs/api/prepare/schema.md +31 -1
  74. package/executors.json +10 -10
  75. package/package.json +49 -57
  76. package/dist/base-executor-5IKYZdSK.d.mts +0 -143
  77. package/dist/base-executor-5IKYZdSK.d.mts.map +0 -1
  78. package/dist/base-executor-B_1n4Nst.js +0 -104
  79. package/dist/base-executor-D8wAP52R.d.ts +0 -143
  80. package/dist/base-executor-D8wAP52R.d.ts.map +0 -1
  81. package/dist/base-executor-Tb7NcSc4.mjs.map +0 -1
  82. package/dist/src/base/base-executor.schema.d.ts +0 -128
  83. package/dist/src/base-executor-5IKYZdSK.d.mts +0 -143
  84. package/dist/src/base-executor-5IKYZdSK.d.mts.map +0 -1
  85. package/dist/src/base-executor-D8wAP52R.d.ts +0 -143
  86. package/dist/src/base-executor-D8wAP52R.d.ts.map +0 -1
  87. package/dist/src/base-executor-Tb7NcSc4.mjs +0 -66
  88. package/dist/src/base-executor-Tb7NcSc4.mjs.map +0 -1
  89. package/dist/src/executors/build/executor.d.mts +0 -140
  90. package/dist/src/executors/build/executor.d.mts.map +0 -1
  91. package/dist/src/executors/build/executor.d.ts +0 -140
  92. package/dist/src/executors/build/executor.d.ts.map +0 -1
  93. package/dist/src/executors/build/executor.js +0 -19
  94. package/dist/src/executors/build/executor.mjs +0 -17
  95. package/dist/src/executors/build/executor.mjs.map +0 -1
  96. package/dist/src/executors/build/schema.d.ts +0 -144
  97. package/dist/src/executors/build/schema.json +0 -163
  98. package/dist/src/executors/clean/executor.d.mts +0 -140
  99. package/dist/src/executors/clean/executor.d.mts.map +0 -1
  100. package/dist/src/executors/clean/executor.d.ts +0 -140
  101. package/dist/src/executors/clean/executor.d.ts.map +0 -1
  102. package/dist/src/executors/clean/executor.js +0 -14
  103. package/dist/src/executors/clean/executor.mjs +0 -13
  104. package/dist/src/executors/clean/executor.mjs.map +0 -1
  105. package/dist/src/executors/clean/schema.d.ts +0 -144
  106. package/dist/src/executors/clean/schema.json +0 -163
  107. package/dist/src/executors/docs/executor.d.mts +0 -140
  108. package/dist/src/executors/docs/executor.d.mts.map +0 -1
  109. package/dist/src/executors/docs/executor.d.ts +0 -140
  110. package/dist/src/executors/docs/executor.d.ts.map +0 -1
  111. package/dist/src/executors/docs/executor.js +0 -15
  112. package/dist/src/executors/docs/executor.mjs +0 -13
  113. package/dist/src/executors/docs/executor.mjs.map +0 -1
  114. package/dist/src/executors/docs/schema.d.ts +0 -144
  115. package/dist/src/executors/docs/schema.json +0 -163
  116. package/dist/src/executors/lint/executor.d.mts +0 -140
  117. package/dist/src/executors/lint/executor.d.mts.map +0 -1
  118. package/dist/src/executors/lint/executor.d.ts +0 -140
  119. package/dist/src/executors/lint/executor.d.ts.map +0 -1
  120. package/dist/src/executors/lint/executor.js +0 -15
  121. package/dist/src/executors/lint/executor.mjs +0 -13
  122. package/dist/src/executors/lint/executor.mjs.map +0 -1
  123. package/dist/src/executors/lint/schema.json +0 -163
  124. package/dist/src/executors/prepare/executor.d.mts +0 -140
  125. package/dist/src/executors/prepare/executor.d.mts.map +0 -1
  126. package/dist/src/executors/prepare/executor.d.ts +0 -140
  127. package/dist/src/executors/prepare/executor.d.ts.map +0 -1
  128. package/dist/src/executors/prepare/executor.js +0 -19
  129. package/dist/src/executors/prepare/executor.mjs +0 -17
  130. package/dist/src/executors/prepare/executor.mjs.map +0 -1
  131. package/dist/src/executors/prepare/schema.d.ts +0 -144
  132. package/dist/src/executors/prepare/schema.json +0 -163
  133. package/dist/src/index.d.mts +0 -2
  134. package/dist/src/index.d.ts +0 -2
  135. package/dist/src/index.js +0 -19
  136. package/dist/src/index.mjs +0 -18
  137. package/dist/src/index.mjs.map +0 -1
  138. package/dist/src/plugin/index.d.mts +0 -8
  139. package/dist/src/plugin/index.d.mts.map +0 -1
  140. package/dist/src/plugin/index.d.ts +0 -8
  141. package/dist/src/plugin/index.d.ts.map +0 -1
  142. package/dist/src/plugin/index.js +0 -9
  143. package/dist/src/plugin/index.mjs +0 -8
  144. package/dist/src/plugin/index.mjs.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/nx",
3
- "version": "0.0.43",
3
+ "version": "0.0.47",
4
4
  "description": "A Nx plugin to support Shell Shock development in Nx monorepos.",
5
5
  "repository": {
6
6
  "type": "github",
@@ -9,109 +9,101 @@
9
9
  },
10
10
  "private": false,
11
11
  "type": "commonjs",
12
- "main": "dist/src/index.js",
13
- "module": "dist/src/index.mjs",
12
+ "main": "dist/index.js",
13
+ "module": "dist/index.mjs",
14
14
  "exports": {
15
15
  "./package.json": "./package.json",
16
16
  "./docs/*": "./docs/*",
17
17
  "./executors.json": "./executors.json",
18
- "./executors/*/schema.json": "./dist/src/executors/*/schema.json",
18
+ "./executors/*/schema.json": "./dist/executors/*/schema.json",
19
19
  ".": {
20
20
  "import": {
21
- "types": "./dist/src/index.d.mts",
22
- "default": "./dist/src/index.mjs"
21
+ "types": "./dist/index.d.mts",
22
+ "default": "./dist/index.mjs"
23
23
  },
24
- "require": {
25
- "types": "./dist/src/index.d.ts",
26
- "default": "./dist/src/index.js"
27
- },
28
- "default": {
29
- "types": "./dist/src/index.d.ts",
30
- "default": "./dist/src/index.js"
31
- }
24
+ "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
25
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
32
26
  },
33
27
  "./index": {
34
28
  "import": {
35
- "types": "./dist/src/index.d.mts",
36
- "default": "./dist/src/index.mjs"
29
+ "types": "./dist/index.d.mts",
30
+ "default": "./dist/index.mjs"
37
31
  },
38
- "require": {
39
- "types": "./dist/src/index.d.ts",
40
- "default": "./dist/src/index.js"
41
- },
42
- "default": {
43
- "types": "./dist/src/index.d.ts",
44
- "default": "./dist/src/index.js"
45
- }
32
+ "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
33
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
46
34
  },
47
35
  "./plugin": {
48
36
  "import": {
49
- "types": "./dist/src/plugin/index.d.mts",
50
- "default": "./dist/src/plugin/index.mjs"
37
+ "types": "./dist/plugin/index.d.mts",
38
+ "default": "./dist/plugin/index.mjs"
51
39
  },
52
40
  "require": {
53
- "types": "./dist/src/plugin/index.d.ts",
54
- "default": "./dist/src/plugin/index.js"
41
+ "types": "./dist/plugin/index.d.ts",
42
+ "default": "./dist/plugin/index.js"
55
43
  },
56
44
  "default": {
57
- "types": "./dist/src/plugin/index.d.ts",
58
- "default": "./dist/src/plugin/index.js"
45
+ "types": "./dist/plugin/index.d.ts",
46
+ "default": "./dist/plugin/index.js"
59
47
  }
60
48
  },
61
49
  "./executors/*/untyped": {
62
50
  "import": {
63
- "types": "./dist/src/executors/*/untyped.d.mts",
64
- "default": "./dist/src/executors/*/untyped.mjs"
51
+ "types": "./dist/executors/*/untyped.d.mts",
52
+ "default": "./dist/executors/*/untyped.mjs"
65
53
  },
66
54
  "require": {
67
- "types": "./dist/src/executors/*/untyped.d.ts",
68
- "default": "./dist/src/executors/*/untyped.js"
55
+ "types": "./dist/executors/*/untyped.d.ts",
56
+ "default": "./dist/executors/*/untyped.js"
69
57
  },
70
58
  "default": {
71
- "types": "./dist/src/executors/*/untyped.d.ts",
72
- "default": "./dist/src/executors/*/untyped.js"
59
+ "types": "./dist/executors/*/untyped.d.ts",
60
+ "default": "./dist/executors/*/untyped.js"
73
61
  }
74
62
  },
75
63
  "./executors/*/executor": {
76
64
  "import": {
77
- "types": "./dist/src/executors/*/executor.d.mts",
78
- "default": "./dist/src/executors/*/executor.mjs"
65
+ "types": "./dist/executors/*/executor.d.mts",
66
+ "default": "./dist/executors/*/executor.mjs"
79
67
  },
80
68
  "require": {
81
- "types": "./dist/src/executors/*/executor.d.ts",
82
- "default": "./dist/src/executors/*/executor.js"
69
+ "types": "./dist/executors/*/executor.d.ts",
70
+ "default": "./dist/executors/*/executor.js"
83
71
  },
84
72
  "default": {
85
- "types": "./dist/src/executors/*/executor.d.ts",
86
- "default": "./dist/src/executors/*/executor.js"
73
+ "types": "./dist/executors/*/executor.d.ts",
74
+ "default": "./dist/executors/*/executor.js"
87
75
  }
88
76
  },
89
- "./executors/*/executor.js": "./dist/src/executors/*/executor.js",
90
- "./executors/*/executor.mjs": "./dist/src/executors/*/executor.mjs"
77
+ "./executors/*/executor.js": "./dist/executors/*/executor.js",
78
+ "./executors/*/executor.mjs": "./dist/executors/*/executor.mjs"
91
79
  },
92
- "typings": "dist/src/index.d.ts",
80
+ "typings": "dist/index.d.ts",
81
+ "peerDependencies": { "nx": ">=22.5.0" },
93
82
  "dependencies": {
94
- "@nx/devkit": "22.5.2",
95
- "@powerlines/nx": "^0.11.283",
96
- "@shell-shock/core": "^0.13.0",
97
- "@storm-software/config": "^1.135.33",
98
- "@storm-software/config-tools": "^1.189.32",
99
- "@storm-software/workspace-tools": "^1.295.8",
100
- "@stryke/type-checks": "^0.5.39",
83
+ "@nx/devkit": "22.6.1",
84
+ "@shell-shock/core": "^0.13.3",
85
+ "@storm-software/config": "^1.137.0",
86
+ "@storm-software/config-tools": "^1.189.46",
87
+ "@storm-software/workspace-tools": "^1.295.22",
88
+ "@stryke/type-checks": "^0.5.41",
89
+ "@stryke/string-format": "^0.17.6",
90
+ "@stryke/hash": "^0.13.16",
91
+ "@stryke/path": "^0.27.2",
101
92
  "defu": "^6.1.4",
102
93
  "jiti": "^2.6.1",
103
- "powerlines": "^0.41.20",
94
+ "powerlines": "^0.42.9",
104
95
  "untyped": "^1.5.2"
105
96
  },
106
97
  "devDependencies": {
107
- "@powerlines/plugin-tsdown": "^0.1.303",
108
- "@powerlines/plugin-untyped": "^0.2.308",
109
- "@storm-software/testing-tools": "^1.119.107",
98
+ "@powerlines/nx": "^0.11.296",
99
+ "@powerlines/plugin-tsdown": "^0.1.316",
100
+ "@powerlines/plugin-untyped": "^0.2.321",
101
+ "@storm-software/testing-tools": "^1.119.121",
110
102
  "@types/node": "^25.5.0",
111
103
  "eslint-flat-config-utils": "^2.1.4",
112
104
  "jsonc-eslint-parser": "^2.4.2"
113
105
  },
114
106
  "publishConfig": { "access": "public" },
115
107
  "executors": "./executors.json",
116
- "gitHead": "d9365dd86c8fd0958486dfb1cef4822da5798464"
108
+ "gitHead": "86ac1c51d3258bded9e493024e6631d241f62dd2"
117
109
  }
@@ -1,143 +0,0 @@
1
- import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
2
- import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
3
- import { ShellShockAPI } from "@shell-shock/core";
4
- import { StormWorkspaceConfig } from "@storm-software/config/types";
5
- import { InlineConfig, PowerlinesCommand } from "powerlines";
6
-
7
- //#region src/base/base-executor.schema.d.ts
8
- // Generated by powerlines
9
- // Do not edit this file directly
10
- interface BaseExecutorSchema {
11
- /**
12
- * Powerlines Configuration File
13
- *
14
- * The path to the Powerlines configuration file
15
- *
16
- * @default "{projectRoot}/powerlines.config.ts"
17
- *
18
- * @format path
19
- */
20
- configFile?: string;
21
- /**
22
- * Input Entry File(s)
23
- *
24
- * The entry file(s) that serve as the input for the project
25
- *
26
- *
27
- * @format path
28
- */
29
- input?: Array<string>;
30
- /**
31
- * TSConfig Path
32
- *
33
- * The path to the tsconfig file
34
- *
35
- * @default "{projectRoot}/tsconfig.json"
36
- *
37
- * @format path
38
- */
39
- tsconfig?: string;
40
- /**
41
- * Output Path
42
- *
43
- * The path to the output directory for the build artifacts
44
- *
45
- *
46
- * @format path
47
- */
48
- outputPath?: string;
49
- /**
50
- * Sourcemap
51
- *
52
- * Generate a sourcemap
53
- *
54
- */
55
- sourceMap?: boolean;
56
- /**
57
- * Format
58
- *
59
- * The format to build
60
- *
61
- * @default ["cjs","esm"]
62
- */
63
- format?: Array<string>;
64
- /**
65
- * Platform
66
- *
67
- * The platform to build
68
- *
69
- * @default "neutral"
70
- *
71
- * @enum neutral,node,browser
72
- */
73
- platform?: string;
74
- /**
75
- * External
76
- *
77
- * The external dependencies
78
- *
79
- */
80
- external?: Array<any>;
81
- /**
82
- * No External
83
- *
84
- * The dependencies that should not be treated as external
85
- *
86
- */
87
- noExternal?: Array<any>;
88
- /**
89
- * Skip Node Modules Bundle
90
- *
91
- * Skip bundling node_modules during the build process (if required)
92
- *
93
- */
94
- skipNodeModulesBundle?: boolean;
95
- /**
96
- * Mode
97
- *
98
- * The build mode
99
- *
100
- *
101
- * @enum development,test,production
102
- */
103
- mode?: string;
104
- /**
105
- * Log Level
106
- *
107
- * The log level to use for the build process
108
- *
109
- *
110
- * @enum fatal,error,warn,success,info,debug,trace,silent
111
- */
112
- logLevel?: string;
113
- /**
114
- * Define
115
- *
116
- * The `define` values
117
- *
118
- */
119
- define?: Record<string, string>;
120
- }
121
- //#endregion
122
- //#region src/base/base-executor.d.ts
123
- type ShellShockExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
124
- projectName: string;
125
- command: TCommand;
126
- options: TExecutorSchema;
127
- inlineConfig: InlineConfig;
128
- workspaceConfig: StormWorkspaceConfig;
129
- };
130
- /**
131
- * A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.
132
- *
133
- * @remarks
134
- * This function is designed to simplify the creation of Shell Shock executors by providing a consistent interface and error handling.
135
- *
136
- * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
137
- * @param executorFn - The function that will be executed when the command is run.
138
- * @returns A Promise that resolves to the result of the executor function.
139
- */
140
- 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>;
141
- //#endregion
142
- export { withExecutor as n, ShellShockExecutorContext as t };
143
- //# sourceMappingURL=base-executor-5IKYZdSK.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-executor-5IKYZdSK.d.mts","names":["BaseExecutorSchema","Array","Record","configFile","input","tsconfig","outputPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;;UAIiBA,kBAAAA;;;AAAjB;;;;;;;EAUCG,UAAAA;EA+Ge;;;;;;;;EArGfC,KAAAA,GAAQH,KAAAA;;;;;;;;;;EAWRI,QAAAA;;;;ACLD;;;;;EDeCC,UAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAASP,KAAAA;;;;;;;;;ACXV;EDsBCQ,QAAAA;;;;;;;EAQAC,QAAAA,GAAWT,KAAAA;;;;;;;EAQXU,UAAAA,GAAaV,KAAAA;;;;;;;EAQbW,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASb,MAAAA;AAAAA;;;KC/FE,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,104 +0,0 @@
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
- let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
29
- let _storm_software_workspace_tools_base_base_executor = require("@storm-software/workspace-tools/base/base-executor");
30
- let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
31
- let defu = require("defu");
32
- defu = __toESM(defu);
33
- let jiti = require("jiti");
34
-
35
- //#region src/base/base-executor.ts
36
- /**
37
- * A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.
38
- *
39
- * @remarks
40
- * This function is designed to simplify the creation of Shell Shock executors by providing a consistent interface and error handling.
41
- *
42
- * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
43
- * @param executorFn - The function that will be executed when the command is run.
44
- * @returns A Promise that resolves to the result of the executor function.
45
- */
46
- function withExecutor(command, executorFn) {
47
- return (0, _storm_software_workspace_tools_base_base_executor.withRunExecutor)(`Shell Shock ${command} command executor`, async (options, context, workspaceConfig) => {
48
- if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
49
- 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.");
50
- const projectConfig = context.projectsConfigurations.projects[context.projectName];
51
- const { createShellShock } = await (0, jiti.createJiti)(context.root, { cache: false }).import("@shell-shock/core");
52
- const api = await createShellShock((0, defu.default)({
53
- name: projectConfig.name,
54
- root: projectConfig.root,
55
- sourceRoot: projectConfig.sourceRoot,
56
- tsconfig: options.tsconfig,
57
- logLevel: options.logLevel,
58
- description: projectConfig.metadata?.description,
59
- projectType: projectConfig.projectType,
60
- mode: options.mode,
61
- output: { outputPath: options.outputPath ?? projectConfig.targets?.build?.options?.outputPath }
62
- }, options));
63
- try {
64
- return await Promise.resolve(executorFn((0, defu.default)({
65
- projectName: context.projectName,
66
- options,
67
- workspaceConfig,
68
- inlineConfig: {
69
- command,
70
- configFile: options.configFile
71
- },
72
- command
73
- }, context), api));
74
- } catch (error) {
75
- (0, _storm_software_config_tools_logger.writeError)(`An error occurred while executing the Shell Shock ${command} command executor: ${(0, _stryke_type_checks_is_error.isError)(error) ? `${error.message}
76
-
77
- ${error.stack}` : "Unknown error"}`);
78
- return { success: false };
79
- } finally {
80
- await api.finalize();
81
- }
82
- }, {
83
- skipReadingConfig: false,
84
- hooks: { applyDefaultOptions: (options) => {
85
- options.outputPath ??= "dist/{projectRoot}";
86
- options.configFile ??= "{projectRoot}/shell-shock.config.ts";
87
- return options;
88
- } }
89
- });
90
- }
91
-
92
- //#endregion
93
- Object.defineProperty(exports, '__toESM', {
94
- enumerable: true,
95
- get: function () {
96
- return __toESM;
97
- }
98
- });
99
- Object.defineProperty(exports, 'withExecutor', {
100
- enumerable: true,
101
- get: function () {
102
- return withExecutor;
103
- }
104
- });
@@ -1,143 +0,0 @@
1
- import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
2
- import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
3
- import { ShellShockAPI } from "@shell-shock/core";
4
- import { StormWorkspaceConfig } from "@storm-software/config/types";
5
- import { InlineConfig, PowerlinesCommand } from "powerlines";
6
-
7
- //#region src/base/base-executor.schema.d.ts
8
- // Generated by powerlines
9
- // Do not edit this file directly
10
- interface BaseExecutorSchema {
11
- /**
12
- * Powerlines Configuration File
13
- *
14
- * The path to the Powerlines configuration file
15
- *
16
- * @default "{projectRoot}/powerlines.config.ts"
17
- *
18
- * @format path
19
- */
20
- configFile?: string;
21
- /**
22
- * Input Entry File(s)
23
- *
24
- * The entry file(s) that serve as the input for the project
25
- *
26
- *
27
- * @format path
28
- */
29
- input?: Array<string>;
30
- /**
31
- * TSConfig Path
32
- *
33
- * The path to the tsconfig file
34
- *
35
- * @default "{projectRoot}/tsconfig.json"
36
- *
37
- * @format path
38
- */
39
- tsconfig?: string;
40
- /**
41
- * Output Path
42
- *
43
- * The path to the output directory for the build artifacts
44
- *
45
- *
46
- * @format path
47
- */
48
- outputPath?: string;
49
- /**
50
- * Sourcemap
51
- *
52
- * Generate a sourcemap
53
- *
54
- */
55
- sourceMap?: boolean;
56
- /**
57
- * Format
58
- *
59
- * The format to build
60
- *
61
- * @default ["cjs","esm"]
62
- */
63
- format?: Array<string>;
64
- /**
65
- * Platform
66
- *
67
- * The platform to build
68
- *
69
- * @default "neutral"
70
- *
71
- * @enum neutral,node,browser
72
- */
73
- platform?: string;
74
- /**
75
- * External
76
- *
77
- * The external dependencies
78
- *
79
- */
80
- external?: Array<any>;
81
- /**
82
- * No External
83
- *
84
- * The dependencies that should not be treated as external
85
- *
86
- */
87
- noExternal?: Array<any>;
88
- /**
89
- * Skip Node Modules Bundle
90
- *
91
- * Skip bundling node_modules during the build process (if required)
92
- *
93
- */
94
- skipNodeModulesBundle?: boolean;
95
- /**
96
- * Mode
97
- *
98
- * The build mode
99
- *
100
- *
101
- * @enum development,test,production
102
- */
103
- mode?: string;
104
- /**
105
- * Log Level
106
- *
107
- * The log level to use for the build process
108
- *
109
- *
110
- * @enum fatal,error,warn,success,info,debug,trace,silent
111
- */
112
- logLevel?: string;
113
- /**
114
- * Define
115
- *
116
- * The `define` values
117
- *
118
- */
119
- define?: Record<string, string>;
120
- }
121
- //#endregion
122
- //#region src/base/base-executor.d.ts
123
- type ShellShockExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
124
- projectName: string;
125
- command: TCommand;
126
- options: TExecutorSchema;
127
- inlineConfig: InlineConfig;
128
- workspaceConfig: StormWorkspaceConfig;
129
- };
130
- /**
131
- * A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.
132
- *
133
- * @remarks
134
- * This function is designed to simplify the creation of Shell Shock executors by providing a consistent interface and error handling.
135
- *
136
- * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
137
- * @param executorFn - The function that will be executed when the command is run.
138
- * @returns A Promise that resolves to the result of the executor function.
139
- */
140
- 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>;
141
- //#endregion
142
- export { withExecutor as n, ShellShockExecutorContext as t };
143
- //# sourceMappingURL=base-executor-D8wAP52R.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-executor-D8wAP52R.d.ts","names":["BaseExecutorSchema","Array","Record","configFile","input","tsconfig","outputPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;;UAIiBA,kBAAAA;;;AAAjB;;;;;;;EAUCG,UAAAA;EA+Ge;;;;;;;;EArGfC,KAAAA,GAAQH,KAAAA;;;;;;;;;;EAWRI,QAAAA;;;;ACLD;;;;;EDeCC,UAAAA;;;;;;;EAQAC,SAAAA;;;;;;;;EASAC,MAAAA,GAASP,KAAAA;;;;;;;;;ACXV;EDsBCQ,QAAAA;;;;;;;EAQAC,QAAAA,GAAWT,KAAAA;;;;;;;EAQXU,UAAAA,GAAaV,KAAAA;;;;;;;EAQbW,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASb,MAAAA;AAAAA;;;KC/FE,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 +0,0 @@
1
- {"version":3,"file":"base-executor-Tb7NcSc4.mjs","names":[],"sources":["../../src/base/base-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 { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport type { ShellShockAPI, UserConfig } from \"@shell-shock/core\";\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 { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type { InlineConfig, PowerlinesCommand } from \"powerlines\";\nimport type { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type ShellShockExecutorContext<\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 Shell Shock executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Shell Shock 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: ShellShockExecutorContext<TCommand, TExecutorSchema>,\n api: ShellShockAPI\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Shell Shock ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, { cache: false });\n const { createShellShock } = await jiti.import<{\n createShellShock: typeof import(\"@shell-shock/core\").createShellShock;\n }>(\"@shell-shock/core\");\n\n const api = await createShellShock(\n defu(\n {\n name: projectConfig.name,\n root: projectConfig.root,\n sourceRoot: projectConfig.sourceRoot,\n tsconfig: options.tsconfig,\n logLevel: options.logLevel,\n description: projectConfig.metadata?.description,\n projectType: projectConfig.projectType,\n mode: options.mode,\n output: {\n outputPath:\n options.outputPath ??\n projectConfig.targets?.build?.options?.outputPath\n }\n },\n options\n ) as Partial<UserConfig>\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\n },\n command\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Shell Shock ${\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 options.outputPath ??= \"dist/{projectRoot}\";\n options.configFile ??= \"{projectRoot}/shell-shock.config.ts\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmDA,SAAgB,aAId,SACA,YAQkC;AAClC,QAAO,gBACL,eAAe,QAAQ,oBACvB,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;EAGlD,MAAM,EAAE,qBAAqB,MADhB,WAAW,QAAQ,MAAM,EAAE,OAAO,OAAO,CAAC,CACf,OAErC,oBAAoB;EAEvB,MAAM,MAAM,MAAM,iBAChB,KACE;GACE,MAAM,cAAc;GACpB,MAAM,cAAc;GACpB,YAAY,cAAc;GAC1B,UAAU,QAAQ;GAClB,UAAU,QAAQ;GAClB,aAAa,cAAc,UAAU;GACrC,aAAa,cAAc;GAC3B,MAAM,QAAQ;GACd,QAAQ,EACN,YACE,QAAQ,cACR,cAAc,SAAS,OAAO,SAAS,YAC1C;GACF,EACD,QACD,CACF;AAED,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,WACE,KACE;IACE,aAAa,QAAQ;IACrB;IACA;IACA,cAAc;KACZ;KACA,YAAY,QAAQ;KACrB;IACD;IACD,EACD,QACD,EACD,IACD,CACF;WACM,OAAO;AACd,cACE,qDACE,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,WAAQ,eAAe;AACvB,WAAQ,eAAe;AAEvB,UAAO;KAEV;EACF,CACF"}