powerlines 0.37.25 → 0.37.27

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-KUVGZOIR.js → chunk-2NYU273V.js} +3 -3
  6. package/dist/{chunk-4KHQJLOZ.js → chunk-4H6VOXCZ.js} +3 -3
  7. package/dist/{chunk-5EXQR5PS.js → chunk-BSGGW3I5.js} +3 -3
  8. package/dist/chunk-C6LGP5FQ.cjs +12 -0
  9. package/dist/{chunk-A44AVBOK.cjs → chunk-EZEZVZK7.cjs} +4 -4
  10. package/dist/{chunk-CBUBY3RQ.js → chunk-MCXY4S7D.js} +3 -3
  11. package/dist/{chunk-VNXIVSZM.cjs → chunk-MTENCFA6.cjs} +4 -4
  12. package/dist/{chunk-A6EFHKFH.cjs → chunk-O74ZII3O.cjs} +5 -5
  13. package/dist/{chunk-GLFCJGOU.cjs → chunk-S4PD5PIH.cjs} +113 -71
  14. package/dist/chunk-SVTMCMIG.cjs +12 -0
  15. package/dist/{chunk-5UWYXYHN.js → chunk-V7UMNZXL.js} +113 -71
  16. package/dist/{chunk-GBWZQNCT.js → chunk-X5W7LQCT.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/{chunk-4UBTIIJL.js → chunk-2LFLJNAV.js} +4 -4
  24. package/dist/lib/{chunk-4UBTIIJL.js.map → chunk-2LFLJNAV.js.map} +1 -1
  25. package/dist/lib/{chunk-AENFA3JO.js → chunk-4KM63YHN.js} +4 -4
  26. package/dist/lib/{chunk-AENFA3JO.js.map → chunk-4KM63YHN.js.map} +1 -1
  27. package/dist/lib/{chunk-5NQEQLWX.cjs → chunk-5E67CQY4.cjs} +6 -6
  28. package/dist/lib/{chunk-5NQEQLWX.cjs.map → chunk-5E67CQY4.cjs.map} +1 -1
  29. package/dist/lib/{chunk-IBV5LQEW.cjs → chunk-GBQKMX4T.cjs} +19 -19
  30. package/dist/lib/{chunk-IBV5LQEW.cjs.map → chunk-GBQKMX4T.cjs.map} +1 -1
  31. package/dist/lib/{chunk-CTZ34LYF.cjs → chunk-I6DUCDRL.cjs} +113 -71
  32. package/dist/lib/chunk-I6DUCDRL.cjs.map +1 -0
  33. package/dist/lib/{chunk-67DD6S67.js → chunk-M3G755EC.js} +113 -71
  34. package/dist/lib/chunk-M3G755EC.js.map +1 -0
  35. package/dist/lib/{chunk-S3WD3XWS.cjs → chunk-MPIQ6XPX.cjs} +5 -5
  36. package/dist/lib/{chunk-S3WD3XWS.cjs.map → chunk-MPIQ6XPX.cjs.map} +1 -1
  37. package/dist/lib/{chunk-5KPURJGU.js → chunk-MQZXXC6R.js} +3 -3
  38. package/dist/lib/{chunk-5KPURJGU.js.map → chunk-MQZXXC6R.js.map} +1 -1
  39. package/dist/lib/{chunk-7S3JZ53C.js → chunk-SQ6TKFZN.js} +3 -3
  40. package/dist/lib/{chunk-7S3JZ53C.js.map → chunk-SQ6TKFZN.js.map} +1 -1
  41. package/dist/lib/{chunk-DFEKS6NC.cjs → chunk-WH6XDHHI.cjs} +16 -16
  42. package/dist/lib/{chunk-DFEKS6NC.cjs.map → chunk-WH6XDHHI.cjs.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 +7 -7
  84. package/dist/chunk-EBWMUY6X.cjs +0 -12
  85. package/dist/chunk-EIJCWBLT.cjs +0 -12
  86. package/dist/lib/chunk-67DD6S67.js.map +0 -1
  87. package/dist/lib/chunk-CTZ34LYF.cjs.map +0 -1
package/dist/api.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkGLFCJGOU_cjs = require('./chunk-GLFCJGOU.cjs');
3
+ var chunkS4PD5PIH_cjs = require('./chunk-S4PD5PIH.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 chunkGLFCJGOU_cjs.PowerlinesAPI; }
13
+ get: function () { return chunkS4PD5PIH_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-5UWYXYHN.js';
1
+ export { PowerlinesAPI } from './chunk-V7UMNZXL.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 chunkA44AVBOK_cjs = require('./chunk-A44AVBOK.cjs');
5
+ var chunkEZEZVZK7_cjs = require('./chunk-EZEZVZK7.cjs');
6
6
  require('./chunk-SE3RCXWI.cjs');
7
- require('./chunk-A6EFHKFH.cjs');
8
- require('./chunk-GLFCJGOU.cjs');
7
+ require('./chunk-O74ZII3O.cjs');
8
+ require('./chunk-S4PD5PIH.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
- chunkA44AVBOK_cjs.vite_default(config)
18
+ chunkEZEZVZK7_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-CBUBY3RQ.js';
1
+ import { vite_default } from './chunk-MCXY4S7D.js';
2
2
  import './chunk-BGBDDKML.js';
3
- import './chunk-5EXQR5PS.js';
4
- import './chunk-5UWYXYHN.js';
3
+ import './chunk-BSGGW3I5.js';
4
+ import './chunk-V7UMNZXL.js';
5
5
  import './chunk-PQXP7XQK.js';
6
6
  import './chunk-NITQ5IYP.js';
7
7
  import './chunk-2MYPFASJ.js';
@@ -1,9 +1,9 @@
1
- import { createUnpluginFactory } from './chunk-5EXQR5PS.js';
1
+ import { createUnpluginFactory } from './chunk-BSGGW3I5.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-KUVGZOIR.js.map
9
- //# sourceMappingURL=chunk-KUVGZOIR.js.map
8
+ //# sourceMappingURL=chunk-2NYU273V.js.map
9
+ //# sourceMappingURL=chunk-2NYU273V.js.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-BGBDDKML.js';
2
- import { createUnpluginFactory } from './chunk-5EXQR5PS.js';
2
+ import { createUnpluginFactory } from './chunk-BSGGW3I5.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-4KHQJLOZ.js.map
33
- //# sourceMappingURL=chunk-4KHQJLOZ.js.map
32
+ //# sourceMappingURL=chunk-4H6VOXCZ.js.map
33
+ //# sourceMappingURL=chunk-4H6VOXCZ.js.map
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-5UWYXYHN.js';
1
+ import { createLog, PowerlinesAPI } from './chunk-V7UMNZXL.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-5EXQR5PS.js.map
138
- //# sourceMappingURL=chunk-5EXQR5PS.js.map
137
+ //# sourceMappingURL=chunk-BSGGW3I5.js.map
138
+ //# sourceMappingURL=chunk-BSGGW3I5.js.map
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkO74ZII3O_cjs = require('./chunk-O74ZII3O.cjs');
4
+ var unplugin = require('unplugin');
5
+
6
+ var webpack = unplugin.createWebpackPlugin(chunkO74ZII3O_cjs.createUnpluginFactory("webpack"));
7
+ var webpack_default = webpack;
8
+
9
+ exports.webpack = webpack;
10
+ exports.webpack_default = webpack_default;
11
+ //# sourceMappingURL=chunk-C6LGP5FQ.cjs.map
12
+ //# sourceMappingURL=chunk-C6LGP5FQ.cjs.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkSE3RCXWI_cjs = require('./chunk-SE3RCXWI.cjs');
4
- var chunkA6EFHKFH_cjs = require('./chunk-A6EFHKFH.cjs');
4
+ var chunkO74ZII3O_cjs = require('./chunk-O74ZII3O.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(chunkA6EFHKFH_cjs.createUnpluginFactory("vite", (api, plugin) => {
100
+ var vite = unplugin.createVitePlugin(chunkO74ZII3O_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-A44AVBOK.cjs.map
162
- //# sourceMappingURL=chunk-A44AVBOK.cjs.map
161
+ //# sourceMappingURL=chunk-EZEZVZK7.cjs.map
162
+ //# sourceMappingURL=chunk-EZEZVZK7.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-BGBDDKML.js';
2
- import { createUnpluginFactory } from './chunk-5EXQR5PS.js';
2
+ import { createUnpluginFactory } from './chunk-BSGGW3I5.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-CBUBY3RQ.js.map
155
- //# sourceMappingURL=chunk-CBUBY3RQ.js.map
154
+ //# sourceMappingURL=chunk-MCXY4S7D.js.map
155
+ //# sourceMappingURL=chunk-MCXY4S7D.js.map
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkSE3RCXWI_cjs = require('./chunk-SE3RCXWI.cjs');
4
- var chunkA6EFHKFH_cjs = require('./chunk-A6EFHKFH.cjs');
4
+ var chunkO74ZII3O_cjs = require('./chunk-O74ZII3O.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(chunkA6EFHKFH_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
9
+ var esbuild = unplugin.createEsbuildPlugin(chunkO74ZII3O_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-VNXIVSZM.cjs.map
36
- //# sourceMappingURL=chunk-VNXIVSZM.cjs.map
35
+ //# sourceMappingURL=chunk-MTENCFA6.cjs.map
36
+ //# sourceMappingURL=chunk-MTENCFA6.cjs.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkGLFCJGOU_cjs = require('./chunk-GLFCJGOU.cjs');
3
+ var chunkS4PD5PIH_cjs = require('./chunk-S4PD5PIH.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 = chunkGLFCJGOU_cjs.createLog("unplugin", config);
30
+ const log = chunkS4PD5PIH_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 chunkGLFCJGOU_cjs.PowerlinesAPI.from(getWorkspaceRoot.getWorkspaceRoot(process.cwd()), userConfig);
41
+ api = await chunkS4PD5PIH_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-A6EFHKFH.cjs.map
141
- //# sourceMappingURL=chunk-A6EFHKFH.cjs.map
140
+ //# sourceMappingURL=chunk-O74ZII3O.cjs.map
141
+ //# sourceMappingURL=chunk-O74ZII3O.cjs.map
@@ -1863,53 +1863,73 @@ var VirtualFileSystem = class _VirtualFileSystem {
1863
1863
  */
1864
1864
  static async create(context) {
1865
1865
  context.debug("Starting virtual file system (VFS) initialization processes...");
1866
+ let result;
1866
1867
  if (!context.config.skipCache && exists.existsSync(joinPaths.joinPaths(context.dataPath, "fs.bin"))) {
1867
1868
  const buffer$1 = await buffer.readFileBuffer(joinPaths.joinPaths(context.dataPath, "fs.bin"));
1868
- const message2 = new $__namespace.Message(buffer$1, false);
1869
- const fs = message2.getRoot(FileSystem);
1870
- const result2 = new _VirtualFileSystem(context, fs);
1869
+ const message = new $__namespace.Message(buffer$1, false);
1870
+ const fs = message.getRoot(FileSystem);
1871
+ result = new _VirtualFileSystem(context, fs);
1871
1872
  if (fs._hasStorage() && fs.storage.length > 0) {
1872
1873
  await Promise.all(fs.storage.values().map(async (file) => {
1873
1874
  if (file.path && file.code) {
1874
- await result2.write(file.path, file.code);
1875
+ let id;
1876
+ if (fs._hasIds()) {
1877
+ id = fs.ids.find((fileId) => fileId.path === file.path);
1878
+ }
1879
+ let metadata;
1880
+ if (fs._hasMetadata()) {
1881
+ metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
1882
+ }
1883
+ await result.write(file.path, file.code, {
1884
+ meta: {
1885
+ id: id?.id || metadata?.id,
1886
+ type: metadata?.type,
1887
+ properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
1888
+ ret[kvp.key] = kvp.value;
1889
+ return ret;
1890
+ }, {}) : void 0,
1891
+ timestamp: metadata?.timestamp
1892
+ }
1893
+ });
1875
1894
  }
1876
1895
  }));
1877
1896
  }
1878
- }
1879
- const message = new $__namespace.Message();
1880
- const result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
1881
- result.#log(types.LogLevelLabel.DEBUG, "Successfully completed virtual file system (VFS) initialization.");
1882
- if (result.#metadata && Object.keys(result.#metadata).length > 0) {
1883
- result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
1884
- const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1885
- if (meta.properties) {
1886
- const typeDefinition = {
1887
- file: path
1888
- };
1889
- if (isSetString.isSetString(meta.properties.name)) {
1890
- typeDefinition.name = meta.properties.name;
1891
- }
1892
- if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
1893
- typeDefinition.input ??= {};
1894
- if (isSetString.isSetString(meta.properties["input.file"])) {
1895
- typeDefinition.input.file = meta.properties["input.file"];
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]) => {
1900
+ if (meta.properties) {
1901
+ const typeDefinition = {
1902
+ file: path
1903
+ };
1904
+ if (isSetString.isSetString(meta.properties.name)) {
1905
+ typeDefinition.name = meta.properties.name;
1896
1906
  }
1897
- if (isSetString.isSetString(meta.properties["input.name"])) {
1898
- typeDefinition.input.name = meta.properties["input.name"];
1907
+ if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
1908
+ typeDefinition.input ??= {};
1909
+ if (isSetString.isSetString(meta.properties["input.file"])) {
1910
+ typeDefinition.input.file = meta.properties["input.file"];
1911
+ }
1912
+ if (isSetString.isSetString(meta.properties["input.name"])) {
1913
+ typeDefinition.input.name = meta.properties["input.name"];
1914
+ }
1899
1915
  }
1916
+ if (isSetString.isSetString(meta.properties.output)) {
1917
+ typeDefinition.output = meta.properties.output;
1918
+ }
1919
+ return typeDefinition;
1900
1920
  }
1901
- if (isSetString.isSetString(meta.properties.output)) {
1902
- typeDefinition.output = meta.properties.output;
1903
- }
1904
- return typeDefinition;
1905
- }
1906
- return null;
1907
- }).filter(Boolean);
1908
- result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1909
- context.entry = entry;
1921
+ return null;
1922
+ }).filter(Boolean);
1923
+ result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1924
+ context.entry = entry;
1925
+ } else {
1926
+ result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1927
+ }
1910
1928
  } else {
1911
- result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
1929
+ const message = new $__namespace.Message();
1930
+ result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
1912
1931
  }
1932
+ result.#log(types.LogLevelLabel.DEBUG, "Successfully completed virtual file system (VFS) initialization.");
1913
1933
  return result;
1914
1934
  }
1915
1935
  /**
@@ -1920,51 +1940,73 @@ var VirtualFileSystem = class _VirtualFileSystem {
1920
1940
  */
1921
1941
  static createSync(context) {
1922
1942
  context.debug("Starting virtual file system (VFS) initialization processes...");
1943
+ let result;
1923
1944
  if (!context.config.skipCache && exists.existsSync(joinPaths.joinPaths(context.dataPath, "fs.bin"))) {
1924
1945
  const buffer$1 = buffer.readFileBufferSync(joinPaths.joinPaths(context.dataPath, "fs.bin"));
1925
- const message2 = new $__namespace.Message(buffer$1, false);
1926
- const fs = message2.getRoot(FileSystem);
1927
- const result2 = new _VirtualFileSystem(context, fs);
1946
+ const message = new $__namespace.Message(buffer$1, false);
1947
+ const fs = message.getRoot(FileSystem);
1948
+ result = new _VirtualFileSystem(context, fs);
1928
1949
  if (fs._hasStorage() && fs.storage.length > 0) {
1929
- fs.storage.values().map((file) => {
1930
- result2.writeSync(file.path, file.code);
1950
+ fs.storage.values().forEach((file) => {
1951
+ if (file.path && file.code) {
1952
+ let id;
1953
+ if (fs._hasIds()) {
1954
+ id = fs.ids.find((fileId) => fileId.path === file.path);
1955
+ }
1956
+ let metadata;
1957
+ if (fs._hasMetadata()) {
1958
+ metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
1959
+ }
1960
+ result.writeSync(file.path, file.code, {
1961
+ meta: {
1962
+ id: id?.id || metadata?.id,
1963
+ type: metadata?.type,
1964
+ properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
1965
+ ret[kvp.key] = kvp.value;
1966
+ return ret;
1967
+ }, {}) : void 0,
1968
+ timestamp: metadata?.timestamp
1969
+ }
1970
+ });
1971
+ }
1931
1972
  });
1932
1973
  }
1933
- }
1934
- const message = new $__namespace.Message();
1935
- const result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
1936
- result.#log(types.LogLevelLabel.DEBUG, "Successfully completed virtual file system (VFS) initialization.");
1937
- if (result.#metadata && Object.keys(result.#metadata).length > 0) {
1938
- result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
1939
- const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
1940
- if (meta.properties) {
1941
- const typeDefinition = {
1942
- file: path
1943
- };
1944
- if (isSetString.isSetString(meta.properties.name)) {
1945
- typeDefinition.name = meta.properties.name;
1946
- }
1947
- if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
1948
- typeDefinition.input ??= {};
1949
- if (isSetString.isSetString(meta.properties["input.file"])) {
1950
- typeDefinition.input.file = meta.properties["input.file"];
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]) => {
1977
+ if (meta.properties) {
1978
+ const typeDefinition = {
1979
+ file: path
1980
+ };
1981
+ if (isSetString.isSetString(meta.properties.name)) {
1982
+ typeDefinition.name = meta.properties.name;
1951
1983
  }
1952
- if (isSetString.isSetString(meta.properties["input.name"])) {
1953
- typeDefinition.input.name = meta.properties["input.name"];
1984
+ if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
1985
+ typeDefinition.input ??= {};
1986
+ if (isSetString.isSetString(meta.properties["input.file"])) {
1987
+ typeDefinition.input.file = meta.properties["input.file"];
1988
+ }
1989
+ if (isSetString.isSetString(meta.properties["input.name"])) {
1990
+ typeDefinition.input.name = meta.properties["input.name"];
1991
+ }
1954
1992
  }
1993
+ if (isSetString.isSetString(meta.properties.output)) {
1994
+ typeDefinition.output = meta.properties.output;
1995
+ }
1996
+ return typeDefinition;
1955
1997
  }
1956
- if (isSetString.isSetString(meta.properties.output)) {
1957
- typeDefinition.output = meta.properties.output;
1958
- }
1959
- return typeDefinition;
1960
- }
1961
- return null;
1962
- }).filter(Boolean);
1963
- result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
1964
- context.entry = entry;
1998
+ return null;
1999
+ }).filter(Boolean);
2000
+ result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
2001
+ context.entry = entry;
2002
+ } else {
2003
+ result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
2004
+ }
1965
2005
  } else {
1966
- result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
2006
+ const message = new $__namespace.Message();
2007
+ result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
1967
2008
  }
2009
+ result.#log(types.LogLevelLabel.DEBUG, "Successfully completed virtual file system (VFS) initialization.");
1968
2010
  return result;
1969
2011
  }
1970
2012
  /**
@@ -5073,5 +5115,5 @@ exports.combineContexts = combineContexts;
5073
5115
  exports.createLog = createLog;
5074
5116
  exports.extendLog = extendLog;
5075
5117
  exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
5076
- //# sourceMappingURL=chunk-GLFCJGOU.cjs.map
5077
- //# sourceMappingURL=chunk-GLFCJGOU.cjs.map
5118
+ //# sourceMappingURL=chunk-S4PD5PIH.cjs.map
5119
+ //# sourceMappingURL=chunk-S4PD5PIH.cjs.map
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkO74ZII3O_cjs = require('./chunk-O74ZII3O.cjs');
4
+ var unplugin = require('unplugin');
5
+
6
+ var rolldown = unplugin.createRolldownPlugin(chunkO74ZII3O_cjs.createUnpluginFactory("rolldown"));
7
+ var rolldown_default = rolldown;
8
+
9
+ exports.rolldown = rolldown;
10
+ exports.rolldown_default = rolldown_default;
11
+ //# sourceMappingURL=chunk-SVTMCMIG.cjs.map
12
+ //# sourceMappingURL=chunk-SVTMCMIG.cjs.map