powerlines 0.40.10 → 0.40.12

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 (50) hide show
  1. package/dist/{api-Ba2OWiVz.cjs → api-5yRaVqKi.cjs} +21 -14
  2. package/dist/{api-D9WIJJt3.mjs → api-U8R0Wudn.mjs} +22 -15
  3. package/dist/api-U8R0Wudn.mjs.map +1 -0
  4. package/dist/astro.cjs +2 -2
  5. package/dist/astro.mjs +2 -2
  6. package/dist/context/index.cjs +1 -1
  7. package/dist/context/index.mjs +1 -1
  8. package/dist/{esbuild-CYu81t25.cjs → esbuild-CvU35Uym.cjs} +1 -1
  9. package/dist/{esbuild-CCuAvKw8.mjs → esbuild-JHTyuSrN.mjs} +2 -2
  10. package/dist/{esbuild-CCuAvKw8.mjs.map → esbuild-JHTyuSrN.mjs.map} +1 -1
  11. package/dist/esbuild.cjs +2 -2
  12. package/dist/esbuild.mjs +2 -2
  13. package/dist/farm.cjs +1 -1
  14. package/dist/farm.mjs +1 -1
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.mjs +1 -1
  17. package/dist/next.cjs +2 -2
  18. package/dist/next.mjs +2 -2
  19. package/dist/nuxt.cjs +3 -3
  20. package/dist/nuxt.mjs +3 -3
  21. package/dist/{rolldown-CHbI0iMF.mjs → rolldown-BG5c97Ej.mjs} +2 -2
  22. package/dist/{rolldown-CHbI0iMF.mjs.map → rolldown-BG5c97Ej.mjs.map} +1 -1
  23. package/dist/{rolldown-CWW8TO6C.cjs → rolldown-BU_vpPUp.cjs} +1 -1
  24. package/dist/rolldown.cjs +2 -2
  25. package/dist/rolldown.mjs +2 -2
  26. package/dist/rollup.cjs +1 -1
  27. package/dist/rollup.mjs +1 -1
  28. package/dist/rspack.cjs +1 -1
  29. package/dist/rspack.mjs +1 -1
  30. package/dist/storage/index.d.cts.map +1 -1
  31. package/dist/tsdown.cjs +2 -2
  32. package/dist/tsdown.mjs +2 -2
  33. package/dist/tsup.cjs +2 -2
  34. package/dist/tsup.mjs +2 -2
  35. package/dist/unloader.cjs +1 -1
  36. package/dist/unloader.mjs +1 -1
  37. package/dist/unplugin.cjs +1 -1
  38. package/dist/unplugin.mjs +1 -1
  39. package/dist/{vite-BSeJ1LCi.cjs → vite-BSkZRWtx.cjs} +1 -1
  40. package/dist/{vite-aRGnKynz.mjs → vite-wRQiYRc5.mjs} +2 -2
  41. package/dist/{vite-aRGnKynz.mjs.map → vite-wRQiYRc5.mjs.map} +1 -1
  42. package/dist/vite.cjs +2 -2
  43. package/dist/vite.mjs +2 -2
  44. package/dist/{webpack-DlkAraA4.mjs → webpack-DaiyexVJ.mjs} +2 -2
  45. package/dist/{webpack-DlkAraA4.mjs.map → webpack-DaiyexVJ.mjs.map} +1 -1
  46. package/dist/{webpack-BQiVW7uT.cjs → webpack-V4jTwNhy.cjs} +1 -1
  47. package/dist/webpack.cjs +2 -2
  48. package/dist/webpack.mjs +2 -2
  49. package/package.json +25 -25
  50. package/dist/api-D9WIJJt3.mjs.map +0 -1
@@ -75,7 +75,7 @@ let unplugin = require("unplugin");
75
75
 
76
76
  //#region package.json
77
77
  var name = "powerlines";
78
- var version = "0.40.10";
78
+ var version = "0.40.12";
79
79
 
80
80
  //#endregion
81
81
  //#region src/_internal/helpers/generate-types.ts
@@ -1570,15 +1570,17 @@ var VirtualFileSystem = class VirtualFileSystem {
1570
1570
  * @returns A promise that resolves to the resolved module path.
1571
1571
  */
1572
1572
  async resolve(id, importer, options = {}) {
1573
- let result = await this.#innerResolve(id, importer, options);
1574
- if (result && options.isFile && await this.isDirectory(result) && !(0, __stryke_path_file_path_fns.hasFileExtension)(result)) {
1575
- for (const ext of DEFAULT_EXTENSIONS) {
1576
- result = await this.resolve(`${result}.${ext}`, importer, options);
1577
- if (result) return result;
1573
+ const origResult = await this.#innerResolve(id, importer, options);
1574
+ if (origResult && options.isFile && await this.isDirectory(origResult)) {
1575
+ const indexResult = await this.resolve((0, __stryke_path_join.joinPaths)(origResult, "index"), importer, options);
1576
+ if (indexResult) return indexResult;
1577
+ if (!(0, __stryke_path_file_path_fns.hasFileExtension)(origResult)) for (const ext of DEFAULT_EXTENSIONS) {
1578
+ const extResult = await this.resolve(`${origResult}.${ext}`, importer, options);
1579
+ if (extResult) return extResult;
1578
1580
  }
1579
1581
  return;
1580
1582
  }
1581
- return result;
1583
+ return origResult;
1582
1584
  }
1583
1585
  /**
1584
1586
  * A synchronous helper function to resolve modules using the Jiti resolver
@@ -1597,15 +1599,17 @@ var VirtualFileSystem = class VirtualFileSystem {
1597
1599
  * @returns The resolved module path.
1598
1600
  */
1599
1601
  resolveSync(id, importer, options = {}) {
1600
- let result = this.#innerResolveSync(id, importer, options);
1601
- if (result && options.isFile && this.isDirectorySync(result) && !(0, __stryke_path_file_path_fns.hasFileExtension)(result)) {
1602
- for (const ext of DEFAULT_EXTENSIONS) {
1603
- result = this.resolveSync(`${result}.${ext}`, importer, options);
1604
- if (result) return result;
1602
+ const origResult = this.#innerResolveSync(id, importer, options);
1603
+ if (origResult && options.isFile && this.isDirectorySync(origResult)) {
1604
+ const indexResult = this.resolveSync((0, __stryke_path_join.joinPaths)(origResult, "index"), importer, options);
1605
+ if (indexResult) return indexResult;
1606
+ if (!(0, __stryke_path_file_path_fns.hasFileExtension)(origResult)) for (const ext of DEFAULT_EXTENSIONS) {
1607
+ const extResult = this.resolveSync(`${origResult}.${ext}`, importer, options);
1608
+ if (extResult) return extResult;
1605
1609
  }
1606
1610
  return;
1607
1611
  }
1608
- return result;
1612
+ return origResult;
1609
1613
  }
1610
1614
  /**
1611
1615
  * Disposes of the virtual file system (VFS) by saving its state to disk.
@@ -2656,7 +2660,10 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2656
2660
  ...result,
2657
2661
  id: `${prefix}${result.id}`
2658
2662
  };
2659
- result = await ctx.resolve(id, importer, opts);
2663
+ result = await ctx.resolve(id, importer, {
2664
+ isFile: true,
2665
+ ...opts
2666
+ });
2660
2667
  if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return `${prefix}${result}`;
2661
2668
  else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
2662
2669
  ...result,
@@ -70,7 +70,7 @@ import { setParseImpl } from "unplugin";
70
70
 
71
71
  //#region package.json
72
72
  var name = "powerlines";
73
- var version = "0.40.10";
73
+ var version = "0.40.12";
74
74
 
75
75
  //#endregion
76
76
  //#region src/_internal/helpers/generate-types.ts
@@ -1565,15 +1565,17 @@ var VirtualFileSystem = class VirtualFileSystem {
1565
1565
  * @returns A promise that resolves to the resolved module path.
1566
1566
  */
1567
1567
  async resolve(id, importer, options = {}) {
1568
- let result = await this.#innerResolve(id, importer, options);
1569
- if (result && options.isFile && await this.isDirectory(result) && !hasFileExtension(result)) {
1570
- for (const ext of DEFAULT_EXTENSIONS) {
1571
- result = await this.resolve(`${result}.${ext}`, importer, options);
1572
- if (result) return result;
1568
+ const origResult = await this.#innerResolve(id, importer, options);
1569
+ if (origResult && options.isFile && await this.isDirectory(origResult)) {
1570
+ const indexResult = await this.resolve(joinPaths$1(origResult, "index"), importer, options);
1571
+ if (indexResult) return indexResult;
1572
+ if (!hasFileExtension(origResult)) for (const ext of DEFAULT_EXTENSIONS) {
1573
+ const extResult = await this.resolve(`${origResult}.${ext}`, importer, options);
1574
+ if (extResult) return extResult;
1573
1575
  }
1574
1576
  return;
1575
1577
  }
1576
- return result;
1578
+ return origResult;
1577
1579
  }
1578
1580
  /**
1579
1581
  * A synchronous helper function to resolve modules using the Jiti resolver
@@ -1592,15 +1594,17 @@ var VirtualFileSystem = class VirtualFileSystem {
1592
1594
  * @returns The resolved module path.
1593
1595
  */
1594
1596
  resolveSync(id, importer, options = {}) {
1595
- let result = this.#innerResolveSync(id, importer, options);
1596
- if (result && options.isFile && this.isDirectorySync(result) && !hasFileExtension(result)) {
1597
- for (const ext of DEFAULT_EXTENSIONS) {
1598
- result = this.resolveSync(`${result}.${ext}`, importer, options);
1599
- if (result) return result;
1597
+ const origResult = this.#innerResolveSync(id, importer, options);
1598
+ if (origResult && options.isFile && this.isDirectorySync(origResult)) {
1599
+ const indexResult = this.resolveSync(joinPaths$1(origResult, "index"), importer, options);
1600
+ if (indexResult) return indexResult;
1601
+ if (!hasFileExtension(origResult)) for (const ext of DEFAULT_EXTENSIONS) {
1602
+ const extResult = this.resolveSync(`${origResult}.${ext}`, importer, options);
1603
+ if (extResult) return extResult;
1600
1604
  }
1601
1605
  return;
1602
1606
  }
1603
- return result;
1607
+ return origResult;
1604
1608
  }
1605
1609
  /**
1606
1610
  * Disposes of the virtual file system (VFS) by saving its state to disk.
@@ -2651,7 +2655,10 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2651
2655
  ...result,
2652
2656
  id: `${prefix}${result.id}`
2653
2657
  };
2654
- result = await ctx.resolve(id, importer, opts);
2658
+ result = await ctx.resolve(id, importer, {
2659
+ isFile: true,
2660
+ ...opts
2661
+ });
2655
2662
  if (isSetString(result)) return `${prefix}${result}`;
2656
2663
  else if (isSetObject(result)) return {
2657
2664
  ...result,
@@ -3843,4 +3850,4 @@ Note: Please ensure the plugin package's default export is a class that extends
3843
3850
 
3844
3851
  //#endregion
3845
3852
  export { _capnpFileId as _, createUnpluginFactory as a, createUnpluginModuleResolutionFunctions as c, PowerlinesContext as d, FileId as f, FileSystem as g, FileStorage as h, createPluginContext as i, combineContexts as l, FileMetadata_KeyValuePair as m, PowerlinesAPIContext as n, createUnplugin as o, FileMetadata as p, PowerlinesEnvironmentContext as r, createUnpluginResolver as s, PowerlinesAPI as t, isUnpluginBuilderVariant as u, name as v, version as y };
3846
- //# sourceMappingURL=api-D9WIJJt3.mjs.map
3853
+ //# sourceMappingURL=api-U8R0Wudn.mjs.map