powerlines 0.40.12 → 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.
- package/dist/{api-U8R0Wudn.mjs → api-DQepfTQv.mjs} +44 -49
- package/dist/api-DQepfTQv.mjs.map +1 -0
- package/dist/{api-5yRaVqKi.cjs → api-Dmv0-53g.cjs} +43 -48
- package/dist/astro.cjs +2 -2
- package/dist/astro.d.mts +1 -1
- package/dist/astro.mjs +2 -2
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/{esbuild-CvU35Uym.cjs → esbuild-BExd6U76.cjs} +1 -1
- package/dist/{esbuild-JHTyuSrN.mjs → esbuild-CtBc3XFz.mjs} +2 -2
- package/dist/{esbuild-JHTyuSrN.mjs.map → esbuild-CtBc3XFz.mjs.map} +1 -1
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.d.mts +1 -1
- package/dist/esbuild.mjs +2 -2
- package/dist/farm.cjs +1 -1
- package/dist/farm.d.mts +1 -1
- package/dist/farm.mjs +1 -1
- package/dist/{index-DjfS4slR.d.mts → index-slvFsJYX.d.mts} +5 -5
- package/dist/{index-DjfS4slR.d.mts.map → index-slvFsJYX.d.mts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- 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.mts +1 -1
- package/dist/nuxt.mjs +3 -3
- package/dist/{plugin-yR7bwKa_.d.cts → plugin-DA2mmmii.d.cts} +5 -5
- package/dist/{plugin-yR7bwKa_.d.cts.map → plugin-DA2mmmii.d.cts.map} +1 -1
- package/dist/plugin-utils.d.cts +2 -2
- package/dist/plugin-utils.d.cts.map +1 -1
- package/dist/plugin-utils.d.mts +3 -3
- package/dist/plugin-utils.d.mts.map +1 -1
- package/dist/{rolldown-BU_vpPUp.cjs → rolldown-CAMp461r.cjs} +1 -1
- package/dist/{rolldown-BG5c97Ej.mjs → rolldown-zLtY1EjE.mjs} +2 -2
- package/dist/{rolldown-BG5c97Ej.mjs.map → rolldown-zLtY1EjE.mjs.map} +1 -1
- package/dist/rolldown.cjs +2 -2
- package/dist/rolldown.d.mts +1 -1
- package/dist/rolldown.mjs +2 -2
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.d.mts +1 -1
- package/dist/rollup.mjs +1 -1
- package/dist/rspack.cjs +1 -1
- package/dist/rspack.d.mts +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/storage/index.d.mts +1 -1
- package/dist/tsdown.cjs +2 -2
- package/dist/tsdown.d.mts +2 -1
- package/dist/tsdown.d.mts.map +1 -1
- package/dist/tsdown.mjs +2 -2
- package/dist/tsup.cjs +2 -2
- package/dist/tsup.d.mts +1 -1
- package/dist/tsup.mjs +2 -2
- package/dist/typescript/index.d.mts +1 -1
- package/dist/unloader.cjs +1 -1
- package/dist/unloader.d.mts +1 -1
- package/dist/unloader.mjs +1 -1
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.d.cts +1 -1
- package/dist/unplugin.d.mts +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/{vite-wRQiYRc5.mjs → vite-C129CZ5h.mjs} +2 -2
- package/dist/{vite-wRQiYRc5.mjs.map → vite-C129CZ5h.mjs.map} +1 -1
- package/dist/{vite-BSkZRWtx.cjs → vite-CR5tH32u.cjs} +1 -1
- package/dist/vite.cjs +2 -2
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -2
- package/dist/{webpack-V4jTwNhy.cjs → webpack-BSZWqSNX.cjs} +1 -1
- package/dist/{webpack-DaiyexVJ.mjs → webpack-jBz7I37E.mjs} +2 -2
- package/dist/{webpack-DaiyexVJ.mjs.map → webpack-jBz7I37E.mjs.map} +1 -1
- package/dist/webpack.cjs +2 -2
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +2 -2
- package/package.json +12 -12
- package/dist/api-U8R0Wudn.mjs.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.14";
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/_internal/helpers/generate-types.ts
|
|
@@ -856,7 +856,7 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
856
856
|
let path = id;
|
|
857
857
|
if (path.includes("{") || path.includes("}")) path = replacePathTokens(this.#context, path);
|
|
858
858
|
if (options.skipAlias !== true) path = this.resolveAlias(path);
|
|
859
|
-
if (isAbsolutePath(path)) return path;
|
|
859
|
+
if (isAbsolutePath(path) && (!options.isFile || !await this.isDirectory(path))) return path;
|
|
860
860
|
const resolverCacheKey = murmurhash({
|
|
861
861
|
path: this.#normalizeId(path),
|
|
862
862
|
importer,
|
|
@@ -871,9 +871,11 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
871
871
|
if (!result) {
|
|
872
872
|
const paths = options.paths ?? [];
|
|
873
873
|
if (importer && !paths.includes(importer)) paths.push(importer);
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
874
|
+
if (!importer) {
|
|
875
|
+
paths.push(this.#context.workspaceConfig.workspaceRoot);
|
|
876
|
+
paths.push(appendPath(this.#context.config.root, this.#context.workspaceConfig.workspaceRoot));
|
|
877
|
+
paths.push(appendPath(joinPaths$1(this.#context.config.root, "src"), this.#context.workspaceConfig.workspaceRoot));
|
|
878
|
+
}
|
|
877
879
|
paths.push(...Object.keys(this.#context.tsconfig?.options?.paths ?? {}).filter((tsconfigPath) => path.startsWith(tsconfigPath.replace(/\*$/, ""))).map((tsconfigPath) => this.#context.tsconfig?.options?.paths?.[tsconfigPath]).flat().filter(Boolean).map((tsconfigPath) => appendPath(tsconfigPath, this.#context.workspaceConfig.workspaceRoot)));
|
|
878
880
|
for (const combination of getResolutionCombinations(path, { paths })) {
|
|
879
881
|
const { relativeKey, adapter } = this.#getStorage(combination);
|
|
@@ -912,7 +914,7 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
912
914
|
let path = id;
|
|
913
915
|
if (path.includes("{") || path.includes("}")) path = replacePathTokens(this.#context, path);
|
|
914
916
|
if (options.skipAlias !== true) path = this.resolveAlias(path);
|
|
915
|
-
if (isAbsolutePath(path)) return path;
|
|
917
|
+
if (isAbsolutePath(path) && (!options.isFile || !this.isDirectorySync(path))) return path;
|
|
916
918
|
let result;
|
|
917
919
|
if (!this.#context.config.skipCache) {
|
|
918
920
|
result = this.resolverCache.get(this.#normalizeId(path));
|
|
@@ -922,9 +924,11 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
922
924
|
if (!result) {
|
|
923
925
|
const paths = options.paths ?? [];
|
|
924
926
|
if (importer && !paths.includes(importer)) paths.push(importer);
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
927
|
+
if (!importer) {
|
|
928
|
+
paths.push(this.#context.workspaceConfig.workspaceRoot);
|
|
929
|
+
paths.push(appendPath(this.#context.config.root, this.#context.workspaceConfig.workspaceRoot));
|
|
930
|
+
paths.push(appendPath(joinPaths$1(this.#context.config.root, "src"), this.#context.workspaceConfig.workspaceRoot));
|
|
931
|
+
}
|
|
928
932
|
paths.push(...Object.keys(this.#context.tsconfig?.options?.paths ?? {}).filter((tsconfigPath) => path.startsWith(tsconfigPath.replace(/\*$/, ""))).map((tsconfigPath) => this.#context.tsconfig?.options?.paths?.[tsconfigPath]).flat().filter(Boolean).map((tsconfigPath) => appendPath(tsconfigPath, this.#context.workspaceConfig.workspaceRoot)));
|
|
929
933
|
for (const combination of getResolutionCombinations(path, { paths })) {
|
|
930
934
|
const { relativeKey, adapter } = this.#getStorage(combination);
|
|
@@ -2631,8 +2635,8 @@ function isUnpluginBuilderVariant(str) {
|
|
|
2631
2635
|
function createUnpluginModuleResolutionFunctions(context, options = {}) {
|
|
2632
2636
|
const ctx = context;
|
|
2633
2637
|
let prefix = "";
|
|
2634
|
-
if (options.prefix
|
|
2635
|
-
else if (
|
|
2638
|
+
if (isSetString(options.prefix)) prefix = options.prefix;
|
|
2639
|
+
else if (options.prefix !== false) prefix = "\0powerlines:";
|
|
2636
2640
|
return {
|
|
2637
2641
|
async resolveId(id, importer, opts = { isEntry: false }) {
|
|
2638
2642
|
let result = await ctx.$$internal.callHook("resolveId", {
|
|
@@ -2676,27 +2680,30 @@ function createUnpluginModuleResolutionFunctions(context, options = {}) {
|
|
|
2676
2680
|
};
|
|
2677
2681
|
return null;
|
|
2678
2682
|
},
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
result
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
result
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
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
|
+
}
|
|
2700
2707
|
}
|
|
2701
2708
|
};
|
|
2702
2709
|
}
|
|
@@ -2721,14 +2728,8 @@ function createUnpluginResolver(context, options = {}) {
|
|
|
2721
2728
|
return {
|
|
2722
2729
|
name: name$1.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${kebabCase(name$1)}`,
|
|
2723
2730
|
api: ctx.$$internal.api,
|
|
2724
|
-
resolveId
|
|
2725
|
-
|
|
2726
|
-
handler: resolveId
|
|
2727
|
-
},
|
|
2728
|
-
load: {
|
|
2729
|
-
filter: { id: { include: [/.*/] } },
|
|
2730
|
-
handler: load
|
|
2731
|
-
}
|
|
2731
|
+
resolveId,
|
|
2732
|
+
load
|
|
2732
2733
|
};
|
|
2733
2734
|
} catch (error) {
|
|
2734
2735
|
log(LogLevelLabel.FATAL, error?.message);
|
|
@@ -2774,14 +2775,8 @@ function createUnplugin(context, options = {}) {
|
|
|
2774
2775
|
return {
|
|
2775
2776
|
name: name$1.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${kebabCase(name$1)}`,
|
|
2776
2777
|
api: ctx.$$internal.api,
|
|
2777
|
-
resolveId
|
|
2778
|
-
|
|
2779
|
-
handler: resolveId
|
|
2780
|
-
},
|
|
2781
|
-
load: {
|
|
2782
|
-
filter: { id: { include: [/.*/] } },
|
|
2783
|
-
handler: load
|
|
2784
|
-
},
|
|
2778
|
+
resolveId,
|
|
2779
|
+
load,
|
|
2785
2780
|
transform,
|
|
2786
2781
|
buildStart,
|
|
2787
2782
|
buildEnd,
|
|
@@ -3850,4 +3845,4 @@ Note: Please ensure the plugin package's default export is a class that extends
|
|
|
3850
3845
|
|
|
3851
3846
|
//#endregion
|
|
3852
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 };
|
|
3853
|
-
//# sourceMappingURL=api-
|
|
3848
|
+
//# sourceMappingURL=api-DQepfTQv.mjs.map
|