@cloudflare/vite-plugin 0.0.0-a52a68a21 → 0.0.0-a60539794
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/asset-workers/asset-worker.js +4 -7
- package/dist/asset-workers/router-worker.js +229 -228
- package/dist/index.js +107 -93
- package/package.json +6 -6
|
@@ -2051,10 +2051,7 @@ var vs = (t, e) => {
|
|
|
2051
2051
|
return 0;
|
|
2052
2052
|
};
|
|
2053
2053
|
var ws = (t) => [...t.slice(16, 16 + 16)].map((n) => n.toString(16).padStart(2, "0")).join("");
|
|
2054
|
-
var Bt = (t) => {
|
|
2055
|
-
let e;
|
|
2056
|
-
return t?.run_worker_first !== void 0 ? e = t?.run_worker_first : t?.serve_directly !== void 0 ? e = !t.serve_directly : e = false, { html_handling: t?.html_handling ?? "auto-trailing-slash", not_found_handling: t?.not_found_handling ?? "none", run_worker_first: e, serve_directly: !e };
|
|
2057
|
-
};
|
|
2054
|
+
var Bt = (t) => ({ compatibility_date: t?.compatibility_date ?? "2021-11-02", compatibility_flags: t?.compatibility_flags ?? [], html_handling: t?.html_handling ?? "auto-trailing-slash", not_found_handling: t?.not_found_handling ?? "none", account_id: t?.account_id ?? -1, script_id: t?.script_id ?? -1 });
|
|
2058
2055
|
var Ve = class {
|
|
2059
2056
|
constructor(e) {
|
|
2060
2057
|
this.data = {};
|
|
@@ -2072,8 +2069,8 @@ var Ve = class {
|
|
|
2072
2069
|
};
|
|
2073
2070
|
var Yn = "public, max-age=0, must-revalidate";
|
|
2074
2071
|
function Jn(t, e, n) {
|
|
2075
|
-
let r = new Headers({
|
|
2076
|
-
return Ds(n) && r.append("Cache-Control", Yn), r;
|
|
2072
|
+
let r = new Headers({ ETag: `"${t}"` });
|
|
2073
|
+
return e !== void 0 && r.append("Content-Type", e), Ds(n) && r.append("Cache-Control", Yn), r;
|
|
2077
2074
|
}
|
|
2078
2075
|
function Ds(t) {
|
|
2079
2076
|
return !t.headers.has("Authorization") && !t.headers.has("Range");
|
|
@@ -2280,7 +2277,7 @@ var Kn = class extends Us {
|
|
|
2280
2277
|
async unstable_getByETag(t) {
|
|
2281
2278
|
let e = await Wn(this.env.ASSETS_KV_NAMESPACE, t);
|
|
2282
2279
|
if (!e || !e.value) throw new Error(`Requested asset ${t} exists in the asset manifest but not in the KV namespace.`);
|
|
2283
|
-
return { readableStream: e.value, contentType: e.metadata?.contentType
|
|
2280
|
+
return { readableStream: e.value, contentType: e.metadata?.contentType };
|
|
2284
2281
|
}
|
|
2285
2282
|
async unstable_getByPathname(t) {
|
|
2286
2283
|
let e = await this.unstable_exists(t);
|