powerlines 0.37.26 → 0.37.28

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 (87) 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-4KTNNA5D.cjs +12 -0
  6. package/dist/{chunk-QJ3CMPPJ.js → chunk-CRIGFGWB.js} +3 -3
  7. package/dist/{chunk-3NXWMXOZ.cjs → chunk-DZP66IJA.cjs} +30 -28
  8. package/dist/{chunk-N2YHQVMW.js → chunk-GSVAZFVI.js} +3 -3
  9. package/dist/chunk-IC7FKHSQ.cjs +12 -0
  10. package/dist/{chunk-MWHTNQVC.cjs → chunk-IG4525PW.cjs} +4 -4
  11. package/dist/{chunk-BWZ6XSL7.js → chunk-ITJIBCTV.js} +3 -3
  12. package/dist/{chunk-6E6WTAVH.js → chunk-QQVX5M5T.js} +3 -3
  13. package/dist/{chunk-A6V5BGQY.js → chunk-RF2JJTY5.js} +3 -3
  14. package/dist/{chunk-AFQL3PY3.js → chunk-RHCSG474.js} +30 -28
  15. package/dist/{chunk-NCS7P6Z6.cjs → chunk-VS527VFM.cjs} +4 -4
  16. package/dist/{chunk-6ZRFRVBT.cjs → chunk-ZN3S5QJO.cjs} +5 -5
  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/{chunk-5WMECB6D.js → chunk-2SM7UCAY.js} +4 -4
  24. package/dist/lib/{chunk-5WMECB6D.js.map → chunk-2SM7UCAY.js.map} +1 -1
  25. package/dist/lib/{chunk-LENVCNR2.cjs → chunk-5RLNKSYH.cjs} +5 -5
  26. package/dist/lib/{chunk-LENVCNR2.cjs.map → chunk-5RLNKSYH.cjs.map} +1 -1
  27. package/dist/lib/{chunk-EHK6LKBR.js → chunk-6UR7IC2X.js} +30 -28
  28. package/dist/lib/chunk-6UR7IC2X.js.map +1 -0
  29. package/dist/lib/{chunk-YR7H6YZZ.cjs → chunk-7KET3OLG.cjs} +16 -16
  30. package/dist/lib/{chunk-YR7H6YZZ.cjs.map → chunk-7KET3OLG.cjs.map} +1 -1
  31. package/dist/lib/{chunk-2PXKVOOG.cjs → chunk-GJDIXV7E.cjs} +19 -19
  32. package/dist/lib/{chunk-2PXKVOOG.cjs.map → chunk-GJDIXV7E.cjs.map} +1 -1
  33. package/dist/lib/{chunk-47XLO7EU.cjs → chunk-JZMHMWDE.cjs} +6 -6
  34. package/dist/lib/{chunk-47XLO7EU.cjs.map → chunk-JZMHMWDE.cjs.map} +1 -1
  35. package/dist/lib/{chunk-3L7QXHBF.cjs → chunk-LGKO3XJH.cjs} +30 -28
  36. package/dist/lib/chunk-LGKO3XJH.cjs.map +1 -0
  37. package/dist/lib/{chunk-2KN6LNJA.js → chunk-NNZBDAIE.js} +3 -3
  38. package/dist/lib/{chunk-2KN6LNJA.js.map → chunk-NNZBDAIE.js.map} +1 -1
  39. package/dist/lib/{chunk-F7TAZWC7.js → chunk-QY5NHTSO.js} +3 -3
  40. package/dist/lib/{chunk-F7TAZWC7.js.map → chunk-QY5NHTSO.js.map} +1 -1
  41. package/dist/lib/{chunk-4EEKHN44.js → chunk-S4AGK7G4.js} +4 -4
  42. package/dist/lib/{chunk-4EEKHN44.js.map → chunk-S4AGK7G4.js.map} +1 -1
  43. package/dist/lib/contexts/api-context.cjs +5 -5
  44. package/dist/lib/contexts/api-context.js +4 -4
  45. package/dist/lib/contexts/context.cjs +3 -3
  46. package/dist/lib/contexts/context.js +2 -2
  47. package/dist/lib/contexts/environment-context.cjs +4 -4
  48. package/dist/lib/contexts/environment-context.js +3 -3
  49. package/dist/lib/contexts/index.cjs +7 -7
  50. package/dist/lib/contexts/index.js +4 -4
  51. package/dist/lib/fs/index.cjs +2 -2
  52. package/dist/lib/fs/index.js +1 -1
  53. package/dist/lib/fs/vfs.cjs +2 -2
  54. package/dist/lib/fs/vfs.js +1 -1
  55. package/dist/lib/index.cjs +10 -10
  56. package/dist/lib/index.js +5 -5
  57. package/dist/lib/unplugin/factory.cjs +6 -6
  58. package/dist/lib/unplugin/factory.js +5 -5
  59. package/dist/lib/unplugin/index.cjs +6 -6
  60. package/dist/lib/unplugin/index.js +5 -5
  61. package/dist/next.cjs +4 -4
  62. package/dist/next.js +3 -3
  63. package/dist/nuxt.cjs +7 -7
  64. package/dist/nuxt.js +5 -5
  65. package/dist/rolldown.cjs +6 -6
  66. package/dist/rolldown.js +3 -3
  67. package/dist/rollup.cjs +3 -3
  68. package/dist/rollup.js +2 -2
  69. package/dist/rspack.cjs +3 -3
  70. package/dist/rspack.js +2 -2
  71. package/dist/tsdown.cjs +4 -4
  72. package/dist/tsdown.js +3 -3
  73. package/dist/tsup.cjs +4 -4
  74. package/dist/tsup.js +3 -3
  75. package/dist/unloader.cjs +3 -3
  76. package/dist/unloader.js +2 -2
  77. package/dist/unplugin.cjs +8 -8
  78. package/dist/unplugin.js +4 -4
  79. package/dist/vite.cjs +6 -6
  80. package/dist/vite.js +3 -3
  81. package/dist/webpack.cjs +6 -6
  82. package/dist/webpack.js +3 -3
  83. package/package.json +2 -2
  84. package/dist/chunk-M7NM24T5.cjs +0 -12
  85. package/dist/chunk-XGBSXPOD.cjs +0 -12
  86. package/dist/lib/chunk-3L7QXHBF.cjs.map +0 -1
  87. package/dist/lib/chunk-EHK6LKBR.js.map +0 -1
package/dist/api.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3NXWMXOZ_cjs = require('./chunk-3NXWMXOZ.cjs');
3
+ var chunkDZP66IJA_cjs = require('./chunk-DZP66IJA.cjs');
4
4
  require('./chunk-B6DVCLP5.cjs');
5
5
  require('./chunk-V5WOGN7O.cjs');
6
6
  require('./chunk-Z6ARQDHR.cjs');
@@ -10,7 +10,7 @@ require('./chunk-PK6SKIKE.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "PowerlinesAPI", {
12
12
  enumerable: true,
13
- get: function () { return chunk3NXWMXOZ_cjs.PowerlinesAPI; }
13
+ get: function () { return chunkDZP66IJA_cjs.PowerlinesAPI; }
14
14
  });
15
15
  //# sourceMappingURL=api.cjs.map
16
16
  //# sourceMappingURL=api.cjs.map
package/dist/api.js CHANGED
@@ -1,4 +1,4 @@
1
- export { PowerlinesAPI } from './chunk-AFQL3PY3.js';
1
+ export { PowerlinesAPI } from './chunk-RHCSG474.js';
2
2
  import './chunk-PQXP7XQK.js';
3
3
  import './chunk-NITQ5IYP.js';
4
4
  import './chunk-2MYPFASJ.js';
package/dist/astro.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkMWHTNQVC_cjs = require('./chunk-MWHTNQVC.cjs');
5
+ var chunkIG4525PW_cjs = require('./chunk-IG4525PW.cjs');
6
6
  require('./chunk-SE3RCXWI.cjs');
7
- require('./chunk-6ZRFRVBT.cjs');
8
- require('./chunk-3NXWMXOZ.cjs');
7
+ require('./chunk-ZN3S5QJO.cjs');
8
+ require('./chunk-DZP66IJA.cjs');
9
9
  require('./chunk-B6DVCLP5.cjs');
10
10
  require('./chunk-V5WOGN7O.cjs');
11
11
  require('./chunk-Z6ARQDHR.cjs');
@@ -15,7 +15,7 @@ var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
15
15
  var astro = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((config) => ({
16
16
  vite: {
17
17
  plugins: [
18
- chunkMWHTNQVC_cjs.vite_default(config)
18
+ chunkIG4525PW_cjs.vite_default(config)
19
19
  ]
20
20
  }
21
21
  }), "astro");
package/dist/astro.js CHANGED
@@ -1,7 +1,7 @@
1
- import { vite_default } from './chunk-6E6WTAVH.js';
1
+ import { vite_default } from './chunk-QQVX5M5T.js';
2
2
  import './chunk-BGBDDKML.js';
3
- import './chunk-N2YHQVMW.js';
4
- import './chunk-AFQL3PY3.js';
3
+ import './chunk-GSVAZFVI.js';
4
+ import './chunk-RHCSG474.js';
5
5
  import './chunk-PQXP7XQK.js';
6
6
  import './chunk-NITQ5IYP.js';
7
7
  import './chunk-2MYPFASJ.js';
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkZN3S5QJO_cjs = require('./chunk-ZN3S5QJO.cjs');
4
+ var unplugin = require('unplugin');
5
+
6
+ var webpack = unplugin.createWebpackPlugin(chunkZN3S5QJO_cjs.createUnpluginFactory("webpack"));
7
+ var webpack_default = webpack;
8
+
9
+ exports.webpack = webpack;
10
+ exports.webpack_default = webpack_default;
11
+ //# sourceMappingURL=chunk-4KTNNA5D.cjs.map
12
+ //# sourceMappingURL=chunk-4KTNNA5D.cjs.map
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-N2YHQVMW.js';
1
+ import { createUnpluginFactory } from './chunk-GSVAZFVI.js';
2
2
  import { createWebpackPlugin } from 'unplugin';
3
3
 
4
4
  var webpack = createWebpackPlugin(createUnpluginFactory("webpack"));
5
5
  var webpack_default = webpack;
6
6
 
7
7
  export { webpack, webpack_default };
8
- //# sourceMappingURL=chunk-QJ3CMPPJ.js.map
9
- //# sourceMappingURL=chunk-QJ3CMPPJ.js.map
8
+ //# sourceMappingURL=chunk-CRIGFGWB.js.map
9
+ //# sourceMappingURL=chunk-CRIGFGWB.js.map
@@ -1743,11 +1743,11 @@ var VirtualFileSystem = class _VirtualFileSystem {
1743
1743
  */
1744
1744
  #metadata;
1745
1745
  /**
1746
- * A map of virtual file IDs to their underlying file paths.
1746
+ * A map of underlying file paths to their virtual file IDs.
1747
1747
  */
1748
1748
  #ids;
1749
1749
  /**
1750
- * A map of underlying file paths to their virtual file IDs.
1750
+ * A map of virtual file IDs to their underlying file paths.
1751
1751
  */
1752
1752
  #paths;
1753
1753
  /**
@@ -1868,20 +1868,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
1868
1868
  const buffer$1 = await buffer.readFileBuffer(joinPaths.joinPaths(context.dataPath, "fs.bin"));
1869
1869
  const message = new $__namespace.Message(buffer$1, false);
1870
1870
  const fs = message.getRoot(FileSystem);
1871
- const result2 = new _VirtualFileSystem(context, fs);
1871
+ result = new _VirtualFileSystem(context, fs);
1872
1872
  if (fs._hasStorage() && fs.storage.length > 0) {
1873
1873
  await Promise.all(fs.storage.values().map(async (file) => {
1874
1874
  if (file.path && file.code) {
1875
+ let id;
1875
1876
  if (fs._hasIds()) {
1876
- fs.ids.find((fileId) => fileId.path === file.path);
1877
+ id = fs.ids.find((fileId) => fileId.path === file.path);
1877
1878
  }
1878
1879
  let metadata;
1879
1880
  if (fs._hasMetadata()) {
1880
- metadata = fs.metadata.find((meta) => meta.id === (file.path));
1881
+ metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
1881
1882
  }
1882
- await result2.write(file.path, file.code, {
1883
+ await result.write(file.path, file.code, {
1883
1884
  meta: {
1884
- id: metadata?.id,
1885
+ id: id?.id || metadata?.id,
1885
1886
  type: metadata?.type,
1886
1887
  properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
1887
1888
  ret[kvp.key] = kvp.value;
@@ -1893,9 +1894,9 @@ var VirtualFileSystem = class _VirtualFileSystem {
1893
1894
  }
1894
1895
  }));
1895
1896
  }
1896
- if (result2.#metadata && Object.keys(result2.#metadata).length > 0) {
1897
- result2.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result2.#metadata).length} previously stored metadata records...`);
1898
- const entry = Object.entries(result2.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1897
+ if (result.#metadata && Object.keys(result.#metadata).length > 0) {
1898
+ result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
1899
+ const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1899
1900
  if (meta.properties) {
1900
1901
  const typeDefinition = {
1901
1902
  file: path
@@ -1919,10 +1920,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
1919
1920
  }
1920
1921
  return null;
1921
1922
  }).filter(Boolean);
1922
- result2.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1923
+ result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1923
1924
  context.entry = entry;
1924
1925
  } else {
1925
- result2.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1926
+ result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1926
1927
  }
1927
1928
  } else {
1928
1929
  const message = new $__namespace.Message();
@@ -1944,20 +1945,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
1944
1945
  const buffer$1 = buffer.readFileBufferSync(joinPaths.joinPaths(context.dataPath, "fs.bin"));
1945
1946
  const message = new $__namespace.Message(buffer$1, false);
1946
1947
  const fs = message.getRoot(FileSystem);
1947
- const result2 = new _VirtualFileSystem(context, fs);
1948
+ result = new _VirtualFileSystem(context, fs);
1948
1949
  if (fs._hasStorage() && fs.storage.length > 0) {
1949
1950
  fs.storage.values().forEach((file) => {
1950
1951
  if (file.path && file.code) {
1952
+ let id;
1951
1953
  if (fs._hasIds()) {
1952
- fs.ids.find((fileId) => fileId.path === file.path);
1954
+ id = fs.ids.find((fileId) => fileId.path === file.path);
1953
1955
  }
1954
1956
  let metadata;
1955
1957
  if (fs._hasMetadata()) {
1956
- metadata = fs.metadata.find((meta) => meta.id === (file.path));
1958
+ metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
1957
1959
  }
1958
- result2.writeSync(file.path, file.code, {
1960
+ result.writeSync(file.path, file.code, {
1959
1961
  meta: {
1960
- id: metadata?.id,
1962
+ id: id?.id || metadata?.id,
1961
1963
  type: metadata?.type,
1962
1964
  properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
1963
1965
  ret[kvp.key] = kvp.value;
@@ -1969,9 +1971,9 @@ var VirtualFileSystem = class _VirtualFileSystem {
1969
1971
  }
1970
1972
  });
1971
1973
  }
1972
- if (result2.#metadata && Object.keys(result2.#metadata).length > 0) {
1973
- result2.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result2.#metadata).length} previously stored metadata records...`);
1974
- const entry = Object.entries(result2.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1974
+ if (result.#metadata && Object.keys(result.#metadata).length > 0) {
1975
+ result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
1976
+ const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1975
1977
  if (meta.properties) {
1976
1978
  const typeDefinition = {
1977
1979
  file: path
@@ -1995,10 +1997,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
1995
1997
  }
1996
1998
  return null;
1997
1999
  }).filter(Boolean);
1998
- result2.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
2000
+ result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1999
2001
  context.entry = entry;
2000
2002
  } else {
2001
- result2.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
2003
+ result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
2002
2004
  }
2003
2005
  } else {
2004
2006
  const message = new $__namespace.Message();
@@ -2035,7 +2037,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2035
2037
  * A map of file paths to their module ids.
2036
2038
  */
2037
2039
  get ids() {
2038
- return new Proxy(this.#paths, {
2040
+ return new Proxy(this.#ids, {
2039
2041
  get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
2040
2042
  return target[this.#normalizePath(prop)];
2041
2043
  }, "get"),
@@ -2527,7 +2529,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2527
2529
  code = data;
2528
2530
  }
2529
2531
  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)})`);
2530
- const id = meta.id || this.#normalizeId(relativeKey);
2532
+ const id = this.#normalizeId(meta.id || relativeKey);
2531
2533
  this.#metadata[id] = {
2532
2534
  type: "normal",
2533
2535
  timestamp: Date.now(),
@@ -2549,7 +2551,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2549
2551
  const meta = options.meta ?? {};
2550
2552
  const { relativeKey, adapter } = this.#getStorage(options.storage || path);
2551
2553
  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)})`);
2552
- const id = meta.id || this.#normalizeId(relativeKey);
2554
+ const id = this.#normalizeId(meta.id || relativeKey);
2553
2555
  this.#metadata[id] = {
2554
2556
  type: "normal",
2555
2557
  timestamp: Date.now(),
@@ -2786,7 +2788,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2786
2788
  fd.code = code || "";
2787
2789
  }));
2788
2790
  const ids = fs._initIds(Object.keys(this.#ids).length);
2789
- Object.entries(this.#ids).filter(([, path]) => path).forEach(([id, path], index) => {
2791
+ Object.entries(this.#ids).filter(([, id]) => id).forEach(([path, id], index) => {
2790
2792
  const fileId = ids.get(index);
2791
2793
  fileId.id = id;
2792
2794
  fileId.path = path;
@@ -5113,5 +5115,5 @@ exports.combineContexts = combineContexts;
5113
5115
  exports.createLog = createLog;
5114
5116
  exports.extendLog = extendLog;
5115
5117
  exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
5116
- //# sourceMappingURL=chunk-3NXWMXOZ.cjs.map
5117
- //# sourceMappingURL=chunk-3NXWMXOZ.cjs.map
5118
+ //# sourceMappingURL=chunk-DZP66IJA.cjs.map
5119
+ //# sourceMappingURL=chunk-DZP66IJA.cjs.map
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-AFQL3PY3.js';
1
+ import { createLog, PowerlinesAPI } from './chunk-RHCSG474.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-N2YHQVMW.js.map
138
- //# sourceMappingURL=chunk-N2YHQVMW.js.map
137
+ //# sourceMappingURL=chunk-GSVAZFVI.js.map
138
+ //# sourceMappingURL=chunk-GSVAZFVI.js.map
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkZN3S5QJO_cjs = require('./chunk-ZN3S5QJO.cjs');
4
+ var unplugin = require('unplugin');
5
+
6
+ var rolldown = unplugin.createRolldownPlugin(chunkZN3S5QJO_cjs.createUnpluginFactory("rolldown"));
7
+ var rolldown_default = rolldown;
8
+
9
+ exports.rolldown = rolldown;
10
+ exports.rolldown_default = rolldown_default;
11
+ //# sourceMappingURL=chunk-IC7FKHSQ.cjs.map
12
+ //# sourceMappingURL=chunk-IC7FKHSQ.cjs.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkSE3RCXWI_cjs = require('./chunk-SE3RCXWI.cjs');
4
- var chunk6ZRFRVBT_cjs = require('./chunk-6ZRFRVBT.cjs');
4
+ var chunkZN3S5QJO_cjs = require('./chunk-ZN3S5QJO.cjs');
5
5
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
6
6
  var environmentChecks = require('@stryke/env/environment-checks');
7
7
  var defu = require('defu');
@@ -97,7 +97,7 @@ function extractViteConfig(context) {
97
97
  chunkPK6SKIKE_cjs.__name(extractViteConfig, "extractViteConfig");
98
98
 
99
99
  // src/vite.ts
100
- var vite = unplugin.createVitePlugin(chunk6ZRFRVBT_cjs.createUnpluginFactory("vite", (api, plugin) => {
100
+ var vite = unplugin.createVitePlugin(chunkZN3S5QJO_cjs.createUnpluginFactory("vite", (api, plugin) => {
101
101
  return {
102
102
  ...plugin,
103
103
  vite: {
@@ -158,5 +158,5 @@ var vite_default = vite;
158
158
 
159
159
  exports.vite = vite;
160
160
  exports.vite_default = vite_default;
161
- //# sourceMappingURL=chunk-MWHTNQVC.cjs.map
162
- //# sourceMappingURL=chunk-MWHTNQVC.cjs.map
161
+ //# sourceMappingURL=chunk-IG4525PW.cjs.map
162
+ //# sourceMappingURL=chunk-IG4525PW.cjs.map
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-N2YHQVMW.js';
1
+ import { createUnpluginFactory } from './chunk-GSVAZFVI.js';
2
2
  import { createRolldownPlugin } from 'unplugin';
3
3
 
4
4
  var rolldown = createRolldownPlugin(createUnpluginFactory("rolldown"));
5
5
  var rolldown_default = rolldown;
6
6
 
7
7
  export { rolldown, rolldown_default };
8
- //# sourceMappingURL=chunk-BWZ6XSL7.js.map
9
- //# sourceMappingURL=chunk-BWZ6XSL7.js.map
8
+ //# sourceMappingURL=chunk-ITJIBCTV.js.map
9
+ //# sourceMappingURL=chunk-ITJIBCTV.js.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-BGBDDKML.js';
2
- import { createUnpluginFactory } from './chunk-N2YHQVMW.js';
2
+ import { createUnpluginFactory } from './chunk-GSVAZFVI.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-6E6WTAVH.js.map
155
- //# sourceMappingURL=chunk-6E6WTAVH.js.map
154
+ //# sourceMappingURL=chunk-QQVX5M5T.js.map
155
+ //# sourceMappingURL=chunk-QQVX5M5T.js.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-BGBDDKML.js';
2
- import { createUnpluginFactory } from './chunk-N2YHQVMW.js';
2
+ import { createUnpluginFactory } from './chunk-GSVAZFVI.js';
3
3
  import { __name } from './chunk-7QVYU63E.js';
4
4
  import { isUndefined } from '@stryke/type-checks/is-undefined';
5
5
  import { createEsbuildPlugin } from 'unplugin';
@@ -29,5 +29,5 @@ var esbuild = createEsbuildPlugin(createUnpluginFactory("esbuild", (api, plugin)
29
29
  var esbuild_default = esbuild;
30
30
 
31
31
  export { esbuild, esbuild_default };
32
- //# sourceMappingURL=chunk-A6V5BGQY.js.map
33
- //# sourceMappingURL=chunk-A6V5BGQY.js.map
32
+ //# sourceMappingURL=chunk-RF2JJTY5.js.map
33
+ //# sourceMappingURL=chunk-RF2JJTY5.js.map
@@ -1714,11 +1714,11 @@ var VirtualFileSystem = class _VirtualFileSystem {
1714
1714
  */
1715
1715
  #metadata;
1716
1716
  /**
1717
- * A map of virtual file IDs to their underlying file paths.
1717
+ * A map of underlying file paths to their virtual file IDs.
1718
1718
  */
1719
1719
  #ids;
1720
1720
  /**
1721
- * A map of underlying file paths to their virtual file IDs.
1721
+ * A map of virtual file IDs to their underlying file paths.
1722
1722
  */
1723
1723
  #paths;
1724
1724
  /**
@@ -1839,20 +1839,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
1839
1839
  const buffer = await readFileBuffer(joinPaths$1(context.dataPath, "fs.bin"));
1840
1840
  const message = new $.Message(buffer, false);
1841
1841
  const fs = message.getRoot(FileSystem);
1842
- const result2 = new _VirtualFileSystem(context, fs);
1842
+ result = new _VirtualFileSystem(context, fs);
1843
1843
  if (fs._hasStorage() && fs.storage.length > 0) {
1844
1844
  await Promise.all(fs.storage.values().map(async (file) => {
1845
1845
  if (file.path && file.code) {
1846
+ let id;
1846
1847
  if (fs._hasIds()) {
1847
- fs.ids.find((fileId) => fileId.path === file.path);
1848
+ id = fs.ids.find((fileId) => fileId.path === file.path);
1848
1849
  }
1849
1850
  let metadata;
1850
1851
  if (fs._hasMetadata()) {
1851
- metadata = fs.metadata.find((meta) => meta.id === (file.path));
1852
+ metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
1852
1853
  }
1853
- await result2.write(file.path, file.code, {
1854
+ await result.write(file.path, file.code, {
1854
1855
  meta: {
1855
- id: metadata?.id,
1856
+ id: id?.id || metadata?.id,
1856
1857
  type: metadata?.type,
1857
1858
  properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
1858
1859
  ret[kvp.key] = kvp.value;
@@ -1864,9 +1865,9 @@ var VirtualFileSystem = class _VirtualFileSystem {
1864
1865
  }
1865
1866
  }));
1866
1867
  }
1867
- if (result2.#metadata && Object.keys(result2.#metadata).length > 0) {
1868
- result2.#log(LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result2.#metadata).length} previously stored metadata records...`);
1869
- const entry = Object.entries(result2.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1868
+ if (result.#metadata && Object.keys(result.#metadata).length > 0) {
1869
+ result.#log(LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
1870
+ const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1870
1871
  if (meta.properties) {
1871
1872
  const typeDefinition = {
1872
1873
  file: path
@@ -1890,10 +1891,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
1890
1891
  }
1891
1892
  return null;
1892
1893
  }).filter(Boolean);
1893
- result2.#log(LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1894
+ result.#log(LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1894
1895
  context.entry = entry;
1895
1896
  } else {
1896
- result2.#log(LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1897
+ result.#log(LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1897
1898
  }
1898
1899
  } else {
1899
1900
  const message = new $.Message();
@@ -1915,20 +1916,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
1915
1916
  const buffer = readFileBufferSync(joinPaths$1(context.dataPath, "fs.bin"));
1916
1917
  const message = new $.Message(buffer, false);
1917
1918
  const fs = message.getRoot(FileSystem);
1918
- const result2 = new _VirtualFileSystem(context, fs);
1919
+ result = new _VirtualFileSystem(context, fs);
1919
1920
  if (fs._hasStorage() && fs.storage.length > 0) {
1920
1921
  fs.storage.values().forEach((file) => {
1921
1922
  if (file.path && file.code) {
1923
+ let id;
1922
1924
  if (fs._hasIds()) {
1923
- fs.ids.find((fileId) => fileId.path === file.path);
1925
+ id = fs.ids.find((fileId) => fileId.path === file.path);
1924
1926
  }
1925
1927
  let metadata;
1926
1928
  if (fs._hasMetadata()) {
1927
- metadata = fs.metadata.find((meta) => meta.id === (file.path));
1929
+ metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
1928
1930
  }
1929
- result2.writeSync(file.path, file.code, {
1931
+ result.writeSync(file.path, file.code, {
1930
1932
  meta: {
1931
- id: metadata?.id,
1933
+ id: id?.id || metadata?.id,
1932
1934
  type: metadata?.type,
1933
1935
  properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
1934
1936
  ret[kvp.key] = kvp.value;
@@ -1940,9 +1942,9 @@ var VirtualFileSystem = class _VirtualFileSystem {
1940
1942
  }
1941
1943
  });
1942
1944
  }
1943
- if (result2.#metadata && Object.keys(result2.#metadata).length > 0) {
1944
- result2.#log(LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result2.#metadata).length} previously stored metadata records...`);
1945
- const entry = Object.entries(result2.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1945
+ if (result.#metadata && Object.keys(result.#metadata).length > 0) {
1946
+ result.#log(LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
1947
+ const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1946
1948
  if (meta.properties) {
1947
1949
  const typeDefinition = {
1948
1950
  file: path
@@ -1966,10 +1968,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
1966
1968
  }
1967
1969
  return null;
1968
1970
  }).filter(Boolean);
1969
- result2.#log(LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1971
+ result.#log(LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1970
1972
  context.entry = entry;
1971
1973
  } else {
1972
- result2.#log(LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1974
+ result.#log(LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1973
1975
  }
1974
1976
  } else {
1975
1977
  const message = new $.Message();
@@ -2006,7 +2008,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2006
2008
  * A map of file paths to their module ids.
2007
2009
  */
2008
2010
  get ids() {
2009
- return new Proxy(this.#paths, {
2011
+ return new Proxy(this.#ids, {
2010
2012
  get: /* @__PURE__ */ __name((target, prop) => {
2011
2013
  return target[this.#normalizePath(prop)];
2012
2014
  }, "get"),
@@ -2498,7 +2500,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2498
2500
  code = data;
2499
2501
  }
2500
2502
  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)})`);
2501
- const id = meta.id || this.#normalizeId(relativeKey);
2503
+ const id = this.#normalizeId(meta.id || relativeKey);
2502
2504
  this.#metadata[id] = {
2503
2505
  type: "normal",
2504
2506
  timestamp: Date.now(),
@@ -2520,7 +2522,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2520
2522
  const meta = options.meta ?? {};
2521
2523
  const { relativeKey, adapter } = this.#getStorage(options.storage || path);
2522
2524
  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)})`);
2523
- const id = meta.id || this.#normalizeId(relativeKey);
2525
+ const id = this.#normalizeId(meta.id || relativeKey);
2524
2526
  this.#metadata[id] = {
2525
2527
  type: "normal",
2526
2528
  timestamp: Date.now(),
@@ -2757,7 +2759,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
2757
2759
  fd.code = code || "";
2758
2760
  }));
2759
2761
  const ids = fs._initIds(Object.keys(this.#ids).length);
2760
- Object.entries(this.#ids).filter(([, path]) => path).forEach(([id, path], index) => {
2762
+ Object.entries(this.#ids).filter(([, id]) => id).forEach(([path, id], index) => {
2761
2763
  const fileId = ids.get(index);
2762
2764
  fileId.id = id;
2763
2765
  fileId.path = path;
@@ -5074,5 +5076,5 @@ Note: Please ensure the plugin package's default export is a class that extends
5074
5076
  };
5075
5077
 
5076
5078
  export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId, combineContexts, createLog, extendLog, isUnpluginBuilderVariant };
5077
- //# sourceMappingURL=chunk-AFQL3PY3.js.map
5078
- //# sourceMappingURL=chunk-AFQL3PY3.js.map
5079
+ //# sourceMappingURL=chunk-RHCSG474.js.map
5080
+ //# sourceMappingURL=chunk-RHCSG474.js.map
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkSE3RCXWI_cjs = require('./chunk-SE3RCXWI.cjs');
4
- var chunk6ZRFRVBT_cjs = require('./chunk-6ZRFRVBT.cjs');
4
+ var chunkZN3S5QJO_cjs = require('./chunk-ZN3S5QJO.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(chunk6ZRFRVBT_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
9
+ var esbuild = unplugin.createEsbuildPlugin(chunkZN3S5QJO_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-NCS7P6Z6.cjs.map
36
- //# sourceMappingURL=chunk-NCS7P6Z6.cjs.map
35
+ //# sourceMappingURL=chunk-VS527VFM.cjs.map
36
+ //# sourceMappingURL=chunk-VS527VFM.cjs.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3NXWMXOZ_cjs = require('./chunk-3NXWMXOZ.cjs');
3
+ var chunkDZP66IJA_cjs = require('./chunk-DZP66IJA.cjs');
4
4
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
5
5
  var types = require('@storm-software/config-tools/types');
6
6
  var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
@@ -27,7 +27,7 @@ chunkPK6SKIKE_cjs.__name(getString, "getString");
27
27
  // src/lib/unplugin/factory.ts
28
28
  function createUnpluginFactory(variant, decorate) {
29
29
  return (config, meta) => {
30
- const log = chunk3NXWMXOZ_cjs.createLog("unplugin", config);
30
+ const log = chunkDZP66IJA_cjs.createLog("unplugin", config);
31
31
  log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
32
32
  try {
33
33
  const userConfig = {
@@ -38,7 +38,7 @@ function createUnpluginFactory(variant, decorate) {
38
38
  let api;
39
39
  async function buildStart() {
40
40
  log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
41
- api = await chunk3NXWMXOZ_cjs.PowerlinesAPI.from(getWorkspaceRoot.getWorkspaceRoot(process.cwd()), userConfig);
41
+ api = await chunkDZP66IJA_cjs.PowerlinesAPI.from(getWorkspaceRoot.getWorkspaceRoot(process.cwd()), userConfig);
42
42
  unplugin.setParseImpl(api.context.parse);
43
43
  log(types.LogLevelLabel.DEBUG, "Preparing build artifacts for the Powerlines project...");
44
44
  await api.prepare({
@@ -137,5 +137,5 @@ chunkPK6SKIKE_cjs.__name(createUnpluginFactory, "createUnpluginFactory");
137
137
 
138
138
  exports.createUnpluginFactory = createUnpluginFactory;
139
139
  exports.getString = getString;
140
- //# sourceMappingURL=chunk-6ZRFRVBT.cjs.map
141
- //# sourceMappingURL=chunk-6ZRFRVBT.cjs.map
140
+ //# sourceMappingURL=chunk-ZN3S5QJO.cjs.map
141
+ //# sourceMappingURL=chunk-ZN3S5QJO.cjs.map
package/dist/esbuild.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkNCS7P6Z6_cjs = require('./chunk-NCS7P6Z6.cjs');
5
+ var chunkVS527VFM_cjs = require('./chunk-VS527VFM.cjs');
6
6
  require('./chunk-SE3RCXWI.cjs');
7
- require('./chunk-6ZRFRVBT.cjs');
8
- require('./chunk-3NXWMXOZ.cjs');
7
+ require('./chunk-ZN3S5QJO.cjs');
8
+ require('./chunk-DZP66IJA.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 chunkNCS7P6Z6_cjs.esbuild_default; }
18
+ get: function () { return chunkVS527VFM_cjs.esbuild_default; }
19
19
  });
20
20
  Object.defineProperty(exports, "esbuild", {
21
21
  enumerable: true,
22
- get: function () { return chunkNCS7P6Z6_cjs.esbuild; }
22
+ get: function () { return chunkVS527VFM_cjs.esbuild; }
23
23
  });
24
24
  Object.defineProperty(exports, "module.exports", {
25
25
  enumerable: true,
26
- get: function () { return chunkNCS7P6Z6_cjs.esbuild; }
26
+ get: function () { return chunkVS527VFM_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-A6V5BGQY.js';
1
+ export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-RF2JJTY5.js';
2
2
  import './chunk-BGBDDKML.js';
3
- import './chunk-N2YHQVMW.js';
4
- import './chunk-AFQL3PY3.js';
3
+ import './chunk-GSVAZFVI.js';
4
+ import './chunk-RHCSG474.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 chunk6ZRFRVBT_cjs = require('./chunk-6ZRFRVBT.cjs');
6
- require('./chunk-3NXWMXOZ.cjs');
5
+ var chunkZN3S5QJO_cjs = require('./chunk-ZN3S5QJO.cjs');
6
+ require('./chunk-DZP66IJA.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(chunk6ZRFRVBT_cjs.createUnpluginFactory("farm"));
13
+ var farm = unplugin.createFarmPlugin(chunkZN3S5QJO_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-N2YHQVMW.js';
2
- import './chunk-AFQL3PY3.js';
1
+ import { createUnpluginFactory } from './chunk-GSVAZFVI.js';
2
+ import './chunk-RHCSG474.js';
3
3
  import './chunk-PQXP7XQK.js';
4
4
  import './chunk-NITQ5IYP.js';
5
5
  import './chunk-2MYPFASJ.js';