powerlines 0.40.18 → 0.40.20

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 (75) hide show
  1. package/dist/{api-CMZBG3oq.cjs → api-BESwNTu1.cjs} +29 -26
  2. package/dist/{api-BpPToWwp.mjs → api-DVNFobLD.mjs} +30 -27
  3. package/dist/api-DVNFobLD.mjs.map +1 -0
  4. package/dist/astro.cjs +2 -2
  5. package/dist/astro.d.mts +1 -1
  6. package/dist/astro.mjs +2 -2
  7. package/dist/context/index.cjs +1 -1
  8. package/dist/context/index.d.mts +1 -1
  9. package/dist/context/index.mjs +1 -1
  10. package/dist/{esbuild-DhtbXiqW.cjs → esbuild-1XefRwHm.cjs} +1 -1
  11. package/dist/{esbuild-Cvb9P_ZW.mjs → esbuild-84-wpkWu.mjs} +2 -2
  12. package/dist/{esbuild-Cvb9P_ZW.mjs.map → esbuild-84-wpkWu.mjs.map} +1 -1
  13. package/dist/esbuild.cjs +2 -2
  14. package/dist/esbuild.d.mts +1 -1
  15. package/dist/esbuild.mjs +2 -2
  16. package/dist/farm.cjs +1 -1
  17. package/dist/farm.d.mts +1 -1
  18. package/dist/farm.mjs +1 -1
  19. package/dist/{index-C1wDpmrr.d.mts → index-2JXW-b2-.d.mts} +2 -2
  20. package/dist/{index-C1wDpmrr.d.mts.map → index-2JXW-b2-.d.mts.map} +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.cts +1 -1
  23. package/dist/index.d.mts +1 -1
  24. package/dist/index.mjs +1 -1
  25. package/dist/next.cjs +2 -2
  26. package/dist/next.mjs +2 -2
  27. package/dist/nuxt.cjs +3 -3
  28. package/dist/nuxt.d.mts +1 -1
  29. package/dist/nuxt.mjs +3 -3
  30. package/dist/{plugin-Ba95Lv5d.d.cts → plugin-B9TQt-p0.d.cts} +2 -2
  31. package/dist/{plugin-Ba95Lv5d.d.cts.map → plugin-B9TQt-p0.d.cts.map} +1 -1
  32. package/dist/plugin-utils.d.mts +1 -1
  33. package/dist/{rolldown-msQVl4gL.mjs → rolldown-CCW9um3c.mjs} +2 -2
  34. package/dist/{rolldown-msQVl4gL.mjs.map → rolldown-CCW9um3c.mjs.map} +1 -1
  35. package/dist/{rolldown-CGkyfhQb.cjs → rolldown-CTf5NRft.cjs} +1 -1
  36. package/dist/rolldown.cjs +2 -2
  37. package/dist/rolldown.d.mts +1 -1
  38. package/dist/rolldown.mjs +2 -2
  39. package/dist/rollup.cjs +1 -1
  40. package/dist/rollup.d.mts +1 -1
  41. package/dist/rollup.mjs +1 -1
  42. package/dist/rspack.cjs +1 -1
  43. package/dist/rspack.d.mts +1 -1
  44. package/dist/rspack.mjs +1 -1
  45. package/dist/storage/index.d.cts.map +1 -1
  46. package/dist/storage/index.d.mts +1 -1
  47. package/dist/tsdown.cjs +3 -3
  48. package/dist/tsdown.d.mts +1 -1
  49. package/dist/tsdown.mjs +3 -3
  50. package/dist/tsdown.mjs.map +1 -1
  51. package/dist/tsup.cjs +2 -2
  52. package/dist/tsup.d.mts +1 -1
  53. package/dist/tsup.mjs +2 -2
  54. package/dist/typescript/index.d.mts +1 -1
  55. package/dist/unloader.cjs +1 -1
  56. package/dist/unloader.d.mts +1 -1
  57. package/dist/unloader.mjs +1 -1
  58. package/dist/unplugin.cjs +1 -1
  59. package/dist/unplugin.d.cts +1 -1
  60. package/dist/unplugin.d.mts +1 -1
  61. package/dist/unplugin.mjs +1 -1
  62. package/dist/{vite-CEZ8iJOi.mjs → vite-BEFn-UDD.mjs} +2 -2
  63. package/dist/{vite-CEZ8iJOi.mjs.map → vite-BEFn-UDD.mjs.map} +1 -1
  64. package/dist/{vite-kYt2G76D.cjs → vite-DeBLOF8V.cjs} +1 -1
  65. package/dist/vite.cjs +2 -2
  66. package/dist/vite.d.mts +1 -1
  67. package/dist/vite.mjs +2 -2
  68. package/dist/{webpack-DBUxefMB.mjs → webpack-Bs3j748Y.mjs} +2 -2
  69. package/dist/{webpack-DBUxefMB.mjs.map → webpack-Bs3j748Y.mjs.map} +1 -1
  70. package/dist/{webpack-47f2tjtr.cjs → webpack-D8R3jqLK.cjs} +1 -1
  71. package/dist/webpack.cjs +2 -2
  72. package/dist/webpack.d.mts +1 -1
  73. package/dist/webpack.mjs +2 -2
  74. package/package.json +29 -29
  75. package/dist/api-BpPToWwp.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.18";
78
+ var version = "0.40.20";
79
79
 
80
80
  //#endregion
81
81
  //#region src/_internal/helpers/generate-types.ts
@@ -2129,7 +2129,7 @@ var PowerlinesContext = class PowerlinesContext {
2129
2129
  return {
2130
2130
  id: result,
2131
2131
  external: !(0, bundle_require.match)(moduleId, this.config.resolve.noExternal) && ((0, bundle_require.match)(moduleId, this.config.resolve.external) || moduleId.startsWith("node:") || this.fs.isVirtual(moduleId) && this.config.projectType !== "application" || this.config.resolve.skipNodeModulesBundle && !/^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/.test(moduleId)),
2132
- virtual: this.fs.isVirtual(moduleId)
2132
+ virtual: true
2133
2133
  };
2134
2134
  }
2135
2135
  if (this.config.resolve.skipNodeModulesBundle) {
@@ -2629,8 +2629,8 @@ function isUnpluginBuilderVariant(str) {
2629
2629
 
2630
2630
  //#endregion
2631
2631
  //#region ../core/src/lib/unplugin/module-resolution.ts
2632
- const VIRTUAL_MODULE_PREFIX = "powerlines-virtual:";
2633
- const VIRTUAL_MODULE_PREFIX_REGEX = /^powerlines-virtual:/;
2632
+ const VIRTUAL_MODULE_PREFIX = "__powerlines-virtual:";
2633
+ const VIRTUAL_MODULE_PREFIX_REGEX = /^__powerlines-virtual:/;
2634
2634
  /**
2635
2635
  * Creates the module resolution hook functions for a Powerlines unplugin plugin instance.
2636
2636
  *
@@ -2688,28 +2688,31 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2688
2688
  };
2689
2689
  return null;
2690
2690
  },
2691
- load: { async handler(id) {
2692
- const moduleId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2693
- let result = await ctx.$$internal.callHook("load", {
2694
- sequential: true,
2695
- result: "first",
2696
- order: "pre"
2697
- }, moduleId);
2698
- if (result) return result;
2699
- result = await ctx.$$internal.callHook("load", {
2700
- sequential: true,
2701
- result: "first",
2702
- order: "normal"
2703
- }, moduleId);
2704
- if (result) return result;
2705
- result = await ctx.load(moduleId);
2706
- if (result) return result;
2707
- return ctx.$$internal.callHook("load", {
2708
- sequential: true,
2709
- result: "first",
2710
- order: "post"
2711
- }, moduleId);
2712
- } }
2691
+ load: {
2692
+ filter: options.prefix ? { id: { include: VIRTUAL_MODULE_PREFIX_REGEX } } : void 0,
2693
+ async handler(id) {
2694
+ const moduleId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2695
+ let result = await ctx.$$internal.callHook("load", {
2696
+ sequential: true,
2697
+ result: "first",
2698
+ order: "pre"
2699
+ }, moduleId);
2700
+ if (result) return result;
2701
+ result = await ctx.$$internal.callHook("load", {
2702
+ sequential: true,
2703
+ result: "first",
2704
+ order: "normal"
2705
+ }, moduleId);
2706
+ if (result) return result;
2707
+ result = await ctx.load(moduleId);
2708
+ if (result) return result;
2709
+ return ctx.$$internal.callHook("load", {
2710
+ sequential: true,
2711
+ result: "first",
2712
+ order: "post"
2713
+ }, moduleId);
2714
+ }
2715
+ }
2713
2716
  };
2714
2717
  }
2715
2718
 
@@ -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.18";
73
+ var version = "0.40.20";
74
74
 
75
75
  //#endregion
76
76
  //#region src/_internal/helpers/generate-types.ts
@@ -2124,7 +2124,7 @@ var PowerlinesContext = class PowerlinesContext {
2124
2124
  return {
2125
2125
  id: result,
2126
2126
  external: !match(moduleId, this.config.resolve.noExternal) && (match(moduleId, this.config.resolve.external) || moduleId.startsWith("node:") || this.fs.isVirtual(moduleId) && this.config.projectType !== "application" || this.config.resolve.skipNodeModulesBundle && !/^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/.test(moduleId)),
2127
- virtual: this.fs.isVirtual(moduleId)
2127
+ virtual: true
2128
2128
  };
2129
2129
  }
2130
2130
  if (this.config.resolve.skipNodeModulesBundle) {
@@ -2624,8 +2624,8 @@ function isUnpluginBuilderVariant(str) {
2624
2624
 
2625
2625
  //#endregion
2626
2626
  //#region ../core/src/lib/unplugin/module-resolution.ts
2627
- const VIRTUAL_MODULE_PREFIX = "powerlines-virtual:";
2628
- const VIRTUAL_MODULE_PREFIX_REGEX = /^powerlines-virtual:/;
2627
+ const VIRTUAL_MODULE_PREFIX = "__powerlines-virtual:";
2628
+ const VIRTUAL_MODULE_PREFIX_REGEX = /^__powerlines-virtual:/;
2629
2629
  /**
2630
2630
  * Creates the module resolution hook functions for a Powerlines unplugin plugin instance.
2631
2631
  *
@@ -2683,28 +2683,31 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2683
2683
  };
2684
2684
  return null;
2685
2685
  },
2686
- load: { async handler(id) {
2687
- const moduleId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2688
- let result = await ctx.$$internal.callHook("load", {
2689
- sequential: true,
2690
- result: "first",
2691
- order: "pre"
2692
- }, moduleId);
2693
- if (result) return result;
2694
- result = await ctx.$$internal.callHook("load", {
2695
- sequential: true,
2696
- result: "first",
2697
- order: "normal"
2698
- }, moduleId);
2699
- if (result) return result;
2700
- result = await ctx.load(moduleId);
2701
- if (result) return result;
2702
- return ctx.$$internal.callHook("load", {
2703
- sequential: true,
2704
- result: "first",
2705
- order: "post"
2706
- }, moduleId);
2707
- } }
2686
+ load: {
2687
+ filter: options.prefix ? { id: { include: VIRTUAL_MODULE_PREFIX_REGEX } } : void 0,
2688
+ async handler(id) {
2689
+ const moduleId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2690
+ let result = await ctx.$$internal.callHook("load", {
2691
+ sequential: true,
2692
+ result: "first",
2693
+ order: "pre"
2694
+ }, moduleId);
2695
+ if (result) return result;
2696
+ result = await ctx.$$internal.callHook("load", {
2697
+ sequential: true,
2698
+ result: "first",
2699
+ order: "normal"
2700
+ }, moduleId);
2701
+ if (result) return result;
2702
+ result = await ctx.load(moduleId);
2703
+ if (result) return result;
2704
+ return ctx.$$internal.callHook("load", {
2705
+ sequential: true,
2706
+ result: "first",
2707
+ order: "post"
2708
+ }, moduleId);
2709
+ }
2710
+ }
2708
2711
  };
2709
2712
  }
2710
2713
 
@@ -3845,4 +3848,4 @@ Note: Please ensure the plugin package's default export is a class that extends
3845
3848
 
3846
3849
  //#endregion
3847
3850
  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 };
3848
- //# sourceMappingURL=api-BpPToWwp.mjs.map
3851
+ //# sourceMappingURL=api-DVNFobLD.mjs.map