@cloudflare/vite-plugin 0.0.0-35710e590 → 0.0.0-35c1dc321
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 +103 -109
- package/dist/asset-workers/router-worker.js +134 -134
- package/dist/index.js +168 -199
- package/dist/runner-worker/index.js +1 -1
- package/package.json +7 -8
|
@@ -6,7 +6,7 @@ var Ee = (t, e, n) => (lr(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
|
6
6
|
var Yt = (t, e, n) => {
|
|
7
7
|
if (!e.has(t)) throw TypeError("Cannot " + n);
|
|
8
8
|
};
|
|
9
|
-
var
|
|
9
|
+
var nt = (t, e, n) => (Yt(t, e, "read from private field"), n ? n.call(t) : e.get(t));
|
|
10
10
|
var jt = (t, e, n) => {
|
|
11
11
|
if (e.has(t)) throw TypeError("Cannot add the same private member more than once");
|
|
12
12
|
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
@@ -73,16 +73,16 @@ function Re(t) {
|
|
|
73
73
|
function x(t) {
|
|
74
74
|
return zt(t, "Object");
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function rt(t) {
|
|
77
77
|
return typeof Event < "u" && C(t, Event);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function st(t) {
|
|
80
80
|
return typeof Element < "u" && C(t, Element);
|
|
81
81
|
}
|
|
82
82
|
function H(t) {
|
|
83
83
|
return !!(t && t.then && typeof t.then == "function");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function it(t) {
|
|
86
86
|
return x(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
|
|
87
87
|
}
|
|
88
88
|
function ie(t) {
|
|
@@ -95,7 +95,7 @@ function C(t, e) {
|
|
|
95
95
|
return false;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function ot(t) {
|
|
99
99
|
return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue));
|
|
100
100
|
}
|
|
101
101
|
function U(t, e = 0) {
|
|
@@ -232,19 +232,19 @@ function Qt(t, e) {
|
|
|
232
232
|
} catch {
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function ct(t) {
|
|
236
236
|
return Object.keys(t).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&");
|
|
237
237
|
}
|
|
238
238
|
function Ne(t) {
|
|
239
239
|
if ($(t)) return { message: t.message, name: t.name, stack: t.stack, ...Zt(t) };
|
|
240
|
-
if (
|
|
240
|
+
if (rt(t)) {
|
|
241
241
|
let e = { type: t.type, target: Xt(t.target), currentTarget: Xt(t.currentTarget), ...Zt(t) };
|
|
242
242
|
return typeof CustomEvent < "u" && C(t, CustomEvent) && (e.detail = t.detail), e;
|
|
243
243
|
} else return t;
|
|
244
244
|
}
|
|
245
245
|
function Xt(t) {
|
|
246
246
|
try {
|
|
247
|
-
return
|
|
247
|
+
return st(t) ? Vt(t) : Object.prototype.toString.call(t);
|
|
248
248
|
} catch {
|
|
249
249
|
return "<unknown>";
|
|
250
250
|
}
|
|
@@ -267,15 +267,15 @@ function ce(t, e = 40) {
|
|
|
267
267
|
return "";
|
|
268
268
|
}
|
|
269
269
|
function E(t) {
|
|
270
|
-
return
|
|
270
|
+
return at(t, /* @__PURE__ */ new Map());
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function at(t, e) {
|
|
273
273
|
if (x(t)) {
|
|
274
274
|
let n = e.get(t);
|
|
275
275
|
if (n !== void 0) return n;
|
|
276
276
|
let r = {};
|
|
277
277
|
e.set(t, r);
|
|
278
|
-
for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] =
|
|
278
|
+
for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] = at(t[s], e));
|
|
279
279
|
return r;
|
|
280
280
|
}
|
|
281
281
|
if (Array.isArray(t)) {
|
|
@@ -283,7 +283,7 @@ function ot(t, e) {
|
|
|
283
283
|
if (n !== void 0) return n;
|
|
284
284
|
let r = [];
|
|
285
285
|
return e.set(t, r), t.forEach((s) => {
|
|
286
|
-
r.push(
|
|
286
|
+
r.push(at(s, e));
|
|
287
287
|
}), r;
|
|
288
288
|
}
|
|
289
289
|
return t;
|
|
@@ -340,7 +340,7 @@ function we(...t) {
|
|
|
340
340
|
return sn(s);
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function dt(t) {
|
|
344
344
|
return Array.isArray(t) ? we(...t) : t;
|
|
345
345
|
}
|
|
346
346
|
function sn(t) {
|
|
@@ -348,20 +348,20 @@ function sn(t) {
|
|
|
348
348
|
let e = Array.from(t);
|
|
349
349
|
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), nn.test(e[e.length - 1].function || "") && (e.pop(), nn.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, rn).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || "?" }));
|
|
350
350
|
}
|
|
351
|
-
var
|
|
351
|
+
var ut = "<anonymous>";
|
|
352
352
|
function ue(t) {
|
|
353
353
|
try {
|
|
354
|
-
return !t || typeof t != "function" ?
|
|
354
|
+
return !t || typeof t != "function" ? ut : t.name || ut;
|
|
355
355
|
} catch {
|
|
356
|
-
return
|
|
356
|
+
return ut;
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function lt(t) {
|
|
360
360
|
return [90, en(t)];
|
|
361
361
|
}
|
|
362
|
-
var
|
|
362
|
+
var ft = w();
|
|
363
363
|
function Sr() {
|
|
364
|
-
if (!("fetch" in
|
|
364
|
+
if (!("fetch" in ft)) return false;
|
|
365
365
|
try {
|
|
366
366
|
return new Headers(), new Request("http://www.example.com"), new Response(), true;
|
|
367
367
|
} catch {
|
|
@@ -373,8 +373,8 @@ function on(t) {
|
|
|
373
373
|
}
|
|
374
374
|
function an() {
|
|
375
375
|
if (!Sr()) return false;
|
|
376
|
-
if (on(
|
|
377
|
-
let t = false, e =
|
|
376
|
+
if (on(ft.fetch)) return true;
|
|
377
|
+
let t = false, e = ft.document;
|
|
378
378
|
if (e && typeof e.createElement == "function") try {
|
|
379
379
|
let n = e.createElement("iframe");
|
|
380
380
|
n.hidden = true, e.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (t = on(n.contentWindow.fetch)), e.head.removeChild(n);
|
|
@@ -454,20 +454,20 @@ function Rr() {
|
|
|
454
454
|
};
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function pt(t, e) {
|
|
458
458
|
return !!t && typeof t == "object" && !!t[e];
|
|
459
459
|
}
|
|
460
460
|
function dn(t) {
|
|
461
|
-
return typeof t == "string" ? t : t ?
|
|
461
|
+
return typeof t == "string" ? t : t ? pt(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
|
|
462
462
|
}
|
|
463
463
|
function pn(t) {
|
|
464
464
|
if (t.length === 0) return { method: "GET", url: "" };
|
|
465
465
|
if (t.length === 2) {
|
|
466
466
|
let [n, r] = t;
|
|
467
|
-
return { url: dn(n), method:
|
|
467
|
+
return { url: dn(n), method: pt(r, "method") ? String(r.method).toUpperCase() : "GET" };
|
|
468
468
|
}
|
|
469
469
|
let e = t[0];
|
|
470
|
-
return { url: dn(e), method:
|
|
470
|
+
return { url: dn(e), method: pt(e, "method") ? String(e.method).toUpperCase() : "GET" };
|
|
471
471
|
}
|
|
472
472
|
function mn() {
|
|
473
473
|
if (!y.XMLHttpRequest) return;
|
|
@@ -706,8 +706,8 @@ function vr(t, e) {
|
|
|
706
706
|
if (typeof global < "u" && e === global) return "[Global]";
|
|
707
707
|
if (typeof window < "u" && e === window) return "[Window]";
|
|
708
708
|
if (typeof document < "u" && e === document) return "[Document]";
|
|
709
|
-
if (
|
|
710
|
-
if (
|
|
709
|
+
if (ot(e)) return "[VueViewModel]";
|
|
710
|
+
if (it(e)) return "[SyntheticEvent]";
|
|
711
711
|
if (typeof e == "number" && e !== e) return "[NaN]";
|
|
712
712
|
if (typeof e == "function") return `[Function: ${ue(e)}]`;
|
|
713
713
|
if (typeof e == "symbol") return `[${String(e)}]`;
|
|
@@ -733,7 +733,7 @@ function Ur(t) {
|
|
|
733
733
|
let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n = Mr.exec(e);
|
|
734
734
|
return n ? n.slice(1) : [];
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function mt(t, e) {
|
|
737
737
|
let n = Ur(t)[2];
|
|
738
738
|
return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
|
|
739
739
|
}
|
|
@@ -833,7 +833,7 @@ var S = class {
|
|
|
833
833
|
};
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
|
-
function
|
|
836
|
+
function ht(t) {
|
|
837
837
|
let e = [];
|
|
838
838
|
function n() {
|
|
839
839
|
return t === void 0 || e.length < t;
|
|
@@ -864,7 +864,7 @@ function mt(t) {
|
|
|
864
864
|
return { $: e, add: s, drain: i };
|
|
865
865
|
}
|
|
866
866
|
var Tn = w();
|
|
867
|
-
var
|
|
867
|
+
var gt = { nowSeconds: () => Date.now() / 1e3 };
|
|
868
868
|
function Lr() {
|
|
869
869
|
let { performance: t } = Tn;
|
|
870
870
|
if (!t || !t.now) return;
|
|
@@ -878,9 +878,9 @@ function Br() {
|
|
|
878
878
|
return;
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
var
|
|
882
|
-
var Sn =
|
|
883
|
-
var j =
|
|
881
|
+
var _t = gn() ? Br() : Lr();
|
|
882
|
+
var Sn = _t === void 0 ? gt : { nowSeconds: () => (_t.timeOrigin + _t.now()) / 1e3 };
|
|
883
|
+
var j = gt.nowSeconds.bind(gt);
|
|
884
884
|
var q = Sn.nowSeconds.bind(Sn);
|
|
885
885
|
var he;
|
|
886
886
|
var Gr = (() => {
|
|
@@ -893,14 +893,14 @@ var Gr = (() => {
|
|
|
893
893
|
return i || u ? s <= c ? (he = "timeOrigin", t.timeOrigin) : (he = "navigationStart", o) : (he = "dateNow", r);
|
|
894
894
|
})();
|
|
895
895
|
var Fr = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");
|
|
896
|
-
function
|
|
896
|
+
function Et(t = g(), e = g().substring(16), n) {
|
|
897
897
|
let r = "";
|
|
898
898
|
return n !== void 0 && (r = n ? "-1" : "-0"), `${t}-${e}${r}`;
|
|
899
899
|
}
|
|
900
900
|
function B(t, e = []) {
|
|
901
901
|
return [t, e];
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function St(t, e) {
|
|
904
904
|
let [n, r] = t;
|
|
905
905
|
return [n, [...r, e]];
|
|
906
906
|
}
|
|
@@ -912,13 +912,13 @@ function Le(t, e) {
|
|
|
912
912
|
}
|
|
913
913
|
return false;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function yt(t, e) {
|
|
916
916
|
return (e || new TextEncoder()).encode(t);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function Tt(t, e) {
|
|
919
919
|
let [n, r] = t, s = JSON.stringify(n);
|
|
920
920
|
function i(o) {
|
|
921
|
-
typeof s == "string" ? s = typeof o == "string" ? s + o : [
|
|
921
|
+
typeof s == "string" ? s = typeof o == "string" ? s + o : [yt(s, e), o] : s.push(typeof o == "string" ? yt(o, e) : o);
|
|
922
922
|
}
|
|
923
923
|
for (let o of r) {
|
|
924
924
|
let [a, c] = o;
|
|
@@ -942,8 +942,8 @@ function $r(t) {
|
|
|
942
942
|
for (let s of t) n.set(s, r), r += s.length;
|
|
943
943
|
return n;
|
|
944
944
|
}
|
|
945
|
-
function
|
|
946
|
-
let n = typeof t.data == "string" ?
|
|
945
|
+
function bt(t, e) {
|
|
946
|
+
let n = typeof t.data == "string" ? yt(t.data, e) : t.data;
|
|
947
947
|
return [E({ type: "attachment", length: n.length, filename: t.filename, content_type: t.contentType, attachment_type: t.attachmentType }), n];
|
|
948
948
|
}
|
|
949
949
|
var Hr = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", statsd: "unknown" };
|
|
@@ -955,7 +955,7 @@ function Ge(t) {
|
|
|
955
955
|
let { name: e, version: n } = t.sdk;
|
|
956
956
|
return { name: e, version: n };
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function Rt(t, e, n, r) {
|
|
959
959
|
let s = t.sdkProcessingMetadata && t.sdkProcessingMetadata.dynamicSamplingContext;
|
|
960
960
|
return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: L(r) }, ...s && { trace: E({ ...s }) } };
|
|
961
961
|
}
|
|
@@ -968,10 +968,10 @@ function bn(t, e = Date.now()) {
|
|
|
968
968
|
function Rn(t, e) {
|
|
969
969
|
return t[e] || t.all || 0;
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function It(t, e, n = Date.now()) {
|
|
972
972
|
return Rn(t, e) > n;
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function xt(t, { statusCode: e, headers: n }, r = Date.now()) {
|
|
975
975
|
let s = { ...t }, i = n && n["x-sentry-rate-limits"], o = n && n["retry-after"];
|
|
976
976
|
if (i) for (let a of i.trim().split(",")) {
|
|
977
977
|
let [c, u] = a.split(":", 2), l = parseInt(c, 10), d = (isNaN(l) ? 60 : l) * 1e3;
|
|
@@ -981,11 +981,11 @@ function It(t, { statusCode: e, headers: n }, r = Date.now()) {
|
|
|
981
981
|
else o ? s.all = r + bn(o, r) : e === 429 && (s.all = r + 60 * 1e3);
|
|
982
982
|
return s;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function At(t, e) {
|
|
985
985
|
return t(e.stack || "", 1);
|
|
986
986
|
}
|
|
987
987
|
function In(t, e) {
|
|
988
|
-
let n = { type: e.name || e.constructor.name, value: e.message }, r =
|
|
988
|
+
let n = { type: e.name || e.constructor.name, value: e.message }, r = At(t, e);
|
|
989
989
|
return r.length && (n.stacktrace = { frames: r }), n;
|
|
990
990
|
}
|
|
991
991
|
function Yr(t) {
|
|
@@ -994,7 +994,7 @@ function Yr(t) {
|
|
|
994
994
|
return "message" in t && typeof t.message == "string" && (e += ` with message '${t.message}'`), e;
|
|
995
995
|
} else return "message" in t && typeof t.message == "string" ? t.message : `Object captured as exception with keys: ${ce(t)}`;
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function Nt(t, e, n, r) {
|
|
998
998
|
let s = n, o = r && r.data && r.data.mechanism || { handled: true, type: "generic" };
|
|
999
999
|
if (!$(n)) {
|
|
1000
1000
|
if (x(n)) {
|
|
@@ -1010,10 +1010,10 @@ function At(t, e, n, r) {
|
|
|
1010
1010
|
let a = { exception: { values: [In(e, s)] } };
|
|
1011
1011
|
return fe(a, void 0, void 0), pe(a, o), { ...a, event_id: r && r.event_id };
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function wt(t, e, n = "info", r, s) {
|
|
1014
1014
|
let i = { event_id: r && r.event_id, level: n, message: e };
|
|
1015
1015
|
if (s && r && r.syntheticException) {
|
|
1016
|
-
let o =
|
|
1016
|
+
let o = At(t, r.syntheticException);
|
|
1017
1017
|
o.length && (i.exception = { values: [{ value: e, stacktrace: { frames: o } }] });
|
|
1018
1018
|
}
|
|
1019
1019
|
return i;
|
|
@@ -1284,11 +1284,11 @@ var W = class {
|
|
|
1284
1284
|
r && e(n);
|
|
1285
1285
|
}
|
|
1286
1286
|
run(e) {
|
|
1287
|
-
let n =
|
|
1287
|
+
let n = Dt(this);
|
|
1288
1288
|
try {
|
|
1289
1289
|
e(this);
|
|
1290
1290
|
} finally {
|
|
1291
|
-
|
|
1291
|
+
Dt(n);
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
1294
|
getIntegration(e) {
|
|
@@ -1347,9 +1347,9 @@ Sentry.init({...});
|
|
|
1347
1347
|
function z() {
|
|
1348
1348
|
return h.__SENTRY__ = h.__SENTRY__ || { extensions: {}, hub: void 0 }, h;
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function Dt(t) {
|
|
1351
1351
|
let e = z(), n = Fe(e);
|
|
1352
|
-
return
|
|
1352
|
+
return Ot(e, t), n;
|
|
1353
1353
|
}
|
|
1354
1354
|
function R() {
|
|
1355
1355
|
let t = z();
|
|
@@ -1360,7 +1360,7 @@ function R() {
|
|
|
1360
1360
|
return zr(t);
|
|
1361
1361
|
}
|
|
1362
1362
|
function zr(t = z()) {
|
|
1363
|
-
return (!Vr(t) || Fe(t).isOlderThan(Dn)) &&
|
|
1363
|
+
return (!Vr(t) || Fe(t).isOlderThan(Dn)) && Ot(t, new W()), Fe(t);
|
|
1364
1364
|
}
|
|
1365
1365
|
function Vr(t) {
|
|
1366
1366
|
return !!(t && t.__SENTRY__ && t.__SENTRY__.hub);
|
|
@@ -1368,7 +1368,7 @@ function Vr(t) {
|
|
|
1368
1368
|
function Fe(t) {
|
|
1369
1369
|
return oe("hub", () => new W(), t);
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function Ot(t, e) {
|
|
1372
1372
|
if (!t) return false;
|
|
1373
1373
|
let n = t.__SENTRY__ = t.__SENTRY__ || {};
|
|
1374
1374
|
return n.hub = e, true;
|
|
@@ -1378,16 +1378,16 @@ function On(t) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
var vn = false;
|
|
1380
1380
|
function kn() {
|
|
1381
|
-
vn || (vn = true, Pe("error",
|
|
1381
|
+
vn || (vn = true, Pe("error", vt), Pe("unhandledrejection", vt));
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function vt() {
|
|
1384
1384
|
let t = On();
|
|
1385
1385
|
if (t) {
|
|
1386
1386
|
let e = "internal_error";
|
|
1387
1387
|
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Transaction: ${e} -> Global error occured`), t.setStatus(e);
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
|
-
|
|
1390
|
+
vt.tag = "sentry_tracingErrorCallback";
|
|
1391
1391
|
var $e = class {
|
|
1392
1392
|
constructor(e = 1e3) {
|
|
1393
1393
|
this._maxlen = e, this.spans = [];
|
|
@@ -1442,7 +1442,7 @@ var ee = class {
|
|
|
1442
1442
|
this.endTimestamp = typeof e == "number" ? e : q();
|
|
1443
1443
|
}
|
|
1444
1444
|
toTraceparent() {
|
|
1445
|
-
return
|
|
1445
|
+
return Et(this.traceId, this.spanId, this.sampled);
|
|
1446
1446
|
}
|
|
1447
1447
|
toContext() {
|
|
1448
1448
|
return E({ data: this.data, description: this.description, endTimestamp: this.endTimestamp, op: this.op, parentSpanId: this.parentSpanId, sampled: this.sampled, spanId: this.spanId, startTimestamp: this.startTimestamp, status: this.status, tags: this.tags, traceId: this.traceId });
|
|
@@ -1627,7 +1627,7 @@ function ts(t) {
|
|
|
1627
1627
|
return `${es(t)}${t.projectId}/envelope/`;
|
|
1628
1628
|
}
|
|
1629
1629
|
function ns(t, e) {
|
|
1630
|
-
return
|
|
1630
|
+
return ct({ sentry_key: t.publicKey, sentry_version: Qr, ...e && { sentry_client: `${e.name}/${e.version}` } });
|
|
1631
1631
|
}
|
|
1632
1632
|
function Un(t, e = {}) {
|
|
1633
1633
|
let n = typeof e == "string" ? e : e.tunnel, r = typeof e == "string" || !e._metadata ? void 0 : e._metadata.sdk;
|
|
@@ -1643,7 +1643,7 @@ function Ln(t, e, n, r) {
|
|
|
1643
1643
|
function Bn(t, e, n, r) {
|
|
1644
1644
|
let s = Ge(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
|
|
1645
1645
|
rs(t, n && n.sdk);
|
|
1646
|
-
let o =
|
|
1646
|
+
let o = Rt(t, s, r, e);
|
|
1647
1647
|
return delete t.sdkProcessingMetadata, B(o, [[{ type: i }, t]]);
|
|
1648
1648
|
}
|
|
1649
1649
|
var Gn = [];
|
|
@@ -1654,7 +1654,7 @@ function ss(t) {
|
|
|
1654
1654
|
s && !s.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
|
|
1655
1655
|
}), Object.keys(e).map((n) => e[n]);
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function kt(t) {
|
|
1658
1658
|
let e = t.defaultIntegrations || [], n = t.integrations;
|
|
1659
1659
|
e.forEach((o) => {
|
|
1660
1660
|
o.isDefaultInstance = true;
|
|
@@ -1671,10 +1671,10 @@ function vt(t) {
|
|
|
1671
1671
|
function Fn(t, e) {
|
|
1672
1672
|
let n = {};
|
|
1673
1673
|
return e.forEach((r) => {
|
|
1674
|
-
r &&
|
|
1674
|
+
r && Ct(t, r, n);
|
|
1675
1675
|
}), n;
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1677
|
+
function Ct(t, e, n) {
|
|
1678
1678
|
if (n[e.name] = e, Gn.indexOf(e.name) === -1 && (e.setupOnce(xn, R), Gn.push(e.name)), t.on && typeof e.preprocessEvent == "function") {
|
|
1679
1679
|
let r = e.preprocessEvent.bind(e);
|
|
1680
1680
|
t.on("preprocessEvent", (s, i) => r(s, i, t));
|
|
@@ -1840,12 +1840,12 @@ var je = class {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
1842
|
addIntegration(e) {
|
|
1843
|
-
|
|
1843
|
+
Ct(this, e, this._integrations);
|
|
1844
1844
|
}
|
|
1845
1845
|
sendEvent(e, n = {}) {
|
|
1846
1846
|
this.emit("beforeSendEvent", e, n);
|
|
1847
1847
|
let r = Bn(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1848
|
-
for (let i of n.attachments || []) r =
|
|
1848
|
+
for (let i of n.attachments || []) r = St(r, bt(i, this._options.transportOptions && this._options.transportOptions.textEncoder));
|
|
1849
1849
|
let s = this._sendEnvelope(r);
|
|
1850
1850
|
s && s.then((i) => this.emit("afterSendEvent", e, i), null);
|
|
1851
1851
|
}
|
|
@@ -1988,10 +1988,10 @@ var ge = class extends je {
|
|
|
1988
1988
|
Mn(), super(e);
|
|
1989
1989
|
}
|
|
1990
1990
|
eventFromException(e, n) {
|
|
1991
|
-
return b(
|
|
1991
|
+
return b(Nt(R, this._options.stackParser, e, n));
|
|
1992
1992
|
}
|
|
1993
1993
|
eventFromMessage(e, n = "info", r) {
|
|
1994
|
-
return b(
|
|
1994
|
+
return b(wt(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
1995
1995
|
}
|
|
1996
1996
|
captureException(e, n, r) {
|
|
1997
1997
|
if (this._options.autoSessionTracking && this._sessionFlusher && r) {
|
|
@@ -2039,13 +2039,13 @@ var ge = class extends je {
|
|
|
2039
2039
|
}
|
|
2040
2040
|
};
|
|
2041
2041
|
var ms = 30;
|
|
2042
|
-
function
|
|
2042
|
+
function Pt(t, e, n = ht(t.bufferSize || ms)) {
|
|
2043
2043
|
let r = {}, s = (o) => n.drain(o);
|
|
2044
2044
|
function i(o) {
|
|
2045
2045
|
let a = [];
|
|
2046
2046
|
if (Le(o, (d, p) => {
|
|
2047
2047
|
let m = Be(p);
|
|
2048
|
-
if (
|
|
2048
|
+
if (It(r, m)) {
|
|
2049
2049
|
let k = zn(d, p);
|
|
2050
2050
|
t.recordDroppedEvent("ratelimit_backoff", m, k);
|
|
2051
2051
|
} else a.push(d);
|
|
@@ -2055,7 +2055,7 @@ function Ct(t, e, n = mt(t.bufferSize || ms)) {
|
|
|
2055
2055
|
let k = zn(p, m);
|
|
2056
2056
|
t.recordDroppedEvent(d, Be(m), k);
|
|
2057
2057
|
});
|
|
2058
|
-
}, l = () => e({ body:
|
|
2058
|
+
}, l = () => e({ body: Tt(c, t.textEncoder) }).then((d) => (d.statusCode !== void 0 && (d.statusCode < 200 || d.statusCode >= 300) && (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`Sentry responded with status code ${d.statusCode} to sent event.`), r = xt(r, d), d), (d) => {
|
|
2059
2059
|
throw u("network_error"), d;
|
|
2060
2060
|
});
|
|
2061
2061
|
return n.add(l).then((d) => d, (d) => {
|
|
@@ -2155,7 +2155,7 @@ var Je = class {
|
|
|
2155
2155
|
setupOnce(e, n) {
|
|
2156
2156
|
n().getClient() && e((s) => {
|
|
2157
2157
|
let { sdkProcessingMetadata: i } = s;
|
|
2158
|
-
return !n().getIntegration(Je) || !i || ("request" in i && i.request instanceof Request && (s.request = xs(i.request,
|
|
2158
|
+
return !n().getIntegration(Je) || !i || ("request" in i && i.request instanceof Request && (s.request = xs(i.request, nt(this, ne)), s.user = Is(s.user ?? {}, i.request, nt(this, ne))), "requestData" in i && (s.request ? s.request.data = i.requestData : s.request = { data: i.requestData })), s;
|
|
2159
2159
|
});
|
|
2160
2160
|
}
|
|
2161
2161
|
};
|
|
@@ -2182,9 +2182,9 @@ function xs(t, e) {
|
|
|
2182
2182
|
l < 0 ? i.url = t.url : (i.url = t.url.substr(0, l), i.query_string = t.url.substr(l + 1));
|
|
2183
2183
|
}
|
|
2184
2184
|
let { allowedHeaders: o, allowedCookies: a, allowedSearchParams: c } = e;
|
|
2185
|
-
if (o !== void 0 && i.headers ? (i.headers =
|
|
2185
|
+
if (o !== void 0 && i.headers ? (i.headers = Mt(i.headers, o), Object.keys(i.headers).length === 0 && delete i.headers) : delete i.headers, a !== void 0 && i.cookies ? (i.cookies = Mt(i.cookies, a), Object.keys(i.cookies).length === 0 && delete i.cookies) : delete i.cookies, c !== void 0) {
|
|
2186
2186
|
let u = Object.fromEntries(new URLSearchParams(i.query_string)), l = new URLSearchParams();
|
|
2187
|
-
Object.keys(
|
|
2187
|
+
Object.keys(Mt(u, c)).forEach((d) => {
|
|
2188
2188
|
l.set(d, u[d]);
|
|
2189
2189
|
}), i.query_string = l.toString();
|
|
2190
2190
|
} else delete i.query_string;
|
|
@@ -2193,7 +2193,7 @@ function xs(t, e) {
|
|
|
2193
2193
|
function As(t, e) {
|
|
2194
2194
|
return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(t) : Array.isArray(e) ? e.map((r) => r.toLowerCase()).includes(t) : false;
|
|
2195
2195
|
}
|
|
2196
|
-
function
|
|
2196
|
+
function Mt(t, e) {
|
|
2197
2197
|
let n = () => false;
|
|
2198
2198
|
if (typeof e == "boolean") return e ? t : {};
|
|
2199
2199
|
if (e instanceof RegExp) n = (r) => e.test(r);
|
|
@@ -2219,7 +2219,7 @@ function ws(t, e) {
|
|
|
2219
2219
|
}, () => e);
|
|
2220
2220
|
}), n;
|
|
2221
2221
|
}
|
|
2222
|
-
var
|
|
2222
|
+
var Ut = class extends ge {
|
|
2223
2223
|
#e = null;
|
|
2224
2224
|
constructor(e) {
|
|
2225
2225
|
e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "3.3.1" }], version: "3.3.1" }, super(e);
|
|
@@ -2250,7 +2250,7 @@ var Mt = class extends ge {
|
|
|
2250
2250
|
}
|
|
2251
2251
|
};
|
|
2252
2252
|
function Ds(t) {
|
|
2253
|
-
let [e, n] =
|
|
2253
|
+
let [e, n] = lt(t);
|
|
2254
2254
|
return [e, (s) => {
|
|
2255
2255
|
let i = n(s);
|
|
2256
2256
|
if (i) {
|
|
@@ -2261,7 +2261,7 @@ function Ds(t) {
|
|
|
2261
2261
|
}];
|
|
2262
2262
|
}
|
|
2263
2263
|
function Os(t) {
|
|
2264
|
-
if (t) return
|
|
2264
|
+
if (t) return mt(t, ".js");
|
|
2265
2265
|
}
|
|
2266
2266
|
var vs = we(Ds(Os));
|
|
2267
2267
|
function ks(t) {
|
|
@@ -2273,7 +2273,7 @@ function ks(t) {
|
|
|
2273
2273
|
return Y(r);
|
|
2274
2274
|
}
|
|
2275
2275
|
}
|
|
2276
|
-
return
|
|
2276
|
+
return Pt(t, e);
|
|
2277
2277
|
}
|
|
2278
2278
|
var ze = class extends W {
|
|
2279
2279
|
constructor(e) {
|
|
@@ -2281,7 +2281,7 @@ var ze = class extends W {
|
|
|
2281
2281
|
let r = gs();
|
|
2282
2282
|
r !== void 0 && (e.release = r);
|
|
2283
2283
|
}
|
|
2284
|
-
let n = new
|
|
2284
|
+
let n = new Ut({ ...e, transport: ks, integrations: kt(e), stackParser: dt(e.stackParser || vs), transportOptions: { ...e.transportOptions, context: e.context } });
|
|
2285
2285
|
super(n), n.setSdk(this), n.setupIntegrations();
|
|
2286
2286
|
}
|
|
2287
2287
|
setRequestBody(e) {
|
|
@@ -2294,10 +2294,10 @@ var ze = class extends W {
|
|
|
2294
2294
|
return e.status === "in_progress" && this.setContext("monitor", { slug: e.monitorSlug }), this.getClient().captureCheckIn(e, n, r);
|
|
2295
2295
|
}
|
|
2296
2296
|
};
|
|
2297
|
-
function Qn(t, e, n, r, s, i, o, a
|
|
2297
|
+
function Qn(t, e, n, r, s, i, o, a) {
|
|
2298
2298
|
if (!(n && r && s)) return;
|
|
2299
|
-
let
|
|
2300
|
-
return i && (
|
|
2299
|
+
let c = new ze({ dsn: n, request: t, context: e, sampleRate: 1, requestDataOptions: { allowedHeaders: ["user-agent", "cf-challenge", "accept-encoding", "accept-language", "cf-ray", "content-length", "content-type", "host"], allowedSearchParams: /(.*)/ }, transportOptions: { headers: { "CF-Access-Client-ID": r, "CF-Access-Client-Secret": s } } });
|
|
2300
|
+
return i && (c.setTag("colo", i.coloId), c.setTag("metal", i.metalId)), o && a && (c.setTag("accountId", o), c.setTag("scriptId", a)), c.setUser({ id: o?.toString() }), c;
|
|
2301
2301
|
}
|
|
2302
2302
|
function Cs() {
|
|
2303
2303
|
return { addLogs: () => {
|
|
@@ -2323,7 +2323,7 @@ var Ke = class {
|
|
|
2323
2323
|
this.readyAnalytics && this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.scriptId?.toString(), doubles: [this.data.requestTime ?? -1, this.data.coloId ?? -1, this.data.metalId ?? -1, this.data.coloTier ?? -1], blobs: [this.data.hostname?.substring(0, 256), this.data.userAgent?.substring(0, 256), this.data.htmlHandling, this.data.notFoundHandling, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] });
|
|
2324
2324
|
}
|
|
2325
2325
|
};
|
|
2326
|
-
var
|
|
2326
|
+
var Ze = class {
|
|
2327
2327
|
constructor(e) {
|
|
2328
2328
|
this.data = e;
|
|
2329
2329
|
}
|
|
@@ -2353,7 +2353,7 @@ var Lt = (t, e) => {
|
|
|
2353
2353
|
return Lt(new Uint8Array(t.buffer, i, o), e);
|
|
2354
2354
|
} else return new Uint8Array(t.buffer, n, 40);
|
|
2355
2355
|
};
|
|
2356
|
-
var
|
|
2356
|
+
var Xe = (t) => {
|
|
2357
2357
|
let e = new DataView(t.buffer, t.byteOffset);
|
|
2358
2358
|
return (e.getBigUint64(0) << 64n) + e.getBigUint64(8);
|
|
2359
2359
|
};
|
|
@@ -2365,19 +2365,13 @@ var Ms = (t, e) => {
|
|
|
2365
2365
|
if (i.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
|
|
2366
2366
|
return Bt(i, e) === 0 ? new Uint8Array(t.buffer, t.byteOffset, 40) : false;
|
|
2367
2367
|
}
|
|
2368
|
-
let s =
|
|
2368
|
+
let s = Xe(e);
|
|
2369
2369
|
for (; n <= r; ) {
|
|
2370
|
-
let i = new Uint8Array(t.buffer, t.byteOffset + n * 40, 16), o = new Uint8Array(t.buffer, t.byteOffset + r * 40, 16), a =
|
|
2371
|
-
if (
|
|
2372
|
-
let
|
|
2373
|
-
if (
|
|
2374
|
-
|
|
2375
|
-
if (d < n || d > r) return false;
|
|
2376
|
-
let p = new Uint8Array(t.buffer, t.byteOffset + d * 40, 16);
|
|
2377
|
-
if (p.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
|
|
2378
|
-
let m = Bt(p, e);
|
|
2379
|
-
if (m === 0) return new Uint8Array(t.buffer, t.byteOffset + d * 40, 40);
|
|
2380
|
-
m < 0 ? n = d + 1 : r = d - 1;
|
|
2370
|
+
let i = new Uint8Array(t.buffer, t.byteOffset + n * 40, 16), o = new Uint8Array(t.buffer, t.byteOffset + r * 40, 16), a = Math.floor(Number(BigInt(n) + BigInt(r - n) * (s - Xe(i)) / (Xe(o) - Xe(i)))), c = new Uint8Array(t.buffer, t.byteOffset + a * 40, 16);
|
|
2371
|
+
if (c.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
|
|
2372
|
+
let u = Bt(c, e);
|
|
2373
|
+
if (u === 0) return new Uint8Array(t.buffer, t.byteOffset + a * 40, 40);
|
|
2374
|
+
u < 0 ? n = a + 1 : r = a - 1;
|
|
2381
2375
|
}
|
|
2382
2376
|
return false;
|
|
2383
2377
|
};
|
|
@@ -2395,7 +2389,7 @@ var Gt = (t) => {
|
|
|
2395
2389
|
let e;
|
|
2396
2390
|
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 };
|
|
2397
2391
|
};
|
|
2398
|
-
var
|
|
2392
|
+
var Qe = class {
|
|
2399
2393
|
constructor(e) {
|
|
2400
2394
|
this.data = {};
|
|
2401
2395
|
this.readyAnalytics = e;
|
|
@@ -2421,7 +2415,7 @@ function Us(t) {
|
|
|
2421
2415
|
var or = async (t, e, n, r, s) => {
|
|
2422
2416
|
let { pathname: i, search: o } = new URL(t.url), a = Ft(i);
|
|
2423
2417
|
a = a.replace(/\/+/g, "/");
|
|
2424
|
-
let c = await
|
|
2418
|
+
let c = await et(a, n, r);
|
|
2425
2419
|
if (!c) return e.JAEGER.enterSpan("no_intent", (I) => (I.setTags({ decodedPathname: a, configuration: JSON.stringify(n), status: 404 }), new se()));
|
|
2426
2420
|
let u = t.method.toUpperCase();
|
|
2427
2421
|
if (!["GET", "HEAD"].includes(u)) return e.JAEGER.enterSpan("method_not_allowed", (I) => (I.setTags({ method: u, status: 405 }), new Se()));
|
|
@@ -2440,7 +2434,7 @@ var or = async (t, e, n, r, s) => {
|
|
|
2440
2434
|
}
|
|
2441
2435
|
});
|
|
2442
2436
|
};
|
|
2443
|
-
var
|
|
2437
|
+
var et = async (t, e, n, r = false) => {
|
|
2444
2438
|
switch (e.html_handling) {
|
|
2445
2439
|
case "auto-trailing-slash":
|
|
2446
2440
|
return Ls(t, e, n, r);
|
|
@@ -2468,7 +2462,7 @@ var Ls = async (t, e, n, r) => {
|
|
|
2468
2462
|
if (s = await _(t, t.slice(0, -5), e, n, r)) return s;
|
|
2469
2463
|
if (s = await _(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
|
|
2470
2464
|
}
|
|
2471
|
-
return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s :
|
|
2465
|
+
return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : tt(t, e, n);
|
|
2472
2466
|
};
|
|
2473
2467
|
var Bs = async (t, e, n, r) => {
|
|
2474
2468
|
let s = null, i = null, o = await n(t);
|
|
@@ -2487,7 +2481,7 @@ var Bs = async (t, e, n, r) => {
|
|
|
2487
2481
|
if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
|
|
2488
2482
|
if (s = await _(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
|
|
2489
2483
|
}
|
|
2490
|
-
return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (s = await _(`${t}.html`, `${t}/`, e, n, r)) || (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s :
|
|
2484
|
+
return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (s = await _(`${t}.html`, `${t}/`, e, n, r)) || (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : tt(t, e, n);
|
|
2491
2485
|
};
|
|
2492
2486
|
var Gs = async (t, e, n, r) => {
|
|
2493
2487
|
let s = null, i = null, o = await n(t);
|
|
@@ -2516,13 +2510,13 @@ var Gs = async (t, e, n, r) => {
|
|
|
2516
2510
|
if (s = await _(t, t.slice(0, -5), e, n, r)) return s;
|
|
2517
2511
|
if (s = await _(`${t.slice(0, -5)}/index.html`, t.slice(0, -5), e, n, r)) return s;
|
|
2518
2512
|
}
|
|
2519
|
-
return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (i = await n(`${t}/index.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } :
|
|
2513
|
+
return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (i = await n(`${t}/index.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : tt(t, e, n);
|
|
2520
2514
|
};
|
|
2521
2515
|
var Fs = async (t, e, n) => {
|
|
2522
2516
|
let r = await n(t);
|
|
2523
|
-
return r ? { asset: { eTag: r, status: 200 }, redirect: null } :
|
|
2517
|
+
return r ? { asset: { eTag: r, status: 200 }, redirect: null } : tt(t, e, n);
|
|
2524
2518
|
};
|
|
2525
|
-
var
|
|
2519
|
+
var tt = async (t, e, n) => {
|
|
2526
2520
|
switch (e.not_found_handling) {
|
|
2527
2521
|
case "single-page-application": {
|
|
2528
2522
|
let r = await n("/index.html");
|
|
@@ -2545,7 +2539,7 @@ var et = async (t, e, n) => {
|
|
|
2545
2539
|
var _ = async (t, e, n, r, s) => {
|
|
2546
2540
|
if (s) return null;
|
|
2547
2541
|
if (!await r(e)) {
|
|
2548
|
-
let i = await
|
|
2542
|
+
let i = await et(e, n, r, true);
|
|
2549
2543
|
if (i?.asset && i.asset.eTag === await r(t)) return { asset: null, redirect: e };
|
|
2550
2544
|
}
|
|
2551
2545
|
return null;
|
|
@@ -2585,7 +2579,7 @@ var cr = class extends Hs {
|
|
|
2585
2579
|
async fetch(t) {
|
|
2586
2580
|
let e, n = new Ke(this.env.ANALYTICS), r = new re(this.env.UNSAFE_PERFORMANCE), s = r.now();
|
|
2587
2581
|
try {
|
|
2588
|
-
this.env.JAEGER || (this.env.JAEGER = er()), e = Qn(t, this.ctx, this.env.SENTRY_DSN, this.env.SENTRY_ACCESS_CLIENT_ID, this.env.SENTRY_ACCESS_CLIENT_SECRET, this.env.COLO_METADATA, this.env.
|
|
2582
|
+
this.env.JAEGER || (this.env.JAEGER = er()), e = Qn(t, this.ctx, this.env.SENTRY_DSN, this.env.SENTRY_ACCESS_CLIENT_ID, this.env.SENTRY_ACCESS_CLIENT_SECRET, this.env.COLO_METADATA, this.env.CONFIG?.account_id, this.env.CONFIG?.script_id);
|
|
2589
2583
|
let i = Gt(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
|
|
2590
2584
|
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 }), or(t, this.env, i, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this))));
|
|
2591
2585
|
} catch (i) {
|
|
@@ -2611,7 +2605,7 @@ var cr = class extends Hs {
|
|
|
2611
2605
|
}
|
|
2612
2606
|
async unstable_canFetch(t) {
|
|
2613
2607
|
let e = new URL(t.url), n = Ft(e.pathname);
|
|
2614
|
-
return await
|
|
2608
|
+
return await et(n, { ...Gt(this.env.CONFIG), not_found_handling: "none" }, this.unstable_exists.bind(this)) !== null;
|
|
2615
2609
|
}
|
|
2616
2610
|
async unstable_getByETag(t) {
|
|
2617
2611
|
let e = await ar(this.env.ASSETS_KV_NAMESPACE, t);
|
|
@@ -2623,11 +2617,11 @@ var cr = class extends Hs {
|
|
|
2623
2617
|
return e ? this.unstable_getByETag(e) : null;
|
|
2624
2618
|
}
|
|
2625
2619
|
async unstable_exists(t) {
|
|
2626
|
-
let e = new
|
|
2620
|
+
let e = new Qe(this.env.EXPERIMENT_ANALYTICS), n = new re(this.env.UNSAFE_PERFORMANCE), r = 0, s = "binary";
|
|
2627
2621
|
Math.random() < r && (s = "interpolation"), e.setData({ manifestReadMethod: s }), this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && e.setData({ accountId: this.env.CONFIG.account_id, experimentName: "manifest-read-timing" });
|
|
2628
2622
|
let i = n.now();
|
|
2629
2623
|
try {
|
|
2630
|
-
let o = new
|
|
2624
|
+
let o = new Ze(this.env.ASSETS_MANIFEST);
|
|
2631
2625
|
return s === "interpolation" ? await o.getWithInterpolationSearch(t) : await o.getWithBinarySearch(t);
|
|
2632
2626
|
} finally {
|
|
2633
2627
|
e.setData({ manifestReadTime: n.now() - i }), e.write();
|