@studiocms/cfetch 0.1.5 → 0.1.6
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/stub.js +1 -1
- package/dist/utils/integration.js +2 -3
- package/package.json +1 -1
package/dist/stub.js
CHANGED
|
@@ -10,7 +10,7 @@ declare module 'virtual:cfetch/config' {
|
|
|
10
10
|
* either minutes (\`<number>m\`) or hours (\`<number>h\`).
|
|
11
11
|
* For example: "5m" for 5 minutes or "2h" for 2 hours.
|
|
12
12
|
*/
|
|
13
|
-
const defaultConfig: import(${resolve("./types")}).CacheConfig;
|
|
13
|
+
const defaultConfig: import("${resolve("./types")}").CacheConfig;
|
|
14
14
|
export default defaultConfig;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
-
import { AstroError } from "astro/errors";
|
|
3
2
|
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
4
3
|
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
5
4
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
@@ -200,7 +199,7 @@ const createVirtualModule = (name, _imports, bypassCoreValidation) => {
|
|
|
200
199
|
}
|
|
201
200
|
for (const [id, contexts] of Object.entries(duplicatedImports)) {
|
|
202
201
|
if (contexts.length !== [...new Set(contexts)].length) {
|
|
203
|
-
throw new
|
|
202
|
+
throw new Error(
|
|
204
203
|
`Virtual import with id "${id}" has been registered several times with conflicting contexts.`
|
|
205
204
|
);
|
|
206
205
|
}
|
|
@@ -208,7 +207,7 @@ const createVirtualModule = (name, _imports, bypassCoreValidation) => {
|
|
|
208
207
|
const resolutionMap = Object.fromEntries(
|
|
209
208
|
imports.map(({ id }) => {
|
|
210
209
|
if (!bypassCoreValidation && id.startsWith("astro:")) {
|
|
211
|
-
throw new
|
|
210
|
+
throw new Error(
|
|
212
211
|
`Virtual import name prefix can't be "astro:" (for "${id}") because it's reserved for Astro core.`
|
|
213
212
|
);
|
|
214
213
|
}
|
package/package.json
CHANGED