powerlines 0.24.6 → 0.24.8

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 (63) 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-4YOH66OR.js → chunk-3TNZWTLG.js} +1 -1
  6. package/dist/{chunk-J42CWDHS.cjs → chunk-7RWEBVQC.cjs} +3 -3
  7. package/dist/{chunk-5VVIGLK7.js → chunk-BCHFSOQ4.js} +23 -19
  8. package/dist/{chunk-MBWFPGQL.cjs → chunk-FQXHIKCM.cjs} +2 -2
  9. package/dist/{chunk-D7IZZTKR.cjs → chunk-LOUZXJFY.cjs} +2 -2
  10. package/dist/{chunk-E2CYWY4C.js → chunk-MOXO6WJO.js} +1 -1
  11. package/dist/{chunk-6F2RGMWO.js → chunk-OB7MYWHE.js} +1 -1
  12. package/dist/{chunk-RUNRTWUD.js → chunk-OLCL34MI.js} +1 -1
  13. package/dist/{chunk-MWURGZO3.cjs → chunk-QH4TS5V4.cjs} +23 -19
  14. package/dist/{chunk-TSGTSGEL.cjs → chunk-X74SYWFL.cjs} +2 -2
  15. package/dist/esbuild.cjs +6 -6
  16. package/dist/esbuild.js +3 -3
  17. package/dist/farm.cjs +3 -3
  18. package/dist/farm.js +2 -2
  19. package/dist/index.cjs +11 -11
  20. package/dist/index.js +2 -2
  21. package/dist/lib/{chunk-QOS4T645.cjs → chunk-3MZQ4MQX.cjs} +9 -11
  22. package/dist/lib/{chunk-JFHYBGFE.js → chunk-5JAFU45Z.js} +10 -11
  23. package/dist/lib/{chunk-SJCNXDNU.cjs → chunk-OA7OL7HF.cjs} +23 -19
  24. package/dist/lib/{chunk-B6MVU5AR.js → chunk-SYF7QG2J.js} +1 -1
  25. package/dist/lib/{chunk-IRIEW3X6.js → chunk-T2KQZC5K.js} +15 -11
  26. package/dist/lib/{chunk-HQ7626MD.js → chunk-UGVHYKKN.js} +2 -2
  27. package/dist/lib/{chunk-ZTI2BIQ4.cjs → chunk-XLYMVIVD.cjs} +10 -10
  28. package/dist/lib/{chunk-FSV2WXHS.cjs → chunk-YMHOAMCU.cjs} +4 -4
  29. package/dist/lib/contexts/api-context.cjs +4 -4
  30. package/dist/lib/contexts/api-context.js +3 -3
  31. package/dist/lib/contexts/context.cjs +2 -2
  32. package/dist/lib/contexts/context.js +1 -1
  33. package/dist/lib/contexts/environment-context.cjs +3 -3
  34. package/dist/lib/contexts/environment-context.js +2 -2
  35. package/dist/lib/contexts/index.cjs +6 -6
  36. package/dist/lib/contexts/index.js +3 -3
  37. package/dist/lib/index.cjs +9 -9
  38. package/dist/lib/index.js +4 -4
  39. package/dist/lib/unplugin/factory.cjs +5 -5
  40. package/dist/lib/unplugin/factory.js +4 -4
  41. package/dist/lib/unplugin/index.cjs +5 -5
  42. package/dist/lib/unplugin/index.js +4 -4
  43. package/dist/next.cjs +4 -4
  44. package/dist/next.js +3 -3
  45. package/dist/nuxt.cjs +6 -6
  46. package/dist/nuxt.js +4 -4
  47. package/dist/rolldown.cjs +3 -3
  48. package/dist/rolldown.js +2 -2
  49. package/dist/rollup.cjs +3 -3
  50. package/dist/rollup.js +2 -2
  51. package/dist/rspack.cjs +3 -3
  52. package/dist/rspack.js +2 -2
  53. package/dist/tsup.cjs +4 -4
  54. package/dist/tsup.js +3 -3
  55. package/dist/unloader.cjs +3 -3
  56. package/dist/unloader.js +2 -2
  57. package/dist/unplugin.cjs +5 -5
  58. package/dist/unplugin.js +3 -3
  59. package/dist/vite.cjs +6 -6
  60. package/dist/vite.js +3 -3
  61. package/dist/webpack.cjs +6 -6
  62. package/dist/webpack.js +3 -3
  63. package/package.json +2 -2
package/dist/api.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkMWURGZO3_cjs = require('./chunk-MWURGZO3.cjs');
3
+ var chunkQH4TS5V4_cjs = require('./chunk-QH4TS5V4.cjs');
4
4
  require('./chunk-ETKZMGLN.cjs');
5
5
  require('./chunk-PAMSESZV.cjs');
6
6
  require('./chunk-AYKZK666.cjs');
@@ -10,5 +10,5 @@ require('./chunk-USNT2KNT.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "PowerlinesAPI", {
12
12
  enumerable: true,
13
- get: function () { return chunkMWURGZO3_cjs.PowerlinesAPI; }
13
+ get: function () { return chunkQH4TS5V4_cjs.PowerlinesAPI; }
14
14
  });
package/dist/api.js CHANGED
@@ -1,4 +1,4 @@
1
- export { PowerlinesAPI } from './chunk-5VVIGLK7.js';
1
+ export { PowerlinesAPI } from './chunk-BCHFSOQ4.js';
2
2
  import './chunk-JQCWV4DT.js';
3
3
  import './chunk-JKBJF3UI.js';
4
4
  import './chunk-VT7NVLLU.js';
package/dist/astro.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkTSGTSGEL_cjs = require('./chunk-TSGTSGEL.cjs');
5
+ var chunkX74SYWFL_cjs = require('./chunk-X74SYWFL.cjs');
6
6
  require('./chunk-5IBA5HC2.cjs');
7
- require('./chunk-J42CWDHS.cjs');
8
- require('./chunk-MWURGZO3.cjs');
7
+ require('./chunk-7RWEBVQC.cjs');
8
+ require('./chunk-QH4TS5V4.cjs');
9
9
  require('./chunk-ETKZMGLN.cjs');
10
10
  require('./chunk-PAMSESZV.cjs');
11
11
  require('./chunk-AYKZK666.cjs');
@@ -15,7 +15,7 @@ var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
15
15
  var astro = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((config) => ({
16
16
  vite: {
17
17
  plugins: [
18
- chunkTSGTSGEL_cjs.vite_default(config)
18
+ chunkX74SYWFL_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-RUNRTWUD.js';
1
+ import { vite_default } from './chunk-OLCL34MI.js';
2
2
  import './chunk-VBR53KGY.js';
3
- import './chunk-6F2RGMWO.js';
4
- import './chunk-5VVIGLK7.js';
3
+ import './chunk-OB7MYWHE.js';
4
+ import './chunk-BCHFSOQ4.js';
5
5
  import './chunk-JQCWV4DT.js';
6
6
  import './chunk-JKBJF3UI.js';
7
7
  import './chunk-VT7NVLLU.js';
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-VBR53KGY.js';
2
- import { createUnpluginFactory } from './chunk-6F2RGMWO.js';
2
+ import { createUnpluginFactory } from './chunk-OB7MYWHE.js';
3
3
  import { __name } from './chunk-SHUYVCID.js';
4
4
  import { isUndefined } from '@stryke/type-checks/is-undefined';
5
5
  import { createEsbuildPlugin } from 'unplugin';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkMWURGZO3_cjs = require('./chunk-MWURGZO3.cjs');
3
+ var chunkQH4TS5V4_cjs = require('./chunk-QH4TS5V4.cjs');
4
4
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
5
5
  var types = require('@storm-software/config-tools/types');
6
6
  var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
@@ -26,7 +26,7 @@ chunkUSNT2KNT_cjs.__name(getString, "getString");
26
26
  // src/lib/unplugin/factory.ts
27
27
  function createUnpluginFactory(variant, decorate) {
28
28
  return (config, meta) => {
29
- const log = chunkMWURGZO3_cjs.createLog("unplugin", config);
29
+ const log = chunkQH4TS5V4_cjs.createLog("unplugin", config);
30
30
  log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
31
31
  try {
32
32
  const userConfig = {
@@ -38,7 +38,7 @@ function createUnpluginFactory(variant, decorate) {
38
38
  async function buildStart() {
39
39
  log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
40
40
  const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(process.cwd());
41
- api = await chunkMWURGZO3_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
41
+ api = await chunkQH4TS5V4_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
42
42
  log(types.LogLevelLabel.DEBUG, "Preparing build artifacts for the Powerlines project...");
43
43
  await api.prepare({
44
44
  command: "build"
@@ -7,8 +7,6 @@ import { formatLogMessage } from '@storm-software/config-tools/logger/console';
7
7
  import { LogLevelLabel } from '@storm-software/config-tools/types';
8
8
  import { toArray } from '@stryke/convert/to-array';
9
9
  import { copyFiles } from '@stryke/fs/copy-file';
10
- import { existsSync } from '@stryke/fs/exists';
11
- import { createDirectory } from '@stryke/fs/helpers';
12
10
  import { install } from '@stryke/fs/install';
13
11
  import { listFiles, listFilesSync } from '@stryke/fs/list-files';
14
12
  import { isPackageExists, isPackageListed, doesPackageMatch, getPackageListing } from '@stryke/fs/package-fns';
@@ -36,6 +34,7 @@ import { StormJSON } from '@stryke/json/storm-json';
36
34
  import { findFilePath, findFileExtension, relativePath, findFileName, findFileDotExtensionSafe } from '@stryke/path/file-path-fns';
37
35
  import { isParentPath } from '@stryke/path/is-parent-path';
38
36
  import { titleCase } from '@stryke/string-format/title-case';
37
+ import { existsSync } from '@stryke/fs/exists';
39
38
  import { writeFile as writeFile$1 } from '@stryke/fs/write-file';
40
39
  import { resolveConfig, format } from 'prettier';
41
40
  import { getWorkspaceConfig } from '@storm-software/config-tools/get-config';
@@ -2229,22 +2228,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
2229
2228
  await this.unlink(joinPaths$1(this.#context.dataPath, "fs.bin"));
2230
2229
  const message = new $.Message();
2231
2230
  const fs2 = message.initRoot(FileSystem);
2232
- const virtualFS = this.#unifiedFS.toJSON();
2233
- const virtualFiles = Object.entries(virtualFS).filter(([_, code]) => code);
2231
+ const virtualFiles = Object.entries(this.#unifiedFS.toJSON()).filter(([, code]) => code);
2234
2232
  const files = fs2._initFiles(virtualFiles.length);
2235
- virtualFiles.forEach(([path, code], index) => {
2233
+ virtualFiles.filter(([, code]) => code).forEach(([path, code], index) => {
2236
2234
  const fd = files.get(index);
2237
2235
  fd.path = path;
2238
2236
  fd.code = code || "";
2239
2237
  });
2240
2238
  const ids = fs2._initIds(Object.keys(this.ids).length);
2241
- Object.entries(this.ids).forEach(([id, path], index) => {
2239
+ Object.entries(this.ids).filter(([, path]) => path).forEach(([id, path], index) => {
2242
2240
  const fileId = ids.get(index);
2243
2241
  fileId.id = id;
2244
2242
  fileId.path = path;
2245
2243
  });
2246
2244
  const metadata = fs2._initMetadata(Object.keys(this.metadata).length);
2247
- Object.entries(this.metadata).forEach(([id, value], index) => {
2245
+ Object.entries(this.metadata).filter(([, value]) => value).forEach(([id, value], index) => {
2248
2246
  const fileMetadata = metadata.get(index);
2249
2247
  fileMetadata.id = id;
2250
2248
  fileMetadata.mode = value.mode;
@@ -2252,10 +2250,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
2252
2250
  fileMetadata.timestamp = value.timestamp ?? BigInt(Date.now());
2253
2251
  if (value.properties) {
2254
2252
  const props = fileMetadata._initProperties(Object.keys(value.properties).length);
2255
- Object.entries(value.properties).forEach(([key, val], propIndex) => {
2256
- const propData = props.get(propIndex);
2257
- propData.key = key;
2258
- propData.value = val;
2253
+ Object.entries(value.properties).forEach(([key, val], index2) => {
2254
+ const prop = props.get(index2);
2255
+ prop.key = key;
2256
+ prop.value = val;
2259
2257
  });
2260
2258
  }
2261
2259
  });
@@ -2638,7 +2636,7 @@ var PowerlinesContext = class _PowerlinesContext {
2638
2636
  * Get the path to the generated declaration file for the project
2639
2637
  */
2640
2638
  get dtsPath() {
2641
- return this.config.output.dts ? appendPath(this.config.output.dts, this.workspaceConfig.workspaceRoot) : joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "storm.d.ts");
2639
+ return this.config.output.dts ? appendPath(this.config.output.dts, this.workspaceConfig.workspaceRoot) : joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "powerlines.d.ts");
2642
2640
  }
2643
2641
  /**
2644
2642
  * Get the project root relative to the workspace root
@@ -3532,16 +3530,23 @@ ${context.entry.map((entry) => `- ${entry.input.file || entry.file}${entry.outpu
3532
3530
  ${formatLogMessage(context.config)}`);
3533
3531
  await writeMetaFile(context);
3534
3532
  context.persistedMeta = context.meta;
3535
- if (!existsSync(context.cachePath)) {
3536
- await createDirectory(context.cachePath);
3533
+ if (!context.fs.existsSync(context.cachePath)) {
3534
+ await context.fs.mkdir(context.cachePath, {
3535
+ mode: "fs"
3536
+ });
3537
3537
  }
3538
- if (!existsSync(context.dataPath)) {
3539
- await createDirectory(context.dataPath);
3538
+ if (!context.fs.existsSync(context.dataPath)) {
3539
+ await context.fs.mkdir(context.dataPath, {
3540
+ mode: "fs"
3541
+ });
3540
3542
  }
3541
3543
  await this.callPreHook(context, "prepare");
3542
3544
  await this.callNormalHook(context, "prepare");
3543
3545
  if (context.config.output.dts !== false) {
3544
3546
  context.log(LogLevelLabel.TRACE, `Preparing the TypeScript definitions for the Powerlines project.`);
3547
+ if (context.fs.existsSync(context.dtsPath)) {
3548
+ await context.fs.unlink(context.dtsPath);
3549
+ }
3545
3550
  context.log(LogLevelLabel.TRACE, "Transforming built-ins runtime modules files.");
3546
3551
  const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
3547
3552
  const result2 = await transformAsync(file.code.toString(), {
@@ -3592,7 +3597,7 @@ ${formatLogMessage(context.config)}`);
3592
3597
  );
3593
3598
  context.log(LogLevelLabel.TRACE, "Parsing TypeScript configuration for the Powerlines project.");
3594
3599
  let generatedTypes = await emitTypes(context, files);
3595
- context.log(LogLevelLabel.TRACE, `Generating TypeScript declaration file in ${context.config.output.dts}.`);
3600
+ context.log(LogLevelLabel.TRACE, `Generating TypeScript declaration file ${context.dtsPath}.`);
3596
3601
  const directives = [];
3597
3602
  let result = await this.callPreHook(context, "generateTypes", generatedTypes);
3598
3603
  if (result) {
@@ -3627,7 +3632,7 @@ ${formatLogMessage(context.config)}`);
3627
3632
  generatedTypes = result;
3628
3633
  }
3629
3634
  }
3630
- await context.fs.writeFile(context.config.output.dts, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
3635
+ await context.fs.writeFile(context.dtsPath, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
3631
3636
 
3632
3637
  ` : ""}${getFileHeader(context, {
3633
3638
  directive: null,
@@ -3817,7 +3822,6 @@ ${formatTypes(generatedTypes)}
3817
3822
  this.context.log(LogLevelLabel.TRACE, "Powerlines finalize execution started");
3818
3823
  await this.#executeEnvironments(async (context) => {
3819
3824
  await this.callHook(context, "finalize");
3820
- context.fs[__VFS_REVERT__]();
3821
3825
  await context.fs.dispose();
3822
3826
  });
3823
3827
  this.context.log(LogLevelLabel.TRACE, "Powerlines finalize execution completed");
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
4
- var chunkJ42CWDHS_cjs = require('./chunk-J42CWDHS.cjs');
4
+ var chunk7RWEBVQC_cjs = require('./chunk-7RWEBVQC.cjs');
5
5
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
6
6
  var isUndefined = require('@stryke/type-checks/is-undefined');
7
7
  var unplugin = require('unplugin');
8
8
 
9
- var esbuild = unplugin.createEsbuildPlugin(chunkJ42CWDHS_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
9
+ var esbuild = unplugin.createEsbuildPlugin(chunk7RWEBVQC_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
10
10
  return {
11
11
  ...plugin,
12
12
  esbuild: {
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkJ42CWDHS_cjs = require('./chunk-J42CWDHS.cjs');
3
+ var chunk7RWEBVQC_cjs = require('./chunk-7RWEBVQC.cjs');
4
4
  var unplugin = require('unplugin');
5
5
 
6
- var webpack = unplugin.createWebpackPlugin(chunkJ42CWDHS_cjs.createUnpluginFactory("webpack"));
6
+ var webpack = unplugin.createWebpackPlugin(chunk7RWEBVQC_cjs.createUnpluginFactory("webpack"));
7
7
  var webpack_default = webpack;
8
8
 
9
9
  exports.webpack = webpack;
@@ -1,4 +1,4 @@
1
- import { createUnpluginFactory } from './chunk-6F2RGMWO.js';
1
+ import { createUnpluginFactory } from './chunk-OB7MYWHE.js';
2
2
  import { createWebpackPlugin } from 'unplugin';
3
3
 
4
4
  var webpack = createWebpackPlugin(createUnpluginFactory("webpack"));
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-5VVIGLK7.js';
1
+ import { createLog, PowerlinesAPI } from './chunk-BCHFSOQ4.js';
2
2
  import { __name } from './chunk-SHUYVCID.js';
3
3
  import { LogLevelLabel } from '@storm-software/config-tools/types';
4
4
  import { getWorkspaceRoot } from '@stryke/fs/get-workspace-root';
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-VBR53KGY.js';
2
- import { createUnpluginFactory } from './chunk-6F2RGMWO.js';
2
+ import { createUnpluginFactory } from './chunk-OB7MYWHE.js';
3
3
  import { __name } from './chunk-SHUYVCID.js';
4
4
  import { isDevelopmentMode, isTestMode } from '@stryke/env/environment-checks';
5
5
  import defu from 'defu';
@@ -9,8 +9,6 @@ var console = require('@storm-software/config-tools/logger/console');
9
9
  var types = require('@storm-software/config-tools/types');
10
10
  var toArray = require('@stryke/convert/to-array');
11
11
  var copyFile = require('@stryke/fs/copy-file');
12
- var exists = require('@stryke/fs/exists');
13
- var helpers = require('@stryke/fs/helpers');
14
12
  var install = require('@stryke/fs/install');
15
13
  var listFiles = require('@stryke/fs/list-files');
16
14
  var packageFns = require('@stryke/fs/package-fns');
@@ -38,6 +36,7 @@ var stormJson = require('@stryke/json/storm-json');
38
36
  var filePathFns = require('@stryke/path/file-path-fns');
39
37
  var isParentPath = require('@stryke/path/is-parent-path');
40
38
  var titleCase = require('@stryke/string-format/title-case');
39
+ var exists = require('@stryke/fs/exists');
41
40
  var writeFile$1 = require('@stryke/fs/write-file');
42
41
  var prettier = require('prettier');
43
42
  var getConfig = require('@storm-software/config-tools/get-config');
@@ -2259,22 +2258,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
2259
2258
  await this.unlink(joinPaths.joinPaths(this.#context.dataPath, "fs.bin"));
2260
2259
  const message = new $__namespace.Message();
2261
2260
  const fs2 = message.initRoot(FileSystem);
2262
- const virtualFS = this.#unifiedFS.toJSON();
2263
- const virtualFiles = Object.entries(virtualFS).filter(([_, code]) => code);
2261
+ const virtualFiles = Object.entries(this.#unifiedFS.toJSON()).filter(([, code]) => code);
2264
2262
  const files = fs2._initFiles(virtualFiles.length);
2265
- virtualFiles.forEach(([path, code], index) => {
2263
+ virtualFiles.filter(([, code]) => code).forEach(([path, code], index) => {
2266
2264
  const fd = files.get(index);
2267
2265
  fd.path = path;
2268
2266
  fd.code = code || "";
2269
2267
  });
2270
2268
  const ids = fs2._initIds(Object.keys(this.ids).length);
2271
- Object.entries(this.ids).forEach(([id, path], index) => {
2269
+ Object.entries(this.ids).filter(([, path]) => path).forEach(([id, path], index) => {
2272
2270
  const fileId = ids.get(index);
2273
2271
  fileId.id = id;
2274
2272
  fileId.path = path;
2275
2273
  });
2276
2274
  const metadata = fs2._initMetadata(Object.keys(this.metadata).length);
2277
- Object.entries(this.metadata).forEach(([id, value], index) => {
2275
+ Object.entries(this.metadata).filter(([, value]) => value).forEach(([id, value], index) => {
2278
2276
  const fileMetadata = metadata.get(index);
2279
2277
  fileMetadata.id = id;
2280
2278
  fileMetadata.mode = value.mode;
@@ -2282,10 +2280,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
2282
2280
  fileMetadata.timestamp = value.timestamp ?? BigInt(Date.now());
2283
2281
  if (value.properties) {
2284
2282
  const props = fileMetadata._initProperties(Object.keys(value.properties).length);
2285
- Object.entries(value.properties).forEach(([key, val], propIndex) => {
2286
- const propData = props.get(propIndex);
2287
- propData.key = key;
2288
- propData.value = val;
2283
+ Object.entries(value.properties).forEach(([key, val], index2) => {
2284
+ const prop = props.get(index2);
2285
+ prop.key = key;
2286
+ prop.value = val;
2289
2287
  });
2290
2288
  }
2291
2289
  });
@@ -2668,7 +2666,7 @@ var PowerlinesContext = class _PowerlinesContext {
2668
2666
  * Get the path to the generated declaration file for the project
2669
2667
  */
2670
2668
  get dtsPath() {
2671
- return this.config.output.dts ? append.appendPath(this.config.output.dts, this.workspaceConfig.workspaceRoot) : join.joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "storm.d.ts");
2669
+ return this.config.output.dts ? append.appendPath(this.config.output.dts, this.workspaceConfig.workspaceRoot) : join.joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "powerlines.d.ts");
2672
2670
  }
2673
2671
  /**
2674
2672
  * Get the project root relative to the workspace root
@@ -3562,16 +3560,23 @@ ${context.entry.map((entry) => `- ${entry.input.file || entry.file}${entry.outpu
3562
3560
  ${console.formatLogMessage(context.config)}`);
3563
3561
  await writeMetaFile(context);
3564
3562
  context.persistedMeta = context.meta;
3565
- if (!exists.existsSync(context.cachePath)) {
3566
- await helpers.createDirectory(context.cachePath);
3563
+ if (!context.fs.existsSync(context.cachePath)) {
3564
+ await context.fs.mkdir(context.cachePath, {
3565
+ mode: "fs"
3566
+ });
3567
3567
  }
3568
- if (!exists.existsSync(context.dataPath)) {
3569
- await helpers.createDirectory(context.dataPath);
3568
+ if (!context.fs.existsSync(context.dataPath)) {
3569
+ await context.fs.mkdir(context.dataPath, {
3570
+ mode: "fs"
3571
+ });
3570
3572
  }
3571
3573
  await this.callPreHook(context, "prepare");
3572
3574
  await this.callNormalHook(context, "prepare");
3573
3575
  if (context.config.output.dts !== false) {
3574
3576
  context.log(types.LogLevelLabel.TRACE, `Preparing the TypeScript definitions for the Powerlines project.`);
3577
+ if (context.fs.existsSync(context.dtsPath)) {
3578
+ await context.fs.unlink(context.dtsPath);
3579
+ }
3575
3580
  context.log(types.LogLevelLabel.TRACE, "Transforming built-ins runtime modules files.");
3576
3581
  const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
3577
3582
  const result2 = await core.transformAsync(file.code.toString(), {
@@ -3622,7 +3627,7 @@ ${console.formatLogMessage(context.config)}`);
3622
3627
  );
3623
3628
  context.log(types.LogLevelLabel.TRACE, "Parsing TypeScript configuration for the Powerlines project.");
3624
3629
  let generatedTypes = await emitTypes(context, files);
3625
- context.log(types.LogLevelLabel.TRACE, `Generating TypeScript declaration file in ${context.config.output.dts}.`);
3630
+ context.log(types.LogLevelLabel.TRACE, `Generating TypeScript declaration file ${context.dtsPath}.`);
3626
3631
  const directives = [];
3627
3632
  let result = await this.callPreHook(context, "generateTypes", generatedTypes);
3628
3633
  if (result) {
@@ -3657,7 +3662,7 @@ ${console.formatLogMessage(context.config)}`);
3657
3662
  generatedTypes = result;
3658
3663
  }
3659
3664
  }
3660
- await context.fs.writeFile(context.config.output.dts, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
3665
+ await context.fs.writeFile(context.dtsPath, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
3661
3666
 
3662
3667
  ` : ""}${getFileHeader(context, {
3663
3668
  directive: null,
@@ -3847,7 +3852,6 @@ ${formatTypes(generatedTypes)}
3847
3852
  this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution started");
3848
3853
  await this.#executeEnvironments(async (context) => {
3849
3854
  await this.callHook(context, "finalize");
3850
- context.fs[chunkAYKZK666_cjs.__VFS_REVERT__]();
3851
3855
  await context.fs.dispose();
3852
3856
  });
3853
3857
  this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution completed");
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
4
- var chunkJ42CWDHS_cjs = require('./chunk-J42CWDHS.cjs');
4
+ var chunk7RWEBVQC_cjs = require('./chunk-7RWEBVQC.cjs');
5
5
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
6
6
  var environmentChecks = require('@stryke/env/environment-checks');
7
7
  var defu = require('defu');
@@ -83,7 +83,7 @@ function extractViteConfig(context) {
83
83
  chunkUSNT2KNT_cjs.__name(extractViteConfig, "extractViteConfig");
84
84
 
85
85
  // src/vite.ts
86
- var vite = unplugin.createVitePlugin(chunkJ42CWDHS_cjs.createUnpluginFactory("vite", (api, plugin) => {
86
+ var vite = unplugin.createVitePlugin(chunk7RWEBVQC_cjs.createUnpluginFactory("vite", (api, plugin) => {
87
87
  return {
88
88
  ...plugin,
89
89
  vite: {
package/dist/esbuild.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkMBWFPGQL_cjs = require('./chunk-MBWFPGQL.cjs');
5
+ var chunkFQXHIKCM_cjs = require('./chunk-FQXHIKCM.cjs');
6
6
  require('./chunk-5IBA5HC2.cjs');
7
- require('./chunk-J42CWDHS.cjs');
8
- require('./chunk-MWURGZO3.cjs');
7
+ require('./chunk-7RWEBVQC.cjs');
8
+ require('./chunk-QH4TS5V4.cjs');
9
9
  require('./chunk-ETKZMGLN.cjs');
10
10
  require('./chunk-PAMSESZV.cjs');
11
11
  require('./chunk-AYKZK666.cjs');
@@ -15,13 +15,13 @@ require('./chunk-USNT2KNT.cjs');
15
15
 
16
16
  Object.defineProperty(exports, "default", {
17
17
  enumerable: true,
18
- get: function () { return chunkMBWFPGQL_cjs.esbuild_default; }
18
+ get: function () { return chunkFQXHIKCM_cjs.esbuild_default; }
19
19
  });
20
20
  Object.defineProperty(exports, "esbuild", {
21
21
  enumerable: true,
22
- get: function () { return chunkMBWFPGQL_cjs.esbuild; }
22
+ get: function () { return chunkFQXHIKCM_cjs.esbuild; }
23
23
  });
24
24
  Object.defineProperty(exports, "module.exports", {
25
25
  enumerable: true,
26
- get: function () { return chunkMBWFPGQL_cjs.esbuild; }
26
+ get: function () { return chunkFQXHIKCM_cjs.esbuild; }
27
27
  });
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
- export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-4YOH66OR.js';
1
+ export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-3TNZWTLG.js';
2
2
  import './chunk-VBR53KGY.js';
3
- import './chunk-6F2RGMWO.js';
4
- import './chunk-5VVIGLK7.js';
3
+ import './chunk-OB7MYWHE.js';
4
+ import './chunk-BCHFSOQ4.js';
5
5
  import './chunk-JQCWV4DT.js';
6
6
  import './chunk-JKBJF3UI.js';
7
7
  import './chunk-VT7NVLLU.js';
package/dist/farm.cjs CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkJ42CWDHS_cjs = require('./chunk-J42CWDHS.cjs');
6
- require('./chunk-MWURGZO3.cjs');
5
+ var chunk7RWEBVQC_cjs = require('./chunk-7RWEBVQC.cjs');
6
+ require('./chunk-QH4TS5V4.cjs');
7
7
  require('./chunk-ETKZMGLN.cjs');
8
8
  require('./chunk-PAMSESZV.cjs');
9
9
  require('./chunk-AYKZK666.cjs');
10
10
  require('./chunk-USNT2KNT.cjs');
11
11
  var unplugin = require('unplugin');
12
12
 
13
- var farm = unplugin.createFarmPlugin(chunkJ42CWDHS_cjs.createUnpluginFactory("farm"));
13
+ var farm = unplugin.createFarmPlugin(chunk7RWEBVQC_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-6F2RGMWO.js';
2
- import './chunk-5VVIGLK7.js';
1
+ import { createUnpluginFactory } from './chunk-OB7MYWHE.js';
2
+ import './chunk-BCHFSOQ4.js';
3
3
  import './chunk-JQCWV4DT.js';
4
4
  import './chunk-JKBJF3UI.js';
5
5
  import './chunk-VT7NVLLU.js';
package/dist/index.cjs CHANGED
@@ -14,14 +14,14 @@ require('./chunk-7GYTTM4M.cjs');
14
14
  var chunkXP7OML7S_cjs = require('./chunk-XP7OML7S.cjs');
15
15
  require('./chunk-HQFZ64VC.cjs');
16
16
  var chunkBUR2JQ6G_cjs = require('./chunk-BUR2JQ6G.cjs');
17
- var chunkMWURGZO3_cjs = require('./chunk-MWURGZO3.cjs');
17
+ var chunkQH4TS5V4_cjs = require('./chunk-QH4TS5V4.cjs');
18
18
  var chunkETKZMGLN_cjs = require('./chunk-ETKZMGLN.cjs');
19
19
  var chunkPAMSESZV_cjs = require('./chunk-PAMSESZV.cjs');
20
20
  var chunkAYKZK666_cjs = require('./chunk-AYKZK666.cjs');
21
21
  require('./chunk-USNT2KNT.cjs');
22
22
 
23
23
  // src/index.ts
24
- var index_default = chunkMWURGZO3_cjs.PowerlinesAPI;
24
+ var index_default = chunkQH4TS5V4_cjs.PowerlinesAPI;
25
25
 
26
26
  Object.defineProperty(exports, "LogLevel", {
27
27
  enumerable: true,
@@ -33,39 +33,39 @@ Object.defineProperty(exports, "defineConfig", {
33
33
  });
34
34
  Object.defineProperty(exports, "FileData", {
35
35
  enumerable: true,
36
- get: function () { return chunkMWURGZO3_cjs.FileData; }
36
+ get: function () { return chunkQH4TS5V4_cjs.FileData; }
37
37
  });
38
38
  Object.defineProperty(exports, "FileId", {
39
39
  enumerable: true,
40
- get: function () { return chunkMWURGZO3_cjs.FileId; }
40
+ get: function () { return chunkQH4TS5V4_cjs.FileId; }
41
41
  });
42
42
  Object.defineProperty(exports, "FileMetadata", {
43
43
  enumerable: true,
44
- get: function () { return chunkMWURGZO3_cjs.FileMetadata; }
44
+ get: function () { return chunkQH4TS5V4_cjs.FileMetadata; }
45
45
  });
46
46
  Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
47
47
  enumerable: true,
48
- get: function () { return chunkMWURGZO3_cjs.FileMetadata_KeyValuePair; }
48
+ get: function () { return chunkQH4TS5V4_cjs.FileMetadata_KeyValuePair; }
49
49
  });
50
50
  Object.defineProperty(exports, "FileSystem", {
51
51
  enumerable: true,
52
- get: function () { return chunkMWURGZO3_cjs.FileSystem; }
52
+ get: function () { return chunkQH4TS5V4_cjs.FileSystem; }
53
53
  });
54
54
  Object.defineProperty(exports, "FileType", {
55
55
  enumerable: true,
56
- get: function () { return chunkMWURGZO3_cjs.FileType; }
56
+ get: function () { return chunkQH4TS5V4_cjs.FileType; }
57
57
  });
58
58
  Object.defineProperty(exports, "PowerlinesAPI", {
59
59
  enumerable: true,
60
- get: function () { return chunkMWURGZO3_cjs.PowerlinesAPI; }
60
+ get: function () { return chunkQH4TS5V4_cjs.PowerlinesAPI; }
61
61
  });
62
62
  Object.defineProperty(exports, "PreserveSignatureType", {
63
63
  enumerable: true,
64
- get: function () { return chunkMWURGZO3_cjs.PreserveSignatureType; }
64
+ get: function () { return chunkQH4TS5V4_cjs.PreserveSignatureType; }
65
65
  });
66
66
  Object.defineProperty(exports, "_capnpFileId", {
67
67
  enumerable: true,
68
- get: function () { return chunkMWURGZO3_cjs._capnpFileId; }
68
+ get: function () { return chunkQH4TS5V4_cjs._capnpFileId; }
69
69
  });
70
70
  Object.defineProperty(exports, "PLUGIN_NON_HOOK_FIELDS", {
71
71
  enumerable: true,
package/dist/index.js CHANGED
@@ -10,8 +10,8 @@ import './chunk-DRXFQCNC.js';
10
10
  export { LogLevel } from './chunk-W5X3ZEZ5.js';
11
11
  import './chunk-JGB5YQ2U.js';
12
12
  export { defineConfig } from './chunk-CJSGAITR.js';
13
- import { PowerlinesAPI } from './chunk-5VVIGLK7.js';
14
- export { FileData, FileId, FileMetadata, FileMetadata_KeyValuePair, FileSystem, FileType, PowerlinesAPI, PreserveSignatureType, _capnpFileId } from './chunk-5VVIGLK7.js';
13
+ import { PowerlinesAPI } from './chunk-BCHFSOQ4.js';
14
+ export { FileData, FileId, FileMetadata, FileMetadata_KeyValuePair, FileSystem, FileType, PowerlinesAPI, PreserveSignatureType, _capnpFileId } from './chunk-BCHFSOQ4.js';
15
15
  export { PLUGIN_NON_HOOK_FIELDS } from './chunk-JQCWV4DT.js';
16
16
  export { SUPPORTED_COMMANDS } from './chunk-JKBJF3UI.js';
17
17
  export { __VFS_PATCH__, __VFS_REVERT__ } from './chunk-VT7NVLLU.js';
@@ -1561,22 +1561,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
1561
1561
  await this.unlink(joinPaths.joinPaths(this.#context.dataPath, "fs.bin"));
1562
1562
  const message = new $__namespace.Message();
1563
1563
  const fs2 = message.initRoot(FileSystem);
1564
- const virtualFS = this.#unifiedFS.toJSON();
1565
- const virtualFiles = Object.entries(virtualFS).filter(([_, code]) => code);
1564
+ const virtualFiles = Object.entries(this.#unifiedFS.toJSON()).filter(([, code]) => code);
1566
1565
  const files = fs2._initFiles(virtualFiles.length);
1567
- virtualFiles.forEach(([path, code], index) => {
1566
+ virtualFiles.filter(([, code]) => code).forEach(([path, code], index) => {
1568
1567
  const fd = files.get(index);
1569
1568
  fd.path = path;
1570
1569
  fd.code = code || "";
1571
1570
  });
1572
1571
  const ids = fs2._initIds(Object.keys(this.ids).length);
1573
- Object.entries(this.ids).forEach(([id, path], index) => {
1572
+ Object.entries(this.ids).filter(([, path]) => path).forEach(([id, path], index) => {
1574
1573
  const fileId = ids.get(index);
1575
1574
  fileId.id = id;
1576
1575
  fileId.path = path;
1577
1576
  });
1578
1577
  const metadata = fs2._initMetadata(Object.keys(this.metadata).length);
1579
- Object.entries(this.metadata).forEach(([id, value], index) => {
1578
+ Object.entries(this.metadata).filter(([, value]) => value).forEach(([id, value], index) => {
1580
1579
  const fileMetadata = metadata.get(index);
1581
1580
  fileMetadata.id = id;
1582
1581
  fileMetadata.mode = value.mode;
@@ -1584,10 +1583,10 @@ var VirtualFileSystem = class _VirtualFileSystem {
1584
1583
  fileMetadata.timestamp = value.timestamp ?? BigInt(Date.now());
1585
1584
  if (value.properties) {
1586
1585
  const props = fileMetadata._initProperties(Object.keys(value.properties).length);
1587
- Object.entries(value.properties).forEach(([key, val], propIndex) => {
1588
- const propData = props.get(propIndex);
1589
- propData.key = key;
1590
- propData.value = val;
1586
+ Object.entries(value.properties).forEach(([key, val], index2) => {
1587
+ const prop = props.get(index2);
1588
+ prop.key = key;
1589
+ prop.value = val;
1591
1590
  });
1592
1591
  }
1593
1592
  });
@@ -1856,7 +1855,7 @@ var PowerlinesContext = class _PowerlinesContext {
1856
1855
  * Get the path to the generated declaration file for the project
1857
1856
  */
1858
1857
  get dtsPath() {
1859
- return this.config.output.dts ? append.appendPath(this.config.output.dts, this.workspaceConfig.workspaceRoot) : join.joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "storm.d.ts");
1858
+ return this.config.output.dts ? append.appendPath(this.config.output.dts, this.workspaceConfig.workspaceRoot) : join.joinPaths(this.workspaceConfig.workspaceRoot, this.config.projectRoot, "powerlines.d.ts");
1860
1859
  }
1861
1860
  /**
1862
1861
  * Get the project root relative to the workspace root
@@ -2350,7 +2349,6 @@ var PowerlinesContext = class _PowerlinesContext {
2350
2349
 
2351
2350
  exports.PowerlinesContext = PowerlinesContext;
2352
2351
  exports.VirtualFileSystem = VirtualFileSystem;
2353
- exports.__VFS_REVERT__ = __VFS_REVERT__;
2354
2352
  exports.addPluginHook = addPluginHook;
2355
2353
  exports.checkDedupe = checkDedupe;
2356
2354
  exports.getHookHandler = getHookHandler;