powerlines 0.40.21 → 0.41.1
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/README.md +1 -1
- package/dist/{api-D-4_dQRX.cjs → api-BW8H3yUM.cjs} +64 -13
- package/dist/{api-BtT0v28K.mjs → api-D21cVOiK.mjs} +65 -14
- package/dist/api-D21cVOiK.mjs.map +1 -0
- package/dist/astro.cjs +2 -2
- package/dist/astro.mjs +2 -2
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/{esbuild-bRKMe1JD.mjs → esbuild-CJ9K3dGj.mjs} +2 -2
- package/dist/{esbuild-bRKMe1JD.mjs.map → esbuild-CJ9K3dGj.mjs.map} +1 -1
- package/dist/{esbuild-BhLG9GPh.cjs → esbuild-b0xlEllw.cjs} +1 -1
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.mjs +2 -2
- package/dist/farm.cjs +1 -1
- package/dist/farm.mjs +1 -1
- package/dist/index.cjs +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.mjs +3 -3
- package/dist/plugin-utils.d.cts +9 -9
- package/dist/{rolldown-Dgcu2_Qi.cjs → rolldown-BCkDg8D_.cjs} +1 -1
- package/dist/{rolldown-C4QhBFIU.mjs → rolldown-Q3Wb2_3B.mjs} +2 -2
- package/dist/{rolldown-C4QhBFIU.mjs.map → rolldown-Q3Wb2_3B.mjs.map} +1 -1
- package/dist/rolldown.cjs +2 -2
- package/dist/rolldown.mjs +2 -2
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.mjs +1 -1
- package/dist/rspack.cjs +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/storage/index.d.cts.map +1 -1
- package/dist/tsdown.cjs +2 -2
- package/dist/tsdown.mjs +2 -2
- package/dist/tsup.cjs +2 -2
- package/dist/tsup.mjs +2 -2
- package/dist/unloader.cjs +1 -1
- package/dist/unloader.mjs +1 -1
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/{vite-uXQWIWdY.mjs → vite-CHNHlbcn.mjs} +2 -2
- package/dist/{vite-uXQWIWdY.mjs.map → vite-CHNHlbcn.mjs.map} +1 -1
- package/dist/{vite-DmBSriVs.cjs → vite-CI8GXLJT.cjs} +1 -1
- package/dist/vite.cjs +2 -2
- package/dist/vite.mjs +2 -2
- package/dist/{webpack-Dn1pjhRP.cjs → webpack-DCCHEoZ_.cjs} +1 -1
- package/dist/{webpack-N9RxJ_s0.mjs → webpack-DS6vD_y6.mjs} +2 -2
- package/dist/{webpack-N9RxJ_s0.mjs.map → webpack-DS6vD_y6.mjs.map} +1 -1
- package/dist/webpack.cjs +2 -2
- package/dist/webpack.mjs +2 -2
- package/package.json +16 -15
- package/dist/api-BtT0v28K.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -71,11 +71,12 @@ let __stryke_path_is_type = require("@stryke/path/is-type");
|
|
|
71
71
|
let __stryke_path_slash = require("@stryke/path/slash");
|
|
72
72
|
let node_buffer = require("node:buffer");
|
|
73
73
|
let node_url = require("node:url");
|
|
74
|
+
let oxc_resolver = require("oxc-resolver");
|
|
74
75
|
let unplugin = require("unplugin");
|
|
75
76
|
|
|
76
77
|
//#region package.json
|
|
77
78
|
var name = "powerlines";
|
|
78
|
-
var version = "0.
|
|
79
|
+
var version = "0.41.1";
|
|
79
80
|
|
|
80
81
|
//#endregion
|
|
81
82
|
//#region src/_internal/helpers/generate-types.ts
|
|
@@ -763,6 +764,12 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
763
764
|
*/
|
|
764
765
|
#storage;
|
|
765
766
|
/**
|
|
767
|
+
* The resolver factory used during module resolution within the virtual file system.
|
|
768
|
+
*
|
|
769
|
+
* @see https://github.com/oxc-project/oxc-resolver
|
|
770
|
+
*/
|
|
771
|
+
#resolver;
|
|
772
|
+
/**
|
|
766
773
|
* A cache for module resolution results.
|
|
767
774
|
*/
|
|
768
775
|
#resolverCache;
|
|
@@ -889,12 +896,22 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
889
896
|
break;
|
|
890
897
|
}
|
|
891
898
|
}
|
|
892
|
-
if (!result)
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
899
|
+
if (!result) {
|
|
900
|
+
try {
|
|
901
|
+
result = await (0, __stryke_fs_resolve.resolve)(path, {
|
|
902
|
+
...options,
|
|
903
|
+
paths
|
|
904
|
+
});
|
|
905
|
+
} catch {}
|
|
906
|
+
if (!result) {
|
|
907
|
+
let index = 0;
|
|
908
|
+
do {
|
|
909
|
+
const resolveResult = await this.resolver.async((paths.length > index ? paths[index] : void 0) || this.#context.config.root, path);
|
|
910
|
+
if (resolveResult.path) result = resolveResult.path;
|
|
911
|
+
index++;
|
|
912
|
+
} while (!result && index < paths.length);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
898
915
|
}
|
|
899
916
|
if (result && !this.#context.config.skipCache) this.resolverCache.set(resolverCacheKey, result);
|
|
900
917
|
return result;
|
|
@@ -942,12 +959,22 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
942
959
|
break;
|
|
943
960
|
}
|
|
944
961
|
}
|
|
945
|
-
if (!result)
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
962
|
+
if (!result) {
|
|
963
|
+
try {
|
|
964
|
+
result = (0, __stryke_fs_resolve.resolveSync)(path, {
|
|
965
|
+
...options,
|
|
966
|
+
paths
|
|
967
|
+
});
|
|
968
|
+
} catch {}
|
|
969
|
+
if (!result) {
|
|
970
|
+
let index = 0;
|
|
971
|
+
do {
|
|
972
|
+
const resolveResult = this.resolver.sync((paths.length > index ? paths[index] : void 0) || this.#context.config.root, path);
|
|
973
|
+
if (resolveResult.path) result = resolveResult.path;
|
|
974
|
+
index++;
|
|
975
|
+
} while (!result && index < paths.length);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
951
978
|
}
|
|
952
979
|
if (result && !this.#context.config.skipCache) this.resolverCache.set(this.#normalizeId(path), result);
|
|
953
980
|
return result;
|
|
@@ -1106,6 +1133,30 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
1106
1133
|
return this.#resolverCache;
|
|
1107
1134
|
}
|
|
1108
1135
|
/**
|
|
1136
|
+
* The resolver factory used during module resolution within the virtual file system.
|
|
1137
|
+
*
|
|
1138
|
+
* @remarks
|
|
1139
|
+
* This resolver is configured with the workspace root, project root, TypeScript configuration, alias mappings, and other resolution options specified in the context. It is lazily initialized on first access to optimize performance.
|
|
1140
|
+
*
|
|
1141
|
+
* @see https://github.com/oxc-project/oxc-resolver
|
|
1142
|
+
*/
|
|
1143
|
+
get resolver() {
|
|
1144
|
+
if (!this.#resolver) this.#resolver = new oxc_resolver.ResolverFactory({
|
|
1145
|
+
roots: [this.#context.workspaceConfig.workspaceRoot, (0, __stryke_path_append.appendPath)(this.#context.config.root, this.#context.workspaceConfig.workspaceRoot)],
|
|
1146
|
+
tsconfig: {
|
|
1147
|
+
configFile: this.#context.tsconfig.tsconfigFilePath,
|
|
1148
|
+
references: this.#context.tsconfig.projectReferences && this.#context.tsconfig.projectReferences.length > 0 ? "auto" : void 0
|
|
1149
|
+
},
|
|
1150
|
+
alias: Object.fromEntries(Object.entries(this.#context.alias).map(([key, value]) => [key, [value]])),
|
|
1151
|
+
extensions: this.#context.config.resolve.extensions,
|
|
1152
|
+
mainFields: this.#context.config.resolve.mainFields,
|
|
1153
|
+
conditionNames: this.#context.config.resolve.conditions,
|
|
1154
|
+
symlinks: this.#context.config.resolve.preserveSymlinks,
|
|
1155
|
+
allowPackageExportsInDirectoryResolve: true
|
|
1156
|
+
});
|
|
1157
|
+
return this.#resolver;
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1109
1160
|
* Creates a new instance of the {@link VirtualFileSystem}.
|
|
1110
1161
|
*
|
|
1111
1162
|
* @param context - The context of the virtual file system, typically containing options and logging functions.
|
|
@@ -66,11 +66,12 @@ import { isAbsolutePath } from "@stryke/path/is-type";
|
|
|
66
66
|
import { slash } from "@stryke/path/slash";
|
|
67
67
|
import { Blob as Blob$1 } from "node:buffer";
|
|
68
68
|
import { fileURLToPath } from "node:url";
|
|
69
|
+
import { ResolverFactory } from "oxc-resolver";
|
|
69
70
|
import { setParseImpl } from "unplugin";
|
|
70
71
|
|
|
71
72
|
//#region package.json
|
|
72
73
|
var name = "powerlines";
|
|
73
|
-
var version = "0.
|
|
74
|
+
var version = "0.41.1";
|
|
74
75
|
|
|
75
76
|
//#endregion
|
|
76
77
|
//#region src/_internal/helpers/generate-types.ts
|
|
@@ -758,6 +759,12 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
758
759
|
*/
|
|
759
760
|
#storage;
|
|
760
761
|
/**
|
|
762
|
+
* The resolver factory used during module resolution within the virtual file system.
|
|
763
|
+
*
|
|
764
|
+
* @see https://github.com/oxc-project/oxc-resolver
|
|
765
|
+
*/
|
|
766
|
+
#resolver;
|
|
767
|
+
/**
|
|
761
768
|
* A cache for module resolution results.
|
|
762
769
|
*/
|
|
763
770
|
#resolverCache;
|
|
@@ -884,12 +891,22 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
884
891
|
break;
|
|
885
892
|
}
|
|
886
893
|
}
|
|
887
|
-
if (!result)
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
894
|
+
if (!result) {
|
|
895
|
+
try {
|
|
896
|
+
result = await resolve(path, {
|
|
897
|
+
...options,
|
|
898
|
+
paths
|
|
899
|
+
});
|
|
900
|
+
} catch {}
|
|
901
|
+
if (!result) {
|
|
902
|
+
let index = 0;
|
|
903
|
+
do {
|
|
904
|
+
const resolveResult = await this.resolver.async((paths.length > index ? paths[index] : void 0) || this.#context.config.root, path);
|
|
905
|
+
if (resolveResult.path) result = resolveResult.path;
|
|
906
|
+
index++;
|
|
907
|
+
} while (!result && index < paths.length);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
893
910
|
}
|
|
894
911
|
if (result && !this.#context.config.skipCache) this.resolverCache.set(resolverCacheKey, result);
|
|
895
912
|
return result;
|
|
@@ -937,12 +954,22 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
937
954
|
break;
|
|
938
955
|
}
|
|
939
956
|
}
|
|
940
|
-
if (!result)
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
957
|
+
if (!result) {
|
|
958
|
+
try {
|
|
959
|
+
result = resolveSync(path, {
|
|
960
|
+
...options,
|
|
961
|
+
paths
|
|
962
|
+
});
|
|
963
|
+
} catch {}
|
|
964
|
+
if (!result) {
|
|
965
|
+
let index = 0;
|
|
966
|
+
do {
|
|
967
|
+
const resolveResult = this.resolver.sync((paths.length > index ? paths[index] : void 0) || this.#context.config.root, path);
|
|
968
|
+
if (resolveResult.path) result = resolveResult.path;
|
|
969
|
+
index++;
|
|
970
|
+
} while (!result && index < paths.length);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
946
973
|
}
|
|
947
974
|
if (result && !this.#context.config.skipCache) this.resolverCache.set(this.#normalizeId(path), result);
|
|
948
975
|
return result;
|
|
@@ -1101,6 +1128,30 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
1101
1128
|
return this.#resolverCache;
|
|
1102
1129
|
}
|
|
1103
1130
|
/**
|
|
1131
|
+
* The resolver factory used during module resolution within the virtual file system.
|
|
1132
|
+
*
|
|
1133
|
+
* @remarks
|
|
1134
|
+
* This resolver is configured with the workspace root, project root, TypeScript configuration, alias mappings, and other resolution options specified in the context. It is lazily initialized on first access to optimize performance.
|
|
1135
|
+
*
|
|
1136
|
+
* @see https://github.com/oxc-project/oxc-resolver
|
|
1137
|
+
*/
|
|
1138
|
+
get resolver() {
|
|
1139
|
+
if (!this.#resolver) this.#resolver = new ResolverFactory({
|
|
1140
|
+
roots: [this.#context.workspaceConfig.workspaceRoot, appendPath(this.#context.config.root, this.#context.workspaceConfig.workspaceRoot)],
|
|
1141
|
+
tsconfig: {
|
|
1142
|
+
configFile: this.#context.tsconfig.tsconfigFilePath,
|
|
1143
|
+
references: this.#context.tsconfig.projectReferences && this.#context.tsconfig.projectReferences.length > 0 ? "auto" : void 0
|
|
1144
|
+
},
|
|
1145
|
+
alias: Object.fromEntries(Object.entries(this.#context.alias).map(([key, value]) => [key, [value]])),
|
|
1146
|
+
extensions: this.#context.config.resolve.extensions,
|
|
1147
|
+
mainFields: this.#context.config.resolve.mainFields,
|
|
1148
|
+
conditionNames: this.#context.config.resolve.conditions,
|
|
1149
|
+
symlinks: this.#context.config.resolve.preserveSymlinks,
|
|
1150
|
+
allowPackageExportsInDirectoryResolve: true
|
|
1151
|
+
});
|
|
1152
|
+
return this.#resolver;
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1104
1155
|
* Creates a new instance of the {@link VirtualFileSystem}.
|
|
1105
1156
|
*
|
|
1106
1157
|
* @param context - The context of the virtual file system, typically containing options and logging functions.
|
|
@@ -3848,4 +3899,4 @@ Note: Please ensure the plugin package's default export is a class that extends
|
|
|
3848
3899
|
|
|
3849
3900
|
//#endregion
|
|
3850
3901
|
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 };
|
|
3851
|
-
//# sourceMappingURL=api-
|
|
3902
|
+
//# sourceMappingURL=api-D21cVOiK.mjs.map
|