@cloudflare/vite-plugin 0.0.0-027698c05 → 0.0.0-060a4db04
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 +109 -103
- package/dist/asset-workers/router-worker.js +134 -134
- package/dist/index.js +165 -140
- package/dist/runner-worker/index.js +1 -1
- package/package.json +9 -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 tt = (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 nt(t) {
|
|
77
77
|
return typeof Event < "u" && C(t, Event);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function rt(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 st(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 it(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 at(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 (nt(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 rt(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 ot(t, /* @__PURE__ */ new Map());
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function ot(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] = ot(t[s], e));
|
|
279
279
|
return r;
|
|
280
280
|
}
|
|
281
281
|
if (Array.isArray(t)) {
|
|
@@ -283,7 +283,7 @@ function at(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(ot(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 ut(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 ct = "<anonymous>";
|
|
352
352
|
function ue(t) {
|
|
353
353
|
try {
|
|
354
|
-
return !t || typeof t != "function" ?
|
|
354
|
+
return !t || typeof t != "function" ? ct : t.name || ct;
|
|
355
355
|
} catch {
|
|
356
|
-
return
|
|
356
|
+
return ct;
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function dt(t) {
|
|
360
360
|
return [90, en(t)];
|
|
361
361
|
}
|
|
362
|
-
var
|
|
362
|
+
var lt = w();
|
|
363
363
|
function Sr() {
|
|
364
|
-
if (!("fetch" in
|
|
364
|
+
if (!("fetch" in lt)) 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(lt.fetch)) return true;
|
|
377
|
+
let t = false, e = lt.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 ft(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 ? ft(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: ft(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: ft(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 (it(e)) return "[VueViewModel]";
|
|
710
|
+
if (st(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 pt(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 mt(t) {
|
|
837
837
|
let e = [];
|
|
838
838
|
function n() {
|
|
839
839
|
return t === void 0 || e.length < t;
|
|
@@ -864,7 +864,7 @@ function ht(t) {
|
|
|
864
864
|
return { $: e, add: s, drain: i };
|
|
865
865
|
}
|
|
866
866
|
var Tn = w();
|
|
867
|
-
var
|
|
867
|
+
var _t = { 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 ht = gn() ? Br() : Lr();
|
|
882
|
+
var Sn = ht === void 0 ? _t : { nowSeconds: () => (ht.timeOrigin + ht.now()) / 1e3 };
|
|
883
|
+
var j = _t.nowSeconds.bind(_t);
|
|
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 gt(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 yt(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 Et(t, e) {
|
|
916
916
|
return (e || new TextEncoder()).encode(t);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function St(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 : [Et(s, e), o] : s.push(typeof o == "string" ? Et(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 Tt(t, e) {
|
|
946
|
+
let n = typeof t.data == "string" ? Et(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 bt(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 Rt(t, e, n = Date.now()) {
|
|
972
972
|
return Rn(t, e) > n;
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function It(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 xt(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 xt(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 = xt(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 At(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 Nt(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 Nt(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 = xt(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 = wt(this);
|
|
1288
1288
|
try {
|
|
1289
1289
|
e(this);
|
|
1290
1290
|
} finally {
|
|
1291
|
-
|
|
1291
|
+
wt(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 wt(t) {
|
|
1351
1351
|
let e = z(), n = Fe(e);
|
|
1352
|
-
return
|
|
1352
|
+
return Dt(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)) && Dt(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 Dt(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", Ot), Pe("unhandledrejection", Ot));
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Ot() {
|
|
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
|
+
Ot.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 gt(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 at({ 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 = bt(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 vt(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 kt(t) {
|
|
|
1671
1671
|
function Fn(t, e) {
|
|
1672
1672
|
let n = {};
|
|
1673
1673
|
return e.forEach((r) => {
|
|
1674
|
-
r &&
|
|
1674
|
+
r && kt(t, r, n);
|
|
1675
1675
|
}), n;
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1677
|
+
function kt(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
|
+
kt(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 = yt(r, Tt(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(At(R, this._options.stackParser, e, n));
|
|
1992
1992
|
}
|
|
1993
1993
|
eventFromMessage(e, n = "info", r) {
|
|
1994
|
-
return b(
|
|
1994
|
+
return b(Nt(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 Ct(t, e, n = mt(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 (Rt(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 Pt(t, e, n = ht(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: St(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 = It(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, tt(this, ne)), s.user = Is(s.user ?? {}, i.request, tt(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 = Pt(i.headers, o), Object.keys(i.headers).length === 0 && delete i.headers) : delete i.headers, a !== void 0 && i.cookies ? (i.cookies = Pt(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(Pt(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 Pt(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 Mt = 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 Ut = class extends ge {
|
|
|
2250
2250
|
}
|
|
2251
2251
|
};
|
|
2252
2252
|
function Ds(t) {
|
|
2253
|
-
let [e, n] =
|
|
2253
|
+
let [e, n] = dt(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 pt(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 Ct(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 Mt({ ...e, transport: ks, integrations: vt(e), stackParser: ut(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, c) {
|
|
2298
2298
|
if (!(n && r && s)) return;
|
|
2299
|
-
let
|
|
2300
|
-
return i && (
|
|
2299
|
+
let u = new ze({ dsn: n, request: t, context: e, sampleRate: 1, release: o?.tag, 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 && (u.setTag("colo", i.coloId), u.setTag("metal", i.metalId)), a && c && (u.setTag("accountId", a), u.setTag("scriptId", c)), u.setUser({ id: a?.toString() }), u;
|
|
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 Xe = 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 Ut = (t) => {
|
|
2357
2357
|
let e = new DataView(t.buffer, t.byteOffset);
|
|
2358
2358
|
return (e.getBigUint64(0) << 64n) + e.getBigUint64(8);
|
|
2359
2359
|
};
|
|
@@ -2365,13 +2365,19 @@ 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 = Ut(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
|
-
|
|
2370
|
+
let i = new Uint8Array(t.buffer, t.byteOffset + n * 40, 16), o = new Uint8Array(t.buffer, t.byteOffset + r * 40, 16), a = Ut(i), u = Ut(o) - a;
|
|
2371
|
+
if (u < 0n) return false;
|
|
2372
|
+
let l = s - a;
|
|
2373
|
+
if (l < 0n) return false;
|
|
2374
|
+
let d = Math.floor(Number(BigInt(n) + BigInt(r - n) * l / u));
|
|
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;
|
|
2375
2381
|
}
|
|
2376
2382
|
return false;
|
|
2377
2383
|
};
|
|
@@ -2389,7 +2395,7 @@ var Gt = (t) => {
|
|
|
2389
2395
|
let e;
|
|
2390
2396
|
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 };
|
|
2391
2397
|
};
|
|
2392
|
-
var
|
|
2398
|
+
var Ze = class {
|
|
2393
2399
|
constructor(e) {
|
|
2394
2400
|
this.data = {};
|
|
2395
2401
|
this.readyAnalytics = e;
|
|
@@ -2415,7 +2421,7 @@ function Us(t) {
|
|
|
2415
2421
|
var or = async (t, e, n, r, s) => {
|
|
2416
2422
|
let { pathname: i, search: o } = new URL(t.url), a = Ft(i);
|
|
2417
2423
|
a = a.replace(/\/+/g, "/");
|
|
2418
|
-
let c = await
|
|
2424
|
+
let c = await Qe(a, n, r);
|
|
2419
2425
|
if (!c) return e.JAEGER.enterSpan("no_intent", (I) => (I.setTags({ decodedPathname: a, configuration: JSON.stringify(n), status: 404 }), new se()));
|
|
2420
2426
|
let u = t.method.toUpperCase();
|
|
2421
2427
|
if (!["GET", "HEAD"].includes(u)) return e.JAEGER.enterSpan("method_not_allowed", (I) => (I.setTags({ method: u, status: 405 }), new Se()));
|
|
@@ -2434,7 +2440,7 @@ var or = async (t, e, n, r, s) => {
|
|
|
2434
2440
|
}
|
|
2435
2441
|
});
|
|
2436
2442
|
};
|
|
2437
|
-
var
|
|
2443
|
+
var Qe = async (t, e, n, r = false) => {
|
|
2438
2444
|
switch (e.html_handling) {
|
|
2439
2445
|
case "auto-trailing-slash":
|
|
2440
2446
|
return Ls(t, e, n, r);
|
|
@@ -2462,7 +2468,7 @@ var Ls = async (t, e, n, r) => {
|
|
|
2462
2468
|
if (s = await _(t, t.slice(0, -5), e, n, r)) return s;
|
|
2463
2469
|
if (s = await _(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
|
|
2464
2470
|
}
|
|
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 :
|
|
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 : et(t, e, n);
|
|
2466
2472
|
};
|
|
2467
2473
|
var Bs = async (t, e, n, r) => {
|
|
2468
2474
|
let s = null, i = null, o = await n(t);
|
|
@@ -2481,7 +2487,7 @@ var Bs = async (t, e, n, r) => {
|
|
|
2481
2487
|
if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
|
|
2482
2488
|
if (s = await _(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
|
|
2483
2489
|
}
|
|
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 :
|
|
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 : et(t, e, n);
|
|
2485
2491
|
};
|
|
2486
2492
|
var Gs = async (t, e, n, r) => {
|
|
2487
2493
|
let s = null, i = null, o = await n(t);
|
|
@@ -2510,13 +2516,13 @@ var Gs = async (t, e, n, r) => {
|
|
|
2510
2516
|
if (s = await _(t, t.slice(0, -5), e, n, r)) return s;
|
|
2511
2517
|
if (s = await _(`${t.slice(0, -5)}/index.html`, t.slice(0, -5), e, n, r)) return s;
|
|
2512
2518
|
}
|
|
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 } :
|
|
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 } : et(t, e, n);
|
|
2514
2520
|
};
|
|
2515
2521
|
var Fs = async (t, e, n) => {
|
|
2516
2522
|
let r = await n(t);
|
|
2517
|
-
return r ? { asset: { eTag: r, status: 200 }, redirect: null } :
|
|
2523
|
+
return r ? { asset: { eTag: r, status: 200 }, redirect: null } : et(t, e, n);
|
|
2518
2524
|
};
|
|
2519
|
-
var
|
|
2525
|
+
var et = async (t, e, n) => {
|
|
2520
2526
|
switch (e.not_found_handling) {
|
|
2521
2527
|
case "single-page-application": {
|
|
2522
2528
|
let r = await n("/index.html");
|
|
@@ -2539,7 +2545,7 @@ var tt = async (t, e, n) => {
|
|
|
2539
2545
|
var _ = async (t, e, n, r, s) => {
|
|
2540
2546
|
if (s) return null;
|
|
2541
2547
|
if (!await r(e)) {
|
|
2542
|
-
let i = await
|
|
2548
|
+
let i = await Qe(e, n, r, true);
|
|
2543
2549
|
if (i?.asset && i.asset.eTag === await r(t)) return { asset: null, redirect: e };
|
|
2544
2550
|
}
|
|
2545
2551
|
return null;
|
|
@@ -2579,7 +2585,7 @@ var cr = class extends Hs {
|
|
|
2579
2585
|
async fetch(t) {
|
|
2580
2586
|
let e, n = new Ke(this.env.ANALYTICS), r = new re(this.env.UNSAFE_PERFORMANCE), s = r.now();
|
|
2581
2587
|
try {
|
|
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);
|
|
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.VERSION_METADATA, this.env.CONFIG?.account_id, this.env.CONFIG?.script_id);
|
|
2583
2589
|
let i = Gt(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
|
|
2584
2590
|
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))));
|
|
2585
2591
|
} catch (i) {
|
|
@@ -2605,7 +2611,7 @@ var cr = class extends Hs {
|
|
|
2605
2611
|
}
|
|
2606
2612
|
async unstable_canFetch(t) {
|
|
2607
2613
|
let e = new URL(t.url), n = Ft(e.pathname);
|
|
2608
|
-
return await
|
|
2614
|
+
return await Qe(n, { ...Gt(this.env.CONFIG), not_found_handling: "none" }, this.unstable_exists.bind(this)) !== null;
|
|
2609
2615
|
}
|
|
2610
2616
|
async unstable_getByETag(t) {
|
|
2611
2617
|
let e = await ar(this.env.ASSETS_KV_NAMESPACE, t);
|
|
@@ -2617,11 +2623,11 @@ var cr = class extends Hs {
|
|
|
2617
2623
|
return e ? this.unstable_getByETag(e) : null;
|
|
2618
2624
|
}
|
|
2619
2625
|
async unstable_exists(t) {
|
|
2620
|
-
let e = new
|
|
2626
|
+
let e = new Ze(this.env.EXPERIMENT_ANALYTICS), n = new re(this.env.UNSAFE_PERFORMANCE), r = 1 / 2e4, s = "binary";
|
|
2621
2627
|
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" });
|
|
2622
2628
|
let i = n.now();
|
|
2623
2629
|
try {
|
|
2624
|
-
let o = new
|
|
2630
|
+
let o = new Xe(this.env.ASSETS_MANIFEST);
|
|
2625
2631
|
return s === "interpolation" ? await o.getWithInterpolationSearch(t) : await o.getWithBinarySearch(t);
|
|
2626
2632
|
} finally {
|
|
2627
2633
|
e.setData({ manifestReadTime: n.now() - i }), e.write();
|