@powerlines/nx 0.11.47 → 0.11.49

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 (30) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{chunk-MKZ63NLS.mjs → chunk-227UWG4B.mjs} +1 -1
  3. package/dist/{chunk-TYWKUU4W.js → chunk-2FZAZIC6.js} +2 -2
  4. package/dist/{chunk-ASZIG5H5.js → chunk-A2M4C3MH.js} +2 -2
  5. package/dist/{chunk-G24F5YQX.mjs → chunk-FKWUDWAS.mjs} +1 -1
  6. package/dist/{chunk-QARM3ABN.mjs → chunk-GR4HHX4J.mjs} +1 -1
  7. package/dist/{chunk-SUEEWSXC.js → chunk-K46OVCRR.js} +2 -2
  8. package/dist/{chunk-HXO76YR6.js → chunk-KIKCFDWW.js} +2 -2
  9. package/dist/{chunk-C3XHFBQH.mjs → chunk-TKZUIHKU.mjs} +1 -1
  10. package/dist/{chunk-NJJ5TC43.js → chunk-TSQ6JTZ3.js} +2 -2
  11. package/dist/{chunk-2BYMHSA6.mjs → chunk-U7VMNLKS.mjs} +1 -1
  12. package/dist/{chunk-JZPRT6PF.mjs → chunk-UUNZMUKU.mjs} +119 -4
  13. package/dist/{chunk-FTFUDXPS.js → chunk-VZXIPXBA.js} +119 -4
  14. package/dist/executors.js +11 -11
  15. package/dist/executors.mjs +6 -6
  16. package/dist/index.js +11 -11
  17. package/dist/index.mjs +6 -6
  18. package/dist/src/base/base-executor.js +2 -2
  19. package/dist/src/base/base-executor.mjs +1 -1
  20. package/dist/src/executors/build/executor.js +4 -4
  21. package/dist/src/executors/build/executor.mjs +2 -2
  22. package/dist/src/executors/clean/executor.js +4 -4
  23. package/dist/src/executors/clean/executor.mjs +2 -2
  24. package/dist/src/executors/docs/executor.js +4 -4
  25. package/dist/src/executors/docs/executor.mjs +2 -2
  26. package/dist/src/executors/lint/executor.js +4 -4
  27. package/dist/src/executors/lint/executor.mjs +2 -2
  28. package/dist/src/executors/prepare/executor.js +4 -4
  29. package/dist/src/executors/prepare/executor.mjs +2 -2
  30. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  # Changelog for Powerlines - Nx
4
4
 
5
+ ## [0.11.48](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.48) (12/30/2025)
6
+
7
+ ### Updated Dependencies
8
+
9
+ - Updated **powerlines** to **v0.36.22**
10
+
11
+ ## [0.11.47](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.47) (12/30/2025)
12
+
13
+ ### Updated Dependencies
14
+
15
+ - Updated **powerlines** to **v0.36.21**
16
+
5
17
  ## [0.11.46](https://github.com/storm-software/powerlines/releases/tag/nx%400.11.46) (12/30/2025)
6
18
 
7
19
  ### Updated Dependencies
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-JZPRT6PF.mjs';
1
+ import { withExecutor } from './chunk-UUNZMUKU.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/clean/executor.ts
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFTFUDXPS_js = require('./chunk-FTFUDXPS.js');
3
+ var chunkVZXIPXBA_js = require('./chunk-VZXIPXBA.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
 
6
6
  // src/executors/clean/executor.ts
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
11
11
  };
12
12
  }
13
13
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
14
- var executor = chunkFTFUDXPS_js.withExecutor("clean", executorFn);
14
+ var executor = chunkVZXIPXBA_js.withExecutor("clean", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFTFUDXPS_js = require('./chunk-FTFUDXPS.js');
3
+ var chunkVZXIPXBA_js = require('./chunk-VZXIPXBA.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
  var defu = require('defu');
6
6
 
@@ -19,7 +19,7 @@ async function executorFn(context, api) {
19
19
  };
20
20
  }
21
21
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
22
- var executor = chunkFTFUDXPS_js.withExecutor("build", executorFn);
22
+ var executor = chunkVZXIPXBA_js.withExecutor("build", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-JZPRT6PF.mjs';
1
+ import { withExecutor } from './chunk-UUNZMUKU.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/lint/executor.ts
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-JZPRT6PF.mjs';
1
+ import { withExecutor } from './chunk-UUNZMUKU.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import defu from 'defu';
4
4
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFTFUDXPS_js = require('./chunk-FTFUDXPS.js');
3
+ var chunkVZXIPXBA_js = require('./chunk-VZXIPXBA.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
  var defu = require('defu');
6
6
 
@@ -19,7 +19,7 @@ async function executorFn(context, api) {
19
19
  };
20
20
  }
21
21
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
22
- var executor = chunkFTFUDXPS_js.withExecutor("prepare", executorFn);
22
+ var executor = chunkVZXIPXBA_js.withExecutor("prepare", executorFn);
23
23
  var executor_default = executor;
24
24
 
25
25
  exports.executorFn = executorFn;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFTFUDXPS_js = require('./chunk-FTFUDXPS.js');
3
+ var chunkVZXIPXBA_js = require('./chunk-VZXIPXBA.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
 
6
6
  // src/executors/docs/executor.ts
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
11
11
  };
12
12
  }
13
13
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
14
- var executor = chunkFTFUDXPS_js.withExecutor("docs", executorFn);
14
+ var executor = chunkVZXIPXBA_js.withExecutor("docs", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-JZPRT6PF.mjs';
1
+ import { withExecutor } from './chunk-UUNZMUKU.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
 
4
4
  // src/executors/docs/executor.ts
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFTFUDXPS_js = require('./chunk-FTFUDXPS.js');
3
+ var chunkVZXIPXBA_js = require('./chunk-VZXIPXBA.js');
4
4
  var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
5
5
 
6
6
  // src/executors/lint/executor.ts
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
11
11
  };
12
12
  }
13
13
  chunkSHUYVCID_js.__name(executorFn, "executorFn");
14
- var executor = chunkFTFUDXPS_js.withExecutor("lint", executorFn);
14
+ var executor = chunkVZXIPXBA_js.withExecutor("lint", executorFn);
15
15
  var executor_default = executor;
16
16
 
17
17
  exports.executorFn = executorFn;
@@ -1,4 +1,4 @@
1
- import { withExecutor } from './chunk-JZPRT6PF.mjs';
1
+ import { withExecutor } from './chunk-UUNZMUKU.mjs';
2
2
  import { __name } from './chunk-O6YSETKJ.mjs';
3
3
  import defu from 'defu';
4
4
 
@@ -1224,6 +1224,13 @@ var BaseStorageAdapter = class {
1224
1224
  */
1225
1225
  options;
1226
1226
  /**
1227
+ * The storage preset for the adapter.
1228
+ *
1229
+ * @remarks
1230
+ * This can be used as an alternate way to identify the type of storage being used.
1231
+ */
1232
+ preset = null;
1233
+ /**
1227
1234
  * Constructor for the BaseStorageAdapter.
1228
1235
  *
1229
1236
  * @param options - Configuration options for the storage adapter.
@@ -1414,6 +1421,13 @@ var FileSystemStorageAdapter = class extends BaseStorageAdapter {
1414
1421
  */
1415
1422
  name = "file-system";
1416
1423
  /**
1424
+ * The storage preset for the adapter.
1425
+ *
1426
+ * @remarks
1427
+ * This can be used as an alternate way to identify the type of storage being used.
1428
+ */
1429
+ preset = "fs";
1430
+ /**
1417
1431
  * Constructor for the FileSystemStorageAdapter.
1418
1432
  *
1419
1433
  * @param options - Configuration options for the storage adapter.
@@ -1573,6 +1587,13 @@ var VirtualStorageAdapter = class extends BaseStorageAdapter {
1573
1587
  */
1574
1588
  name = "virtual";
1575
1589
  /**
1590
+ * The storage preset for the adapter.
1591
+ *
1592
+ * @remarks
1593
+ * This can be used as an alternate way to identify the type of storage being used.
1594
+ */
1595
+ preset = "virtual";
1596
+ /**
1576
1597
  * In-memory data storage.
1577
1598
  */
1578
1599
  data = /* @__PURE__ */ new Map();
@@ -1721,10 +1742,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
1721
1742
  /**
1722
1743
  * Gets the storage adapter and relative key for a given key.
1723
1744
  *
1745
+ * @remarks
1746
+ * The `key` can be either a path or a storage adapter name.
1747
+ *
1724
1748
  * @param key - The key to get the storage adapter for.
1725
1749
  * @returns The storage adapter and relative key for the given key.
1726
1750
  */
1727
1751
  #getStorage(key) {
1752
+ const found = Object.entries(this.#storage).find(([, adapter]) => adapter.name === key || adapter.preset && adapter.preset.toLowerCase() === key?.toLowerCase());
1753
+ if (found) {
1754
+ return {
1755
+ base: found[0],
1756
+ relativeKey: "",
1757
+ adapter: found[1]
1758
+ };
1759
+ }
1728
1760
  const path = this.resolveSync(this.#normalizePath(key)) || key;
1729
1761
  for (const base of Object.keys(this.#storage).filter(Boolean).sort().reverse()) {
1730
1762
  if (isParentPath(path, base)) {
@@ -2272,7 +2304,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2272
2304
  });
2273
2305
  }
2274
2306
  }
2275
- const { relativeKey, adapter } = this.#getStorage(path);
2307
+ const { relativeKey, adapter } = this.#getStorage(options.storage || path);
2276
2308
  this.#log(LogLevelLabel.TRACE, `Writing ${this.#normalizePath(relativeKey)} to ${adapter.name === "virtual" ? "the virtual file system" : adapter.name === "file-system" ? "the local file system" : adapter.name} (size: ${prettyBytes(new Blob(toArray(code)).size)})`);
2277
2309
  const id = options?.meta?.id || this.#normalizeId(relativeKey);
2278
2310
  this.#metadata[id] = {
@@ -2292,7 +2324,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2292
2324
  * @param options - Optional parameters for writing the file.
2293
2325
  */
2294
2326
  writeSync(path, data = "", options = {}) {
2295
- const { relativeKey, adapter } = this.#getStorage(path);
2327
+ const { relativeKey, adapter } = this.#getStorage(options.storage || path);
2296
2328
  this.#log(LogLevelLabel.TRACE, `Writing ${this.#normalizePath(relativeKey)} file to ${adapter.name === "virtual" ? "the virtual file system" : adapter.name === "file-system" ? "the local file system" : adapter.name} (size: ${prettyBytes(new Blob(toArray(data)).size)})`);
2297
2329
  const id = options?.meta?.id || this.#normalizeId(relativeKey);
2298
2330
  this.#metadata[id] = {
@@ -3148,6 +3180,44 @@ var PowerlinesContext = class _PowerlinesContext {
3148
3180
  }));
3149
3181
  }
3150
3182
  /**
3183
+ * Resolves a file and writes it to the VFS if it does not already exist
3184
+ *
3185
+ * @param code - The source code of the file
3186
+ * @param path - The path to write the file to
3187
+ * @param options - Additional options for writing the file
3188
+ */
3189
+ async emit(code, path, options = {}) {
3190
+ if (isFunction(this.emitFile) && options.emitWithBundler) {
3191
+ return this.emitFile({
3192
+ needsCodeReference: options.needsCodeReference,
3193
+ originalFileName: options.originalFileName,
3194
+ fileName: path,
3195
+ source: code,
3196
+ type: "asset"
3197
+ });
3198
+ }
3199
+ return this.fs.write(path, code, options);
3200
+ }
3201
+ /**
3202
+ * Synchronously resolves a file and writes it to the VFS if it does not already exist
3203
+ *
3204
+ * @param code - The source code of the file
3205
+ * @param path - The path to write the file to
3206
+ * @param options - Additional options for writing the file
3207
+ */
3208
+ emitSync(code, path, options = {}) {
3209
+ if (isFunction(this.emitFile) && options.emitWithBundler) {
3210
+ return this.emitFile({
3211
+ needsCodeReference: options.needsCodeReference,
3212
+ originalFileName: options.originalFileName,
3213
+ fileName: path,
3214
+ source: code,
3215
+ type: "asset"
3216
+ });
3217
+ }
3218
+ return this.fs.writeSync(path, code, options);
3219
+ }
3220
+ /**
3151
3221
  * Resolves a entry virtual file and writes it to the VFS if it does not already exist
3152
3222
  *
3153
3223
  * @param code - The source code of the entry file
@@ -3163,7 +3233,7 @@ var PowerlinesContext = class _PowerlinesContext {
3163
3233
  input: options.input,
3164
3234
  output: options.output
3165
3235
  });
3166
- return this.fs.write(entryPath, code, defu6(omit(options, [
3236
+ return this.emit(entryPath, code, defu6(omit(options, [
3167
3237
  "name"
3168
3238
  ]), {
3169
3239
  meta: {
@@ -3178,6 +3248,36 @@ var PowerlinesContext = class _PowerlinesContext {
3178
3248
  }));
3179
3249
  }
3180
3250
  /**
3251
+ * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
3252
+ *
3253
+ * @param code - The source code of the entry file
3254
+ * @param path - A path to write the entry file to
3255
+ * @param options - Optional write file options
3256
+ */
3257
+ emitEntrySync(code, path, options = {}) {
3258
+ const entryPath = isAbsolute(path) ? path : appendPath(path, this.entryPath);
3259
+ this.entry ??= [];
3260
+ this.entry.push({
3261
+ name: options?.name,
3262
+ file: entryPath,
3263
+ input: options?.input,
3264
+ output: options?.output
3265
+ });
3266
+ return this.emitSync(entryPath, code, defu6(omit(options, [
3267
+ "name"
3268
+ ]), {
3269
+ meta: {
3270
+ type: "entry",
3271
+ properties: {
3272
+ name: options?.name,
3273
+ output: options?.output,
3274
+ "input.file": options?.input?.file,
3275
+ "input.name": options?.input?.name
3276
+ }
3277
+ }
3278
+ }));
3279
+ }
3280
+ /**
3181
3281
  * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
3182
3282
  *
3183
3283
  * @param code - The source code of the builtin file
@@ -3186,7 +3286,22 @@ var PowerlinesContext = class _PowerlinesContext {
3186
3286
  * @param options - Optional write file options
3187
3287
  */
3188
3288
  async emitBuiltin(code, id, path, options = {}) {
3189
- return this.fs.write(path ? isAbsolute(path) ? path : joinPaths(this.builtinsPath, path) : appendPath(id, this.builtinsPath), code, defu6(options, {
3289
+ return this.emit(path ? isAbsolute(path) ? path : joinPaths(this.builtinsPath, path) : appendPath(id, this.builtinsPath), code, defu6(options, {
3290
+ meta: {
3291
+ type: "builtin"
3292
+ }
3293
+ }));
3294
+ }
3295
+ /**
3296
+ * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
3297
+ *
3298
+ * @param code - The source code of the builtin file
3299
+ * @param id - The unique identifier of the builtin file
3300
+ * @param path - An optional path to write the builtin file to
3301
+ * @param options - Optional write file options
3302
+ */
3303
+ emitBuiltinSync(code, id, path, options = {}) {
3304
+ return this.emitSync(path ? isAbsolute(path) ? path : joinPaths(this.builtinsPath, path) : appendPath(id, this.builtinsPath), code, defu6(options, {
3190
3305
  meta: {
3191
3306
  type: "builtin"
3192
3307
  }
@@ -1253,6 +1253,13 @@ var BaseStorageAdapter = class {
1253
1253
  */
1254
1254
  options;
1255
1255
  /**
1256
+ * The storage preset for the adapter.
1257
+ *
1258
+ * @remarks
1259
+ * This can be used as an alternate way to identify the type of storage being used.
1260
+ */
1261
+ preset = null;
1262
+ /**
1256
1263
  * Constructor for the BaseStorageAdapter.
1257
1264
  *
1258
1265
  * @param options - Configuration options for the storage adapter.
@@ -1443,6 +1450,13 @@ var FileSystemStorageAdapter = class extends BaseStorageAdapter {
1443
1450
  */
1444
1451
  name = "file-system";
1445
1452
  /**
1453
+ * The storage preset for the adapter.
1454
+ *
1455
+ * @remarks
1456
+ * This can be used as an alternate way to identify the type of storage being used.
1457
+ */
1458
+ preset = "fs";
1459
+ /**
1446
1460
  * Constructor for the FileSystemStorageAdapter.
1447
1461
  *
1448
1462
  * @param options - Configuration options for the storage adapter.
@@ -1602,6 +1616,13 @@ var VirtualStorageAdapter = class extends BaseStorageAdapter {
1602
1616
  */
1603
1617
  name = "virtual";
1604
1618
  /**
1619
+ * The storage preset for the adapter.
1620
+ *
1621
+ * @remarks
1622
+ * This can be used as an alternate way to identify the type of storage being used.
1623
+ */
1624
+ preset = "virtual";
1625
+ /**
1605
1626
  * In-memory data storage.
1606
1627
  */
1607
1628
  data = /* @__PURE__ */ new Map();
@@ -1750,10 +1771,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
1750
1771
  /**
1751
1772
  * Gets the storage adapter and relative key for a given key.
1752
1773
  *
1774
+ * @remarks
1775
+ * The `key` can be either a path or a storage adapter name.
1776
+ *
1753
1777
  * @param key - The key to get the storage adapter for.
1754
1778
  * @returns The storage adapter and relative key for the given key.
1755
1779
  */
1756
1780
  #getStorage(key) {
1781
+ const found = Object.entries(this.#storage).find(([, adapter]) => adapter.name === key || adapter.preset && adapter.preset.toLowerCase() === key?.toLowerCase());
1782
+ if (found) {
1783
+ return {
1784
+ base: found[0],
1785
+ relativeKey: "",
1786
+ adapter: found[1]
1787
+ };
1788
+ }
1757
1789
  const path = this.resolveSync(this.#normalizePath(key)) || key;
1758
1790
  for (const base of Object.keys(this.#storage).filter(Boolean).sort().reverse()) {
1759
1791
  if (isParentPath.isParentPath(path, base)) {
@@ -2301,7 +2333,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2301
2333
  });
2302
2334
  }
2303
2335
  }
2304
- const { relativeKey, adapter } = this.#getStorage(path);
2336
+ const { relativeKey, adapter } = this.#getStorage(options.storage || path);
2305
2337
  this.#log(types.LogLevelLabel.TRACE, `Writing ${this.#normalizePath(relativeKey)} to ${adapter.name === "virtual" ? "the virtual file system" : adapter.name === "file-system" ? "the local file system" : adapter.name} (size: ${prettyBytes.prettyBytes(new buffer$1.Blob(toArray.toArray(code)).size)})`);
2306
2338
  const id = options?.meta?.id || this.#normalizeId(relativeKey);
2307
2339
  this.#metadata[id] = {
@@ -2321,7 +2353,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2321
2353
  * @param options - Optional parameters for writing the file.
2322
2354
  */
2323
2355
  writeSync(path, data = "", options = {}) {
2324
- const { relativeKey, adapter } = this.#getStorage(path);
2356
+ const { relativeKey, adapter } = this.#getStorage(options.storage || path);
2325
2357
  this.#log(types.LogLevelLabel.TRACE, `Writing ${this.#normalizePath(relativeKey)} file to ${adapter.name === "virtual" ? "the virtual file system" : adapter.name === "file-system" ? "the local file system" : adapter.name} (size: ${prettyBytes.prettyBytes(new buffer$1.Blob(toArray.toArray(data)).size)})`);
2326
2358
  const id = options?.meta?.id || this.#normalizeId(relativeKey);
2327
2359
  this.#metadata[id] = {
@@ -3177,6 +3209,44 @@ var PowerlinesContext = class _PowerlinesContext {
3177
3209
  }));
3178
3210
  }
3179
3211
  /**
3212
+ * Resolves a file and writes it to the VFS if it does not already exist
3213
+ *
3214
+ * @param code - The source code of the file
3215
+ * @param path - The path to write the file to
3216
+ * @param options - Additional options for writing the file
3217
+ */
3218
+ async emit(code, path, options = {}) {
3219
+ if (isFunction.isFunction(this.emitFile) && options.emitWithBundler) {
3220
+ return this.emitFile({
3221
+ needsCodeReference: options.needsCodeReference,
3222
+ originalFileName: options.originalFileName,
3223
+ fileName: path,
3224
+ source: code,
3225
+ type: "asset"
3226
+ });
3227
+ }
3228
+ return this.fs.write(path, code, options);
3229
+ }
3230
+ /**
3231
+ * Synchronously resolves a file and writes it to the VFS if it does not already exist
3232
+ *
3233
+ * @param code - The source code of the file
3234
+ * @param path - The path to write the file to
3235
+ * @param options - Additional options for writing the file
3236
+ */
3237
+ emitSync(code, path, options = {}) {
3238
+ if (isFunction.isFunction(this.emitFile) && options.emitWithBundler) {
3239
+ return this.emitFile({
3240
+ needsCodeReference: options.needsCodeReference,
3241
+ originalFileName: options.originalFileName,
3242
+ fileName: path,
3243
+ source: code,
3244
+ type: "asset"
3245
+ });
3246
+ }
3247
+ return this.fs.writeSync(path, code, options);
3248
+ }
3249
+ /**
3180
3250
  * Resolves a entry virtual file and writes it to the VFS if it does not already exist
3181
3251
  *
3182
3252
  * @param code - The source code of the entry file
@@ -3192,7 +3262,7 @@ var PowerlinesContext = class _PowerlinesContext {
3192
3262
  input: options.input,
3193
3263
  output: options.output
3194
3264
  });
3195
- return this.fs.write(entryPath, code, defu6__default.default(omit.omit(options, [
3265
+ return this.emit(entryPath, code, defu6__default.default(omit.omit(options, [
3196
3266
  "name"
3197
3267
  ]), {
3198
3268
  meta: {
@@ -3207,6 +3277,36 @@ var PowerlinesContext = class _PowerlinesContext {
3207
3277
  }));
3208
3278
  }
3209
3279
  /**
3280
+ * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
3281
+ *
3282
+ * @param code - The source code of the entry file
3283
+ * @param path - A path to write the entry file to
3284
+ * @param options - Optional write file options
3285
+ */
3286
+ emitEntrySync(code, path, options = {}) {
3287
+ const entryPath = isType.isAbsolute(path) ? path : append.appendPath(path, this.entryPath);
3288
+ this.entry ??= [];
3289
+ this.entry.push({
3290
+ name: options?.name,
3291
+ file: entryPath,
3292
+ input: options?.input,
3293
+ output: options?.output
3294
+ });
3295
+ return this.emitSync(entryPath, code, defu6__default.default(omit.omit(options, [
3296
+ "name"
3297
+ ]), {
3298
+ meta: {
3299
+ type: "entry",
3300
+ properties: {
3301
+ name: options?.name,
3302
+ output: options?.output,
3303
+ "input.file": options?.input?.file,
3304
+ "input.name": options?.input?.name
3305
+ }
3306
+ }
3307
+ }));
3308
+ }
3309
+ /**
3210
3310
  * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
3211
3311
  *
3212
3312
  * @param code - The source code of the builtin file
@@ -3215,7 +3315,22 @@ var PowerlinesContext = class _PowerlinesContext {
3215
3315
  * @param options - Optional write file options
3216
3316
  */
3217
3317
  async emitBuiltin(code, id, path, options = {}) {
3218
- return this.fs.write(path ? isType.isAbsolute(path) ? path : join.joinPaths(this.builtinsPath, path) : append.appendPath(id, this.builtinsPath), code, defu6__default.default(options, {
3318
+ return this.emit(path ? isType.isAbsolute(path) ? path : join.joinPaths(this.builtinsPath, path) : append.appendPath(id, this.builtinsPath), code, defu6__default.default(options, {
3319
+ meta: {
3320
+ type: "builtin"
3321
+ }
3322
+ }));
3323
+ }
3324
+ /**
3325
+ * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
3326
+ *
3327
+ * @param code - The source code of the builtin file
3328
+ * @param id - The unique identifier of the builtin file
3329
+ * @param path - An optional path to write the builtin file to
3330
+ * @param options - Optional write file options
3331
+ */
3332
+ emitBuiltinSync(code, id, path, options = {}) {
3333
+ return this.emitSync(path ? isType.isAbsolute(path) ? path : join.joinPaths(this.builtinsPath, path) : append.appendPath(id, this.builtinsPath), code, defu6__default.default(options, {
3219
3334
  meta: {
3220
3335
  type: "builtin"
3221
3336
  }
package/dist/executors.js CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  require('./chunk-XO62WWX4.js');
4
- var chunkNJJ5TC43_js = require('./chunk-NJJ5TC43.js');
5
- var chunkSUEEWSXC_js = require('./chunk-SUEEWSXC.js');
6
- var chunkASZIG5H5_js = require('./chunk-ASZIG5H5.js');
7
- var chunkTYWKUU4W_js = require('./chunk-TYWKUU4W.js');
8
- var chunkHXO76YR6_js = require('./chunk-HXO76YR6.js');
9
- require('./chunk-FTFUDXPS.js');
4
+ var chunkTSQ6JTZ3_js = require('./chunk-TSQ6JTZ3.js');
5
+ var chunkK46OVCRR_js = require('./chunk-K46OVCRR.js');
6
+ var chunkA2M4C3MH_js = require('./chunk-A2M4C3MH.js');
7
+ var chunk2FZAZIC6_js = require('./chunk-2FZAZIC6.js');
8
+ var chunkKIKCFDWW_js = require('./chunk-KIKCFDWW.js');
9
+ require('./chunk-VZXIPXBA.js');
10
10
  require('./chunk-DQI2I5KK.js');
11
11
  require('./chunk-SHUYVCID.js');
12
12
 
@@ -14,21 +14,21 @@ require('./chunk-SHUYVCID.js');
14
14
 
15
15
  Object.defineProperty(exports, "lint", {
16
16
  enumerable: true,
17
- get: function () { return chunkNJJ5TC43_js.executor_default; }
17
+ get: function () { return chunkTSQ6JTZ3_js.executor_default; }
18
18
  });
19
19
  Object.defineProperty(exports, "prepare", {
20
20
  enumerable: true,
21
- get: function () { return chunkSUEEWSXC_js.executor_default; }
21
+ get: function () { return chunkK46OVCRR_js.executor_default; }
22
22
  });
23
23
  Object.defineProperty(exports, "build", {
24
24
  enumerable: true,
25
- get: function () { return chunkASZIG5H5_js.executor_default; }
25
+ get: function () { return chunkA2M4C3MH_js.executor_default; }
26
26
  });
27
27
  Object.defineProperty(exports, "clean", {
28
28
  enumerable: true,
29
- get: function () { return chunkTYWKUU4W_js.executor_default; }
29
+ get: function () { return chunk2FZAZIC6_js.executor_default; }
30
30
  });
31
31
  Object.defineProperty(exports, "docs", {
32
32
  enumerable: true,
33
- get: function () { return chunkHXO76YR6_js.executor_default; }
33
+ get: function () { return chunkKIKCFDWW_js.executor_default; }
34
34
  });
@@ -1,9 +1,9 @@
1
1
  import './chunk-UV4HQO3Y.mjs';
2
- export { executor_default as lint } from './chunk-G24F5YQX.mjs';
3
- export { executor_default as prepare } from './chunk-2BYMHSA6.mjs';
4
- export { executor_default as build } from './chunk-QARM3ABN.mjs';
5
- export { executor_default as clean } from './chunk-MKZ63NLS.mjs';
6
- export { executor_default as docs } from './chunk-C3XHFBQH.mjs';
7
- import './chunk-JZPRT6PF.mjs';
2
+ export { executor_default as lint } from './chunk-FKWUDWAS.mjs';
3
+ export { executor_default as prepare } from './chunk-U7VMNLKS.mjs';
4
+ export { executor_default as build } from './chunk-GR4HHX4J.mjs';
5
+ export { executor_default as clean } from './chunk-227UWG4B.mjs';
6
+ export { executor_default as docs } from './chunk-TKZUIHKU.mjs';
7
+ import './chunk-UUNZMUKU.mjs';
8
8
  import './chunk-OVX2CEXQ.mjs';
9
9
  import './chunk-O6YSETKJ.mjs';
package/dist/index.js CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  var chunkTNFRQNSW_js = require('./chunk-TNFRQNSW.js');
4
4
  require('./chunk-XO62WWX4.js');
5
- var chunkNJJ5TC43_js = require('./chunk-NJJ5TC43.js');
6
- var chunkSUEEWSXC_js = require('./chunk-SUEEWSXC.js');
7
- var chunkASZIG5H5_js = require('./chunk-ASZIG5H5.js');
8
- var chunkTYWKUU4W_js = require('./chunk-TYWKUU4W.js');
9
- var chunkHXO76YR6_js = require('./chunk-HXO76YR6.js');
5
+ var chunkTSQ6JTZ3_js = require('./chunk-TSQ6JTZ3.js');
6
+ var chunkK46OVCRR_js = require('./chunk-K46OVCRR.js');
7
+ var chunkA2M4C3MH_js = require('./chunk-A2M4C3MH.js');
8
+ var chunk2FZAZIC6_js = require('./chunk-2FZAZIC6.js');
9
+ var chunkKIKCFDWW_js = require('./chunk-KIKCFDWW.js');
10
10
  require('./chunk-N2YKXZ5R.js');
11
11
  var chunkWUJKJGEW_js = require('./chunk-WUJKJGEW.js');
12
- require('./chunk-FTFUDXPS.js');
12
+ require('./chunk-VZXIPXBA.js');
13
13
  require('./chunk-QSMJD4CD.js');
14
14
  require('./chunk-DQI2I5KK.js');
15
15
  require('./chunk-IQVSZEQ6.js');
@@ -23,23 +23,23 @@ Object.defineProperty(exports, "createNodesV2", {
23
23
  });
24
24
  Object.defineProperty(exports, "lint", {
25
25
  enumerable: true,
26
- get: function () { return chunkNJJ5TC43_js.executor_default; }
26
+ get: function () { return chunkTSQ6JTZ3_js.executor_default; }
27
27
  });
28
28
  Object.defineProperty(exports, "prepare", {
29
29
  enumerable: true,
30
- get: function () { return chunkSUEEWSXC_js.executor_default; }
30
+ get: function () { return chunkK46OVCRR_js.executor_default; }
31
31
  });
32
32
  Object.defineProperty(exports, "build", {
33
33
  enumerable: true,
34
- get: function () { return chunkASZIG5H5_js.executor_default; }
34
+ get: function () { return chunkA2M4C3MH_js.executor_default; }
35
35
  });
36
36
  Object.defineProperty(exports, "clean", {
37
37
  enumerable: true,
38
- get: function () { return chunkTYWKUU4W_js.executor_default; }
38
+ get: function () { return chunk2FZAZIC6_js.executor_default; }
39
39
  });
40
40
  Object.defineProperty(exports, "docs", {
41
41
  enumerable: true,
42
- get: function () { return chunkHXO76YR6_js.executor_default; }
42
+ get: function () { return chunkKIKCFDWW_js.executor_default; }
43
43
  });
44
44
  Object.defineProperty(exports, "sync", {
45
45
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  export { createNodesV2 } from './chunk-KPZS6OF5.mjs';
2
2
  import './chunk-UV4HQO3Y.mjs';
3
- export { executor_default as lint } from './chunk-G24F5YQX.mjs';
4
- export { executor_default as prepare } from './chunk-2BYMHSA6.mjs';
5
- export { executor_default as build } from './chunk-QARM3ABN.mjs';
6
- export { executor_default as clean } from './chunk-MKZ63NLS.mjs';
7
- export { executor_default as docs } from './chunk-C3XHFBQH.mjs';
3
+ export { executor_default as lint } from './chunk-FKWUDWAS.mjs';
4
+ export { executor_default as prepare } from './chunk-U7VMNLKS.mjs';
5
+ export { executor_default as build } from './chunk-GR4HHX4J.mjs';
6
+ export { executor_default as clean } from './chunk-227UWG4B.mjs';
7
+ export { executor_default as docs } from './chunk-TKZUIHKU.mjs';
8
8
  import './chunk-23KFTIT2.mjs';
9
9
  export { generator_default as sync, generatorFn as syncGenerator } from './chunk-326QB2VK.mjs';
10
- import './chunk-JZPRT6PF.mjs';
10
+ import './chunk-UUNZMUKU.mjs';
11
11
  import './chunk-LK4PXBKI.mjs';
12
12
  import './chunk-OVX2CEXQ.mjs';
13
13
  import './chunk-IC47MFKB.mjs';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFTFUDXPS_js = require('../../chunk-FTFUDXPS.js');
3
+ var chunkVZXIPXBA_js = require('../../chunk-VZXIPXBA.js');
4
4
  require('../../chunk-DQI2I5KK.js');
5
5
  require('../../chunk-SHUYVCID.js');
6
6
 
@@ -8,5 +8,5 @@ require('../../chunk-SHUYVCID.js');
8
8
 
9
9
  Object.defineProperty(exports, "withExecutor", {
10
10
  enumerable: true,
11
- get: function () { return chunkFTFUDXPS_js.withExecutor; }
11
+ get: function () { return chunkVZXIPXBA_js.withExecutor; }
12
12
  });
@@ -1,3 +1,3 @@
1
- export { withExecutor } from '../../chunk-JZPRT6PF.mjs';
1
+ export { withExecutor } from '../../chunk-UUNZMUKU.mjs';
2
2
  import '../../chunk-OVX2CEXQ.mjs';
3
3
  import '../../chunk-O6YSETKJ.mjs';
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkASZIG5H5_js = require('../../../chunk-ASZIG5H5.js');
6
- require('../../../chunk-FTFUDXPS.js');
5
+ var chunkA2M4C3MH_js = require('../../../chunk-A2M4C3MH.js');
6
+ require('../../../chunk-VZXIPXBA.js');
7
7
  require('../../../chunk-DQI2I5KK.js');
8
8
  require('../../../chunk-SHUYVCID.js');
9
9
 
@@ -11,9 +11,9 @@ require('../../../chunk-SHUYVCID.js');
11
11
 
12
12
  Object.defineProperty(exports, "default", {
13
13
  enumerable: true,
14
- get: function () { return chunkASZIG5H5_js.executor_default; }
14
+ get: function () { return chunkA2M4C3MH_js.executor_default; }
15
15
  });
16
16
  Object.defineProperty(exports, "executorFn", {
17
17
  enumerable: true,
18
- get: function () { return chunkASZIG5H5_js.executorFn; }
18
+ get: function () { return chunkA2M4C3MH_js.executorFn; }
19
19
  });
@@ -1,4 +1,4 @@
1
- export { executor_default as default, executorFn } from '../../../chunk-QARM3ABN.mjs';
2
- import '../../../chunk-JZPRT6PF.mjs';
1
+ export { executor_default as default, executorFn } from '../../../chunk-GR4HHX4J.mjs';
2
+ import '../../../chunk-UUNZMUKU.mjs';
3
3
  import '../../../chunk-OVX2CEXQ.mjs';
4
4
  import '../../../chunk-O6YSETKJ.mjs';
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkTYWKUU4W_js = require('../../../chunk-TYWKUU4W.js');
6
- require('../../../chunk-FTFUDXPS.js');
5
+ var chunk2FZAZIC6_js = require('../../../chunk-2FZAZIC6.js');
6
+ require('../../../chunk-VZXIPXBA.js');
7
7
  require('../../../chunk-DQI2I5KK.js');
8
8
  require('../../../chunk-SHUYVCID.js');
9
9
 
@@ -11,9 +11,9 @@ require('../../../chunk-SHUYVCID.js');
11
11
 
12
12
  Object.defineProperty(exports, "default", {
13
13
  enumerable: true,
14
- get: function () { return chunkTYWKUU4W_js.executor_default; }
14
+ get: function () { return chunk2FZAZIC6_js.executor_default; }
15
15
  });
16
16
  Object.defineProperty(exports, "executorFn", {
17
17
  enumerable: true,
18
- get: function () { return chunkTYWKUU4W_js.executorFn; }
18
+ get: function () { return chunk2FZAZIC6_js.executorFn; }
19
19
  });
@@ -1,4 +1,4 @@
1
- export { executor_default as default, executorFn } from '../../../chunk-MKZ63NLS.mjs';
2
- import '../../../chunk-JZPRT6PF.mjs';
1
+ export { executor_default as default, executorFn } from '../../../chunk-227UWG4B.mjs';
2
+ import '../../../chunk-UUNZMUKU.mjs';
3
3
  import '../../../chunk-OVX2CEXQ.mjs';
4
4
  import '../../../chunk-O6YSETKJ.mjs';
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkHXO76YR6_js = require('../../../chunk-HXO76YR6.js');
6
- require('../../../chunk-FTFUDXPS.js');
5
+ var chunkKIKCFDWW_js = require('../../../chunk-KIKCFDWW.js');
6
+ require('../../../chunk-VZXIPXBA.js');
7
7
  require('../../../chunk-DQI2I5KK.js');
8
8
  require('../../../chunk-SHUYVCID.js');
9
9
 
@@ -11,9 +11,9 @@ require('../../../chunk-SHUYVCID.js');
11
11
 
12
12
  Object.defineProperty(exports, "default", {
13
13
  enumerable: true,
14
- get: function () { return chunkHXO76YR6_js.executor_default; }
14
+ get: function () { return chunkKIKCFDWW_js.executor_default; }
15
15
  });
16
16
  Object.defineProperty(exports, "executorFn", {
17
17
  enumerable: true,
18
- get: function () { return chunkHXO76YR6_js.executorFn; }
18
+ get: function () { return chunkKIKCFDWW_js.executorFn; }
19
19
  });
@@ -1,4 +1,4 @@
1
- export { executor_default as default, executorFn } from '../../../chunk-C3XHFBQH.mjs';
2
- import '../../../chunk-JZPRT6PF.mjs';
1
+ export { executor_default as default, executorFn } from '../../../chunk-TKZUIHKU.mjs';
2
+ import '../../../chunk-UUNZMUKU.mjs';
3
3
  import '../../../chunk-OVX2CEXQ.mjs';
4
4
  import '../../../chunk-O6YSETKJ.mjs';
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkNJJ5TC43_js = require('../../../chunk-NJJ5TC43.js');
6
- require('../../../chunk-FTFUDXPS.js');
5
+ var chunkTSQ6JTZ3_js = require('../../../chunk-TSQ6JTZ3.js');
6
+ require('../../../chunk-VZXIPXBA.js');
7
7
  require('../../../chunk-DQI2I5KK.js');
8
8
  require('../../../chunk-SHUYVCID.js');
9
9
 
@@ -11,9 +11,9 @@ require('../../../chunk-SHUYVCID.js');
11
11
 
12
12
  Object.defineProperty(exports, "default", {
13
13
  enumerable: true,
14
- get: function () { return chunkNJJ5TC43_js.executor_default; }
14
+ get: function () { return chunkTSQ6JTZ3_js.executor_default; }
15
15
  });
16
16
  Object.defineProperty(exports, "executorFn", {
17
17
  enumerable: true,
18
- get: function () { return chunkNJJ5TC43_js.executorFn; }
18
+ get: function () { return chunkTSQ6JTZ3_js.executorFn; }
19
19
  });
@@ -1,4 +1,4 @@
1
- export { executor_default as default, executorFn } from '../../../chunk-G24F5YQX.mjs';
2
- import '../../../chunk-JZPRT6PF.mjs';
1
+ export { executor_default as default, executorFn } from '../../../chunk-FKWUDWAS.mjs';
2
+ import '../../../chunk-UUNZMUKU.mjs';
3
3
  import '../../../chunk-OVX2CEXQ.mjs';
4
4
  import '../../../chunk-O6YSETKJ.mjs';
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkSUEEWSXC_js = require('../../../chunk-SUEEWSXC.js');
6
- require('../../../chunk-FTFUDXPS.js');
5
+ var chunkK46OVCRR_js = require('../../../chunk-K46OVCRR.js');
6
+ require('../../../chunk-VZXIPXBA.js');
7
7
  require('../../../chunk-DQI2I5KK.js');
8
8
  require('../../../chunk-SHUYVCID.js');
9
9
 
@@ -11,9 +11,9 @@ require('../../../chunk-SHUYVCID.js');
11
11
 
12
12
  Object.defineProperty(exports, "default", {
13
13
  enumerable: true,
14
- get: function () { return chunkSUEEWSXC_js.executor_default; }
14
+ get: function () { return chunkK46OVCRR_js.executor_default; }
15
15
  });
16
16
  Object.defineProperty(exports, "executorFn", {
17
17
  enumerable: true,
18
- get: function () { return chunkSUEEWSXC_js.executorFn; }
18
+ get: function () { return chunkK46OVCRR_js.executorFn; }
19
19
  });
@@ -1,4 +1,4 @@
1
- export { executor_default as default, executorFn } from '../../../chunk-2BYMHSA6.mjs';
2
- import '../../../chunk-JZPRT6PF.mjs';
1
+ export { executor_default as default, executorFn } from '../../../chunk-U7VMNLKS.mjs';
2
+ import '../../../chunk-UUNZMUKU.mjs';
3
3
  import '../../../chunk-OVX2CEXQ.mjs';
4
4
  import '../../../chunk-O6YSETKJ.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/nx",
3
- "version": "0.11.47",
3
+ "version": "0.11.49",
4
4
  "description": "A Nx plugin to support Powerlines development in Nx monorepos.",
5
5
  "repository": {
6
6
  "type": "github",
@@ -188,15 +188,15 @@
188
188
  "@storm-software/esbuild": "^0.53.74",
189
189
  "@storm-software/unbuild": "^0.57.74",
190
190
  "@storm-software/workspace-tools": "^1.294.20",
191
- "@stryke/fs": "^0.33.26",
192
- "@stryke/hash": "^0.12.32",
193
- "@stryke/path": "^0.24.0",
194
- "@stryke/string-format": "^0.12.29",
195
- "@stryke/type-checks": "^0.5.14",
191
+ "@stryke/fs": "^0.33.27",
192
+ "@stryke/hash": "^0.12.33",
193
+ "@stryke/path": "^0.24.1",
194
+ "@stryke/string-format": "^0.12.30",
195
+ "@stryke/type-checks": "^0.5.15",
196
196
  "defu": "^6.1.4",
197
197
  "jiti": "^2.6.1",
198
198
  "nx": "^22.3.3",
199
- "powerlines": "^0.36.21"
199
+ "powerlines": "^0.36.23"
200
200
  },
201
201
  "devDependencies": {
202
202
  "@nx/workspace": "^22.3.3",
@@ -210,5 +210,5 @@
210
210
  "publishConfig": { "access": "public" },
211
211
  "executors": "./executors.json",
212
212
  "generators": "./generators.json",
213
- "gitHead": "b16324cf857ea5743fd7ad06e18607b1ba32abe0"
213
+ "gitHead": "be47e546b48b9a82e460b5c5d4f02fb66e821f18"
214
214
  }