rsbuild-plugin-cloudflare 0.0.5 → 0.0.7

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.
@@ -1,5 +1,4 @@
1
1
  import { WorkerEntrypoint } from "cloudflare:workers";
2
-
3
2
  //#region ../workers-shared/utils/responses.ts
4
3
  var TemporaryRedirectResponse = class TemporaryRedirectResponse extends Response {
5
4
  static status = 307;
@@ -15,7 +14,6 @@ var TemporaryRedirectResponse = class TemporaryRedirectResponse extends Response
15
14
  });
16
15
  }
17
16
  };
18
-
19
17
  //#endregion
20
18
  //#region ../workers-shared/utils/tracing.ts
21
19
  function mockJaegerBindingSpan() {
@@ -46,7 +44,6 @@ function mockJaegerBinding() {
46
44
  cfTraceIdHeader: "test-trace:test-span:0"
47
45
  };
48
46
  }
49
-
50
47
  //#endregion
51
48
  //#region ../workers-shared/asset-worker/src/utils/rules-engine.ts
52
49
  const ESCAPE_REGEX_CHARACTERS = /[-/\\^$*+?.()|[\]{}]/g;
@@ -65,7 +62,6 @@ const generateStaticRoutingRuleMatcher = (rules) => ({ request }) => {
65
62
  } catch {}
66
63
  return false;
67
64
  };
68
-
69
65
  //#endregion
70
66
  //#region ../workers-shared/utils/performance.ts
71
67
  var PerformanceTimer = class {
@@ -78,7 +74,6 @@ var PerformanceTimer = class {
78
74
  return Date.now();
79
75
  }
80
76
  };
81
-
82
77
  //#endregion
83
78
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/is.js
84
79
  const objectToString = Object.prototype.toString;
@@ -218,7 +213,6 @@ function isInstanceOf(wat, base) {
218
213
  function isVueViewModel(wat) {
219
214
  return !!(typeof wat === "object" && wat !== null && (wat.__isVue || wat._isVue));
220
215
  }
221
-
222
216
  //#endregion
223
217
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/string.js
224
218
  /**
@@ -232,11 +226,9 @@ function truncate(str, max = 0) {
232
226
  if (typeof str !== "string" || max === 0) return str;
233
227
  return str.length <= max ? str : `${str.slice(0, max)}...`;
234
228
  }
235
-
236
229
  //#endregion
237
230
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/version.js
238
231
  const SDK_VERSION = "8.9.2";
239
-
240
232
  //#endregion
241
233
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/worldwide.js
242
234
  /** Get's the global object for the current JavaScript runtime */
@@ -255,10 +247,9 @@ const GLOBAL_OBJ = globalThis;
255
247
  function getGlobalSingleton(name, creator, obj) {
256
248
  const gbl = obj || GLOBAL_OBJ;
257
249
  const __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {};
258
- const versionedCarrier = __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};
250
+ const versionedCarrier = __SENTRY__[SDK_VERSION] = __SENTRY__["8.9.2"] || {};
259
251
  return versionedCarrier[name] || (versionedCarrier[name] = creator());
260
252
  }
261
-
262
253
  //#endregion
263
254
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/browser.js
264
255
  const WINDOW = GLOBAL_OBJ;
@@ -341,7 +332,6 @@ function _htmlElementAsString(el, keyAttrs) {
341
332
  }
342
333
  return out.join("");
343
334
  }
344
-
345
335
  //#endregion
346
336
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/debug-build.js
347
337
  /**
@@ -350,7 +340,6 @@ function _htmlElementAsString(el, keyAttrs) {
350
340
  * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
351
341
  */
352
342
  const DEBUG_BUILD$1 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
353
-
354
343
  //#endregion
355
344
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/logger.js
356
345
  /** Prefix for logging strings */
@@ -375,25 +364,25 @@ const originalConsoleMethods = {};
375
364
  */
376
365
  function consoleSandbox(callback) {
377
366
  if (!("console" in GLOBAL_OBJ)) return callback();
378
- const console$1 = GLOBAL_OBJ.console;
367
+ const console = GLOBAL_OBJ.console;
379
368
  const wrappedFuncs = {};
380
369
  const wrappedLevels = Object.keys(originalConsoleMethods);
381
370
  wrappedLevels.forEach((level) => {
382
371
  const originalConsoleMethod = originalConsoleMethods[level];
383
- wrappedFuncs[level] = console$1[level];
384
- console$1[level] = originalConsoleMethod;
372
+ wrappedFuncs[level] = console[level];
373
+ console[level] = originalConsoleMethod;
385
374
  });
386
375
  try {
387
376
  return callback();
388
377
  } finally {
389
378
  wrappedLevels.forEach((level) => {
390
- console$1[level] = wrappedFuncs[level];
379
+ console[level] = wrappedFuncs[level];
391
380
  });
392
381
  }
393
382
  }
394
383
  function makeLogger() {
395
384
  let enabled = false;
396
- const logger$1 = {
385
+ const logger = {
397
386
  enable: () => {
398
387
  enabled = true;
399
388
  },
@@ -403,19 +392,18 @@ function makeLogger() {
403
392
  isEnabled: () => enabled
404
393
  };
405
394
  if (DEBUG_BUILD$1) CONSOLE_LEVELS.forEach((name) => {
406
- logger$1[name] = (...args) => {
395
+ logger[name] = (...args) => {
407
396
  if (enabled) consoleSandbox(() => {
408
397
  GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);
409
398
  });
410
399
  };
411
400
  });
412
401
  else CONSOLE_LEVELS.forEach((name) => {
413
- logger$1[name] = () => void 0;
402
+ logger[name] = () => void 0;
414
403
  });
415
- return logger$1;
404
+ return logger;
416
405
  }
417
406
  const logger = makeLogger();
418
-
419
407
  //#endregion
420
408
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/dsn.js
421
409
  /** Regular expression used to parse a Dsn. */
@@ -521,7 +509,6 @@ function makeDsn(from) {
521
509
  if (!components || !validateDsn(components)) return;
522
510
  return components;
523
511
  }
524
-
525
512
  //#endregion
526
513
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/error.js
527
514
  /** An error emitted by Sentry SDKs and related utilities. */
@@ -535,7 +522,6 @@ var SentryError = class extends Error {
535
522
  this.logLevel = logLevel;
536
523
  }
537
524
  };
538
-
539
525
  //#endregion
540
526
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/object.js
541
527
  /**
@@ -664,11 +650,9 @@ function isPojo(input) {
664
650
  return true;
665
651
  }
666
652
  }
667
-
668
653
  //#endregion
669
654
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/stacktrace.js
670
655
  const STACKTRACE_FRAME_LIMIT = 50;
671
- const UNKNOWN_FUNCTION = "?";
672
656
  const WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
673
657
  const STRIP_FRAME_REGEXP = /captureMessage|captureException/;
674
658
  /**
@@ -728,7 +712,7 @@ function stripSentryFramesAndReverse(stack) {
728
712
  return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({
729
713
  ...frame,
730
714
  filename: frame.filename || localStack[localStack.length - 1].filename,
731
- function: frame.function || UNKNOWN_FUNCTION
715
+ function: frame.function || "?"
732
716
  }));
733
717
  }
734
718
  const defaultFunctionName = "<anonymous>";
@@ -743,15 +727,14 @@ function getFunctionName(fn) {
743
727
  return defaultFunctionName;
744
728
  }
745
729
  }
746
-
747
730
  //#endregion
748
731
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/instrument/handlers.js
749
732
  const handlers = {};
750
733
  const instrumented = {};
751
734
  /** Add a handler function. */
752
- function addHandler(type, handler$1) {
735
+ function addHandler(type, handler) {
753
736
  handlers[type] = handlers[type] || [];
754
- handlers[type].push(handler$1);
737
+ handlers[type].push(handler);
755
738
  }
756
739
  /** Maybe run an instrumentation function, unless it was already called. */
757
740
  function maybeInstrument(type, instrumentFn) {
@@ -764,13 +747,12 @@ function maybeInstrument(type, instrumentFn) {
764
747
  function triggerHandlers(type, data) {
765
748
  const typeHandlers = type && handlers[type];
766
749
  if (!typeHandlers) return;
767
- for (const handler$1 of typeHandlers) try {
768
- handler$1(data);
750
+ for (const handler of typeHandlers) try {
751
+ handler(data);
769
752
  } catch (e) {
770
- DEBUG_BUILD$1 && logger.error(`Error while triggering instrumentation handler.\nType: ${type}\nName: ${getFunctionName(handler$1)}\nError:`, e);
753
+ DEBUG_BUILD$1 && logger.error(`Error while triggering instrumentation handler.\nType: ${type}\nName: ${getFunctionName(handler)}\nError:`, e);
771
754
  }
772
755
  }
773
-
774
756
  //#endregion
775
757
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/time.js
776
758
  const ONE_SECOND_IN_MS = 1e3;
@@ -811,38 +793,22 @@ function createUnixTimestampInSecondsFunc() {
811
793
  * See https://github.com/getsentry/sentry-javascript/issues/2590.
812
794
  */
813
795
  const timestampInSeconds = createUnixTimestampInSecondsFunc();
814
- /**
815
- * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
816
- */
817
- let _browserPerformanceTimeOriginMode;
818
- /**
819
- * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
820
- * performance API is available.
821
- */
822
- const browserPerformanceTimeOrigin = (() => {
796
+ (() => {
823
797
  const { performance } = GLOBAL_OBJ;
824
- if (!performance || !performance.now) {
825
- _browserPerformanceTimeOriginMode = "none";
826
- return;
827
- }
828
- const threshold = 3600 * 1e3;
798
+ if (!performance || !performance.now) return;
799
+ const threshold = 36e5;
829
800
  const performanceNow = performance.now();
830
801
  const dateNow = Date.now();
831
802
  const timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold;
832
803
  const timeOriginIsReliable = timeOriginDelta < threshold;
833
804
  const navigationStart = performance.timing && performance.timing.navigationStart;
834
805
  const navigationStartDelta = typeof navigationStart === "number" ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;
835
- if (timeOriginIsReliable || navigationStartDelta < threshold) if (timeOriginDelta <= navigationStartDelta) {
836
- _browserPerformanceTimeOriginMode = "timeOrigin";
837
- return performance.timeOrigin;
838
- } else {
839
- _browserPerformanceTimeOriginMode = "navigationStart";
840
- return navigationStart;
841
- }
842
- _browserPerformanceTimeOriginMode = "dateNow";
806
+ if (timeOriginIsReliable || navigationStartDelta < threshold) {
807
+ if (timeOriginDelta <= navigationStartDelta) return performance.timeOrigin;
808
+ else return navigationStart;
809
+ }
843
810
  return dateNow;
844
811
  })();
845
-
846
812
  //#endregion
847
813
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/instrument/globalError.js
848
814
  let _oldOnErrorHandler = null;
@@ -852,9 +818,9 @@ let _oldOnErrorHandler = null;
852
818
  * Use at your own risk, this might break without changelog notice, only used internally.
853
819
  * @hidden
854
820
  */
855
- function addGlobalErrorInstrumentationHandler(handler$1) {
821
+ function addGlobalErrorInstrumentationHandler(handler) {
856
822
  const type = "error";
857
- addHandler(type, handler$1);
823
+ addHandler(type, handler);
858
824
  maybeInstrument(type, instrumentError);
859
825
  }
860
826
  function instrumentError() {
@@ -872,7 +838,6 @@ function instrumentError() {
872
838
  };
873
839
  GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;
874
840
  }
875
-
876
841
  //#endregion
877
842
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js
878
843
  let _oldOnUnhandledRejectionHandler = null;
@@ -882,9 +847,9 @@ let _oldOnUnhandledRejectionHandler = null;
882
847
  * Use at your own risk, this might break without changelog notice, only used internally.
883
848
  * @hidden
884
849
  */
885
- function addGlobalUnhandledRejectionInstrumentationHandler(handler$1) {
850
+ function addGlobalUnhandledRejectionInstrumentationHandler(handler) {
886
851
  const type = "unhandledrejection";
887
- addHandler(type, handler$1);
852
+ addHandler(type, handler);
888
853
  maybeInstrument(type, instrumentUnhandledRejection);
889
854
  }
890
855
  function instrumentUnhandledRejection() {
@@ -896,7 +861,6 @@ function instrumentUnhandledRejection() {
896
861
  };
897
862
  GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
898
863
  }
899
-
900
864
  //#endregion
901
865
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/memo.js
902
866
  /**
@@ -924,7 +888,6 @@ function memoBuilder() {
924
888
  }
925
889
  return [memoize, unmemoize];
926
890
  }
927
-
928
891
  //#endregion
929
892
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/misc.js
930
893
  /**
@@ -939,7 +902,7 @@ function uuid4() {
939
902
  try {
940
903
  if (crypto && crypto.randomUUID) return crypto.randomUUID().replace(/-/g, "");
941
904
  if (crypto && crypto.getRandomValues) getRandomByte = () => {
942
- const typedArray = new Uint8Array(1);
905
+ const typedArray = /* @__PURE__ */ new Uint8Array(1);
943
906
  crypto.getRandomValues(typedArray);
944
907
  return typedArray[0];
945
908
  };
@@ -1028,7 +991,6 @@ function checkOrSetAlreadyCaught(exception) {
1028
991
  function arrayify(maybeArray) {
1029
992
  return Array.isArray(maybeArray) ? maybeArray : [maybeArray];
1030
993
  }
1031
-
1032
994
  //#endregion
1033
995
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/normalize.js
1034
996
  /**
@@ -1058,7 +1020,7 @@ function normalize(input, depth = 100, maxProperties = Infinity) {
1058
1020
  }
1059
1021
  }
1060
1022
  /** JSDoc */
1061
- function normalizeToSize(object, depth = 3, maxSize = 100 * 1024) {
1023
+ function normalizeToSize(object, depth = 3, maxSize = 102400) {
1062
1024
  const normalized = normalize(object, depth);
1063
1025
  if (jsonSize(normalized) > maxSize) return normalizeToSize(object, depth - 1, maxSize);
1064
1026
  return normalized;
@@ -1146,7 +1108,6 @@ function utf8Length(value) {
1146
1108
  function jsonSize(value) {
1147
1109
  return utf8Length(JSON.stringify(value));
1148
1110
  }
1149
-
1150
1111
  //#endregion
1151
1112
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/path.js
1152
1113
  /** JSDoc */
@@ -1218,21 +1179,20 @@ function basename(path, ext) {
1218
1179
  if (ext && f.slice(ext.length * -1) === ext) f = f.slice(0, f.length - ext.length);
1219
1180
  return f;
1220
1181
  }
1221
-
1222
1182
  //#endregion
1223
1183
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/syncpromise.js
1224
1184
  /** SyncPromise internal states */
1225
1185
  var States;
1226
- (function(States$1) {
1186
+ (function(States) {
1227
1187
  /** Pending */
1228
1188
  const PENDING = 0;
1229
- States$1[States$1["PENDING"] = PENDING] = "PENDING";
1189
+ States[States["PENDING"] = PENDING] = "PENDING";
1230
1190
  /** Resolved / OK */
1231
1191
  const RESOLVED = 1;
1232
- States$1[States$1["RESOLVED"] = RESOLVED] = "RESOLVED";
1192
+ States[States["RESOLVED"] = RESOLVED] = "RESOLVED";
1233
1193
  /** Rejected / Error */
1234
1194
  const REJECTED = 2;
1235
- States$1[States$1["REJECTED"] = REJECTED] = "REJECTED";
1195
+ States[States["REJECTED"] = REJECTED] = "REJECTED";
1236
1196
  })(States || (States = {}));
1237
1197
  /**
1238
1198
  * Creates a resolved sync promise.
@@ -1241,8 +1201,8 @@ var States;
1241
1201
  * @returns the resolved sync promise
1242
1202
  */
1243
1203
  function resolvedSyncPromise(value) {
1244
- return new SyncPromise((resolve$1) => {
1245
- resolve$1(value);
1204
+ return new SyncPromise((resolve) => {
1205
+ resolve(value);
1246
1206
  });
1247
1207
  }
1248
1208
  /**
@@ -1276,13 +1236,13 @@ var SyncPromise = class SyncPromise {
1276
1236
  }
1277
1237
  /** JSDoc */
1278
1238
  then(onfulfilled, onrejected) {
1279
- return new SyncPromise((resolve$1, reject) => {
1239
+ return new SyncPromise((resolve, reject) => {
1280
1240
  this._handlers.push([
1281
1241
  false,
1282
1242
  (result) => {
1283
- if (!onfulfilled) resolve$1(result);
1243
+ if (!onfulfilled) resolve(result);
1284
1244
  else try {
1285
- resolve$1(onfulfilled(result));
1245
+ resolve(onfulfilled(result));
1286
1246
  } catch (e) {
1287
1247
  reject(e);
1288
1248
  }
@@ -1290,7 +1250,7 @@ var SyncPromise = class SyncPromise {
1290
1250
  (reason) => {
1291
1251
  if (!onrejected) reject(reason);
1292
1252
  else try {
1293
- resolve$1(onrejected(reason));
1253
+ resolve(onrejected(reason));
1294
1254
  } catch (e) {
1295
1255
  reject(e);
1296
1256
  }
@@ -1305,7 +1265,7 @@ var SyncPromise = class SyncPromise {
1305
1265
  }
1306
1266
  /** JSDoc */
1307
1267
  finally(onfinally) {
1308
- return new SyncPromise((resolve$1, reject) => {
1268
+ return new SyncPromise((resolve, reject) => {
1309
1269
  let val;
1310
1270
  let isRejected;
1311
1271
  return this.then((value) => {
@@ -1321,7 +1281,7 @@ var SyncPromise = class SyncPromise {
1321
1281
  reject(val);
1322
1282
  return;
1323
1283
  }
1324
- resolve$1(val);
1284
+ resolve(val);
1325
1285
  });
1326
1286
  });
1327
1287
  }
@@ -1356,16 +1316,15 @@ var SyncPromise = class SyncPromise {
1356
1316
  if (this._state === States.PENDING) return;
1357
1317
  const cachedHandlers = this._handlers.slice();
1358
1318
  this._handlers = [];
1359
- cachedHandlers.forEach((handler$1) => {
1360
- if (handler$1[0]) return;
1361
- if (this._state === States.RESOLVED) handler$1[1](this._value);
1362
- if (this._state === States.REJECTED) handler$1[2](this._value);
1363
- handler$1[0] = true;
1319
+ cachedHandlers.forEach((handler) => {
1320
+ if (handler[0]) return;
1321
+ if (this._state === States.RESOLVED) handler[1](this._value);
1322
+ if (this._state === States.REJECTED) handler[2](this._value);
1323
+ handler[0] = true;
1364
1324
  });
1365
1325
  };
1366
1326
  }
1367
1327
  };
1368
-
1369
1328
  //#endregion
1370
1329
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/promisebuffer.js
1371
1330
  /**
@@ -1413,17 +1372,17 @@ function makePromiseBuffer(limit) {
1413
1372
  * `false` otherwise
1414
1373
  */
1415
1374
  function drain(timeout) {
1416
- return new SyncPromise((resolve$1, reject) => {
1375
+ return new SyncPromise((resolve, reject) => {
1417
1376
  let counter = buffer.length;
1418
- if (!counter) return resolve$1(true);
1377
+ if (!counter) return resolve(true);
1419
1378
  const capturedSetTimeout = setTimeout(() => {
1420
- if (timeout && timeout > 0) resolve$1(false);
1379
+ if (timeout && timeout > 0) resolve(false);
1421
1380
  }, timeout);
1422
1381
  buffer.forEach((item) => {
1423
1382
  resolvedSyncPromise(item).then(() => {
1424
1383
  if (!--counter) {
1425
1384
  clearTimeout(capturedSetTimeout);
1426
- resolve$1(true);
1385
+ resolve(true);
1427
1386
  }
1428
1387
  }, reject);
1429
1388
  });
@@ -1435,7 +1394,6 @@ function makePromiseBuffer(limit) {
1435
1394
  drain
1436
1395
  };
1437
1396
  }
1438
-
1439
1397
  //#endregion
1440
1398
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/node-stack-trace.js
1441
1399
  /**
@@ -1445,7 +1403,7 @@ function filenameIsInApp(filename, isNative = false) {
1445
1403
  return !(isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && filename !== void 0 && !filename.includes("node_modules/");
1446
1404
  }
1447
1405
  /** Node Stack line parser */
1448
- function node(getModule$1) {
1406
+ function node(getModule) {
1449
1407
  const FILENAME_MATCH = /^\s*[-]{4,}$/;
1450
1408
  const FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
1451
1409
  return (line) => {
@@ -1480,7 +1438,7 @@ function node(getModule$1) {
1480
1438
  functionName = void 0;
1481
1439
  }
1482
1440
  if (functionName === void 0) {
1483
- methodName = methodName || UNKNOWN_FUNCTION;
1441
+ methodName = methodName || "?";
1484
1442
  functionName = typeName ? `${typeName}.${methodName}` : methodName;
1485
1443
  }
1486
1444
  let filename = lineMatch[2] && lineMatch[2].startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2];
@@ -1489,7 +1447,7 @@ function node(getModule$1) {
1489
1447
  if (!filename && lineMatch[5] && !isNative) filename = lineMatch[5];
1490
1448
  return {
1491
1449
  filename,
1492
- module: getModule$1 ? getModule$1(filename) : void 0,
1450
+ module: getModule ? getModule(filename) : void 0,
1493
1451
  function: functionName,
1494
1452
  lineno: parseInt(lineMatch[3], 10) || void 0,
1495
1453
  colno: parseInt(lineMatch[4], 10) || void 0,
@@ -1505,10 +1463,9 @@ function node(getModule$1) {
1505
1463
  * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.
1506
1464
  * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain
1507
1465
  */
1508
- function nodeStackLineParser(getModule$1) {
1509
- return [90, node(getModule$1)];
1466
+ function nodeStackLineParser(getModule) {
1467
+ return [90, node(getModule)];
1510
1468
  }
1511
-
1512
1469
  //#endregion
1513
1470
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/envelope.js
1514
1471
  /**
@@ -1643,10 +1600,9 @@ function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {
1643
1600
  ...dynamicSamplingContext && { trace: dropUndefinedKeys({ ...dynamicSamplingContext }) }
1644
1601
  };
1645
1602
  }
1646
-
1647
1603
  //#endregion
1648
1604
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/ratelimit.js
1649
- const DEFAULT_RETRY_AFTER = 60 * 1e3;
1605
+ const DEFAULT_RETRY_AFTER = 6e4;
1650
1606
  /**
1651
1607
  * Extracts Retry-After value from the request header or returns default value
1652
1608
  * @param header string representation of 'Retry-After' header
@@ -1710,10 +1666,9 @@ function updateRateLimits(limits, { statusCode, headers }, now = Date.now()) {
1710
1666
  } else updatedRateLimits[category] = now + delay;
1711
1667
  }
1712
1668
  else if (retryAfterHeader) updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);
1713
- else if (statusCode === 429) updatedRateLimits.all = now + 60 * 1e3;
1669
+ else if (statusCode === 429) updatedRateLimits.all = now + 6e4;
1714
1670
  return updatedRateLimits;
1715
1671
  }
1716
-
1717
1672
  //#endregion
1718
1673
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/eventbuilder.js
1719
1674
  /**
@@ -1767,9 +1722,9 @@ function getException(client, mechanism, exception, hint) {
1767
1722
  const errorFromProp = getErrorPropertyFromObject(exception);
1768
1723
  if (errorFromProp) return [errorFromProp, extras];
1769
1724
  const message = getMessageForObject(exception);
1770
- const ex$1 = hint && hint.syntheticException || new Error(message);
1771
- ex$1.message = message;
1772
- return [ex$1, extras];
1725
+ const ex = hint && hint.syntheticException || new Error(message);
1726
+ ex.message = message;
1727
+ return [ex, extras];
1773
1728
  }
1774
1729
  const ex = hint && hint.syntheticException || new Error(exception);
1775
1730
  ex.message = `${exception}`;
@@ -1821,7 +1776,6 @@ function eventFromMessage$1(stackParser, message, level = "info", hint, attachSt
1821
1776
  event.message = message;
1822
1777
  return event;
1823
1778
  }
1824
-
1825
1779
  //#endregion
1826
1780
  //#region ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/esm/propagationContext.js
1827
1781
  /**
@@ -1833,7 +1787,6 @@ function generatePropagationContext() {
1833
1787
  spanId: uuid4().substring(16)
1834
1788
  };
1835
1789
  }
1836
-
1837
1790
  //#endregion
1838
1791
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/debug-build.js
1839
1792
  /**
@@ -1842,7 +1795,6 @@ function generatePropagationContext() {
1842
1795
  * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
1843
1796
  */
1844
1797
  const DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
1845
-
1846
1798
  //#endregion
1847
1799
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/carrier.js
1848
1800
  /**
@@ -1863,10 +1815,9 @@ function getMainCarrier() {
1863
1815
  /** Will either get the existing sentry carrier, or create a new one. */
1864
1816
  function getSentryCarrier(carrier) {
1865
1817
  const __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};
1866
- __SENTRY__.version = __SENTRY__.version || SDK_VERSION;
1867
- return __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};
1818
+ __SENTRY__.version = __SENTRY__.version || "8.9.2";
1819
+ return __SENTRY__[SDK_VERSION] = __SENTRY__["8.9.2"] || {};
1868
1820
  }
1869
-
1870
1821
  //#endregion
1871
1822
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/session.js
1872
1823
  /**
@@ -1905,7 +1856,6 @@ function updateSession(session, context = {}) {
1905
1856
  if (typeof context.errors === "number") session.errors = context.errors;
1906
1857
  if (context.status) session.status = context.status;
1907
1858
  }
1908
-
1909
1859
  //#endregion
1910
1860
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/utils/spanOnScope.js
1911
1861
  const SCOPE_SPAN_FIELD = "_sentrySpan";
@@ -1924,7 +1874,6 @@ function _setSpanForScope(scope, span) {
1924
1874
  function _getSpanForScope(scope) {
1925
1875
  return scope[SCOPE_SPAN_FIELD];
1926
1876
  }
1927
-
1928
1877
  //#endregion
1929
1878
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/scope.js
1930
1879
  /**
@@ -1934,7 +1883,7 @@ const DEFAULT_MAX_BREADCRUMBS = 100;
1934
1883
  /**
1935
1884
  * Holds additional event information.
1936
1885
  */
1937
- var ScopeClass = class ScopeClass {
1886
+ const Scope = class ScopeClass {
1938
1887
  /** Flag if notifying is happening. */
1939
1888
  /** Callback for client to receive scope changes. */
1940
1889
  /** Callback list that will be called during event processing. */
@@ -2356,11 +2305,6 @@ var ScopeClass = class ScopeClass {
2356
2305
  }
2357
2306
  }
2358
2307
  };
2359
- /**
2360
- * Holds additional event information.
2361
- */
2362
- const Scope = ScopeClass;
2363
-
2364
2308
  //#endregion
2365
2309
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/defaultScopes.js
2366
2310
  /** Get the default current scope. */
@@ -2371,7 +2315,6 @@ function getDefaultCurrentScope() {
2371
2315
  function getDefaultIsolationScope() {
2372
2316
  return getGlobalSingleton("defaultIsolationScope", () => new Scope());
2373
2317
  }
2374
-
2375
2318
  //#endregion
2376
2319
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/asyncContext/stackStrategy.js
2377
2320
  /**
@@ -2497,7 +2440,6 @@ function getStackAsyncContextStrategy() {
2497
2440
  getIsolationScope: () => getAsyncContextStack().getIsolationScope()
2498
2441
  };
2499
2442
  }
2500
-
2501
2443
  //#endregion
2502
2444
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/asyncContext/index.js
2503
2445
  /**
@@ -2509,7 +2451,6 @@ function getAsyncContextStrategy(carrier) {
2509
2451
  if (sentry.acs) return sentry.acs;
2510
2452
  return getStackAsyncContextStrategy();
2511
2453
  }
2512
-
2513
2454
  //#endregion
2514
2455
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/currentScopes.js
2515
2456
  /**
@@ -2538,7 +2479,6 @@ function getGlobalScope() {
2538
2479
  function getClient() {
2539
2480
  return getCurrentScope().getClient();
2540
2481
  }
2541
-
2542
2482
  //#endregion
2543
2483
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/metrics/metric-summary.js
2544
2484
  /**
@@ -2559,7 +2499,6 @@ function getMetricSummaryJsonForSpan(span) {
2559
2499
  }
2560
2500
  return output;
2561
2501
  }
2562
-
2563
2502
  //#endregion
2564
2503
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/semanticAttributes.js
2565
2504
  /**
@@ -2580,16 +2519,6 @@ const SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op";
2580
2519
  * Use this attribute to represent the origin of a span.
2581
2520
  */
2582
2521
  const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin";
2583
-
2584
- //#endregion
2585
- //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/tracing/spanstatus.js
2586
- const SPAN_STATUS_UNSET = 0;
2587
- const SPAN_STATUS_OK = 1;
2588
- const SPAN_STATUS_ERROR = 2;
2589
-
2590
- //#endregion
2591
- //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/utils/spanUtils.js
2592
- const TRACE_FLAG_SAMPLED = 1;
2593
2522
  /**
2594
2523
  * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.
2595
2524
  */
@@ -2668,12 +2597,12 @@ function spanIsSentrySpan(span) {
2668
2597
  */
2669
2598
  function spanIsSampled(span) {
2670
2599
  const { traceFlags } = span.spanContext();
2671
- return traceFlags === TRACE_FLAG_SAMPLED;
2600
+ return traceFlags === 1;
2672
2601
  }
2673
2602
  /** Get the status message to use for a JSON representation of a span. */
2674
2603
  function getStatusMessage(status) {
2675
- if (!status || status.code === SPAN_STATUS_UNSET) return;
2676
- if (status.code === SPAN_STATUS_OK) return "ok";
2604
+ if (!status || status.code === 0) return;
2605
+ if (status.code === 1) return "ok";
2677
2606
  return status.message || "unknown_error";
2678
2607
  }
2679
2608
  const ROOT_SPAN_FIELD = "_sentryRootSpan";
@@ -2691,7 +2620,6 @@ function getActiveSpan() {
2691
2620
  if (acs.getActiveSpan) return acs.getActiveSpan();
2692
2621
  return _getSpanForScope(getCurrentScope());
2693
2622
  }
2694
-
2695
2623
  //#endregion
2696
2624
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/tracing/errors.js
2697
2625
  let errorsInstrumented = false;
@@ -2714,17 +2642,15 @@ function errorCallback() {
2714
2642
  const message = "internal_error";
2715
2643
  DEBUG_BUILD && logger.log(`[Tracing] Root span: ${message} -> Global error occured`);
2716
2644
  rootSpan.setStatus({
2717
- code: SPAN_STATUS_ERROR,
2645
+ code: 2,
2718
2646
  message
2719
2647
  });
2720
2648
  }
2721
2649
  }
2722
2650
  errorCallback.tag = "sentry_tracingErrorCallback";
2723
-
2724
2651
  //#endregion
2725
2652
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/constants.js
2726
2653
  const DEFAULT_ENVIRONMENT = "production";
2727
-
2728
2654
  //#endregion
2729
2655
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js
2730
2656
  /**
@@ -2741,7 +2667,7 @@ function getDynamicSamplingContextFromClient(trace_id, client) {
2741
2667
  const options = client.getOptions();
2742
2668
  const { publicKey: public_key } = client.getDsn() || {};
2743
2669
  const dsc = dropUndefinedKeys({
2744
- environment: options.environment || DEFAULT_ENVIRONMENT,
2670
+ environment: options.environment || "production",
2745
2671
  release: options.release,
2746
2672
  public_key,
2747
2673
  trace_id
@@ -2774,7 +2700,6 @@ function getDynamicSamplingContextFromSpan(span) {
2774
2700
  client.emit("createDsc", dsc);
2775
2701
  return dsc;
2776
2702
  }
2777
-
2778
2703
  //#endregion
2779
2704
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/utils/parseSampleRate.js
2780
2705
  /**
@@ -2793,7 +2718,6 @@ function parseSampleRate(sampleRate) {
2793
2718
  }
2794
2719
  return rate;
2795
2720
  }
2796
-
2797
2721
  //#endregion
2798
2722
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/envelope.js
2799
2723
  /**
@@ -2829,25 +2753,23 @@ function createEventEnvelope(event, dsn, metadata, tunnel) {
2829
2753
  delete event.sdkProcessingMetadata;
2830
2754
  return createEnvelope(envelopeHeaders, [[{ type: eventType }, event]]);
2831
2755
  }
2832
-
2833
2756
  //#endregion
2834
2757
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/eventProcessors.js
2835
2758
  /**
2836
2759
  * Process an array of event processors, returning the processed event (or `null` if the event was dropped).
2837
2760
  */
2838
2761
  function notifyEventProcessors(processors, event, hint, index = 0) {
2839
- return new SyncPromise((resolve$1, reject) => {
2762
+ return new SyncPromise((resolve, reject) => {
2840
2763
  const processor = processors[index];
2841
- if (event === null || typeof processor !== "function") resolve$1(event);
2764
+ if (event === null || typeof processor !== "function") resolve(event);
2842
2765
  else {
2843
2766
  const result = processor({ ...event }, hint);
2844
2767
  DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor "${processor.id}" dropped event`);
2845
- if (isThenable(result)) result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve$1)).then(null, reject);
2846
- else notifyEventProcessors(processors, result, hint, index + 1).then(resolve$1).then(null, reject);
2768
+ if (isThenable(result)) result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject);
2769
+ else notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject);
2847
2770
  }
2848
2771
  });
2849
2772
  }
2850
-
2851
2773
  //#endregion
2852
2774
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js
2853
2775
  /**
@@ -2947,7 +2869,6 @@ function applyFingerprintToEvent(event, fingerprint) {
2947
2869
  if (fingerprint) event.fingerprint = event.fingerprint.concat(fingerprint);
2948
2870
  if (event.fingerprint && !event.fingerprint.length) delete event.fingerprint;
2949
2871
  }
2950
-
2951
2872
  //#endregion
2952
2873
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/utils/prepareEvent.js
2953
2874
  /**
@@ -3130,7 +3051,6 @@ function getFinalScope(scope, captureContext) {
3130
3051
  finalScope.update(captureContext);
3131
3052
  return finalScope;
3132
3053
  }
3133
-
3134
3054
  //#endregion
3135
3055
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/sessionflusher.js
3136
3056
  /**
@@ -3205,7 +3125,6 @@ var SessionFlusher = class {
3205
3125
  }
3206
3126
  }
3207
3127
  };
3208
-
3209
3128
  //#endregion
3210
3129
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/api.js
3211
3130
  const SENTRY_API_VERSION = "7";
@@ -3235,7 +3154,6 @@ function _encodedAuth(dsn, sdkInfo) {
3235
3154
  function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {
3236
3155
  return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;
3237
3156
  }
3238
-
3239
3157
  //#endregion
3240
3158
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/integration.js
3241
3159
  const installedIntegrations = [];
@@ -3328,7 +3246,6 @@ function findIndex(arr, callback) {
3328
3246
  function defineIntegration(fn) {
3329
3247
  return fn;
3330
3248
  }
3331
-
3332
3249
  //#endregion
3333
3250
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/baseclient.js
3334
3251
  const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
@@ -3616,18 +3533,18 @@ var BaseClient = class {
3616
3533
  * `false` otherwise
3617
3534
  */
3618
3535
  _isClientDoneProcessing(timeout) {
3619
- return new SyncPromise((resolve$1) => {
3536
+ return new SyncPromise((resolve) => {
3620
3537
  let ticked = 0;
3621
3538
  const tick = 1;
3622
3539
  const interval = setInterval(() => {
3623
3540
  if (this._numProcessing == 0) {
3624
3541
  clearInterval(interval);
3625
- resolve$1(true);
3542
+ resolve(true);
3626
3543
  } else {
3627
3544
  ticked += tick;
3628
3545
  if (timeout && ticked >= timeout) {
3629
3546
  clearInterval(interval);
3630
- resolve$1(false);
3547
+ resolve(false);
3631
3548
  }
3632
3549
  }
3633
3550
  }, tick);
@@ -3715,11 +3632,11 @@ var BaseClient = class {
3715
3632
  const options = this.getOptions();
3716
3633
  const { sampleRate } = options;
3717
3634
  const isTransaction = isTransactionEvent(event);
3718
- const isError$1 = isErrorEvent(event);
3635
+ const isError = isErrorEvent(event);
3719
3636
  const eventType = event.type || "error";
3720
3637
  const beforeSendLabel = `before send for type \`${eventType}\``;
3721
3638
  const parsedSampleRate = typeof sampleRate === "undefined" ? void 0 : parseSampleRate(sampleRate);
3722
- if (isError$1 && typeof parsedSampleRate === "number" && Math.random() > parsedSampleRate) {
3639
+ if (isError && typeof parsedSampleRate === "number" && Math.random() > parsedSampleRate) {
3723
3640
  this.recordDroppedEvent("sample_rate", "error", event);
3724
3641
  return rejectedSyncPromise(new SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, "log"));
3725
3642
  }
@@ -3826,7 +3743,6 @@ function isErrorEvent(event) {
3826
3743
  function isTransactionEvent(event) {
3827
3744
  return event.type === "transaction";
3828
3745
  }
3829
-
3830
3746
  //#endregion
3831
3747
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/checkin.js
3832
3748
  /**
@@ -3845,7 +3761,6 @@ function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel
3845
3761
  function createCheckInEnvelopeItem(checkIn) {
3846
3762
  return [{ type: "check_in" }, checkIn];
3847
3763
  }
3848
-
3849
3764
  //#endregion
3850
3765
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/server-runtime-client.js
3851
3766
  /**
@@ -3986,17 +3901,13 @@ var ServerRuntimeClient = class extends BaseClient {
3986
3901
  return [getDynamicSamplingContextFromClient(traceId, this), traceContext];
3987
3902
  }
3988
3903
  };
3989
-
3990
- //#endregion
3991
- //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/transports/base.js
3992
- const DEFAULT_TRANSPORT_BUFFER_SIZE = 64;
3993
3904
  /**
3994
3905
  * Creates an instance of a Sentry `Transport`
3995
3906
  *
3996
3907
  * @param options
3997
3908
  * @param makeRequest
3998
3909
  */
3999
- function createTransport(options, makeRequest, buffer = makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE)) {
3910
+ function createTransport(options, makeRequest, buffer = makePromiseBuffer(options.bufferSize || 64)) {
4000
3911
  let rateLimits = {};
4001
3912
  const flush = (timeout) => buffer.drain(timeout);
4002
3913
  function send(envelope) {
@@ -4041,7 +3952,6 @@ function getEventForEnvelopeItem(item, type) {
4041
3952
  if (type !== "event" && type !== "transaction") return;
4042
3953
  return Array.isArray(item) ? item[1] : void 0;
4043
3954
  }
4044
-
4045
3955
  //#endregion
4046
3956
  //#region ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/esm/integrations/rewriteframes.js
4047
3957
  const INTEGRATION_NAME = "RewriteFrames";
@@ -4110,7 +4020,6 @@ function generateIteratee({ isBrowser, root, prefix }) {
4110
4020
  return frame;
4111
4021
  };
4112
4022
  }
4113
-
4114
4023
  //#endregion
4115
4024
  //#region ../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=60bdb1dcdbde0a135bb56d6fa1a1027caba891b149e2cfcb48d6a5b3524e0a91/node_modules/toucan-js/dist/index.esm.js
4116
4025
  function isObject(value) {
@@ -4255,8 +4164,10 @@ const requestDataIntegration = defineIntegration((userOptions = {}) => {
4255
4164
  event.request = toEventRequest(sdkProcessingMetadata.request, options);
4256
4165
  event.user = toEventUser(event.user ?? {}, sdkProcessingMetadata.request, options);
4257
4166
  }
4258
- if ("requestData" in sdkProcessingMetadata) if (event.request) event.request.data = sdkProcessingMetadata.requestData;
4259
- else event.request = { data: sdkProcessingMetadata.requestData };
4167
+ if ("requestData" in sdkProcessingMetadata) {
4168
+ if (event.request) event.request.data = sdkProcessingMetadata.requestData;
4169
+ else event.request = { data: sdkProcessingMetadata.requestData };
4170
+ }
4260
4171
  return event;
4261
4172
  }
4262
4173
  };
@@ -4481,8 +4392,8 @@ var ToucanClient = class extends ServerRuntimeClient {
4481
4392
  * This wraps node stack parser and adjusts root paths to match with source maps.
4482
4393
  *
4483
4394
  */
4484
- function workersStackLineParser(getModule$1) {
4485
- const [arg1, arg2] = nodeStackLineParser(getModule$1);
4395
+ function workersStackLineParser(getModule) {
4396
+ const [arg1, arg2] = nodeStackLineParser(getModule);
4486
4397
  const fn = (line) => {
4487
4398
  const result = arg2(line);
4488
4399
  if (result) {
@@ -4640,7 +4551,6 @@ var Toucan = class Toucan extends Scope {
4640
4551
  return callback(this.clone());
4641
4552
  }
4642
4553
  };
4643
-
4644
4554
  //#endregion
4645
4555
  //#region ../workers-shared/utils/sentry.ts
4646
4556
  function setupSentry(request, context, dsn, clientId, clientSecret, coloMetadata, versionMetadata, accountId, scriptId) {
@@ -4684,21 +4594,9 @@ function setupSentry(request, context, dsn, clientId, clientSecret, coloMetadata
4684
4594
  sentry.setUser({ id: accountId?.toString() });
4685
4595
  return sentry;
4686
4596
  }
4687
-
4688
4597
  //#endregion
4689
4598
  //#region ../workers-shared/router-worker/src/analytics.ts
4690
4599
  const VERSION = 1;
4691
- let STATIC_ROUTING_DECISION = /* @__PURE__ */ function(STATIC_ROUTING_DECISION$1) {
4692
- STATIC_ROUTING_DECISION$1[STATIC_ROUTING_DECISION$1["NOT_PROVIDED"] = 0] = "NOT_PROVIDED";
4693
- STATIC_ROUTING_DECISION$1[STATIC_ROUTING_DECISION$1["NOT_ROUTED"] = 1] = "NOT_ROUTED";
4694
- STATIC_ROUTING_DECISION$1[STATIC_ROUTING_DECISION$1["ROUTED"] = 2] = "ROUTED";
4695
- return STATIC_ROUTING_DECISION$1;
4696
- }({});
4697
- let DISPATCH_TYPE = /* @__PURE__ */ function(DISPATCH_TYPE$1) {
4698
- DISPATCH_TYPE$1["ASSETS"] = "asset";
4699
- DISPATCH_TYPE$1["WORKER"] = "worker";
4700
- return DISPATCH_TYPE$1;
4701
- }({});
4702
4600
  var Analytics = class {
4703
4601
  data = {};
4704
4602
  readyAnalytics;
@@ -4729,7 +4627,7 @@ var Analytics = class {
4729
4627
  this.data.metalId ?? -1,
4730
4628
  this.data.coloTier ?? -1,
4731
4629
  this.data.userWorkerAhead === void 0 ? -1 : Number(this.data.userWorkerAhead),
4732
- this.data.staticRoutingDecision ?? STATIC_ROUTING_DECISION.NOT_PROVIDED,
4630
+ this.data.staticRoutingDecision ?? 0,
4733
4631
  this.data.abuseMitigationBlocked ? 1 : 0,
4734
4632
  this.data.userWorkerFreeTierLimiting ? 1 : 0,
4735
4633
  this.data.timeToDispatch ?? -1
@@ -4747,7 +4645,6 @@ var Analytics = class {
4747
4645
  });
4748
4646
  }
4749
4647
  };
4750
-
4751
4648
  //#endregion
4752
4649
  //#region ../workers-shared/router-worker/src/configuration.ts
4753
4650
  const applyRouterConfigDefaults = (configuration) => {
@@ -4763,7 +4660,6 @@ const applyRouterConfigDefaults = (configuration) => {
4763
4660
  const applyEyeballConfigDefaults = (eyeballConfiguration) => {
4764
4661
  return { limitedAssetsOnly: eyeballConfiguration?.limitedAssetsOnly ?? false };
4765
4662
  };
4766
-
4767
4663
  //#endregion
4768
4664
  //#region ../workers-shared/router-worker/src/limited-response.ts
4769
4665
  function formatDate(date) {
@@ -4794,9 +4690,7 @@ function formatDate(date) {
4794
4690
  case "minute":
4795
4691
  minute = part.value;
4796
4692
  break;
4797
- case "second":
4798
- second = part.value;
4799
- break;
4693
+ case "second": second = part.value;
4800
4694
  }
4801
4695
  return `${year}-${month}-${day} ${hour}:${minute}:${second} UTC`;
4802
4696
  }
@@ -6238,7 +6132,6 @@ function renderLimitedResponse(req) {
6238
6132
  </body>
6239
6133
  </html>`;
6240
6134
  }
6241
-
6242
6135
  //#endregion
6243
6136
  //#region ../workers-shared/router-worker/src/worker.ts
6244
6137
  var RouterOuterEntrypoint = class extends WorkerEntrypoint {
@@ -6308,13 +6201,13 @@ var RouterInnerEntrypoint = class extends WorkerEntrypoint {
6308
6201
  headers: { "Content-Type": "text/html" }
6309
6202
  });
6310
6203
  }
6311
- analytics.setData({ dispatchtype: DISPATCH_TYPE.WORKER });
6204
+ analytics.setData({ dispatchtype: "worker" });
6312
6205
  userWorkerInvocation = true;
6313
6206
  return this.env.JAEGER.enterSpan("dispatch_worker", async (span) => {
6314
6207
  span.setTags({
6315
6208
  hasUserWorker: true,
6316
6209
  asset,
6317
- dispatchType: DISPATCH_TYPE.WORKER
6210
+ dispatchType: "worker"
6318
6211
  });
6319
6212
  let shouldCheckContentType = false;
6320
6213
  if (url.pathname.endsWith("/_next/image")) {
@@ -6352,12 +6245,12 @@ var RouterInnerEntrypoint = class extends WorkerEntrypoint {
6352
6245
  });
6353
6246
  };
6354
6247
  const routeToAssets = async ({ asset }) => {
6355
- analytics.setData({ dispatchtype: DISPATCH_TYPE.ASSETS });
6248
+ analytics.setData({ dispatchtype: "asset" });
6356
6249
  return await this.env.JAEGER.enterSpan("dispatch_assets", async (span) => {
6357
6250
  span.setTags({
6358
6251
  hasUserWorker: config.has_user_worker,
6359
6252
  asset,
6360
- dispatchType: DISPATCH_TYPE.ASSETS
6253
+ dispatchType: "asset"
6361
6254
  });
6362
6255
  analytics.setData({ timeToDispatch: performance.now() - startTimeMs });
6363
6256
  return this.env.ASSET_WORKER.fetch(request);
@@ -6365,15 +6258,15 @@ var RouterInnerEntrypoint = class extends WorkerEntrypoint {
6365
6258
  };
6366
6259
  if (config.static_routing) {
6367
6260
  if (generateStaticRoutingRuleMatcher(config.static_routing.asset_worker ?? [])({ request })) {
6368
- analytics.setData({ staticRoutingDecision: STATIC_ROUTING_DECISION.ROUTED });
6261
+ analytics.setData({ staticRoutingDecision: 2 });
6369
6262
  return await routeToAssets({ asset: "static_routing" });
6370
6263
  }
6371
6264
  if (generateStaticRoutingRuleMatcher(config.static_routing.user_worker ?? [])({ request })) {
6372
6265
  if (!config.has_user_worker) throw new Error("Fetch for user worker without having a user worker binding");
6373
- analytics.setData({ staticRoutingDecision: STATIC_ROUTING_DECISION.ROUTED });
6266
+ analytics.setData({ staticRoutingDecision: 2 });
6374
6267
  return await routeToUserWorker({ asset: "static_routing" });
6375
6268
  }
6376
- analytics.setData({ staticRoutingDecision: hasStaticRouting ? STATIC_ROUTING_DECISION.NOT_ROUTED : STATIC_ROUTING_DECISION.NOT_PROVIDED });
6269
+ analytics.setData({ staticRoutingDecision: hasStaticRouting ? 1 : 0 });
6377
6270
  }
6378
6271
  if (config.invoke_user_worker_ahead_of_assets) return await routeToUserWorker({ asset: "static_routing" });
6379
6272
  const assetsExist = await this.env.ASSET_WORKER.unstable_canFetch(new Request(request.url, {
@@ -6393,7 +6286,6 @@ var RouterInnerEntrypoint = class extends WorkerEntrypoint {
6393
6286
  }
6394
6287
  }
6395
6288
  };
6396
- var worker_default = RouterInnerEntrypoint;
6397
6289
  /**
6398
6290
  * Check if the Content Type is allowed for the the `_next/image` endpoint.
6399
6291
  *
@@ -6409,7 +6301,7 @@ function shouldBlockContentType(response) {
6409
6301
  if (contentType.includes(",")) return true;
6410
6302
  return !(contentType.startsWith("image/") || contentType.split(";")[0] === "text/plain");
6411
6303
  }
6412
-
6413
6304
  //#endregion
6414
- export { RouterInnerEntrypoint, RouterOuterEntrypoint, worker_default as default };
6305
+ export { RouterInnerEntrypoint, RouterInnerEntrypoint as default, RouterOuterEntrypoint };
6306
+
6415
6307
  //# sourceMappingURL=index.js.map