@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
@@ -1,128 +0,0 @@
1
-
2
- // Generated by powerlines
3
- // Do not edit this file directly
4
-
5
- export interface BaseExecutorSchema {
6
- /**
7
- * Powerlines Configuration File
8
- *
9
- * The path to the Powerlines configuration file
10
- *
11
- * @default "{projectRoot}/powerlines.config.ts"
12
- *
13
- * @format path
14
- */
15
- configFile?: string,
16
-
17
- /**
18
- * Input Entry File(s)
19
- *
20
- * The entry file(s) that serve as the input for the project
21
- *
22
- *
23
- * @format path
24
- */
25
- input?: Array<string>,
26
-
27
- /**
28
- * TSConfig Path
29
- *
30
- * The path to the tsconfig file
31
- *
32
- * @default "{projectRoot}/tsconfig.json"
33
- *
34
- * @format path
35
- */
36
- tsconfig?: string,
37
-
38
- /**
39
- * Output Path
40
- *
41
- * The path to the output directory for the build artifacts
42
- *
43
- *
44
- * @format path
45
- */
46
- outputPath?: string,
47
-
48
- /**
49
- * Sourcemap
50
- *
51
- * Generate a sourcemap
52
- *
53
- */
54
- sourceMap?: boolean,
55
-
56
- /**
57
- * Format
58
- *
59
- * The format to build
60
- *
61
- * @default ["cjs","esm"]
62
- */
63
- format?: Array<string>,
64
-
65
- /**
66
- * Platform
67
- *
68
- * The platform to build
69
- *
70
- * @default "neutral"
71
- *
72
- * @enum neutral,node,browser
73
- */
74
- platform?: string,
75
-
76
- /**
77
- * External
78
- *
79
- * The external dependencies
80
- *
81
- */
82
- external?: Array<any>,
83
-
84
- /**
85
- * No External
86
- *
87
- * The dependencies that should not be treated as external
88
- *
89
- */
90
- noExternal?: Array<any>,
91
-
92
- /**
93
- * Skip Node Modules Bundle
94
- *
95
- * Skip bundling node_modules during the build process (if required)
96
- *
97
- */
98
- skipNodeModulesBundle?: boolean,
99
-
100
- /**
101
- * Mode
102
- *
103
- * The build mode
104
- *
105
- *
106
- * @enum development,test,production
107
- */
108
- mode?: string,
109
-
110
- /**
111
- * Log Level
112
- *
113
- * The log level to use for the build process
114
- *
115
- *
116
- * @enum fatal,error,warn,success,info,debug,trace,silent
117
- */
118
- logLevel?: string,
119
-
120
- /**
121
- * Define
122
- *
123
- * The `define` values
124
- *
125
- */
126
- define?: Record<string, string>,
127
- }
128
-
@@ -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,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,66 +0,0 @@
1
- import { writeError } from "@storm-software/config-tools/logger";
2
- import { withRunExecutor } from "@storm-software/workspace-tools/base/base-executor";
3
- import { isError } from "@stryke/type-checks/is-error";
4
- import defu from "defu";
5
- import { createJiti } from "jiti";
6
-
7
- //#region src/base/base-executor.ts
8
- /**
9
- * A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.
10
- *
11
- * @remarks
12
- * This function is designed to simplify the creation of Shell Shock 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(`Shell Shock ${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 { createShellShock } = await createJiti(context.root, { cache: false }).import("@shell-shock/core");
24
- const api = await createShellShock(defu({
25
- name: projectConfig.name,
26
- root: projectConfig.root,
27
- sourceRoot: projectConfig.sourceRoot,
28
- tsconfig: options.tsconfig,
29
- logLevel: options.logLevel,
30
- description: projectConfig.metadata?.description,
31
- projectType: projectConfig.projectType,
32
- mode: options.mode,
33
- output: { outputPath: options.outputPath ?? projectConfig.targets?.build?.options?.outputPath }
34
- }, options));
35
- try {
36
- return await Promise.resolve(executorFn(defu({
37
- projectName: context.projectName,
38
- options,
39
- workspaceConfig,
40
- inlineConfig: {
41
- command,
42
- configFile: options.configFile
43
- },
44
- command
45
- }, context), api));
46
- } catch (error) {
47
- writeError(`An error occurred while executing the Shell Shock ${command} command executor: ${isError(error) ? `${error.message}
48
-
49
- ${error.stack}` : "Unknown error"}`);
50
- return { success: false };
51
- } finally {
52
- await api.finalize();
53
- }
54
- }, {
55
- skipReadingConfig: false,
56
- hooks: { applyDefaultOptions: (options) => {
57
- options.outputPath ??= "dist/{projectRoot}";
58
- options.configFile ??= "{projectRoot}/shell-shock.config.ts";
59
- return options;
60
- } }
61
- });
62
- }
63
-
64
- //#endregion
65
- export { withExecutor as t };
66
- //# sourceMappingURL=base-executor-Tb7NcSc4.mjs.map
@@ -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"}
@@ -1,140 +0,0 @@
1
- import { t as ShellShockExecutorContext } from "../../base-executor-5IKYZdSK.mjs";
2
- import { PromiseExecutor } from "@nx/devkit";
3
- import { ShellShockAPI } from "@shell-shock/core/api";
4
- import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
5
-
6
- //#region src/executors/build/schema.d.ts
7
- // Generated by powerlines
8
- // Do not edit this file directly
9
- interface BuildExecutorSchema {
10
- /**
11
- * Powerlines Configuration File
12
- *
13
- * The path to the Powerlines configuration file
14
- *
15
- * @default "{projectRoot}/powerlines.config.ts"
16
- *
17
- * @format path
18
- */
19
- configFile?: string;
20
- /**
21
- * Input Entry File(s)
22
- *
23
- * The entry file(s) that serve as the input for the project
24
- *
25
- *
26
- * @format path
27
- */
28
- input?: Array<string>;
29
- /**
30
- * TSConfig Path
31
- *
32
- * The path to the tsconfig file
33
- *
34
- * @default "{projectRoot}/tsconfig.json"
35
- *
36
- * @format path
37
- */
38
- tsconfig?: string;
39
- /**
40
- * Output Path
41
- *
42
- * The path to the output directory for the build artifacts
43
- *
44
- *
45
- * @format path
46
- */
47
- outputPath?: string;
48
- /**
49
- * Sourcemap
50
- *
51
- * Generate a sourcemap
52
- *
53
- */
54
- sourceMap?: boolean;
55
- /**
56
- * Format
57
- *
58
- * The format to build
59
- *
60
- * @default ["cjs","esm"]
61
- */
62
- format?: Array<string>;
63
- /**
64
- * Platform
65
- *
66
- * The platform to build
67
- *
68
- * @default "neutral"
69
- *
70
- * @enum neutral,node,browser
71
- */
72
- platform?: string;
73
- /**
74
- * External
75
- *
76
- * The external dependencies
77
- *
78
- */
79
- external?: Array<any>;
80
- /**
81
- * No External
82
- *
83
- * The dependencies that should not be treated as external
84
- *
85
- */
86
- noExternal?: Array<any>;
87
- /**
88
- * Skip Node Modules Bundle
89
- *
90
- * Skip bundling node_modules during the build process (if required)
91
- *
92
- */
93
- skipNodeModulesBundle?: boolean;
94
- /**
95
- * Mode
96
- *
97
- * The build mode
98
- *
99
- *
100
- * @enum development,test,production
101
- */
102
- mode?: string;
103
- /**
104
- * Log Level
105
- *
106
- * The log level to use for the build process
107
- *
108
- *
109
- * @enum fatal,error,warn,success,info,debug,trace,silent
110
- */
111
- logLevel?: string;
112
- /**
113
- * Define
114
- *
115
- * The `define` values
116
- *
117
- */
118
- define?: Record<string, string>;
119
- /**
120
- * Auto Install
121
- *
122
- * Automatically install dependencies during prepare stage
123
- *
124
- */
125
- autoInstall?: boolean;
126
- /**
127
- * Skip Cache
128
- *
129
- * Skip the caching mechanism during the build process (if required)
130
- *
131
- */
132
- skipCache?: boolean;
133
- }
134
- //#endregion
135
- //#region src/executors/build/executor.d.ts
136
- declare function executorFn(context: ShellShockExecutorContext<"build", BuildExecutorSchema>, api: ShellShockAPI): Promise<BaseExecutorResult>;
137
- declare const executor: PromiseExecutor<BuildExecutorSchema>;
138
- //#endregion
139
- export { executor as default, executorFn };
140
- //# sourceMappingURL=executor.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.d.mts","names":["BuildExecutorSchema","Array","Record","configFile","input","tsconfig","outputPath","sourceMap","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","autoInstall","skipCache"],"sources":["../../../../src/executors/build/schema.d.ts","../../../../src/executors/build/executor.ts"],"mappings":";;;;;;;;UAIiBA,mBAAAA;;AAAjB;;;;;;;;EAUCG,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQH,KAAAA;;;;;;;;;;EAWRI,QAAAA;EA0GS;;;;AClHV;;;;EDkBCC,UAAAA;;;;;;;EAQAC,SAAAA;;;;;;ACRA;;EDiBAC,MAAAA,GAASP,KAAAA;ECfyC;;;;;;;;;ED0BlDQ,QAAAA;;;;;;;EAQAC,QAAAA,GAAWT,KAAAA;;;;;;;EAQXU,UAAAA,GAAaV,KAAAA;;;;;;;EAQbW,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAASb,MAAAA;;;;;;;EAQTc,WAAAA;;;;;;;EAQAC,SAAAA;AAAAA;;;iBClHqB,UAAA,CACpB,OAAA,EAAS,yBAAA,UAAmC,mBAAA,GAC5C,GAAA,EAAK,aAAA,GACJ,OAAA,CAAQ,kBAAA;AAAA,cAiBL,QAAA,EAAU,eAAA,CAAgB,mBAAA"}