powerlines 0.40.13 → 0.40.14

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 (74) hide show
  1. package/dist/{api-DNliE0lt.mjs → api-DQepfTQv.mjs} +32 -41
  2. package/dist/{api-DNliE0lt.mjs.map → api-DQepfTQv.mjs.map} +1 -1
  3. package/dist/{api-mL7vkH98.cjs → api-Dmv0-53g.cjs} +31 -40
  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-Cbjh2zI3.cjs → esbuild-BExd6U76.cjs} +1 -1
  11. package/dist/{esbuild-D9_xvfrO.mjs → esbuild-CtBc3XFz.mjs} +2 -2
  12. package/dist/{esbuild-D9_xvfrO.mjs.map → esbuild-CtBc3XFz.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-DjfS4slR.d.mts → index-slvFsJYX.d.mts} +5 -5
  20. package/dist/{index-DjfS4slR.d.mts.map → index-slvFsJYX.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-yR7bwKa_.d.cts → plugin-DA2mmmii.d.cts} +5 -5
  31. package/dist/{plugin-yR7bwKa_.d.cts.map → plugin-DA2mmmii.d.cts.map} +1 -1
  32. package/dist/plugin-utils.d.mts +1 -1
  33. package/dist/{rolldown-DnjTTTNR.cjs → rolldown-CAMp461r.cjs} +1 -1
  34. package/dist/{rolldown-Blrv1BE3.mjs → rolldown-zLtY1EjE.mjs} +2 -2
  35. package/dist/{rolldown-Blrv1BE3.mjs.map → rolldown-zLtY1EjE.mjs.map} +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 +2 -2
  48. package/dist/tsdown.d.mts +2 -1
  49. package/dist/tsdown.d.mts.map +1 -1
  50. package/dist/tsdown.mjs +2 -2
  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-ClKDljCv.mjs → vite-C129CZ5h.mjs} +2 -2
  63. package/dist/{vite-ClKDljCv.mjs.map → vite-C129CZ5h.mjs.map} +1 -1
  64. package/dist/{vite-t0-H93-t.cjs → vite-CR5tH32u.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-Cih_Wt7Z.cjs → webpack-BSZWqSNX.cjs} +1 -1
  69. package/dist/{webpack-S_HPYcBX.mjs → webpack-jBz7I37E.mjs} +2 -2
  70. package/dist/{webpack-S_HPYcBX.mjs.map → webpack-jBz7I37E.mjs.map} +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 +12 -12
@@ -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.13";
73
+ var version = "0.40.14";
74
74
 
75
75
  //#endregion
76
76
  //#region src/_internal/helpers/generate-types.ts
@@ -2635,8 +2635,8 @@ function isUnpluginBuilderVariant(str) {
2635
2635
  function createUnpluginModuleResolutionFunctions(context, options = {}) {
2636
2636
  const ctx = context;
2637
2637
  let prefix = "";
2638
- if (options.prefix === true) prefix = "\0";
2639
- else if (isSetString(options.prefix)) prefix = options.prefix;
2638
+ if (isSetString(options.prefix)) prefix = options.prefix;
2639
+ else if (options.prefix !== false) prefix = "\0powerlines:";
2640
2640
  return {
2641
2641
  async resolveId(id, importer, opts = { isEntry: false }) {
2642
2642
  let result = await ctx.$$internal.callHook("resolveId", {
@@ -2680,27 +2680,30 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2680
2680
  };
2681
2681
  return null;
2682
2682
  },
2683
- async load(id) {
2684
- const moduleId = prefix ? id.replace(new RegExp(`^${prefix}*`, "g"), "") : id;
2685
- let result = await ctx.$$internal.callHook("load", {
2686
- sequential: true,
2687
- result: "first",
2688
- order: "pre"
2689
- }, moduleId);
2690
- if (result) return result;
2691
- result = await ctx.$$internal.callHook("load", {
2692
- sequential: true,
2693
- result: "first",
2694
- order: "normal"
2695
- }, moduleId);
2696
- if (result) return result;
2697
- result = await ctx.load(moduleId);
2698
- if (result) return result;
2699
- return ctx.$$internal.callHook("load", {
2700
- sequential: true,
2701
- result: "first",
2702
- order: "post"
2703
- }, moduleId);
2683
+ load: {
2684
+ filter: prefix ? { id: { include: [/* @__PURE__ */ new RegExp(`^${prefix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`)] } } : void 0,
2685
+ async handler(id) {
2686
+ const moduleId = prefix ? id.replace(new RegExp(`^${prefix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`, "g"), "") : id;
2687
+ let result = await ctx.$$internal.callHook("load", {
2688
+ sequential: true,
2689
+ result: "first",
2690
+ order: "pre"
2691
+ }, moduleId);
2692
+ if (result) return result;
2693
+ result = await ctx.$$internal.callHook("load", {
2694
+ sequential: true,
2695
+ result: "first",
2696
+ order: "normal"
2697
+ }, moduleId);
2698
+ if (result) return result;
2699
+ result = await ctx.load(moduleId);
2700
+ if (result) return result;
2701
+ return ctx.$$internal.callHook("load", {
2702
+ sequential: true,
2703
+ result: "first",
2704
+ order: "post"
2705
+ }, moduleId);
2706
+ }
2704
2707
  }
2705
2708
  };
2706
2709
  }
@@ -2725,14 +2728,8 @@ function createUnpluginResolver(context, options = {}) {
2725
2728
  return {
2726
2729
  name: name$1.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${kebabCase(name$1)}`,
2727
2730
  api: ctx.$$internal.api,
2728
- resolveId: {
2729
- filter: { id: { include: [/.*/] } },
2730
- handler: resolveId
2731
- },
2732
- load: {
2733
- filter: { id: { include: [/.*/] } },
2734
- handler: load
2735
- }
2731
+ resolveId,
2732
+ load
2736
2733
  };
2737
2734
  } catch (error) {
2738
2735
  log(LogLevelLabel.FATAL, error?.message);
@@ -2778,14 +2775,8 @@ function createUnplugin(context, options = {}) {
2778
2775
  return {
2779
2776
  name: name$1.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${kebabCase(name$1)}`,
2780
2777
  api: ctx.$$internal.api,
2781
- resolveId: {
2782
- filter: { id: { include: [/.*/] } },
2783
- handler: resolveId
2784
- },
2785
- load: {
2786
- filter: { id: { include: [/.*/] } },
2787
- handler: load
2788
- },
2778
+ resolveId,
2779
+ load,
2789
2780
  transform,
2790
2781
  buildStart,
2791
2782
  buildEnd,
@@ -3854,4 +3845,4 @@ Note: Please ensure the plugin package's default export is a class that extends
3854
3845
 
3855
3846
  //#endregion
3856
3847
  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 };
3857
- //# sourceMappingURL=api-DNliE0lt.mjs.map
3848
+ //# sourceMappingURL=api-DQepfTQv.mjs.map