powerlines 0.42.8 → 0.42.9
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-D0jVyqAA.mjs → api-B7a8UhJo.mjs} +13 -64
- package/dist/api-B7a8UhJo.mjs.map +1 -0
- package/dist/{api-BvBO12z0.cjs → api-BzuVSDXX.cjs} +12 -63
- package/dist/astro.cjs +1 -1
- package/dist/astro.mjs +1 -1
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/esbuild.cjs +1 -1
- package/dist/esbuild.mjs +1 -1
- 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 +1 -1
- package/dist/next.mjs +1 -1
- package/dist/nuxt.cjs +1 -1
- package/dist/nuxt.mjs +1 -1
- package/dist/rolldown.cjs +1 -1
- package/dist/rolldown.mjs +1 -1
- 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/tsdown.cjs +1 -1
- package/dist/tsdown.mjs +1 -1
- package/dist/tsup.cjs +1 -1
- package/dist/tsup.mjs +1 -1
- 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.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +17 -17
- package/dist/api-D0jVyqAA.mjs.map +0 -1
|
@@ -66,7 +66,6 @@ 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";
|
|
70
69
|
import { createLog } from "@powerlines/core/lib/logger";
|
|
71
70
|
import { getString } from "@powerlines/core/lib/utilities/source-file";
|
|
72
71
|
import { setParseImpl } from "unplugin";
|
|
@@ -761,12 +760,6 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
761
760
|
*/
|
|
762
761
|
#storage;
|
|
763
762
|
/**
|
|
764
|
-
* The resolver factory used during module resolution within the virtual file system.
|
|
765
|
-
*
|
|
766
|
-
* @see https://github.com/oxc-project/oxc-resolver
|
|
767
|
-
*/
|
|
768
|
-
#resolver;
|
|
769
|
-
/**
|
|
770
763
|
* A cache for module resolution results.
|
|
771
764
|
*/
|
|
772
765
|
#resolverCache;
|
|
@@ -893,22 +886,12 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
893
886
|
break;
|
|
894
887
|
}
|
|
895
888
|
}
|
|
896
|
-
if (!result) {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
} catch {}
|
|
903
|
-
if (!result) {
|
|
904
|
-
let index = 0;
|
|
905
|
-
do {
|
|
906
|
-
const resolveResult = await this.resolver.async((paths.length > index ? paths[index] : void 0) || this.#context.config.root, path);
|
|
907
|
-
if (resolveResult.path) result = resolveResult.path;
|
|
908
|
-
index++;
|
|
909
|
-
} while (!result && index < paths.length);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
889
|
+
if (!result) try {
|
|
890
|
+
result = await resolve(path, {
|
|
891
|
+
...options,
|
|
892
|
+
paths
|
|
893
|
+
});
|
|
894
|
+
} catch {}
|
|
912
895
|
}
|
|
913
896
|
if (result && !this.#context.config.skipCache) this.resolverCache.set(resolverCacheKey, result);
|
|
914
897
|
return result;
|
|
@@ -956,22 +939,12 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
956
939
|
break;
|
|
957
940
|
}
|
|
958
941
|
}
|
|
959
|
-
if (!result) {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
} catch {}
|
|
966
|
-
if (!result) {
|
|
967
|
-
let index = 0;
|
|
968
|
-
do {
|
|
969
|
-
const resolveResult = this.resolver.sync((paths.length > index ? paths[index] : void 0) || this.#context.config.root, path);
|
|
970
|
-
if (resolveResult.path) result = resolveResult.path;
|
|
971
|
-
index++;
|
|
972
|
-
} while (!result && index < paths.length);
|
|
973
|
-
}
|
|
974
|
-
}
|
|
942
|
+
if (!result) try {
|
|
943
|
+
result = resolveSync(path, {
|
|
944
|
+
...options,
|
|
945
|
+
paths
|
|
946
|
+
});
|
|
947
|
+
} catch {}
|
|
975
948
|
}
|
|
976
949
|
if (result && !this.#context.config.skipCache) this.resolverCache.set(this.#normalizeId(path), result);
|
|
977
950
|
return result;
|
|
@@ -1130,30 +1103,6 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
1130
1103
|
return this.#resolverCache;
|
|
1131
1104
|
}
|
|
1132
1105
|
/**
|
|
1133
|
-
* The resolver factory used during module resolution within the virtual file system.
|
|
1134
|
-
*
|
|
1135
|
-
* @remarks
|
|
1136
|
-
* 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.
|
|
1137
|
-
*
|
|
1138
|
-
* @see https://github.com/oxc-project/oxc-resolver
|
|
1139
|
-
*/
|
|
1140
|
-
get resolver() {
|
|
1141
|
-
if (!this.#resolver) this.#resolver = new ResolverFactory({
|
|
1142
|
-
roots: [this.#context.workspaceConfig.workspaceRoot, appendPath(this.#context.config.root, this.#context.workspaceConfig.workspaceRoot)],
|
|
1143
|
-
tsconfig: {
|
|
1144
|
-
configFile: this.#context.tsconfig.tsconfigFilePath,
|
|
1145
|
-
references: this.#context.tsconfig.projectReferences && this.#context.tsconfig.projectReferences.length > 0 ? "auto" : void 0
|
|
1146
|
-
},
|
|
1147
|
-
alias: Object.fromEntries(Object.entries(this.#context.alias).map(([key, value]) => [key, [value]])),
|
|
1148
|
-
extensions: this.#context.config.resolve.extensions,
|
|
1149
|
-
mainFields: this.#context.config.resolve.mainFields,
|
|
1150
|
-
conditionNames: this.#context.config.resolve.conditions,
|
|
1151
|
-
symlinks: this.#context.config.resolve.preserveSymlinks,
|
|
1152
|
-
allowPackageExportsInDirectoryResolve: true
|
|
1153
|
-
});
|
|
1154
|
-
return this.#resolver;
|
|
1155
|
-
}
|
|
1156
|
-
/**
|
|
1157
1106
|
* Creates a new instance of the {@link VirtualFileSystem}.
|
|
1158
1107
|
*
|
|
1159
1108
|
* @param context - The context of the virtual file system, typically containing options and logging functions.
|
|
@@ -3781,4 +3730,4 @@ ${formatTypes(types)}
|
|
|
3781
3730
|
|
|
3782
3731
|
//#endregion
|
|
3783
3732
|
export { createUnpluginFactory as a, FileMetadata as c, FileSystem as d, _capnpFileId as f, createPluginContext as i, FileMetadata_KeyValuePair as l, version as m, PowerlinesAPIContext as n, PowerlinesContext as o, name as p, PowerlinesEnvironmentContext as r, FileId as s, PowerlinesAPI as t, FileStorage as u };
|
|
3784
|
-
//# sourceMappingURL=api-
|
|
3733
|
+
//# sourceMappingURL=api-B7a8UhJo.mjs.map
|