powerlines 0.42.20 → 0.42.21
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-hJX-1Z5h.cjs → api-Bt68FE-P.cjs} +21 -5
- package/dist/api-Bt68FE-P.cjs.map +1 -0
- package/dist/{api-mmJSlyW7.mjs → api-R6gI_KWp.mjs} +21 -5
- package/dist/api-R6gI_KWp.mjs.map +1 -0
- 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/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/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 +12 -12
- package/dist/api-hJX-1Z5h.cjs.map +0 -1
- package/dist/api-mmJSlyW7.mjs.map +0 -1
|
@@ -77,7 +77,7 @@ let unplugin = require("unplugin");
|
|
|
77
77
|
|
|
78
78
|
//#region package.json
|
|
79
79
|
var name = "powerlines";
|
|
80
|
-
var version = "0.42.
|
|
80
|
+
var version = "0.42.20";
|
|
81
81
|
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/_internal/helpers/generate-types.ts
|
|
@@ -1268,6 +1268,22 @@ var VirtualFileSystem = class VirtualFileSystem {
|
|
|
1268
1268
|
return await this.#getStorage(resolved)?.adapter?.isFile(resolved) ?? false;
|
|
1269
1269
|
}
|
|
1270
1270
|
/**
|
|
1271
|
+
* Checks if a file Id must be resolved by the virtual file system (VFS).
|
|
1272
|
+
*
|
|
1273
|
+
* @remarks
|
|
1274
|
+
* Examples of file Ids that would be considered virtual include:
|
|
1275
|
+
* - Ids that start with the framework specific prefix (e.g. `powerlines:`)
|
|
1276
|
+
* - Ids that match a configured alias for virtual modules (returned true from {@link VirtualFileSystemInterface.isVirtual})
|
|
1277
|
+
*
|
|
1278
|
+
* @param path - The path or id of the file.
|
|
1279
|
+
* @param importer - An optional path to the importer module, used for resolving the file path.
|
|
1280
|
+
* @param options - Additional options for resolving the file path.
|
|
1281
|
+
* @returns `true` if the file is virtual, otherwise `false`.
|
|
1282
|
+
*/
|
|
1283
|
+
isResolvableId(path, importer, options) {
|
|
1284
|
+
return path.startsWith(`${this.#context.config.framework}:`) || this.isVirtual(path, importer, options);
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1271
1287
|
* Lists files in a given path.
|
|
1272
1288
|
*
|
|
1273
1289
|
* @param path - The path to list files from.
|
|
@@ -2173,9 +2189,9 @@ var PowerlinesContext = class PowerlinesContext {
|
|
|
2173
2189
|
if (alias) moduleId = alias.replacement;
|
|
2174
2190
|
} else if ((0, _stryke_type_checks_is_set_object.isSetObject)(this.config.resolve.alias) && this.config.resolve.alias[id]) moduleId = this.config.resolve.alias[id];
|
|
2175
2191
|
}
|
|
2176
|
-
if (this.fs.
|
|
2192
|
+
if (this.fs.isResolvableId(moduleId) || importer && this.fs.isResolvableId(importer)) {
|
|
2177
2193
|
let resolvedImporter = importer;
|
|
2178
|
-
if (importer && this.fs.
|
|
2194
|
+
if (importer && this.fs.isResolvableId(importer)) resolvedImporter = await this.fs.resolve(importer, void 0, (0, defu.default)({
|
|
2179
2195
|
conditions: this.config.resolve.conditions,
|
|
2180
2196
|
extensions: this.config.resolve.extensions
|
|
2181
2197
|
}, options));
|
|
@@ -2184,7 +2200,7 @@ var PowerlinesContext = class PowerlinesContext {
|
|
|
2184
2200
|
extensions: this.config.resolve.extensions
|
|
2185
2201
|
}, options));
|
|
2186
2202
|
if (!result) return;
|
|
2187
|
-
const external = Boolean(!(0, bundle_require.match)(moduleId, this.config.resolve.noExternal) && ((0, bundle_require.match)(moduleId, this.config.resolve.external) || moduleId.startsWith("node:") || this.fs.
|
|
2203
|
+
const external = Boolean(!(0, bundle_require.match)(moduleId, this.config.resolve.noExternal) && ((0, bundle_require.match)(moduleId, this.config.resolve.external) || moduleId.startsWith("node:") || this.fs.isResolvableId(moduleId) && this.config.projectType !== "application" || this.config.resolve.skipNodeModulesBundle && !/^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/.test(moduleId)));
|
|
2188
2204
|
return {
|
|
2189
2205
|
id: result,
|
|
2190
2206
|
external,
|
|
@@ -3929,4 +3945,4 @@ Object.defineProperty(exports, 'version', {
|
|
|
3929
3945
|
return version;
|
|
3930
3946
|
}
|
|
3931
3947
|
});
|
|
3932
|
-
//# sourceMappingURL=api-
|
|
3948
|
+
//# sourceMappingURL=api-Bt68FE-P.cjs.map
|