powerlines 0.41.1 → 0.41.3

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 (51) hide show
  1. package/dist/{api-BW8H3yUM.cjs → api-C5ZPuU1K.cjs} +15 -12
  2. package/dist/{api-D21cVOiK.mjs → api-CVmACutO.mjs} +16 -13
  3. package/dist/api-CVmACutO.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.d.cts.map +1 -1
  8. package/dist/context/index.d.mts.map +1 -1
  9. package/dist/context/index.mjs +1 -1
  10. package/dist/{esbuild-b0xlEllw.cjs → esbuild-11TK3H3R.cjs} +1 -1
  11. package/dist/{esbuild-CJ9K3dGj.mjs → esbuild-BAc_vICt.mjs} +2 -2
  12. package/dist/{esbuild-CJ9K3dGj.mjs.map → esbuild-BAc_vICt.mjs.map} +1 -1
  13. package/dist/esbuild.cjs +2 -2
  14. package/dist/esbuild.mjs +2 -2
  15. package/dist/farm.cjs +1 -1
  16. package/dist/farm.mjs +1 -1
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.mjs +1 -1
  19. package/dist/next.cjs +2 -2
  20. package/dist/next.mjs +2 -2
  21. package/dist/nuxt.cjs +3 -3
  22. package/dist/nuxt.mjs +3 -3
  23. package/dist/{rolldown-BCkDg8D_.cjs → rolldown-CDCHAiZ8.cjs} +1 -1
  24. package/dist/{rolldown-Q3Wb2_3B.mjs → rolldown-DAk-1IGJ.mjs} +2 -2
  25. package/dist/{rolldown-Q3Wb2_3B.mjs.map → rolldown-DAk-1IGJ.mjs.map} +1 -1
  26. package/dist/rolldown.cjs +2 -2
  27. package/dist/rolldown.mjs +2 -2
  28. package/dist/rollup.cjs +1 -1
  29. package/dist/rollup.mjs +1 -1
  30. package/dist/rspack.cjs +1 -1
  31. package/dist/rspack.mjs +1 -1
  32. package/dist/tsdown.cjs +2 -2
  33. package/dist/tsdown.mjs +2 -2
  34. package/dist/tsup.cjs +2 -2
  35. package/dist/tsup.mjs +2 -2
  36. package/dist/unloader.cjs +1 -1
  37. package/dist/unloader.mjs +1 -1
  38. package/dist/unplugin.cjs +1 -1
  39. package/dist/unplugin.mjs +1 -1
  40. package/dist/{vite-CI8GXLJT.cjs → vite-B3mH7ZWb.cjs} +1 -1
  41. package/dist/{vite-CHNHlbcn.mjs → vite-CCKl54nq.mjs} +2 -2
  42. package/dist/{vite-CHNHlbcn.mjs.map → vite-CCKl54nq.mjs.map} +1 -1
  43. package/dist/vite.cjs +2 -2
  44. package/dist/vite.mjs +2 -2
  45. package/dist/{webpack-DS6vD_y6.mjs → webpack-CHxGDxxQ.mjs} +2 -2
  46. package/dist/{webpack-DS6vD_y6.mjs.map → webpack-CHxGDxxQ.mjs.map} +1 -1
  47. package/dist/{webpack-DCCHEoZ_.cjs → webpack-DXFP4PDK.cjs} +1 -1
  48. package/dist/webpack.cjs +2 -2
  49. package/dist/webpack.mjs +2 -2
  50. package/package.json +12 -12
  51. package/dist/api-D21cVOiK.mjs.map +0 -1
@@ -76,7 +76,7 @@ let unplugin = require("unplugin");
76
76
 
77
77
  //#region package.json
78
78
  var name = "powerlines";
79
- var version = "0.41.1";
79
+ var version = "0.41.3";
80
80
 
81
81
  //#endregion
82
82
  //#region src/_internal/helpers/generate-types.ts
@@ -2177,10 +2177,11 @@ var PowerlinesContext = class PowerlinesContext {
2177
2177
  ...options
2178
2178
  });
2179
2179
  if (!result) return;
2180
+ const 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));
2180
2181
  return {
2181
2182
  id: result,
2182
- 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)),
2183
- virtual: true
2183
+ external,
2184
+ virtual: !external
2184
2185
  };
2185
2186
  }
2186
2187
  if (this.config.resolve.skipNodeModulesBundle) {
@@ -2699,11 +2700,13 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2699
2700
  const ctx = context;
2700
2701
  return {
2701
2702
  async resolveId(id, importer, opts = { isEntry: false }) {
2703
+ const normalizedId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2704
+ const normalizedImporter = importer ? importer.replace(VIRTUAL_MODULE_PREFIX_REGEX, "") : void 0;
2702
2705
  let result = await ctx.$$internal.callHook("resolveId", {
2703
2706
  sequential: true,
2704
2707
  result: "first",
2705
2708
  order: "pre"
2706
- }, id, importer, opts);
2709
+ }, normalizedId, normalizedImporter, opts);
2707
2710
  if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return result;
2708
2711
  else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
2709
2712
  ...result,
@@ -2713,13 +2716,13 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2713
2716
  sequential: true,
2714
2717
  result: "first",
2715
2718
  order: "normal"
2716
- }, id, importer, opts);
2719
+ }, normalizedId, normalizedImporter, opts);
2717
2720
  if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return result;
2718
2721
  else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
2719
2722
  ...result,
2720
2723
  id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
2721
2724
  };
2722
- result = await ctx.resolve(id, importer, {
2725
+ result = await ctx.resolve(normalizedId, normalizedImporter, {
2723
2726
  isFile: true,
2724
2727
  ...opts
2725
2728
  });
@@ -2731,7 +2734,7 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2731
2734
  sequential: true,
2732
2735
  result: "first",
2733
2736
  order: "post"
2734
- }, id, importer, opts);
2737
+ }, normalizedId, normalizedImporter, opts);
2735
2738
  if ((0, __stryke_type_checks_is_set_string.isSetString)(result)) return result;
2736
2739
  else if ((0, __stryke_type_checks_is_set_object.isSetObject)(result)) return {
2737
2740
  ...result,
@@ -2742,26 +2745,26 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2742
2745
  load: {
2743
2746
  filter: options.prefix !== false ? { id: { include: [VIRTUAL_MODULE_PREFIX_REGEX] } } : void 0,
2744
2747
  async handler(id) {
2745
- const moduleId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2748
+ const normalizedId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2746
2749
  let result = await ctx.$$internal.callHook("load", {
2747
2750
  sequential: true,
2748
2751
  result: "first",
2749
2752
  order: "pre"
2750
- }, moduleId);
2753
+ }, normalizedId);
2751
2754
  if (result) return result;
2752
2755
  result = await ctx.$$internal.callHook("load", {
2753
2756
  sequential: true,
2754
2757
  result: "first",
2755
2758
  order: "normal"
2756
- }, moduleId);
2759
+ }, normalizedId);
2757
2760
  if (result) return result;
2758
- result = await ctx.load(moduleId);
2761
+ result = await ctx.load(normalizedId);
2759
2762
  if (result) return result;
2760
2763
  return ctx.$$internal.callHook("load", {
2761
2764
  sequential: true,
2762
2765
  result: "first",
2763
2766
  order: "post"
2764
- }, moduleId);
2767
+ }, normalizedId);
2765
2768
  }
2766
2769
  }
2767
2770
  };
@@ -71,7 +71,7 @@ import { setParseImpl } from "unplugin";
71
71
 
72
72
  //#region package.json
73
73
  var name = "powerlines";
74
- var version = "0.41.1";
74
+ var version = "0.41.3";
75
75
 
76
76
  //#endregion
77
77
  //#region src/_internal/helpers/generate-types.ts
@@ -2172,10 +2172,11 @@ var PowerlinesContext = class PowerlinesContext {
2172
2172
  ...options
2173
2173
  });
2174
2174
  if (!result) return;
2175
+ const 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));
2175
2176
  return {
2176
2177
  id: result,
2177
- 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)),
2178
- virtual: true
2178
+ external,
2179
+ virtual: !external
2179
2180
  };
2180
2181
  }
2181
2182
  if (this.config.resolve.skipNodeModulesBundle) {
@@ -2694,11 +2695,13 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2694
2695
  const ctx = context;
2695
2696
  return {
2696
2697
  async resolveId(id, importer, opts = { isEntry: false }) {
2698
+ const normalizedId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2699
+ const normalizedImporter = importer ? importer.replace(VIRTUAL_MODULE_PREFIX_REGEX, "") : void 0;
2697
2700
  let result = await ctx.$$internal.callHook("resolveId", {
2698
2701
  sequential: true,
2699
2702
  result: "first",
2700
2703
  order: "pre"
2701
- }, id, importer, opts);
2704
+ }, normalizedId, normalizedImporter, opts);
2702
2705
  if (isSetString(result)) return result;
2703
2706
  else if (isSetObject(result)) return {
2704
2707
  ...result,
@@ -2708,13 +2711,13 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2708
2711
  sequential: true,
2709
2712
  result: "first",
2710
2713
  order: "normal"
2711
- }, id, importer, opts);
2714
+ }, normalizedId, normalizedImporter, opts);
2712
2715
  if (isSetString(result)) return result;
2713
2716
  else if (isSetObject(result)) return {
2714
2717
  ...result,
2715
2718
  id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
2716
2719
  };
2717
- result = await ctx.resolve(id, importer, {
2720
+ result = await ctx.resolve(normalizedId, normalizedImporter, {
2718
2721
  isFile: true,
2719
2722
  ...opts
2720
2723
  });
@@ -2726,7 +2729,7 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2726
2729
  sequential: true,
2727
2730
  result: "first",
2728
2731
  order: "post"
2729
- }, id, importer, opts);
2732
+ }, normalizedId, normalizedImporter, opts);
2730
2733
  if (isSetString(result)) return result;
2731
2734
  else if (isSetObject(result)) return {
2732
2735
  ...result,
@@ -2737,26 +2740,26 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
2737
2740
  load: {
2738
2741
  filter: options.prefix !== false ? { id: { include: [VIRTUAL_MODULE_PREFIX_REGEX] } } : void 0,
2739
2742
  async handler(id) {
2740
- const moduleId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2743
+ const normalizedId = id.replace(VIRTUAL_MODULE_PREFIX_REGEX, "");
2741
2744
  let result = await ctx.$$internal.callHook("load", {
2742
2745
  sequential: true,
2743
2746
  result: "first",
2744
2747
  order: "pre"
2745
- }, moduleId);
2748
+ }, normalizedId);
2746
2749
  if (result) return result;
2747
2750
  result = await ctx.$$internal.callHook("load", {
2748
2751
  sequential: true,
2749
2752
  result: "first",
2750
2753
  order: "normal"
2751
- }, moduleId);
2754
+ }, normalizedId);
2752
2755
  if (result) return result;
2753
- result = await ctx.load(moduleId);
2756
+ result = await ctx.load(normalizedId);
2754
2757
  if (result) return result;
2755
2758
  return ctx.$$internal.callHook("load", {
2756
2759
  sequential: true,
2757
2760
  result: "first",
2758
2761
  order: "post"
2759
- }, moduleId);
2762
+ }, normalizedId);
2760
2763
  }
2761
2764
  }
2762
2765
  };
@@ -3899,4 +3902,4 @@ Note: Please ensure the plugin package's default export is a class that extends
3899
3902
 
3900
3903
  //#endregion
3901
3904
  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 };
3902
- //# sourceMappingURL=api-D21cVOiK.mjs.map
3905
+ //# sourceMappingURL=api-CVmACutO.mjs.map