@cloudflare/vite-plugin 0.0.0-e98269a59 → 0.0.0-ea3e16a89
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.
|
@@ -2526,11 +2526,8 @@ async function tr(t, e, n, r = 1) {
|
|
|
2526
2526
|
return o.value !== null && n && n.captureException(new Error(`Initial request for asset ${e} failed, but subsequent request succeeded.`)), o;
|
|
2527
2527
|
}
|
|
2528
2528
|
return i;
|
|
2529
|
-
} catch
|
|
2530
|
-
if (s >= r) {
|
|
2531
|
-
let o = `KV GET ${e} failed.`;
|
|
2532
|
-
throw i instanceof Error && (o = `KV GET ${e} failed: ${i.message}`), new Error(o);
|
|
2533
|
-
}
|
|
2529
|
+
} catch {
|
|
2530
|
+
if (s >= r) throw new Error(`Requested asset ${e} could not be fetched from KV namespace.`);
|
|
2534
2531
|
await new Promise((o) => setTimeout(o, Math.pow(2, s++) * 1e3));
|
|
2535
2532
|
}
|
|
2536
2533
|
}
|
|
@@ -2542,9 +2539,8 @@ var nr = class extends Bs {
|
|
|
2542
2539
|
let i = Ut(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
|
|
2543
2540
|
return this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && n.setData({ accountId: this.env.CONFIG.account_id, scriptId: this.env.CONFIG.script_id, coloId: this.env.COLO_METADATA.coloId, metalId: this.env.COLO_METADATA.metalId, coloTier: this.env.COLO_METADATA.coloTier, coloRegion: this.env.COLO_METADATA.coloRegion, version: this.env.VERSION_METADATA.id, hostname: a.hostname, htmlHandling: i.html_handling, notFoundHandling: i.not_found_handling, userAgent: o }), await this.env.JAEGER.enterSpan("handleRequest", async (c) => (c.setTags({ hostname: a.hostname, eyeballPath: a.pathname, env: this.env.ENVIRONMENT, version: this.env.VERSION_METADATA?.id }), er(t, this.env, i, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this))));
|
|
2544
2541
|
} catch (i) {
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
this.submitMetrics(n, r, s);
|
|
2542
|
+
let o = this.handleError(e, n, i);
|
|
2543
|
+
return this.submitMetrics(n, r, s), o;
|
|
2548
2544
|
}
|
|
2549
2545
|
}
|
|
2550
2546
|
handleError(t, e, n) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-ea3e16a89",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"@hattip/adapter-node": "^0.0.49",
|
|
37
37
|
"unenv": "npm:unenv-nightly@2.0.0-20241218-183400-5d6aec3",
|
|
38
38
|
"ws": "^8.18.0",
|
|
39
|
-
"miniflare": "0.0.0-
|
|
39
|
+
"miniflare": "0.0.0-ea3e16a89"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@cloudflare/workers-types": "^4.
|
|
42
|
+
"@cloudflare/workers-types": "^4.20250121.0",
|
|
43
43
|
"@types/node": "^22.10.1",
|
|
44
44
|
"@types/ws": "^8.5.13",
|
|
45
45
|
"magic-string": "^0.30.12",
|
|
46
46
|
"tsup": "8.3.0",
|
|
47
47
|
"typescript": "^5.7.2",
|
|
48
48
|
"vite": "^6.0.7",
|
|
49
|
-
"@cloudflare/workers-shared": "0.0.0-
|
|
50
|
-
"
|
|
51
|
-
"
|
|
49
|
+
"@cloudflare/workers-shared": "0.0.0-ea3e16a89",
|
|
50
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
51
|
+
"wrangler": "0.0.0-ea3e16a89"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"vite": "^6.0.7",
|