@powerlines/nx 0.11.261 → 0.11.264
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.
- package/README.md +72 -34
- package/dist/src/base/base-executor.js +1 -1
- package/dist/src/base/base-executor.mjs +1 -1
- package/dist/src/base/index.js +1 -1
- package/dist/src/base/index.mjs +1 -1
- package/dist/src/{base-executor-C59DiyUh.mjs → base-executor-0AJy4tNT.mjs} +65 -14
- package/dist/src/base-executor-0AJy4tNT.mjs.map +1 -0
- package/dist/src/{base-executor-BeaxMRjJ.js → base-executor-Beez8GRn.js} +64 -13
- package/dist/src/{base-executor-CzLqlwh7.js → base-executor-Bo9fi0tA.js} +64 -13
- package/dist/src/{base-executor-SJIBQwB2.mjs → base-executor-CufDCf4m.mjs} +65 -14
- package/dist/src/base-executor-CufDCf4m.mjs.map +1 -0
- package/dist/src/base-executor.untyped-B24q82iI.d.ts +7 -0
- package/dist/src/base-executor.untyped-B24q82iI.d.ts.map +1 -0
- package/dist/src/executors/build/executor.js +1 -1
- package/dist/src/executors/build/executor.mjs +1 -1
- package/dist/src/executors/build/untyped.d.mts +2 -2
- package/dist/src/executors/build/untyped.d.ts +2 -2
- package/dist/src/executors/clean/executor.js +1 -1
- package/dist/src/executors/clean/executor.mjs +1 -1
- package/dist/src/executors/clean/untyped.d.mts +2 -2
- package/dist/src/executors/clean/untyped.d.ts +2 -2
- package/dist/src/executors/docs/executor.js +1 -1
- package/dist/src/executors/docs/executor.mjs +1 -1
- package/dist/src/executors/docs/untyped.d.mts +2 -2
- package/dist/src/executors/docs/untyped.d.ts +2 -2
- package/dist/src/executors/lint/executor.js +1 -1
- package/dist/src/executors/lint/executor.mjs +1 -1
- package/dist/src/executors/lint/untyped.d.ts +2 -2
- package/dist/src/executors/prepare/executor.js +1 -1
- package/dist/src/executors/prepare/executor.mjs +1 -1
- package/dist/src/executors/prepare/untyped.d.mts +2 -2
- package/dist/src/executors/prepare/untyped.d.ts +2 -2
- package/dist/src/generators/sync/untyped.d.mts +2 -2
- package/dist/src/generators/sync/untyped.d.ts +2 -2
- package/dist/src/index.js +1 -1
- package/dist/src/index.mjs +1 -1
- package/package.json +10 -10
- package/dist/src/base-executor-C59DiyUh.mjs.map +0 -1
- package/dist/src/base-executor-SJIBQwB2.mjs.map +0 -1
- package/dist/src/base-executor.untyped-7SvGKXcO.d.mts +0 -7
- package/dist/src/base-executor.untyped-7SvGKXcO.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ A package containing tools for managing a Storm workspace. It includes various
|
|
|
49
49
|
|
|
50
50
|
<!-- START doctoc -->
|
|
51
51
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
52
|
+
|
|
52
53
|
## Table of Contents
|
|
53
54
|
|
|
54
55
|
- [Powerlines - Nx Plugin](#powerlines---nx-plugin)
|
|
@@ -125,7 +126,7 @@ the workspace's projects:
|
|
|
125
126
|
<!-- markdownlint-disable -->
|
|
126
127
|
|
|
127
128
|
|
|
128
|
-
##
|
|
129
|
+
## Clean Executor
|
|
129
130
|
|
|
130
131
|
A type definition for the Powerlines - Clean executor schema
|
|
131
132
|
|
|
@@ -145,16 +146,24 @@ The following executor options are available:
|
|
|
145
146
|
|
|
146
147
|
| Option | Type | Description | Default |
|
|
147
148
|
| --------- | ------ | ------------- | --------- |
|
|
148
|
-
|
|
|
149
|
+
| configFile | `string` | The path to the Powerlines configuration file | "{projectRoot}/powerlines.config.ts" |
|
|
150
|
+
| input | `string[]` | The entry file(s) that serve as the input for the project | |
|
|
149
151
|
| tsconfig | `string` | The path to the tsconfig file | "{projectRoot}/tsconfig.json" |
|
|
152
|
+
| outputPath | `string` | The path to the output directory for the build artifacts | |
|
|
153
|
+
| sourceMap | `boolean` | Generate a sourcemap | |
|
|
154
|
+
| format | `string[]` | The format to build | `[]` |
|
|
155
|
+
| platform | "neutral" \| "node" \| "browser" | The platform to build | "neutral" |
|
|
156
|
+
| external | `any[]` | The external dependencies | `[]` |
|
|
157
|
+
| noExternal | `any[]` | The dependencies that should not be treated as external | `[]` |
|
|
158
|
+
| skipNodeModulesBundle | `boolean` | Skip bundling node_modules during the build process (if required) | |
|
|
150
159
|
| mode | "development" \| "test" \| "production" | The build mode | |
|
|
151
|
-
|
|
|
152
|
-
|
|
|
160
|
+
| logLevel | "fatal" \| "error" \| "warn" \| "success" \| "info" \| "debug" \| "trace" \| "silent" | The log level to use for the build process | |
|
|
161
|
+
| define | `object` | The \`define\` values | `[object Object]` |
|
|
153
162
|
|
|
154
163
|
|
|
155
164
|
|
|
156
165
|
|
|
157
|
-
##
|
|
166
|
+
## Prepare Executor
|
|
158
167
|
|
|
159
168
|
A type definition for the Powerlines - Prepare executor schema
|
|
160
169
|
|
|
@@ -174,18 +183,26 @@ The following executor options are available:
|
|
|
174
183
|
|
|
175
184
|
| Option | Type | Description | Default |
|
|
176
185
|
| --------- | ------ | ------------- | --------- |
|
|
177
|
-
|
|
|
186
|
+
| configFile | `string` | The path to the Powerlines configuration file | "{projectRoot}/powerlines.config.ts" |
|
|
187
|
+
| input | `string[]` | The entry file(s) that serve as the input for the project | |
|
|
178
188
|
| tsconfig | `string` | The path to the tsconfig file | "{projectRoot}/tsconfig.json" |
|
|
189
|
+
| outputPath | `string` | The path to the output directory for the build artifacts | |
|
|
190
|
+
| sourceMap | `boolean` | Generate a sourcemap | |
|
|
191
|
+
| format | `string[]` | The format to build | `[]` |
|
|
192
|
+
| platform | "neutral" \| "node" \| "browser" | The platform to build | "neutral" |
|
|
193
|
+
| external | `any[]` | The external dependencies | `[]` |
|
|
194
|
+
| noExternal | `any[]` | The dependencies that should not be treated as external | `[]` |
|
|
195
|
+
| skipNodeModulesBundle | `boolean` | Skip bundling node_modules during the build process (if required) | |
|
|
179
196
|
| mode | "development" \| "test" \| "production" | The build mode | |
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
|
|
|
197
|
+
| logLevel | "fatal" \| "error" \| "warn" \| "success" \| "info" \| "debug" \| "trace" \| "silent" | The log level to use for the build process | |
|
|
198
|
+
| define | `object` | The \`define\` values | `[object Object]` |
|
|
199
|
+
| autoInstall | `boolean` | Automatically install dependencies during prepare stage | |
|
|
200
|
+
| skipCache | `boolean` | Skip the caching mechanism during the build process (if required) | |
|
|
184
201
|
|
|
185
202
|
|
|
186
203
|
|
|
187
204
|
|
|
188
|
-
##
|
|
205
|
+
## Lint Executor
|
|
189
206
|
|
|
190
207
|
A type definition for the Powerlines - Lint executor schema
|
|
191
208
|
|
|
@@ -205,18 +222,26 @@ The following executor options are available:
|
|
|
205
222
|
|
|
206
223
|
| Option | Type | Description | Default |
|
|
207
224
|
| --------- | ------ | ------------- | --------- |
|
|
208
|
-
|
|
|
225
|
+
| configFile | `string` | The path to the Powerlines configuration file | "{projectRoot}/powerlines.config.ts" |
|
|
226
|
+
| input | `string[]` | The entry file(s) that serve as the input for the project | |
|
|
209
227
|
| tsconfig | `string` | The path to the tsconfig file | "{projectRoot}/tsconfig.json" |
|
|
228
|
+
| outputPath | `string` | The path to the output directory for the build artifacts | |
|
|
229
|
+
| sourceMap | `boolean` | Generate a sourcemap | |
|
|
230
|
+
| format | `string[]` | The format to build | `[]` |
|
|
231
|
+
| platform | "neutral" \| "node" \| "browser" | The platform to build | "neutral" |
|
|
232
|
+
| external | `any[]` | The external dependencies | `[]` |
|
|
233
|
+
| noExternal | `any[]` | The dependencies that should not be treated as external | `[]` |
|
|
234
|
+
| skipNodeModulesBundle | `boolean` | Skip bundling node_modules during the build process (if required) | |
|
|
210
235
|
| mode | "development" \| "test" \| "production" | The build mode | |
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
|
|
|
236
|
+
| logLevel | "fatal" \| "error" \| "warn" \| "success" \| "info" \| "debug" \| "trace" \| "silent" | The log level to use for the build process | |
|
|
237
|
+
| define | `object` | The \`define\` values | `[object Object]` |
|
|
238
|
+
| autoInstall | `boolean` | Automatically install dependencies during prepare stage | |
|
|
239
|
+
| skipCache | `boolean` | Skip the caching mechanism during the build process (if required) | |
|
|
215
240
|
|
|
216
241
|
|
|
217
242
|
|
|
218
243
|
|
|
219
|
-
##
|
|
244
|
+
## Build Executor
|
|
220
245
|
|
|
221
246
|
A type definition for the Powerlines - Build executor schema
|
|
222
247
|
|
|
@@ -228,7 +253,7 @@ This executor can be used by executing the following in a command line utility:
|
|
|
228
253
|
nx run my-project:build
|
|
229
254
|
```
|
|
230
255
|
|
|
231
|
-
**Please note:** _The build executor should be included in the desired projects's `project.json` file.
|
|
256
|
+
**Please note:** _The build executor should be included in the desired projects's `project.json` file._
|
|
232
257
|
|
|
233
258
|
### Options
|
|
234
259
|
|
|
@@ -236,22 +261,27 @@ The following executor options are available:
|
|
|
236
261
|
|
|
237
262
|
| Option | Type | Description | Default |
|
|
238
263
|
| --------- | ------ | ------------- | --------- |
|
|
239
|
-
|
|
|
264
|
+
| configFile | `string` | The path to the Powerlines configuration file | "{projectRoot}/powerlines.config.ts" |
|
|
265
|
+
| input | `string[]` | The entry file(s) that serve as the input for the project | |
|
|
240
266
|
| tsconfig | `string` | The path to the tsconfig file | "{projectRoot}/tsconfig.json" |
|
|
267
|
+
| outputPath | `string` | The path to the output directory for the build artifacts | |
|
|
268
|
+
| sourceMap | `boolean` | Generate a sourcemap | |
|
|
269
|
+
| format | `string[]` | The format to build | `[]` |
|
|
270
|
+
| platform | "neutral" \| "node" \| "browser" | The platform to build | "neutral" |
|
|
271
|
+
| external | `any[]` | The external dependencies | `[]` |
|
|
272
|
+
| noExternal | `any[]` | The dependencies that should not be treated as external | `[]` |
|
|
273
|
+
| skipNodeModulesBundle | `boolean` | Skip bundling node_modules during the build process (if required) | |
|
|
241
274
|
| mode | "development" \| "test" \| "production" | The build mode | |
|
|
242
|
-
|
|
|
243
|
-
|
|
|
244
|
-
|
|
|
245
|
-
|
|
|
246
|
-
|
|
|
247
|
-
| skipLint | `boolean` | Skip the linting process ran prior to the build (if required) | |
|
|
248
|
-
|
|
275
|
+
| logLevel | "fatal" \| "error" \| "warn" \| "success" \| "info" \| "debug" \| "trace" \| "silent" | The log level to use for the build process | |
|
|
276
|
+
| define | `object` | The \`define\` values | `[object Object]` |
|
|
277
|
+
| autoInstall | `boolean` | Automatically install dependencies during prepare stage | |
|
|
278
|
+
| skipCache | `boolean` | Skip the caching mechanism during the build process (if required) | |
|
|
279
|
+
| entry | `any` | The entry path(s) for the package | `[object Object]` |
|
|
249
280
|
|
|
250
|
-
**Please note:** _Option names followed by \* above are required, and must be provided to run the executor._
|
|
251
281
|
|
|
252
282
|
|
|
253
283
|
|
|
254
|
-
##
|
|
284
|
+
## Docs Executor
|
|
255
285
|
|
|
256
286
|
A type definition for the Powerlines - Docs executor schema
|
|
257
287
|
|
|
@@ -271,13 +301,21 @@ The following executor options are available:
|
|
|
271
301
|
|
|
272
302
|
| Option | Type | Description | Default |
|
|
273
303
|
| --------- | ------ | ------------- | --------- |
|
|
274
|
-
|
|
|
304
|
+
| configFile | `string` | The path to the Powerlines configuration file | "{projectRoot}/powerlines.config.ts" |
|
|
305
|
+
| input | `string[]` | The entry file(s) that serve as the input for the project | |
|
|
275
306
|
| tsconfig | `string` | The path to the tsconfig file | "{projectRoot}/tsconfig.json" |
|
|
307
|
+
| outputPath | `string` | The path to the output directory for the build artifacts | |
|
|
308
|
+
| sourceMap | `boolean` | Generate a sourcemap | |
|
|
309
|
+
| format | `string[]` | The format to build | `[]` |
|
|
310
|
+
| platform | "neutral" \| "node" \| "browser" | The platform to build | "neutral" |
|
|
311
|
+
| external | `any[]` | The external dependencies | `[]` |
|
|
312
|
+
| noExternal | `any[]` | The dependencies that should not be treated as external | `[]` |
|
|
313
|
+
| skipNodeModulesBundle | `boolean` | Skip bundling node_modules during the build process (if required) | |
|
|
276
314
|
| mode | "development" \| "test" \| "production" | The build mode | |
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
|
280
|
-
|
|
|
315
|
+
| logLevel | "fatal" \| "error" \| "warn" \| "success" \| "info" \| "debug" \| "trace" \| "silent" | The log level to use for the build process | |
|
|
316
|
+
| define | `object` | The \`define\` values | `[object Object]` |
|
|
317
|
+
| autoInstall | `boolean` | Automatically install dependencies during prepare stage | |
|
|
318
|
+
| skipCache | `boolean` | Skip the caching mechanism during the build process (if required) | |
|
|
281
319
|
|
|
282
320
|
|
|
283
321
|
|
|
@@ -297,7 +335,7 @@ management:
|
|
|
297
335
|
<!-- markdownlint-disable -->
|
|
298
336
|
|
|
299
337
|
|
|
300
|
-
##
|
|
338
|
+
## Sync Generator
|
|
301
339
|
|
|
302
340
|
A type definition for the Powerlines - Sync generator's options
|
|
303
341
|
|
package/dist/src/base/index.js
CHANGED
package/dist/src/base/index.mjs
CHANGED
|
@@ -65,6 +65,7 @@ import { isAbsolutePath } from "@stryke/path/is-type";
|
|
|
65
65
|
import { slash } from "@stryke/path/slash";
|
|
66
66
|
import { Blob as Blob$1 } from "node:buffer";
|
|
67
67
|
import { fileURLToPath } from "node:url";
|
|
68
|
+
import { ResolverFactory } from "oxc-resolver";
|
|
68
69
|
import { isDirectory, isFile } from "@stryke/fs/is-file";
|
|
69
70
|
import { readFile, readFileSync } from "@stryke/fs/read-file";
|
|
70
71
|
import { writeFile, writeFileSync } from "@stryke/fs/write-file";
|
|
@@ -78,7 +79,7 @@ import { resolve as resolve$1 } from "node:path";
|
|
|
78
79
|
import "unplugin";
|
|
79
80
|
|
|
80
81
|
//#region ../powerlines/package.json
|
|
81
|
-
var version = "0.
|
|
82
|
+
var version = "0.41.0";
|
|
82
83
|
|
|
83
84
|
//#endregion
|
|
84
85
|
//#region ../powerlines/src/typescript/ts-morph.ts
|
|
@@ -1915,6 +1916,12 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
1915
1916
|
*/
|
|
1916
1917
|
#storage;
|
|
1917
1918
|
/**
|
|
1919
|
+
* The resolver factory used during module resolution within the virtual file system.
|
|
1920
|
+
*
|
|
1921
|
+
* @see https://github.com/oxc-project/oxc-resolver
|
|
1922
|
+
*/
|
|
1923
|
+
#resolver;
|
|
1924
|
+
/**
|
|
1918
1925
|
* A cache for module resolution results.
|
|
1919
1926
|
*/
|
|
1920
1927
|
#resolverCache;
|
|
@@ -2041,12 +2048,22 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
2041
2048
|
break;
|
|
2042
2049
|
}
|
|
2043
2050
|
}
|
|
2044
|
-
if (!result)
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2051
|
+
if (!result) {
|
|
2052
|
+
try {
|
|
2053
|
+
result = await resolve(path, {
|
|
2054
|
+
...options,
|
|
2055
|
+
paths
|
|
2056
|
+
});
|
|
2057
|
+
} catch {}
|
|
2058
|
+
if (!result) {
|
|
2059
|
+
let index = 0;
|
|
2060
|
+
do {
|
|
2061
|
+
const resolveResult = await this.resolver.async((paths.length > index ? paths[index] : void 0) || this.#context.config.root, path);
|
|
2062
|
+
if (resolveResult.path) result = resolveResult.path;
|
|
2063
|
+
index++;
|
|
2064
|
+
} while (!result && index < paths.length);
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2050
2067
|
}
|
|
2051
2068
|
if (result && !this.#context.config.skipCache) this.resolverCache.set(resolverCacheKey, result);
|
|
2052
2069
|
return result;
|
|
@@ -2094,12 +2111,22 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
2094
2111
|
break;
|
|
2095
2112
|
}
|
|
2096
2113
|
}
|
|
2097
|
-
if (!result)
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2114
|
+
if (!result) {
|
|
2115
|
+
try {
|
|
2116
|
+
result = resolveSync(path, {
|
|
2117
|
+
...options,
|
|
2118
|
+
paths
|
|
2119
|
+
});
|
|
2120
|
+
} catch {}
|
|
2121
|
+
if (!result) {
|
|
2122
|
+
let index = 0;
|
|
2123
|
+
do {
|
|
2124
|
+
const resolveResult = this.resolver.sync((paths.length > index ? paths[index] : void 0) || this.#context.config.root, path);
|
|
2125
|
+
if (resolveResult.path) result = resolveResult.path;
|
|
2126
|
+
index++;
|
|
2127
|
+
} while (!result && index < paths.length);
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2103
2130
|
}
|
|
2104
2131
|
if (result && !this.#context.config.skipCache) this.resolverCache.set(this.#normalizeId(path), result);
|
|
2105
2132
|
return result;
|
|
@@ -2258,6 +2285,30 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
2258
2285
|
return this.#resolverCache;
|
|
2259
2286
|
}
|
|
2260
2287
|
/**
|
|
2288
|
+
* The resolver factory used during module resolution within the virtual file system.
|
|
2289
|
+
*
|
|
2290
|
+
* @remarks
|
|
2291
|
+
* This resolver is configured with the workspace root, project root, TypeScript configuration, alias mappings, and other resolution options specified in the context. It is lazily initialized on first access to optimize performance.
|
|
2292
|
+
*
|
|
2293
|
+
* @see https://github.com/oxc-project/oxc-resolver
|
|
2294
|
+
*/
|
|
2295
|
+
get resolver() {
|
|
2296
|
+
if (!this.#resolver) this.#resolver = new ResolverFactory({
|
|
2297
|
+
roots: [this.#context.workspaceConfig.workspaceRoot, appendPath(this.#context.config.root, this.#context.workspaceConfig.workspaceRoot)],
|
|
2298
|
+
tsconfig: {
|
|
2299
|
+
configFile: this.#context.tsconfig.tsconfigFilePath,
|
|
2300
|
+
references: this.#context.tsconfig.projectReferences && this.#context.tsconfig.projectReferences.length > 0 ? "auto" : void 0
|
|
2301
|
+
},
|
|
2302
|
+
alias: Object.fromEntries(Object.entries(this.#context.alias).map(([key, value]) => [key, [value]])),
|
|
2303
|
+
extensions: this.#context.config.resolve.extensions,
|
|
2304
|
+
mainFields: this.#context.config.resolve.mainFields,
|
|
2305
|
+
conditionNames: this.#context.config.resolve.conditions,
|
|
2306
|
+
symlinks: this.#context.config.resolve.preserveSymlinks,
|
|
2307
|
+
allowPackageExportsInDirectoryResolve: true
|
|
2308
|
+
});
|
|
2309
|
+
return this.#resolver;
|
|
2310
|
+
}
|
|
2311
|
+
/**
|
|
2261
2312
|
* Creates a new instance of the {@link VirtualFileSystem}.
|
|
2262
2313
|
*
|
|
2263
2314
|
* @param context - The context of the virtual file system, typically containing options and logging functions.
|
|
@@ -4808,4 +4859,4 @@ ${error.stack}` : "Unknown error"}`);
|
|
|
4808
4859
|
|
|
4809
4860
|
//#endregion
|
|
4810
4861
|
export { withExecutor as t };
|
|
4811
|
-
//# sourceMappingURL=base-executor-
|
|
4862
|
+
//# sourceMappingURL=base-executor-0AJy4tNT.mjs.map
|