powerlines 0.37.21 → 0.37.23

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 (111) hide show
  1. package/dist/api.cjs +2 -2
  2. package/dist/api.js +1 -1
  3. package/dist/astro.cjs +4 -4
  4. package/dist/astro.js +3 -3
  5. package/dist/{chunk-STSTFZT2.js → chunk-3XEOJ3TS.js} +89 -48
  6. package/dist/chunk-4QCZWJMW.cjs +12 -0
  7. package/dist/{chunk-GUFYA64E.js → chunk-APLBM72X.js} +3 -3
  8. package/dist/{chunk-LQZK77AH.cjs → chunk-C3TWAGFQ.cjs} +5 -5
  9. package/dist/{chunk-AQG66EUK.js → chunk-D4L3REG4.js} +3 -3
  10. package/dist/chunk-D56IP3ZO.cjs +12 -0
  11. package/dist/{chunk-KRQKJHEH.cjs → chunk-DWF4GVXQ.cjs} +4 -4
  12. package/dist/{chunk-QVZ32P2J.js → chunk-PQ6DDPXP.js} +3 -3
  13. package/dist/{chunk-J7FOWGCH.cjs → chunk-R7IUNKL4.cjs} +89 -48
  14. package/dist/{chunk-Y6A4FTVN.js → chunk-UQ7LY7EU.js} +3 -3
  15. package/dist/{chunk-OZZ65IVY.cjs → chunk-UZV6LCRL.cjs} +4 -4
  16. package/dist/{chunk-7Q4TUBXJ.js → chunk-Z7KIQFLN.js} +3 -3
  17. package/dist/esbuild.cjs +6 -6
  18. package/dist/esbuild.js +3 -3
  19. package/dist/farm.cjs +3 -3
  20. package/dist/farm.js +2 -2
  21. package/dist/index.cjs +10 -10
  22. package/dist/index.js +2 -2
  23. package/dist/lib/build/index.d.cts +1 -1
  24. package/dist/lib/build/index.d.ts +1 -1
  25. package/dist/lib/build/unbuild.d.cts +1 -1
  26. package/dist/lib/build/unbuild.d.ts +1 -1
  27. package/dist/lib/{chunk-C6CJM3EI.cjs → chunk-5WSRLNW3.cjs} +52 -14
  28. package/dist/lib/chunk-5WSRLNW3.cjs.map +1 -0
  29. package/dist/lib/{chunk-ZH6OZFGY.js → chunk-EUG7HXQY.js} +6 -5
  30. package/dist/lib/chunk-EUG7HXQY.js.map +1 -0
  31. package/dist/lib/{chunk-ZTBWCQH5.js → chunk-GAIS4GMK.js} +52 -14
  32. package/dist/lib/chunk-GAIS4GMK.js.map +1 -0
  33. package/dist/lib/{chunk-LD73LMAE.js → chunk-K3NVHAWK.js} +38 -36
  34. package/dist/lib/chunk-K3NVHAWK.js.map +1 -0
  35. package/dist/lib/{chunk-2L77PLFS.js → chunk-KAYP2ZET.js} +3 -3
  36. package/dist/lib/{chunk-2L77PLFS.js.map → chunk-KAYP2ZET.js.map} +1 -1
  37. package/dist/lib/{chunk-MOCQ266V.cjs → chunk-NP43P5WN.cjs} +40 -38
  38. package/dist/lib/chunk-NP43P5WN.cjs.map +1 -0
  39. package/dist/lib/{chunk-4JLVGWHR.js → chunk-UKH6QWNB.js} +4 -4
  40. package/dist/lib/{chunk-4JLVGWHR.js.map → chunk-UKH6QWNB.js.map} +1 -1
  41. package/dist/lib/{chunk-LMXKPOEX.cjs → chunk-Y2IR6IBT.cjs} +19 -19
  42. package/dist/lib/{chunk-LMXKPOEX.cjs.map → chunk-Y2IR6IBT.cjs.map} +1 -1
  43. package/dist/lib/{chunk-GIYLCTW5.cjs → chunk-Y542GHNE.cjs} +6 -6
  44. package/dist/lib/{chunk-GIYLCTW5.cjs.map → chunk-Y542GHNE.cjs.map} +1 -1
  45. package/dist/lib/{chunk-SVAHW2JC.cjs → chunk-ZYQHFUU6.cjs} +18 -17
  46. package/dist/lib/chunk-ZYQHFUU6.cjs.map +1 -0
  47. package/dist/lib/contexts/api-context.cjs +5 -5
  48. package/dist/lib/contexts/api-context.d.cts +1 -1
  49. package/dist/lib/contexts/api-context.d.ts +1 -1
  50. package/dist/lib/contexts/api-context.js +4 -4
  51. package/dist/lib/contexts/context.cjs +3 -3
  52. package/dist/lib/contexts/context.d.cts +1 -5
  53. package/dist/lib/contexts/context.d.ts +1 -5
  54. package/dist/lib/contexts/context.js +2 -2
  55. package/dist/lib/contexts/environment-context.cjs +4 -4
  56. package/dist/lib/contexts/environment-context.d.cts +1 -1
  57. package/dist/lib/contexts/environment-context.d.ts +1 -1
  58. package/dist/lib/contexts/environment-context.js +3 -3
  59. package/dist/lib/contexts/index.cjs +7 -7
  60. package/dist/lib/contexts/index.d.cts +1 -1
  61. package/dist/lib/contexts/index.d.ts +1 -1
  62. package/dist/lib/contexts/index.js +4 -4
  63. package/dist/lib/contexts/plugin-context.d.cts +1 -1
  64. package/dist/lib/contexts/plugin-context.d.ts +1 -1
  65. package/dist/lib/fs/index.cjs +2 -2
  66. package/dist/lib/fs/index.js +1 -1
  67. package/dist/lib/fs/vfs.cjs +2 -2
  68. package/dist/lib/fs/vfs.js +1 -1
  69. package/dist/lib/index.cjs +10 -10
  70. package/dist/lib/index.d.cts +1 -1
  71. package/dist/lib/index.d.ts +1 -1
  72. package/dist/lib/index.js +5 -5
  73. package/dist/lib/{internal-CFBs3Fok.d.cts → internal-Dt8PM9M2.d.cts} +5 -1
  74. package/dist/lib/{internal-Dlj-vo3a.d.ts → internal-DyXNBori.d.ts} +5 -1
  75. package/dist/lib/unplugin/factory.cjs +6 -6
  76. package/dist/lib/unplugin/factory.js +5 -5
  77. package/dist/lib/unplugin/index.cjs +6 -6
  78. package/dist/lib/unplugin/index.js +5 -5
  79. package/dist/next.cjs +4 -4
  80. package/dist/next.js +3 -3
  81. package/dist/nuxt.cjs +7 -7
  82. package/dist/nuxt.js +5 -5
  83. package/dist/rolldown.cjs +6 -6
  84. package/dist/rolldown.js +3 -3
  85. package/dist/rollup.cjs +3 -3
  86. package/dist/rollup.js +2 -2
  87. package/dist/rspack.cjs +3 -3
  88. package/dist/rspack.js +2 -2
  89. package/dist/tsdown.cjs +4 -4
  90. package/dist/tsdown.js +3 -3
  91. package/dist/tsup.cjs +4 -4
  92. package/dist/tsup.js +3 -3
  93. package/dist/types/internal.d.cts +5 -1
  94. package/dist/types/internal.d.ts +5 -1
  95. package/dist/unloader.cjs +3 -3
  96. package/dist/unloader.js +2 -2
  97. package/dist/unplugin.cjs +8 -8
  98. package/dist/unplugin.js +4 -4
  99. package/dist/vite.cjs +6 -6
  100. package/dist/vite.js +3 -3
  101. package/dist/webpack.cjs +6 -6
  102. package/dist/webpack.js +3 -3
  103. package/package.json +8 -8
  104. package/dist/chunk-4QATNI7W.cjs +0 -12
  105. package/dist/chunk-P3RYMCAA.cjs +0 -12
  106. package/dist/lib/chunk-C6CJM3EI.cjs.map +0 -1
  107. package/dist/lib/chunk-LD73LMAE.js.map +0 -1
  108. package/dist/lib/chunk-MOCQ266V.cjs.map +0 -1
  109. package/dist/lib/chunk-SVAHW2JC.cjs.map +0 -1
  110. package/dist/lib/chunk-ZH6OZFGY.js.map +0 -1
  111. package/dist/lib/chunk-ZTBWCQH5.js.map +0 -1
@@ -1862,6 +1862,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
1862
1862
  * @returns A promise that resolves to a new virtual file system instance.
1863
1863
  */
1864
1864
  static async create(context) {
1865
+ context.debug("Starting virtual file system (VFS) initialization processes...");
1865
1866
  if (!context.config.skipCache && exists.existsSync(joinPaths.joinPaths(context.dataPath, "fs.bin"))) {
1866
1867
  const buffer$1 = await buffer.readFileBuffer(joinPaths.joinPaths(context.dataPath, "fs.bin"));
1867
1868
  const message2 = new $__namespace.Message(buffer$1, false);
@@ -1875,8 +1876,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
1875
1876
  }
1876
1877
  const message = new $__namespace.Message();
1877
1878
  const result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
1879
+ result.#log(types.LogLevelLabel.DEBUG, "Successfully completed virtual file system (VFS) initialization.");
1878
1880
  if (result.metadata) {
1879
- context.entry = Object.entries(result.metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1881
+ result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.metadata).length} previously stored metadata records...`);
1882
+ const entry = Object.entries(result.metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1880
1883
  if (meta.properties) {
1881
1884
  const typeDefinition = {
1882
1885
  file: path
@@ -1900,7 +1903,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
1900
1903
  }
1901
1904
  return null;
1902
1905
  }).filter(Boolean);
1903
- context.debug(`Loaded ${context.entry.length} entry type definitions from VFS metadata.`);
1906
+ result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1907
+ context.entry = entry;
1904
1908
  }
1905
1909
  return result;
1906
1910
  }
@@ -1932,7 +1936,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
1932
1936
  return new Proxy(this.#metadata, {
1933
1937
  get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1934
1938
  return target[this.#normalizeId(prop)];
1935
- }, "get")
1939
+ }, "get"),
1940
+ set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
1941
+ target[this.#normalizeId(prop)] = value;
1942
+ return true;
1943
+ }, "set"),
1944
+ deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1945
+ delete target[this.#normalizeId(prop)];
1946
+ return true;
1947
+ }, "deleteProperty"),
1948
+ has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1949
+ return this.#normalizeId(prop) in target;
1950
+ }, "has")
1936
1951
  });
1937
1952
  }
1938
1953
  /**
@@ -1942,7 +1957,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
1942
1957
  return new Proxy(this.#paths, {
1943
1958
  get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1944
1959
  return target[this.#normalizePath(prop)];
1945
- }, "get")
1960
+ }, "get"),
1961
+ set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
1962
+ target[this.#normalizePath(prop)] = value;
1963
+ return true;
1964
+ }, "set"),
1965
+ deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1966
+ delete target[this.#normalizePath(prop)];
1967
+ return true;
1968
+ }, "deleteProperty"),
1969
+ has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1970
+ return this.#normalizePath(prop) in target;
1971
+ }, "has")
1946
1972
  });
1947
1973
  }
1948
1974
  /**
@@ -1952,7 +1978,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
1952
1978
  return new Proxy(this.#paths, {
1953
1979
  get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1954
1980
  return target[this.#normalizeId(prop)];
1955
- }, "get")
1981
+ }, "get"),
1982
+ set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
1983
+ target[this.#normalizeId(prop)] = value;
1984
+ return true;
1985
+ }, "set"),
1986
+ deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1987
+ delete target[this.#normalizeId(prop)];
1988
+ return true;
1989
+ }, "deleteProperty"),
1990
+ has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
1991
+ return this.#normalizeId(prop) in target;
1992
+ }, "has")
1956
1993
  });
1957
1994
  }
1958
1995
  /**
@@ -2401,6 +2438,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2401
2438
  this.#metadata[id] = {
2402
2439
  type: "normal",
2403
2440
  timestamp: Date.now(),
2441
+ ...this.#metadata[id] ?? {},
2404
2442
  ...meta
2405
2443
  };
2406
2444
  this.#paths[id] = this.#normalizePath(relativeKey);
@@ -2422,6 +2460,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2422
2460
  this.#metadata[id] = {
2423
2461
  type: "normal",
2424
2462
  timestamp: Date.now(),
2463
+ ...this.#metadata[id] ?? {},
2425
2464
  ...meta
2426
2465
  };
2427
2466
  this.#paths[id] = this.#normalizePath(relativeKey);
@@ -2646,22 +2685,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
2646
2685
  await this.remove(joinPaths.joinPaths(this.#context.dataPath, "fs.bin"));
2647
2686
  const message = new $__namespace.Message();
2648
2687
  const fs = message.initRoot(FileSystem);
2649
- const paths = await this.list();
2650
- const storage = fs._initStorage(paths.length);
2651
- await Promise.all(paths.map(async (path, index) => {
2688
+ const storage = fs._initStorage(Object.keys(this.#paths).length);
2689
+ await Promise.all(Object.values(this.#paths).map(async (path, index) => {
2652
2690
  const code = await this.read(path);
2653
2691
  const fd = storage.get(index);
2654
2692
  fd.path = path;
2655
2693
  fd.code = code || "";
2656
2694
  }));
2657
- const ids = fs._initIds(Object.keys(this.ids).length);
2658
- Object.entries(this.ids).filter(([, path]) => path).forEach(([id, path], index) => {
2695
+ const ids = fs._initIds(Object.keys(this.#ids).length);
2696
+ Object.entries(this.#ids).filter(([, path]) => path).forEach(([id, path], index) => {
2659
2697
  const fileId = ids.get(index);
2660
2698
  fileId.id = id;
2661
2699
  fileId.path = path;
2662
2700
  });
2663
- const metadata = fs._initMetadata(Object.keys(this.metadata).length);
2664
- Object.entries(this.metadata).filter(([, value]) => value).forEach(([id, value], index) => {
2701
+ const metadata = fs._initMetadata(Object.keys(this.#metadata).length);
2702
+ Object.entries(this.#metadata).filter(([, value]) => value).forEach(([id, value], index) => {
2665
2703
  const fileMetadata = metadata.get(index);
2666
2704
  fileMetadata.id = id;
2667
2705
  fileMetadata.type = value.type;
@@ -2749,7 +2787,9 @@ var PowerlinesContext = class _PowerlinesContext {
2749
2787
  *
2750
2788
  * @internal
2751
2789
  */
2752
- #internal = {};
2790
+ #internal = {
2791
+ entry: []
2792
+ };
2753
2793
  #workspaceConfig;
2754
2794
  #checksum = null;
2755
2795
  #buildId = uuid.uuid();
@@ -2841,10 +2881,6 @@ var PowerlinesContext = class _PowerlinesContext {
2841
2881
  */
2842
2882
  resolver;
2843
2883
  /**
2844
- * An internal object containing the added resolved entry type definitions for the project.
2845
- */
2846
- _entry = null;
2847
- /**
2848
2884
  * The resolved configuration options
2849
2885
  */
2850
2886
  resolvePatterns = [];
@@ -2874,13 +2910,13 @@ var PowerlinesContext = class _PowerlinesContext {
2874
2910
  * The resolved entry type definitions for the project
2875
2911
  */
2876
2912
  get entry() {
2877
- return resolveEntriesSync(this, !this._entry || this._entry.length === 0 ? toArray.toArray(this.config.entry) : this._entry);
2913
+ return resolveEntriesSync(this, !this.$$internal.entry || this.$$internal.entry.length === 0 ? toArray.toArray(this.config.entry) : this.$$internal.entry);
2878
2914
  }
2879
2915
  /**
2880
2916
  * Sets the resolved entry type definitions for the project
2881
2917
  */
2882
2918
  set entry(value) {
2883
- this._entry = value;
2919
+ this.$$internal.entry = value;
2884
2920
  }
2885
2921
  /**
2886
2922
  * The TypeScript configuration parsed from the tsconfig file
@@ -3337,26 +3373,28 @@ var PowerlinesContext = class _PowerlinesContext {
3337
3373
  */
3338
3374
  async emitEntry(code, path, options = {}) {
3339
3375
  const entryPath = append.appendPath(replace.replacePath(replace.replacePath(replace.replacePath(path, this.entryPath), this.config.projectRoot), this.workspaceConfig.workspaceRoot), this.entryPath);
3340
- this._entry ??= [];
3341
- this._entry.push({
3342
- name: options.name,
3343
- file: entryPath,
3344
- input: options.input,
3345
- output: options.output
3346
- });
3347
- return this.emit(code, entryPath, defu7__default.default(omit.omit(options, [
3348
- "name"
3349
- ]), {
3376
+ if (this.$$internal.entry) {
3377
+ this.$$internal.entry.push({
3378
+ name: options.name,
3379
+ file: entryPath,
3380
+ input: options.input,
3381
+ output: options.output
3382
+ });
3383
+ }
3384
+ return this.emit(code, entryPath, defu7__default.default({
3350
3385
  meta: {
3351
3386
  type: "entry",
3352
3387
  properties: {
3353
- name: options.name,
3354
- output: options.output,
3355
- "input.file": options.input?.file,
3356
- "input.name": options.input?.name
3388
+ file: entryPath,
3389
+ name: options?.name,
3390
+ output: options?.output,
3391
+ "input.file": options?.input?.file,
3392
+ "input.name": options?.input?.name
3357
3393
  }
3358
3394
  }
3359
- }));
3395
+ }, omit.omit(options, [
3396
+ "name"
3397
+ ])));
3360
3398
  }
3361
3399
  /**
3362
3400
  * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
@@ -3367,26 +3405,28 @@ var PowerlinesContext = class _PowerlinesContext {
3367
3405
  */
3368
3406
  emitEntrySync(code, path, options = {}) {
3369
3407
  const entryPath = append.appendPath(replace.replacePath(replace.replacePath(replace.replacePath(path, this.entryPath), this.config.projectRoot), this.workspaceConfig.workspaceRoot), this.entryPath);
3370
- this._entry ??= [];
3371
- this._entry.push({
3372
- name: options?.name,
3373
- file: entryPath,
3374
- input: options?.input,
3375
- output: options?.output
3376
- });
3377
- return this.emitSync(code, entryPath, defu7__default.default(omit.omit(options, [
3378
- "name"
3379
- ]), {
3408
+ if (this.$$internal.entry) {
3409
+ this.$$internal.entry.push({
3410
+ name: options?.name,
3411
+ file: entryPath,
3412
+ input: options?.input,
3413
+ output: options?.output
3414
+ });
3415
+ }
3416
+ return this.emitSync(code, entryPath, defu7__default.default({
3380
3417
  meta: {
3381
3418
  type: "entry",
3382
3419
  properties: {
3420
+ file: entryPath,
3383
3421
  name: options?.name,
3384
3422
  output: options?.output,
3385
3423
  "input.file": options?.input?.file,
3386
3424
  "input.name": options?.input?.name
3387
3425
  }
3388
3426
  }
3389
- }));
3427
+ }, omit.omit(options, [
3428
+ "name"
3429
+ ])));
3390
3430
  }
3391
3431
  /**
3392
3432
  * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
@@ -4326,7 +4366,8 @@ var PowerlinesAPI = class _PowerlinesAPI {
4326
4366
  const api = new _PowerlinesAPI(await PowerlinesAPIContext.from(workspaceRoot, config));
4327
4367
  api.#context.$$internal = {
4328
4368
  api,
4329
- addPlugin: api.#addPlugin.bind(api)
4369
+ addPlugin: api.#addPlugin.bind(api),
4370
+ entry: []
4330
4371
  };
4331
4372
  for (const plugin of api.context.config.plugins ?? []) {
4332
4373
  await api.#addPlugin(plugin);
@@ -4979,5 +5020,5 @@ exports.combineContexts = combineContexts;
4979
5020
  exports.createLog = createLog;
4980
5021
  exports.extendLog = extendLog;
4981
5022
  exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
4982
- //# sourceMappingURL=chunk-J7FOWGCH.cjs.map
4983
- //# sourceMappingURL=chunk-J7FOWGCH.cjs.map
5023
+ //# sourceMappingURL=chunk-R7IUNKL4.cjs.map
5024
+ //# sourceMappingURL=chunk-R7IUNKL4.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-BGBDDKML.js';
2
- import { createUnpluginFactory } from './chunk-7Q4TUBXJ.js';
2
+ import { createUnpluginFactory } from './chunk-Z7KIQFLN.js';
3
3
  import { __name } from './chunk-7QVYU63E.js';
4
4
  import { isDevelopmentMode, isTestMode } from '@stryke/env/environment-checks';
5
5
  import defu from 'defu';
@@ -151,5 +151,5 @@ var vite = createVitePlugin(createUnpluginFactory("vite", (api, plugin) => {
151
151
  var vite_default = vite;
152
152
 
153
153
  export { vite, vite_default };
154
- //# sourceMappingURL=chunk-Y6A4FTVN.js.map
155
- //# sourceMappingURL=chunk-Y6A4FTVN.js.map
154
+ //# sourceMappingURL=chunk-UQ7LY7EU.js.map
155
+ //# sourceMappingURL=chunk-UQ7LY7EU.js.map
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkSE3RCXWI_cjs = require('./chunk-SE3RCXWI.cjs');
4
- var chunkLQZK77AH_cjs = require('./chunk-LQZK77AH.cjs');
4
+ var chunkC3TWAGFQ_cjs = require('./chunk-C3TWAGFQ.cjs');
5
5
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
6
6
  var isUndefined = require('@stryke/type-checks/is-undefined');
7
7
  var unplugin = require('unplugin');
8
8
 
9
- var esbuild = unplugin.createEsbuildPlugin(chunkLQZK77AH_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
9
+ var esbuild = unplugin.createEsbuildPlugin(chunkC3TWAGFQ_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
10
10
  return {
11
11
  ...plugin,
12
12
  esbuild: {
@@ -32,5 +32,5 @@ var esbuild_default = esbuild;
32
32
 
33
33
  exports.esbuild = esbuild;
34
34
  exports.esbuild_default = esbuild_default;
35
- //# sourceMappingURL=chunk-OZZ65IVY.cjs.map
36
- //# sourceMappingURL=chunk-OZZ65IVY.cjs.map
35
+ //# sourceMappingURL=chunk-UZV6LCRL.cjs.map
36
+ //# sourceMappingURL=chunk-UZV6LCRL.cjs.map
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-STSTFZT2.js';
1
+ import { createLog, PowerlinesAPI } from './chunk-3XEOJ3TS.js';
2
2
  import { __name } from './chunk-7QVYU63E.js';
3
3
  import { LogLevelLabel } from '@storm-software/config-tools/types';
4
4
  import { getWorkspaceRoot } from '@stryke/fs/get-workspace-root';
@@ -134,5 +134,5 @@ function createUnpluginFactory(variant, decorate) {
134
134
  __name(createUnpluginFactory, "createUnpluginFactory");
135
135
 
136
136
  export { createUnpluginFactory, getString };
137
- //# sourceMappingURL=chunk-7Q4TUBXJ.js.map
138
- //# sourceMappingURL=chunk-7Q4TUBXJ.js.map
137
+ //# sourceMappingURL=chunk-Z7KIQFLN.js.map
138
+ //# sourceMappingURL=chunk-Z7KIQFLN.js.map
package/dist/esbuild.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkOZZ65IVY_cjs = require('./chunk-OZZ65IVY.cjs');
5
+ var chunkUZV6LCRL_cjs = require('./chunk-UZV6LCRL.cjs');
6
6
  require('./chunk-SE3RCXWI.cjs');
7
- require('./chunk-LQZK77AH.cjs');
8
- require('./chunk-J7FOWGCH.cjs');
7
+ require('./chunk-C3TWAGFQ.cjs');
8
+ require('./chunk-R7IUNKL4.cjs');
9
9
  require('./chunk-B6DVCLP5.cjs');
10
10
  require('./chunk-V5WOGN7O.cjs');
11
11
  require('./chunk-Z6ARQDHR.cjs');
@@ -15,15 +15,15 @@ require('./chunk-PK6SKIKE.cjs');
15
15
 
16
16
  Object.defineProperty(exports, "default", {
17
17
  enumerable: true,
18
- get: function () { return chunkOZZ65IVY_cjs.esbuild_default; }
18
+ get: function () { return chunkUZV6LCRL_cjs.esbuild_default; }
19
19
  });
20
20
  Object.defineProperty(exports, "esbuild", {
21
21
  enumerable: true,
22
- get: function () { return chunkOZZ65IVY_cjs.esbuild; }
22
+ get: function () { return chunkUZV6LCRL_cjs.esbuild; }
23
23
  });
24
24
  Object.defineProperty(exports, "module.exports", {
25
25
  enumerable: true,
26
- get: function () { return chunkOZZ65IVY_cjs.esbuild; }
26
+ get: function () { return chunkUZV6LCRL_cjs.esbuild; }
27
27
  });
28
28
  //# sourceMappingURL=esbuild.cjs.map
29
29
  //# sourceMappingURL=esbuild.cjs.map
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
- export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-AQG66EUK.js';
1
+ export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-D4L3REG4.js';
2
2
  import './chunk-BGBDDKML.js';
3
- import './chunk-7Q4TUBXJ.js';
4
- import './chunk-STSTFZT2.js';
3
+ import './chunk-Z7KIQFLN.js';
4
+ import './chunk-3XEOJ3TS.js';
5
5
  import './chunk-PQXP7XQK.js';
6
6
  import './chunk-NITQ5IYP.js';
7
7
  import './chunk-2MYPFASJ.js';
package/dist/farm.cjs CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkLQZK77AH_cjs = require('./chunk-LQZK77AH.cjs');
6
- require('./chunk-J7FOWGCH.cjs');
5
+ var chunkC3TWAGFQ_cjs = require('./chunk-C3TWAGFQ.cjs');
6
+ require('./chunk-R7IUNKL4.cjs');
7
7
  require('./chunk-B6DVCLP5.cjs');
8
8
  require('./chunk-V5WOGN7O.cjs');
9
9
  require('./chunk-Z6ARQDHR.cjs');
10
10
  require('./chunk-PK6SKIKE.cjs');
11
11
  var unplugin = require('unplugin');
12
12
 
13
- var farm = unplugin.createFarmPlugin(chunkLQZK77AH_cjs.createUnpluginFactory("farm"));
13
+ var farm = unplugin.createFarmPlugin(chunkC3TWAGFQ_cjs.createUnpluginFactory("farm"));
14
14
  var farm_default = farm;
15
15
 
16
16
  exports.default = farm_default;
package/dist/farm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createUnpluginFactory } from './chunk-7Q4TUBXJ.js';
2
- import './chunk-STSTFZT2.js';
1
+ import { createUnpluginFactory } from './chunk-Z7KIQFLN.js';
2
+ import './chunk-3XEOJ3TS.js';
3
3
  import './chunk-PQXP7XQK.js';
4
4
  import './chunk-NITQ5IYP.js';
5
5
  import './chunk-2MYPFASJ.js';
package/dist/index.cjs CHANGED
@@ -13,7 +13,7 @@ require('./chunk-4JCNAKOE.cjs');
13
13
  require('./chunk-D6GGZQLC.cjs');
14
14
  var chunkA7AUGAHH_cjs = require('./chunk-A7AUGAHH.cjs');
15
15
  var chunk42ZHOCZJ_cjs = require('./chunk-42ZHOCZJ.cjs');
16
- var chunkJ7FOWGCH_cjs = require('./chunk-J7FOWGCH.cjs');
16
+ var chunkR7IUNKL4_cjs = require('./chunk-R7IUNKL4.cjs');
17
17
  var chunkB6DVCLP5_cjs = require('./chunk-B6DVCLP5.cjs');
18
18
  var chunkV5WOGN7O_cjs = require('./chunk-V5WOGN7O.cjs');
19
19
  var chunkZ6ARQDHR_cjs = require('./chunk-Z6ARQDHR.cjs');
@@ -27,10 +27,10 @@ chunkPK6SKIKE_cjs.__name(defineConfig, "defineConfig");
27
27
  async function createPowerlines(options = {}) {
28
28
  options.root ??= process.cwd();
29
29
  const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(options.root);
30
- return chunkJ7FOWGCH_cjs.PowerlinesAPI.from(workspaceRoot, options);
30
+ return chunkR7IUNKL4_cjs.PowerlinesAPI.from(workspaceRoot, options);
31
31
  }
32
32
  chunkPK6SKIKE_cjs.__name(createPowerlines, "createPowerlines");
33
- var index_default = chunkJ7FOWGCH_cjs.PowerlinesAPI;
33
+ var index_default = chunkR7IUNKL4_cjs.PowerlinesAPI;
34
34
 
35
35
  Object.defineProperty(exports, "STORAGE_PRESETS", {
36
36
  enumerable: true,
@@ -50,31 +50,31 @@ Object.defineProperty(exports, "HOOKS_LIST_ORDERS", {
50
50
  });
51
51
  Object.defineProperty(exports, "FileId", {
52
52
  enumerable: true,
53
- get: function () { return chunkJ7FOWGCH_cjs.FileId; }
53
+ get: function () { return chunkR7IUNKL4_cjs.FileId; }
54
54
  });
55
55
  Object.defineProperty(exports, "FileMetadata", {
56
56
  enumerable: true,
57
- get: function () { return chunkJ7FOWGCH_cjs.FileMetadata; }
57
+ get: function () { return chunkR7IUNKL4_cjs.FileMetadata; }
58
58
  });
59
59
  Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
60
60
  enumerable: true,
61
- get: function () { return chunkJ7FOWGCH_cjs.FileMetadata_KeyValuePair; }
61
+ get: function () { return chunkR7IUNKL4_cjs.FileMetadata_KeyValuePair; }
62
62
  });
63
63
  Object.defineProperty(exports, "FileStorage", {
64
64
  enumerable: true,
65
- get: function () { return chunkJ7FOWGCH_cjs.FileStorage; }
65
+ get: function () { return chunkR7IUNKL4_cjs.FileStorage; }
66
66
  });
67
67
  Object.defineProperty(exports, "FileSystem", {
68
68
  enumerable: true,
69
- get: function () { return chunkJ7FOWGCH_cjs.FileSystem; }
69
+ get: function () { return chunkR7IUNKL4_cjs.FileSystem; }
70
70
  });
71
71
  Object.defineProperty(exports, "PowerlinesAPI", {
72
72
  enumerable: true,
73
- get: function () { return chunkJ7FOWGCH_cjs.PowerlinesAPI; }
73
+ get: function () { return chunkR7IUNKL4_cjs.PowerlinesAPI; }
74
74
  });
75
75
  Object.defineProperty(exports, "_capnpFileId", {
76
76
  enumerable: true,
77
- get: function () { return chunkJ7FOWGCH_cjs._capnpFileId; }
77
+ get: function () { return chunkR7IUNKL4_cjs._capnpFileId; }
78
78
  });
79
79
  Object.defineProperty(exports, "KNOWN_PLUGIN_FIELDS", {
80
80
  enumerable: true,
package/dist/index.js CHANGED
@@ -9,8 +9,8 @@ import './chunk-OYASPHNL.js';
9
9
  import './chunk-OD4BINRW.js';
10
10
  export { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from './chunk-KXRVVFNK.js';
11
11
  export { HOOKS_LIST_ORDERS } from './chunk-CCJQBJKQ.js';
12
- import { PowerlinesAPI } from './chunk-STSTFZT2.js';
13
- export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId } from './chunk-STSTFZT2.js';
12
+ import { PowerlinesAPI } from './chunk-3XEOJ3TS.js';
13
+ export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId } from './chunk-3XEOJ3TS.js';
14
14
  export { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS } from './chunk-PQXP7XQK.js';
15
15
  export { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from './chunk-NITQ5IYP.js';
16
16
  export { SUPPORTED_COMMANDS } from './chunk-2MYPFASJ.js';
@@ -43,4 +43,4 @@ import '@stryke/types/array';
43
43
  import '../tsconfig-Bz-CiFqD.cjs';
44
44
  import '@stryke/types/tsconfig';
45
45
  import 'typescript';
46
- import '../internal-CFBs3Fok.cjs';
46
+ import '../internal-Dt8PM9M2.cjs';
@@ -43,4 +43,4 @@ import '@stryke/types/array';
43
43
  import '../tsconfig-Bz-CiFqD.js';
44
44
  import '@stryke/types/tsconfig';
45
45
  import 'typescript';
46
- import '../internal-Dlj-vo3a.js';
46
+ import '../internal-DyXNBori.js';
@@ -1,6 +1,6 @@
1
1
  import { Loader } from '@storm-software/unbuild/types';
2
2
  import { U as UnbuildBuildConfig, C as Context, f as UnbuildResolvedBuildConfig } from '../config-D7uVz_j9.cjs';
3
- import { U as UNSAFE_PluginContext } from '../internal-CFBs3Fok.cjs';
3
+ import { U as UNSAFE_PluginContext } from '../internal-Dt8PM9M2.cjs';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
6
6
  import '@storm-software/config/types';
@@ -1,6 +1,6 @@
1
1
  import { Loader } from '@storm-software/unbuild/types';
2
2
  import { U as UnbuildBuildConfig, C as Context, f as UnbuildResolvedBuildConfig } from '../config-B7VlKFtE.js';
3
- import { U as UNSAFE_PluginContext } from '../internal-Dlj-vo3a.js';
3
+ import { U as UNSAFE_PluginContext } from '../internal-DyXNBori.js';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
6
6
  import '@storm-software/config/types';
@@ -402,6 +402,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
402
402
  * @returns A promise that resolves to a new virtual file system instance.
403
403
  */
404
404
  static async create(context) {
405
+ context.debug("Starting virtual file system (VFS) initialization processes...");
405
406
  if (!context.config.skipCache && exists.existsSync(joinPaths.joinPaths(context.dataPath, "fs.bin"))) {
406
407
  const buffer$1 = await buffer.readFileBuffer(joinPaths.joinPaths(context.dataPath, "fs.bin"));
407
408
  const message2 = new $__namespace.Message(buffer$1, false);
@@ -415,8 +416,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
415
416
  }
416
417
  const message = new $__namespace.Message();
417
418
  const result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
419
+ result.#log(types.LogLevelLabel.DEBUG, "Successfully completed virtual file system (VFS) initialization.");
418
420
  if (result.metadata) {
419
- context.entry = Object.entries(result.metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
421
+ result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.metadata).length} previously stored metadata records...`);
422
+ const entry = Object.entries(result.metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
420
423
  if (meta.properties) {
421
424
  const typeDefinition = {
422
425
  file: path
@@ -440,7 +443,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
440
443
  }
441
444
  return null;
442
445
  }).filter(Boolean);
443
- context.debug(`Loaded ${context.entry.length} entry type definitions from VFS metadata.`);
446
+ result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
447
+ context.entry = entry;
444
448
  }
445
449
  return result;
446
450
  }
@@ -472,7 +476,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
472
476
  return new Proxy(this.#metadata, {
473
477
  get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
474
478
  return target[this.#normalizeId(prop)];
475
- }, "get")
479
+ }, "get"),
480
+ set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
481
+ target[this.#normalizeId(prop)] = value;
482
+ return true;
483
+ }, "set"),
484
+ deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
485
+ delete target[this.#normalizeId(prop)];
486
+ return true;
487
+ }, "deleteProperty"),
488
+ has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
489
+ return this.#normalizeId(prop) in target;
490
+ }, "has")
476
491
  });
477
492
  }
478
493
  /**
@@ -482,7 +497,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
482
497
  return new Proxy(this.#paths, {
483
498
  get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
484
499
  return target[this.#normalizePath(prop)];
485
- }, "get")
500
+ }, "get"),
501
+ set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
502
+ target[this.#normalizePath(prop)] = value;
503
+ return true;
504
+ }, "set"),
505
+ deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
506
+ delete target[this.#normalizePath(prop)];
507
+ return true;
508
+ }, "deleteProperty"),
509
+ has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
510
+ return this.#normalizePath(prop) in target;
511
+ }, "has")
486
512
  });
487
513
  }
488
514
  /**
@@ -492,7 +518,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
492
518
  return new Proxy(this.#paths, {
493
519
  get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
494
520
  return target[this.#normalizeId(prop)];
495
- }, "get")
521
+ }, "get"),
522
+ set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
523
+ target[this.#normalizeId(prop)] = value;
524
+ return true;
525
+ }, "set"),
526
+ deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
527
+ delete target[this.#normalizeId(prop)];
528
+ return true;
529
+ }, "deleteProperty"),
530
+ has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
531
+ return this.#normalizeId(prop) in target;
532
+ }, "has")
496
533
  });
497
534
  }
498
535
  /**
@@ -941,6 +978,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
941
978
  this.#metadata[id] = {
942
979
  type: "normal",
943
980
  timestamp: Date.now(),
981
+ ...this.#metadata[id] ?? {},
944
982
  ...meta
945
983
  };
946
984
  this.#paths[id] = this.#normalizePath(relativeKey);
@@ -962,6 +1000,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
962
1000
  this.#metadata[id] = {
963
1001
  type: "normal",
964
1002
  timestamp: Date.now(),
1003
+ ...this.#metadata[id] ?? {},
965
1004
  ...meta
966
1005
  };
967
1006
  this.#paths[id] = this.#normalizePath(relativeKey);
@@ -1186,22 +1225,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
1186
1225
  await this.remove(joinPaths.joinPaths(this.#context.dataPath, "fs.bin"));
1187
1226
  const message = new $__namespace.Message();
1188
1227
  const fs = message.initRoot(FileSystem);
1189
- const paths = await this.list();
1190
- const storage = fs._initStorage(paths.length);
1191
- await Promise.all(paths.map(async (path, index) => {
1228
+ const storage = fs._initStorage(Object.keys(this.#paths).length);
1229
+ await Promise.all(Object.values(this.#paths).map(async (path, index) => {
1192
1230
  const code = await this.read(path);
1193
1231
  const fd = storage.get(index);
1194
1232
  fd.path = path;
1195
1233
  fd.code = code || "";
1196
1234
  }));
1197
- const ids = fs._initIds(Object.keys(this.ids).length);
1198
- Object.entries(this.ids).filter(([, path]) => path).forEach(([id, path], index) => {
1235
+ const ids = fs._initIds(Object.keys(this.#ids).length);
1236
+ Object.entries(this.#ids).filter(([, path]) => path).forEach(([id, path], index) => {
1199
1237
  const fileId = ids.get(index);
1200
1238
  fileId.id = id;
1201
1239
  fileId.path = path;
1202
1240
  });
1203
- const metadata = fs._initMetadata(Object.keys(this.metadata).length);
1204
- Object.entries(this.metadata).filter(([, value]) => value).forEach(([id, value], index) => {
1241
+ const metadata = fs._initMetadata(Object.keys(this.#metadata).length);
1242
+ Object.entries(this.#metadata).filter(([, value]) => value).forEach(([id, value], index) => {
1205
1243
  const fileMetadata = metadata.get(index);
1206
1244
  fileMetadata.id = id;
1207
1245
  fileMetadata.type = value.type;
@@ -1252,5 +1290,5 @@ var VirtualFileSystem = class _VirtualFileSystem {
1252
1290
  };
1253
1291
 
1254
1292
  exports.VirtualFileSystem = VirtualFileSystem;
1255
- //# sourceMappingURL=chunk-C6CJM3EI.cjs.map
1256
- //# sourceMappingURL=chunk-C6CJM3EI.cjs.map
1293
+ //# sourceMappingURL=chunk-5WSRLNW3.cjs.map
1294
+ //# sourceMappingURL=chunk-5WSRLNW3.cjs.map