powerlines 0.42.20 → 0.42.22

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.
@@ -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.19";
80
+ var version = "0.42.21";
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.isVirtual(moduleId) || importer && this.fs.isVirtual(importer)) {
2192
+ if (this.fs.isResolvableId(moduleId) || importer && this.fs.isResolvableId(importer)) {
2177
2193
  let resolvedImporter = importer;
2178
- if (importer && this.fs.isVirtual(importer)) resolvedImporter = await this.fs.resolve(importer, void 0, (0, defu.default)({
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.isVirtual(moduleId) && this.config.projectType !== "application" || this.config.resolve.skipNodeModulesBundle && !/^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/.test(moduleId)));
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.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-hJX-1Z5h.cjs.map
3948
+ //# sourceMappingURL=api-C6MewkT2.cjs.map