powerlines 0.40.14 → 0.40.16
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.
- package/dist/{api-DQepfTQv.mjs → api-CT1HMNLh.mjs} +23 -20
- package/dist/{api-DQepfTQv.mjs.map → api-CT1HMNLh.mjs.map} +1 -1
- package/dist/{api-Dmv0-53g.cjs → api-Cq1cUeLx.cjs} +22 -19
- package/dist/astro.cjs +2 -2
- package/dist/astro.d.cts +1 -1
- package/dist/astro.d.mts +5 -5
- package/dist/astro.mjs +2 -2
- package/dist/{config-zlkThEoC.d.mts → config-CK756s0L.d.mts} +11 -4
- package/dist/config-CK756s0L.d.mts.map +1 -0
- package/dist/{config-BXRlCZ9z.d.cts → config-CiPXgwzt.d.mts} +2 -2
- package/dist/{config-BS54DOEG.d.mts.map → config-CiPXgwzt.d.mts.map} +1 -1
- package/dist/{config-BS54DOEG.d.mts → config-J74ORCFY.d.cts} +2 -2
- package/dist/{config-BXRlCZ9z.d.cts.map → config-J74ORCFY.d.cts.map} +1 -1
- package/dist/{config-CqsFCFR8.d.cts → config-vnrrSxEB.d.cts} +11 -4
- package/dist/config-vnrrSxEB.d.cts.map +1 -0
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +2 -2
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.d.cts +3 -3
- package/dist/context/index.d.cts.map +1 -1
- package/dist/context/index.d.mts +6 -6
- package/dist/context/index.d.mts.map +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/{esbuild-CtBc3XFz.mjs → esbuild-DuyGcO2M.mjs} +2 -2
- package/dist/{esbuild-CtBc3XFz.mjs.map → esbuild-DuyGcO2M.mjs.map} +1 -1
- package/dist/{esbuild-BExd6U76.cjs → esbuild-ZfmZH2rH.cjs} +1 -1
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.d.cts +1 -1
- package/dist/esbuild.d.mts +4 -4
- package/dist/esbuild.mjs +2 -2
- package/dist/farm.cjs +1 -1
- package/dist/farm.d.cts +1 -1
- package/dist/farm.d.mts +4 -4
- package/dist/farm.mjs +1 -1
- package/dist/{index-BPdDWzbp.d.cts → index-6BLROVtJ.d.mts} +2 -2
- package/dist/{index-BPdDWzbp.d.cts.map → index-6BLROVtJ.d.mts.map} +1 -1
- package/dist/{index-PJqBw8CG.d.mts → index-C7W0kmm7.d.mts} +2 -2
- package/dist/{index-PJqBw8CG.d.mts.map → index-C7W0kmm7.d.mts.map} +1 -1
- package/dist/{plugin-DA2mmmii.d.cts → index-CK6YPeaO.d.mts} +8 -6
- package/dist/index-CK6YPeaO.d.mts.map +1 -0
- package/dist/{index-CRLhknww.d.mts → index-DJ-k0GOX.d.cts} +2 -2
- package/dist/{index-CRLhknww.d.mts.map → index-DJ-k0GOX.d.cts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +1 -1
- package/dist/next.cjs +2 -2
- package/dist/next.mjs +2 -2
- package/dist/nuxt.cjs +3 -3
- package/dist/nuxt.d.cts +1 -1
- package/dist/nuxt.d.mts +4 -4
- package/dist/nuxt.mjs +3 -3
- package/dist/{plugin-CUXcGRD_.d.mts → plugin-BE3wmhoU.d.cts} +2 -2
- package/dist/{plugin-CUXcGRD_.d.mts.map → plugin-BE3wmhoU.d.cts.map} +1 -1
- package/dist/{index-slvFsJYX.d.mts → plugin-BEVE4I3A.d.cts} +8 -6
- package/dist/plugin-BEVE4I3A.d.cts.map +1 -0
- package/dist/{plugin-jeRiyjfy.d.cts → plugin-C_8RhG5V.d.mts} +2 -2
- package/dist/{plugin-jeRiyjfy.d.cts.map → plugin-C_8RhG5V.d.mts.map} +1 -1
- package/dist/plugin-utils.d.cts +7 -7
- package/dist/plugin-utils.d.cts.map +1 -1
- package/dist/plugin-utils.d.mts +11 -11
- package/dist/plugin-utils.d.mts.map +1 -1
- package/dist/{rolldown-zLtY1EjE.mjs → rolldown-5_RAKPoC.mjs} +2 -2
- package/dist/{rolldown-zLtY1EjE.mjs.map → rolldown-5_RAKPoC.mjs.map} +1 -1
- package/dist/{rolldown-CAMp461r.cjs → rolldown-UH28mDes.cjs} +1 -1
- package/dist/rolldown.cjs +2 -2
- package/dist/rolldown.d.cts +1 -1
- package/dist/rolldown.d.mts +4 -4
- package/dist/rolldown.mjs +2 -2
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.d.cts +1 -1
- package/dist/rollup.d.mts +4 -4
- package/dist/rollup.mjs +1 -1
- package/dist/rspack.cjs +1 -1
- package/dist/rspack.d.cts +1 -1
- package/dist/rspack.d.mts +4 -4
- package/dist/rspack.mjs +1 -1
- package/dist/storage/index.d.cts +1 -1
- package/dist/storage/index.d.cts.map +1 -1
- package/dist/storage/index.d.mts +4 -4
- package/dist/tsdown.cjs +2 -2
- package/dist/tsdown.d.cts +1 -1
- package/dist/tsdown.d.mts +4 -5
- package/dist/tsdown.d.mts.map +1 -1
- package/dist/tsdown.mjs +2 -2
- package/dist/tsup.cjs +2 -2
- package/dist/tsup.d.cts +1 -1
- package/dist/tsup.d.mts +4 -4
- package/dist/tsup.mjs +2 -2
- package/dist/typescript/index.d.cts +1 -1
- package/dist/typescript/index.d.mts +4 -4
- package/dist/unloader.cjs +1 -1
- package/dist/unloader.d.cts +1 -1
- package/dist/unloader.d.mts +4 -4
- package/dist/unloader.mjs +1 -1
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.d.cts +2 -2
- package/dist/unplugin.d.mts +4 -4
- package/dist/unplugin.mjs +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.mts +2 -2
- package/dist/{vite-C129CZ5h.mjs → vite-62muOctS.mjs} +2 -2
- package/dist/{vite-C129CZ5h.mjs.map → vite-62muOctS.mjs.map} +1 -1
- package/dist/{vite-CR5tH32u.cjs → vite-DwAQ0nZ5.cjs} +1 -1
- package/dist/vite.cjs +2 -2
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.mts +5 -5
- package/dist/vite.mjs +2 -2
- package/dist/{webpack-BSZWqSNX.cjs → webpack-0YhRQr-B.cjs} +1 -1
- package/dist/{webpack-jBz7I37E.mjs → webpack-Bca7BjFU.mjs} +2 -2
- package/dist/{webpack-jBz7I37E.mjs.map → webpack-Bca7BjFU.mjs.map} +1 -1
- package/dist/webpack.cjs +2 -2
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.mts +4 -4
- package/dist/webpack.mjs +2 -2
- package/dist/{write-file-D9MsaQ36.d.cts → write-file-CpNWY8SV.d.cts} +2 -2
- package/dist/{write-file-D9MsaQ36.d.cts.map → write-file-CpNWY8SV.d.cts.map} +1 -1
- package/package.json +13 -13
- package/dist/config-CqsFCFR8.d.cts.map +0 -1
- package/dist/config-zlkThEoC.d.mts.map +0 -1
- package/dist/index-slvFsJYX.d.mts.map +0 -1
- package/dist/plugin-DA2mmmii.d.cts.map +0 -1
|
@@ -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.
|
|
73
|
+
var version = "0.40.16";
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/_internal/helpers/generate-types.ts
|
|
@@ -2123,24 +2123,28 @@ var PowerlinesContext = class PowerlinesContext {
|
|
|
2123
2123
|
if (!result) return;
|
|
2124
2124
|
return {
|
|
2125
2125
|
id: result,
|
|
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))
|
|
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
2128
|
};
|
|
2128
2129
|
}
|
|
2129
2130
|
if (this.config.resolve.skipNodeModulesBundle) {
|
|
2130
2131
|
if (match(moduleId, this.resolvePatterns) || match(moduleId, this.config.resolve.noExternal)) return;
|
|
2131
2132
|
if (match(moduleId, this.config.resolve.external) || moduleId.startsWith("node:")) return {
|
|
2132
2133
|
id: moduleId,
|
|
2133
|
-
external: true
|
|
2134
|
+
external: true,
|
|
2135
|
+
virtual: false
|
|
2134
2136
|
};
|
|
2135
2137
|
if (!/^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/.test(moduleId)) return {
|
|
2136
2138
|
id: moduleId,
|
|
2137
|
-
external: true
|
|
2139
|
+
external: true,
|
|
2140
|
+
virtual: false
|
|
2138
2141
|
};
|
|
2139
2142
|
} else {
|
|
2140
2143
|
if (match(moduleId, this.config.resolve.noExternal)) return;
|
|
2141
2144
|
if (match(moduleId, this.config.resolve.external) || moduleId.startsWith("node:")) return {
|
|
2142
2145
|
id: moduleId,
|
|
2143
|
-
external: true
|
|
2146
|
+
external: true,
|
|
2147
|
+
virtual: false
|
|
2144
2148
|
};
|
|
2145
2149
|
}
|
|
2146
2150
|
}
|
|
@@ -2620,6 +2624,8 @@ function isUnpluginBuilderVariant(str) {
|
|
|
2620
2624
|
|
|
2621
2625
|
//#endregion
|
|
2622
2626
|
//#region ../core/src/lib/unplugin/module-resolution.ts
|
|
2627
|
+
const VIRTUAL_MODULE_PREFIX = "\\0powerlines-virtual:";
|
|
2628
|
+
const VIRTUAL_MODULE_PREFIX_REGEX = /^\\0powerlines-virtual:/;
|
|
2623
2629
|
/**
|
|
2624
2630
|
* Creates the module resolution hook functions for a Powerlines unplugin plugin instance.
|
|
2625
2631
|
*
|
|
@@ -2630,13 +2636,11 @@ function isUnpluginBuilderVariant(str) {
|
|
|
2630
2636
|
* @see https://rollupjs.org/plugin-development/#load
|
|
2631
2637
|
*
|
|
2632
2638
|
* @param context - The plugin context.
|
|
2639
|
+
* @param options - Options for creating the module resolution functions.
|
|
2633
2640
|
* @returns The module resolution hooks (`resolveId` and `load`).
|
|
2634
2641
|
*/
|
|
2635
2642
|
function createUnpluginModuleResolutionFunctions(context, options = {}) {
|
|
2636
2643
|
const ctx = context;
|
|
2637
|
-
let prefix = "";
|
|
2638
|
-
if (isSetString(options.prefix)) prefix = options.prefix;
|
|
2639
|
-
else if (options.prefix !== false) prefix = "\0powerlines:";
|
|
2640
2644
|
return {
|
|
2641
2645
|
async resolveId(id, importer, opts = { isEntry: false }) {
|
|
2642
2646
|
let result = await ctx.$$internal.callHook("resolveId", {
|
|
@@ -2644,46 +2648,45 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
|
|
|
2644
2648
|
result: "first",
|
|
2645
2649
|
order: "pre"
|
|
2646
2650
|
}, id, importer, opts);
|
|
2647
|
-
if (isSetString(result)) return
|
|
2651
|
+
if (isSetString(result)) return result;
|
|
2648
2652
|
else if (isSetObject(result)) return {
|
|
2649
2653
|
...result,
|
|
2650
|
-
id: `${
|
|
2654
|
+
id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
|
|
2651
2655
|
};
|
|
2652
2656
|
result = await ctx.$$internal.callHook("resolveId", {
|
|
2653
2657
|
sequential: true,
|
|
2654
2658
|
result: "first",
|
|
2655
2659
|
order: "normal"
|
|
2656
2660
|
}, id, importer, opts);
|
|
2657
|
-
if (isSetString(result)) return
|
|
2661
|
+
if (isSetString(result)) return result;
|
|
2658
2662
|
else if (isSetObject(result)) return {
|
|
2659
2663
|
...result,
|
|
2660
|
-
id: `${
|
|
2664
|
+
id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
|
|
2661
2665
|
};
|
|
2662
2666
|
result = await ctx.resolve(id, importer, {
|
|
2663
2667
|
isFile: true,
|
|
2664
2668
|
...opts
|
|
2665
2669
|
});
|
|
2666
|
-
if (
|
|
2667
|
-
else if (isSetObject(result)) return {
|
|
2670
|
+
if (isSetObject(result)) return {
|
|
2668
2671
|
...result,
|
|
2669
|
-
id: `${
|
|
2672
|
+
id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
|
|
2670
2673
|
};
|
|
2671
2674
|
result = await ctx.$$internal.callHook("resolveId", {
|
|
2672
2675
|
sequential: true,
|
|
2673
2676
|
result: "first",
|
|
2674
2677
|
order: "post"
|
|
2675
2678
|
}, id, importer, opts);
|
|
2676
|
-
if (isSetString(result)) return
|
|
2679
|
+
if (isSetString(result)) return result;
|
|
2677
2680
|
else if (isSetObject(result)) return {
|
|
2678
2681
|
...result,
|
|
2679
|
-
id: `${
|
|
2682
|
+
id: result.virtual && options.prefix !== false ? `${VIRTUAL_MODULE_PREFIX}${result.id}` : result.id
|
|
2680
2683
|
};
|
|
2681
2684
|
return null;
|
|
2682
2685
|
},
|
|
2683
2686
|
load: {
|
|
2684
|
-
filter: prefix ? { id: { include: [
|
|
2687
|
+
filter: options.prefix !== false ? { id: { include: [VIRTUAL_MODULE_PREFIX_REGEX] } } : void 0,
|
|
2685
2688
|
async handler(id) {
|
|
2686
|
-
const moduleId = prefix ? id.replace(
|
|
2689
|
+
const moduleId = options.prefix !== false ? id.replace(VIRTUAL_MODULE_PREFIX, "") : id;
|
|
2687
2690
|
let result = await ctx.$$internal.callHook("load", {
|
|
2688
2691
|
sequential: true,
|
|
2689
2692
|
result: "first",
|
|
@@ -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-
|
|
3851
|
+
//# sourceMappingURL=api-CT1HMNLh.mjs.map
|