@wix/cli-app 1.1.86 → 1.1.87
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/build/{AddPermissionCommand-JJH3H7KS.js → AddPermissionCommand-5W2NXRON.js} +2 -2
- package/build/{CreateVersionCommand-L6EZG3SQ.js → CreateVersionCommand-AJKCDDMU.js} +3 -3
- package/build/{DevCommand-VVW5RMBB.js → DevCommand-SMPSYVXL.js} +10 -10
- package/build/DevCommand-SMPSYVXL.js.map +1 -0
- package/build/{GenerateCommand-M66IIHDA.js → GenerateCommand-FEFWJU7C.js} +7 -7
- package/build/GenerateCommand-FEFWJU7C.js.map +1 -0
- package/build/{LogsCommand-46ZO645C.js → LogsCommand-H6B7P3CF.js} +3 -3
- package/build/PreviewCommand-V6YW32Q2.js +19 -0
- package/build/ReleaseCommand-JVWRPNNM.js +28 -0
- package/build/{ServeCommand-5KEW652S.js → ServeCommand-S7Z22MYJ.js} +3 -3
- package/build/{build-T27LVJLA.js → build-JSYVRCXZ.js} +6 -6
- package/build/{chunk-G62XT7GV.js → chunk-2DXDV5VJ.js} +2 -2
- package/build/{chunk-FASGRCE7.js → chunk-2ZXLHTPQ.js} +4 -4
- package/build/{chunk-NLSP6XKF.js → chunk-3FBTCUBV.js} +3 -3
- package/build/{chunk-MMCTF7GG.js → chunk-4P6UKSMR.js} +4 -4
- package/build/{chunk-EG7MQUDA.js → chunk-6XP45W4V.js} +3 -3
- package/build/{chunk-EG7MQUDA.js.map → chunk-6XP45W4V.js.map} +1 -1
- package/build/{chunk-IKYXCB27.js → chunk-BRJOVJEF.js} +2 -2
- package/build/{chunk-FPQBL4BB.js → chunk-IBU2AWOE.js} +2 -2
- package/build/{chunk-7ULS74J6.js → chunk-IFPNLMTX.js} +2 -2
- package/build/{chunk-LIAX2TBQ.js → chunk-M7PQNNMR.js} +6 -6
- package/build/chunk-M7PQNNMR.js.map +1 -0
- package/build/{chunk-R5FY3GMD.js → chunk-N4NN67BN.js} +6 -6
- package/build/{chunk-4ZDYSQJH.js → chunk-QBXGT24B.js} +2 -2
- package/build/{chunk-PHFLDAC7.js → chunk-S2STPG55.js} +2 -2
- package/build/{chunk-WQX5LXAW.js → chunk-VACFFNYN.js} +2 -2
- package/build/{chunk-F3T6LJNP.js → chunk-VETSOB6L.js} +2 -2
- package/build/{chunk-KKG4M5FZ.js → chunk-WBRNFKDB.js} +2 -2
- package/build/{chunk-ZQBJIG6E.js → chunk-YFSPJZJK.js} +643 -570
- package/build/{chunk-ZQBJIG6E.js.map → chunk-YFSPJZJK.js.map} +1 -1
- package/build/{chunk-NVBN5743.js → chunk-YOAHNPAF.js} +7 -7
- package/build/cloudflare-runtime/entry.js +1197 -16
- package/build/index.js +25 -25
- package/build/platform-sdk/chunk-UGJIYUX3.js +2 -0
- package/build/platform-sdk/chunk-UGJIYUX3.js.map +1 -0
- package/build/platform-sdk/dashboard.js +1 -1
- package/build/platform-sdk/editor.js +1 -1
- package/build/{preview-VYWSS5LH.js → preview-XGUQZAFR.js} +12 -12
- package/build/{release-IXHM7OMX.js → release-FNA63ZAG.js} +14 -14
- package/build/{render-command-MUP3QGZS.js → render-command-3BWQUJIU.js} +5 -5
- package/package.json +3 -3
- package/templates/dashboard-modal/dependencies.json +1 -1
- package/build/DevCommand-VVW5RMBB.js.map +0 -1
- package/build/GenerateCommand-M66IIHDA.js.map +0 -1
- package/build/PreviewCommand-A3TYLVNC.js +0 -19
- package/build/ReleaseCommand-7CLWBPPS.js +0 -28
- package/build/chunk-LIAX2TBQ.js.map +0 -1
- package/build/platform-sdk/chunk-6NLQHDP6.js +0 -2
- package/build/platform-sdk/chunk-6NLQHDP6.js.map +0 -1
- /package/build/{AddPermissionCommand-JJH3H7KS.js.map → AddPermissionCommand-5W2NXRON.js.map} +0 -0
- /package/build/{CreateVersionCommand-L6EZG3SQ.js.map → CreateVersionCommand-AJKCDDMU.js.map} +0 -0
- /package/build/{LogsCommand-46ZO645C.js.map → LogsCommand-H6B7P3CF.js.map} +0 -0
- /package/build/{PreviewCommand-A3TYLVNC.js.map → PreviewCommand-V6YW32Q2.js.map} +0 -0
- /package/build/{ReleaseCommand-7CLWBPPS.js.map → ReleaseCommand-JVWRPNNM.js.map} +0 -0
- /package/build/{ServeCommand-5KEW652S.js.map → ServeCommand-S7Z22MYJ.js.map} +0 -0
- /package/build/{build-T27LVJLA.js.map → build-JSYVRCXZ.js.map} +0 -0
- /package/build/{chunk-G62XT7GV.js.map → chunk-2DXDV5VJ.js.map} +0 -0
- /package/build/{chunk-FASGRCE7.js.map → chunk-2ZXLHTPQ.js.map} +0 -0
- /package/build/{chunk-NLSP6XKF.js.map → chunk-3FBTCUBV.js.map} +0 -0
- /package/build/{chunk-MMCTF7GG.js.map → chunk-4P6UKSMR.js.map} +0 -0
- /package/build/{chunk-IKYXCB27.js.map → chunk-BRJOVJEF.js.map} +0 -0
- /package/build/{chunk-FPQBL4BB.js.map → chunk-IBU2AWOE.js.map} +0 -0
- /package/build/{chunk-7ULS74J6.js.map → chunk-IFPNLMTX.js.map} +0 -0
- /package/build/{chunk-R5FY3GMD.js.map → chunk-N4NN67BN.js.map} +0 -0
- /package/build/{chunk-4ZDYSQJH.js.map → chunk-QBXGT24B.js.map} +0 -0
- /package/build/{chunk-PHFLDAC7.js.map → chunk-S2STPG55.js.map} +0 -0
- /package/build/{chunk-WQX5LXAW.js.map → chunk-VACFFNYN.js.map} +0 -0
- /package/build/{chunk-F3T6LJNP.js.map → chunk-VETSOB6L.js.map} +0 -0
- /package/build/{chunk-KKG4M5FZ.js.map → chunk-WBRNFKDB.js.map} +0 -0
- /package/build/{chunk-NVBN5743.js.map → chunk-YOAHNPAF.js.map} +0 -0
- /package/build/{preview-VYWSS5LH.js.map → preview-XGUQZAFR.js.map} +0 -0
- /package/build/{release-IXHM7OMX.js.map → release-FNA63ZAG.js.map} +0 -0
- /package/build/{render-command-MUP3QGZS.js.map → render-command-3BWQUJIU.js.map} +0 -0
|
@@ -3635,11 +3635,11 @@ async function importWithAlgCache(cache, jwk, alg) {
|
|
|
3635
3635
|
return cached[alg];
|
|
3636
3636
|
}
|
|
3637
3637
|
function createLocalJWKSet(jwks) {
|
|
3638
|
-
const
|
|
3639
|
-
const localJWKSet = async (protectedHeader, token) =>
|
|
3638
|
+
const set2 = new LocalJWKSet(jwks);
|
|
3639
|
+
const localJWKSet = async (protectedHeader, token) => set2.getKey(protectedHeader, token);
|
|
3640
3640
|
Object.defineProperties(localJWKSet, {
|
|
3641
3641
|
jwks: {
|
|
3642
|
-
value: () => clone(
|
|
3642
|
+
value: () => clone(set2._jwks),
|
|
3643
3643
|
enumerable: true,
|
|
3644
3644
|
configurable: false,
|
|
3645
3645
|
writable: false
|
|
@@ -3784,32 +3784,32 @@ function isFreshJwksCache(input, cacheMaxAge) {
|
|
|
3784
3784
|
return true;
|
|
3785
3785
|
}
|
|
3786
3786
|
function createRemoteJWKSet(url, options) {
|
|
3787
|
-
const
|
|
3788
|
-
const remoteJWKSet = async (protectedHeader, token) =>
|
|
3787
|
+
const set2 = new RemoteJWKSet(url, options);
|
|
3788
|
+
const remoteJWKSet = async (protectedHeader, token) => set2.getKey(protectedHeader, token);
|
|
3789
3789
|
Object.defineProperties(remoteJWKSet, {
|
|
3790
3790
|
coolingDown: {
|
|
3791
|
-
get: () =>
|
|
3791
|
+
get: () => set2.coolingDown(),
|
|
3792
3792
|
enumerable: true,
|
|
3793
3793
|
configurable: false
|
|
3794
3794
|
},
|
|
3795
3795
|
fresh: {
|
|
3796
|
-
get: () =>
|
|
3796
|
+
get: () => set2.fresh(),
|
|
3797
3797
|
enumerable: true,
|
|
3798
3798
|
configurable: false
|
|
3799
3799
|
},
|
|
3800
3800
|
reload: {
|
|
3801
|
-
value: () =>
|
|
3801
|
+
value: () => set2.reload(),
|
|
3802
3802
|
enumerable: true,
|
|
3803
3803
|
configurable: false,
|
|
3804
3804
|
writable: false
|
|
3805
3805
|
},
|
|
3806
3806
|
reloading: {
|
|
3807
|
-
get: () => !!
|
|
3807
|
+
get: () => !!set2._pendingFetch,
|
|
3808
3808
|
enumerable: true,
|
|
3809
3809
|
configurable: false
|
|
3810
3810
|
},
|
|
3811
3811
|
jwks: {
|
|
3812
|
-
value: () =>
|
|
3812
|
+
value: () => set2._local?.jwks(),
|
|
3813
3813
|
enumerable: true,
|
|
3814
3814
|
configurable: false,
|
|
3815
3815
|
writable: false
|
|
@@ -5591,7 +5591,19 @@ var FallbackMonitoringClient = class {
|
|
|
5591
5591
|
};
|
|
5592
5592
|
this.startSpan = (spanOptions, callback) => {
|
|
5593
5593
|
console.error(this.message);
|
|
5594
|
-
return
|
|
5594
|
+
return callback(void 0);
|
|
5595
|
+
};
|
|
5596
|
+
this.startSpanManual = () => {
|
|
5597
|
+
console.error(this.message);
|
|
5598
|
+
return {
|
|
5599
|
+
end: () => {
|
|
5600
|
+
},
|
|
5601
|
+
fail: () => {
|
|
5602
|
+
}
|
|
5603
|
+
};
|
|
5604
|
+
};
|
|
5605
|
+
this.endSpanManual = () => {
|
|
5606
|
+
console.error(this.message);
|
|
5595
5607
|
};
|
|
5596
5608
|
this.addBreadcrumb = () => {
|
|
5597
5609
|
console.error(this.message);
|
|
@@ -5602,6 +5614,83 @@ var createFallbackMonitoringClient = (message2) => {
|
|
|
5602
5614
|
return new FallbackMonitoringClient(message2);
|
|
5603
5615
|
};
|
|
5604
5616
|
|
|
5617
|
+
// ../../node_modules/@sentry/cloudflare/build/esm/index.js
|
|
5618
|
+
var esm_exports = {};
|
|
5619
|
+
__export(esm_exports, {
|
|
5620
|
+
CloudflareClient: () => CloudflareClient,
|
|
5621
|
+
SDK_VERSION: () => SDK_VERSION,
|
|
5622
|
+
SEMANTIC_ATTRIBUTE_SENTRY_OP: () => SEMANTIC_ATTRIBUTE_SENTRY_OP,
|
|
5623
|
+
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN: () => SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
|
|
5624
|
+
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE: () => SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
|
|
5625
|
+
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE: () => SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
|
|
5626
|
+
Scope: () => Scope,
|
|
5627
|
+
addBreadcrumb: () => addBreadcrumb,
|
|
5628
|
+
addEventProcessor: () => addEventProcessor,
|
|
5629
|
+
addIntegration: () => addIntegration,
|
|
5630
|
+
captureCheckIn: () => captureCheckIn,
|
|
5631
|
+
captureConsoleIntegration: () => captureConsoleIntegration,
|
|
5632
|
+
captureEvent: () => captureEvent,
|
|
5633
|
+
captureException: () => captureException,
|
|
5634
|
+
captureFeedback: () => captureFeedback,
|
|
5635
|
+
captureMessage: () => captureMessage,
|
|
5636
|
+
close: () => close,
|
|
5637
|
+
continueTrace: () => continueTrace,
|
|
5638
|
+
createTransport: () => createTransport,
|
|
5639
|
+
debugIntegration: () => debugIntegration,
|
|
5640
|
+
dedupeIntegration: () => dedupeIntegration,
|
|
5641
|
+
extraErrorDataIntegration: () => extraErrorDataIntegration,
|
|
5642
|
+
fetchIntegration: () => fetchIntegration,
|
|
5643
|
+
flush: () => flush,
|
|
5644
|
+
functionToStringIntegration: () => functionToStringIntegration,
|
|
5645
|
+
getActiveSpan: () => getActiveSpan,
|
|
5646
|
+
getClient: () => getClient,
|
|
5647
|
+
getCurrentScope: () => getCurrentScope,
|
|
5648
|
+
getDefaultIntegrations: () => getDefaultIntegrations,
|
|
5649
|
+
getGlobalScope: () => getGlobalScope,
|
|
5650
|
+
getIsolationScope: () => getIsolationScope,
|
|
5651
|
+
getRootSpan: () => getRootSpan,
|
|
5652
|
+
getSpanDescendants: () => getSpanDescendants,
|
|
5653
|
+
getSpanStatusFromHttpCode: () => getSpanStatusFromHttpCode,
|
|
5654
|
+
getTraceData: () => getTraceData,
|
|
5655
|
+
getTraceMetaTags: () => getTraceMetaTags,
|
|
5656
|
+
inboundFiltersIntegration: () => inboundFiltersIntegration,
|
|
5657
|
+
instrumentD1WithSentry: () => instrumentD1WithSentry,
|
|
5658
|
+
isInitialized: () => isInitialized,
|
|
5659
|
+
lastEventId: () => lastEventId,
|
|
5660
|
+
linkedErrorsIntegration: () => linkedErrorsIntegration,
|
|
5661
|
+
metrics: () => metrics,
|
|
5662
|
+
moduleMetadataIntegration: () => moduleMetadataIntegration,
|
|
5663
|
+
requestDataIntegration: () => requestDataIntegration,
|
|
5664
|
+
rewriteFramesIntegration: () => rewriteFramesIntegration,
|
|
5665
|
+
sentryPagesPlugin: () => sentryPagesPlugin,
|
|
5666
|
+
setContext: () => setContext,
|
|
5667
|
+
setCurrentClient: () => setCurrentClient,
|
|
5668
|
+
setExtra: () => setExtra,
|
|
5669
|
+
setExtras: () => setExtras,
|
|
5670
|
+
setHttpStatus: () => setHttpStatus,
|
|
5671
|
+
setMeasurement: () => setMeasurement,
|
|
5672
|
+
setTag: () => setTag,
|
|
5673
|
+
setTags: () => setTags,
|
|
5674
|
+
setUser: () => setUser,
|
|
5675
|
+
spanToBaggageHeader: () => spanToBaggageHeader,
|
|
5676
|
+
spanToJSON: () => spanToJSON,
|
|
5677
|
+
spanToTraceHeader: () => spanToTraceHeader,
|
|
5678
|
+
startInactiveSpan: () => startInactiveSpan,
|
|
5679
|
+
startNewTrace: () => startNewTrace,
|
|
5680
|
+
startSpan: () => startSpan,
|
|
5681
|
+
startSpanManual: () => startSpanManual,
|
|
5682
|
+
suppressTracing: () => suppressTracing,
|
|
5683
|
+
trpcMiddleware: () => trpcMiddleware,
|
|
5684
|
+
updateSpanName: () => updateSpanName,
|
|
5685
|
+
withActiveSpan: () => withActiveSpan,
|
|
5686
|
+
withIsolationScope: () => withIsolationScope2,
|
|
5687
|
+
withMonitor: () => withMonitor,
|
|
5688
|
+
withScope: () => withScope2,
|
|
5689
|
+
withSentry: () => withSentry,
|
|
5690
|
+
wrapRequestHandler: () => wrapRequestHandler,
|
|
5691
|
+
zodErrorsIntegration: () => zodErrorsIntegration
|
|
5692
|
+
});
|
|
5693
|
+
|
|
5605
5694
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/debug-build.js
|
|
5606
5695
|
var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
5607
5696
|
|
|
@@ -6008,6 +6097,25 @@ function truncate(str, max = 0) {
|
|
|
6008
6097
|
}
|
|
6009
6098
|
return str.length <= max ? str : `${str.slice(0, max)}...`;
|
|
6010
6099
|
}
|
|
6100
|
+
function safeJoin(input, delimiter) {
|
|
6101
|
+
if (!Array.isArray(input)) {
|
|
6102
|
+
return "";
|
|
6103
|
+
}
|
|
6104
|
+
const output = [];
|
|
6105
|
+
for (let i = 0; i < input.length; i++) {
|
|
6106
|
+
const value = input[i];
|
|
6107
|
+
try {
|
|
6108
|
+
if (isVueViewModel(value)) {
|
|
6109
|
+
output.push("[VueViewModel]");
|
|
6110
|
+
} else {
|
|
6111
|
+
output.push(String(value));
|
|
6112
|
+
}
|
|
6113
|
+
} catch (e) {
|
|
6114
|
+
output.push("[value cannot be serialized]");
|
|
6115
|
+
}
|
|
6116
|
+
}
|
|
6117
|
+
return output.join(delimiter);
|
|
6118
|
+
}
|
|
6011
6119
|
function isMatchingPattern(value, pattern, requireExactStringMatch = false) {
|
|
6012
6120
|
if (!isString(value)) {
|
|
6013
6121
|
return false;
|
|
@@ -7562,6 +7670,13 @@ function showSpanDropWarning() {
|
|
|
7562
7670
|
hasShownSpanDropWarning = true;
|
|
7563
7671
|
}
|
|
7564
7672
|
}
|
|
7673
|
+
function updateSpanName(span, name) {
|
|
7674
|
+
span.updateName(name);
|
|
7675
|
+
span.setAttributes({
|
|
7676
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom",
|
|
7677
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name
|
|
7678
|
+
});
|
|
7679
|
+
}
|
|
7565
7680
|
|
|
7566
7681
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/tracing/errors.js
|
|
7567
7682
|
var errorsInstrumented = false;
|
|
@@ -7773,6 +7888,10 @@ function getDynamicSamplingContextFromSpan(span) {
|
|
|
7773
7888
|
client.emit("createDsc", dsc, rootSpan);
|
|
7774
7889
|
return dsc;
|
|
7775
7890
|
}
|
|
7891
|
+
function spanToBaggageHeader(span) {
|
|
7892
|
+
const dsc = getDynamicSamplingContextFromSpan(span);
|
|
7893
|
+
return dynamicSamplingContextToSentryBaggageHeader(dsc);
|
|
7894
|
+
}
|
|
7776
7895
|
|
|
7777
7896
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/tracing/logSpans.js
|
|
7778
7897
|
function logSpanStart(span) {
|
|
@@ -8287,6 +8406,16 @@ function createSpanEnvelope(spans, client) {
|
|
|
8287
8406
|
}
|
|
8288
8407
|
|
|
8289
8408
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/tracing/measurement.js
|
|
8409
|
+
function setMeasurement(name, value, unit, activeSpan = getActiveSpan()) {
|
|
8410
|
+
const rootSpan = activeSpan && getRootSpan(activeSpan);
|
|
8411
|
+
if (rootSpan) {
|
|
8412
|
+
DEBUG_BUILD && logger.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);
|
|
8413
|
+
rootSpan.addEvent(name, {
|
|
8414
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,
|
|
8415
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit
|
|
8416
|
+
});
|
|
8417
|
+
}
|
|
8418
|
+
}
|
|
8290
8419
|
function timedEventsToMeasurements(events2) {
|
|
8291
8420
|
if (!events2 || events2.length === 0) {
|
|
8292
8421
|
return void 0;
|
|
@@ -8640,6 +8769,41 @@ function startSpan(options, callback) {
|
|
|
8640
8769
|
});
|
|
8641
8770
|
});
|
|
8642
8771
|
}
|
|
8772
|
+
function startSpanManual(options, callback) {
|
|
8773
|
+
const acs = getAcs();
|
|
8774
|
+
if (acs.startSpanManual) {
|
|
8775
|
+
return acs.startSpanManual(options, callback);
|
|
8776
|
+
}
|
|
8777
|
+
const spanArguments = parseSentrySpanArguments(options);
|
|
8778
|
+
const { forceTransaction, parentSpan: customParentSpan } = options;
|
|
8779
|
+
return withScope2(options.scope, () => {
|
|
8780
|
+
const wrapper = getActiveSpanWrapper(customParentSpan);
|
|
8781
|
+
return wrapper(() => {
|
|
8782
|
+
const scope = getCurrentScope();
|
|
8783
|
+
const parentSpan = getParentSpan(scope);
|
|
8784
|
+
const shouldSkipSpan = options.onlyIfParent && !parentSpan;
|
|
8785
|
+
const activeSpan = shouldSkipSpan ? new SentryNonRecordingSpan() : createChildOrRootSpan({
|
|
8786
|
+
parentSpan,
|
|
8787
|
+
spanArguments,
|
|
8788
|
+
forceTransaction,
|
|
8789
|
+
scope
|
|
8790
|
+
});
|
|
8791
|
+
_setSpanForScope(scope, activeSpan);
|
|
8792
|
+
function finishAndSetSpan() {
|
|
8793
|
+
activeSpan.end();
|
|
8794
|
+
}
|
|
8795
|
+
return handleCallbackErrors(
|
|
8796
|
+
() => callback(activeSpan, finishAndSetSpan),
|
|
8797
|
+
() => {
|
|
8798
|
+
const { status } = spanToJSON(activeSpan);
|
|
8799
|
+
if (activeSpan.isRecording() && (!status || status === "ok")) {
|
|
8800
|
+
activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
|
|
8801
|
+
}
|
|
8802
|
+
}
|
|
8803
|
+
);
|
|
8804
|
+
});
|
|
8805
|
+
});
|
|
8806
|
+
}
|
|
8643
8807
|
function startInactiveSpan(options) {
|
|
8644
8808
|
const acs = getAcs();
|
|
8645
8809
|
if (acs.startInactiveSpan) {
|
|
@@ -8696,6 +8860,13 @@ function suppressTracing(callback) {
|
|
|
8696
8860
|
return callback();
|
|
8697
8861
|
});
|
|
8698
8862
|
}
|
|
8863
|
+
function startNewTrace(callback) {
|
|
8864
|
+
return withScope2((scope) => {
|
|
8865
|
+
scope.setPropagationContext({ traceId: generateTraceId() });
|
|
8866
|
+
DEBUG_BUILD && logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);
|
|
8867
|
+
return withActiveSpan(null, callback);
|
|
8868
|
+
});
|
|
8869
|
+
}
|
|
8699
8870
|
function createChildOrRootSpan({
|
|
8700
8871
|
parentSpan,
|
|
8701
8872
|
spanArguments,
|
|
@@ -9226,6 +9397,72 @@ function captureMessage(message2, captureContext) {
|
|
|
9226
9397
|
const context = typeof captureContext !== "string" ? { captureContext } : void 0;
|
|
9227
9398
|
return getCurrentScope().captureMessage(message2, level, context);
|
|
9228
9399
|
}
|
|
9400
|
+
function captureEvent(event, hint) {
|
|
9401
|
+
return getCurrentScope().captureEvent(event, hint);
|
|
9402
|
+
}
|
|
9403
|
+
function setContext(name, context) {
|
|
9404
|
+
getIsolationScope().setContext(name, context);
|
|
9405
|
+
}
|
|
9406
|
+
function setExtras(extras) {
|
|
9407
|
+
getIsolationScope().setExtras(extras);
|
|
9408
|
+
}
|
|
9409
|
+
function setExtra(key, extra) {
|
|
9410
|
+
getIsolationScope().setExtra(key, extra);
|
|
9411
|
+
}
|
|
9412
|
+
function setTags(tags) {
|
|
9413
|
+
getIsolationScope().setTags(tags);
|
|
9414
|
+
}
|
|
9415
|
+
function setTag(key, value) {
|
|
9416
|
+
getIsolationScope().setTag(key, value);
|
|
9417
|
+
}
|
|
9418
|
+
function setUser(user) {
|
|
9419
|
+
getIsolationScope().setUser(user);
|
|
9420
|
+
}
|
|
9421
|
+
function lastEventId() {
|
|
9422
|
+
return getIsolationScope().lastEventId();
|
|
9423
|
+
}
|
|
9424
|
+
function captureCheckIn(checkIn, upsertMonitorConfig) {
|
|
9425
|
+
const scope = getCurrentScope();
|
|
9426
|
+
const client = getClient();
|
|
9427
|
+
if (!client) {
|
|
9428
|
+
DEBUG_BUILD && logger.warn("Cannot capture check-in. No client defined.");
|
|
9429
|
+
} else if (!client.captureCheckIn) {
|
|
9430
|
+
DEBUG_BUILD && logger.warn("Cannot capture check-in. Client does not support sending check-ins.");
|
|
9431
|
+
} else {
|
|
9432
|
+
return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);
|
|
9433
|
+
}
|
|
9434
|
+
return uuid4();
|
|
9435
|
+
}
|
|
9436
|
+
function withMonitor(monitorSlug, callback, upsertMonitorConfig) {
|
|
9437
|
+
const checkInId = captureCheckIn({ monitorSlug, status: "in_progress" }, upsertMonitorConfig);
|
|
9438
|
+
const now = timestampInSeconds();
|
|
9439
|
+
function finishCheckIn(status) {
|
|
9440
|
+
captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });
|
|
9441
|
+
}
|
|
9442
|
+
return withIsolationScope2(() => {
|
|
9443
|
+
let maybePromiseResult;
|
|
9444
|
+
try {
|
|
9445
|
+
maybePromiseResult = callback();
|
|
9446
|
+
} catch (e) {
|
|
9447
|
+
finishCheckIn("error");
|
|
9448
|
+
throw e;
|
|
9449
|
+
}
|
|
9450
|
+
if (isThenable(maybePromiseResult)) {
|
|
9451
|
+
Promise.resolve(maybePromiseResult).then(
|
|
9452
|
+
() => {
|
|
9453
|
+
finishCheckIn("ok");
|
|
9454
|
+
},
|
|
9455
|
+
(e) => {
|
|
9456
|
+
finishCheckIn("error");
|
|
9457
|
+
throw e;
|
|
9458
|
+
}
|
|
9459
|
+
);
|
|
9460
|
+
} else {
|
|
9461
|
+
finishCheckIn("ok");
|
|
9462
|
+
}
|
|
9463
|
+
return maybePromiseResult;
|
|
9464
|
+
});
|
|
9465
|
+
}
|
|
9229
9466
|
async function flush(timeout) {
|
|
9230
9467
|
const client = getClient();
|
|
9231
9468
|
if (client) {
|
|
@@ -9234,10 +9471,24 @@ async function flush(timeout) {
|
|
|
9234
9471
|
DEBUG_BUILD && logger.warn("Cannot flush events. No client defined.");
|
|
9235
9472
|
return Promise.resolve(false);
|
|
9236
9473
|
}
|
|
9474
|
+
async function close(timeout) {
|
|
9475
|
+
const client = getClient();
|
|
9476
|
+
if (client) {
|
|
9477
|
+
return client.close(timeout);
|
|
9478
|
+
}
|
|
9479
|
+
DEBUG_BUILD && logger.warn("Cannot flush events and disable SDK. No client defined.");
|
|
9480
|
+
return Promise.resolve(false);
|
|
9481
|
+
}
|
|
9482
|
+
function isInitialized() {
|
|
9483
|
+
return !!getClient();
|
|
9484
|
+
}
|
|
9237
9485
|
function isEnabled() {
|
|
9238
9486
|
const client = getClient();
|
|
9239
9487
|
return !!client && client.getOptions().enabled !== false && !!client.getTransport();
|
|
9240
9488
|
}
|
|
9489
|
+
function addEventProcessor(callback) {
|
|
9490
|
+
getIsolationScope().addEventProcessor(callback);
|
|
9491
|
+
}
|
|
9241
9492
|
|
|
9242
9493
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/sessionflusher.js
|
|
9243
9494
|
var SessionFlusher = class {
|
|
@@ -9424,6 +9675,14 @@ function setupIntegration(client, integration, integrationIndex) {
|
|
|
9424
9675
|
}
|
|
9425
9676
|
DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);
|
|
9426
9677
|
}
|
|
9678
|
+
function addIntegration(integration) {
|
|
9679
|
+
const client = getClient();
|
|
9680
|
+
if (!client) {
|
|
9681
|
+
DEBUG_BUILD && logger.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`);
|
|
9682
|
+
return;
|
|
9683
|
+
}
|
|
9684
|
+
client.addIntegration(integration);
|
|
9685
|
+
}
|
|
9427
9686
|
function defineIntegration(fn) {
|
|
9428
9687
|
return fn;
|
|
9429
9688
|
}
|
|
@@ -10632,6 +10891,11 @@ function scopeToTraceHeader(scope) {
|
|
|
10632
10891
|
return generateSentryTraceHeader(traceId, spanId, sampled);
|
|
10633
10892
|
}
|
|
10634
10893
|
|
|
10894
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/utils/meta.js
|
|
10895
|
+
function getTraceMetaTags() {
|
|
10896
|
+
return Object.entries(getTraceData()).map(([key, value]) => `<meta name="${key}" content="${value}"/>`).join("\n");
|
|
10897
|
+
}
|
|
10898
|
+
|
|
10635
10899
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/breadcrumbs.js
|
|
10636
10900
|
var DEFAULT_BREADCRUMBS = 100;
|
|
10637
10901
|
function addBreadcrumb(breadcrumb, hint) {
|
|
@@ -10977,6 +11241,92 @@ var _linkedErrorsIntegration = (options = {}) => {
|
|
|
10977
11241
|
};
|
|
10978
11242
|
var linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);
|
|
10979
11243
|
|
|
11244
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/metadata.js
|
|
11245
|
+
var filenameMetadataMap = /* @__PURE__ */ new Map();
|
|
11246
|
+
var parsedStacks = /* @__PURE__ */ new Set();
|
|
11247
|
+
function ensureMetadataStacksAreParsed(parser) {
|
|
11248
|
+
if (!GLOBAL_OBJ._sentryModuleMetadata) {
|
|
11249
|
+
return;
|
|
11250
|
+
}
|
|
11251
|
+
for (const stack of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) {
|
|
11252
|
+
const metadata = GLOBAL_OBJ._sentryModuleMetadata[stack];
|
|
11253
|
+
if (parsedStacks.has(stack)) {
|
|
11254
|
+
continue;
|
|
11255
|
+
}
|
|
11256
|
+
parsedStacks.add(stack);
|
|
11257
|
+
const frames = parser(stack);
|
|
11258
|
+
for (const frame of frames.reverse()) {
|
|
11259
|
+
if (frame.filename) {
|
|
11260
|
+
filenameMetadataMap.set(frame.filename, metadata);
|
|
11261
|
+
break;
|
|
11262
|
+
}
|
|
11263
|
+
}
|
|
11264
|
+
}
|
|
11265
|
+
}
|
|
11266
|
+
function getMetadataForUrl(parser, filename) {
|
|
11267
|
+
ensureMetadataStacksAreParsed(parser);
|
|
11268
|
+
return filenameMetadataMap.get(filename);
|
|
11269
|
+
}
|
|
11270
|
+
function addMetadataToStackFrames(parser, event) {
|
|
11271
|
+
try {
|
|
11272
|
+
event.exception.values.forEach((exception) => {
|
|
11273
|
+
if (!exception.stacktrace) {
|
|
11274
|
+
return;
|
|
11275
|
+
}
|
|
11276
|
+
for (const frame of exception.stacktrace.frames || []) {
|
|
11277
|
+
if (!frame.filename || frame.module_metadata) {
|
|
11278
|
+
continue;
|
|
11279
|
+
}
|
|
11280
|
+
const metadata = getMetadataForUrl(parser, frame.filename);
|
|
11281
|
+
if (metadata) {
|
|
11282
|
+
frame.module_metadata = metadata;
|
|
11283
|
+
}
|
|
11284
|
+
}
|
|
11285
|
+
});
|
|
11286
|
+
} catch (_) {
|
|
11287
|
+
}
|
|
11288
|
+
}
|
|
11289
|
+
function stripMetadataFromStackFrames(event) {
|
|
11290
|
+
try {
|
|
11291
|
+
event.exception.values.forEach((exception) => {
|
|
11292
|
+
if (!exception.stacktrace) {
|
|
11293
|
+
return;
|
|
11294
|
+
}
|
|
11295
|
+
for (const frame of exception.stacktrace.frames || []) {
|
|
11296
|
+
delete frame.module_metadata;
|
|
11297
|
+
}
|
|
11298
|
+
});
|
|
11299
|
+
} catch (_) {
|
|
11300
|
+
}
|
|
11301
|
+
}
|
|
11302
|
+
|
|
11303
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/integrations/metadata.js
|
|
11304
|
+
var moduleMetadataIntegration = defineIntegration(() => {
|
|
11305
|
+
return {
|
|
11306
|
+
name: "ModuleMetadata",
|
|
11307
|
+
setup(client) {
|
|
11308
|
+
client.on("beforeEnvelope", (envelope) => {
|
|
11309
|
+
forEachEnvelopeItem(envelope, (item, type) => {
|
|
11310
|
+
if (type === "event") {
|
|
11311
|
+
const event = Array.isArray(item) ? item[1] : void 0;
|
|
11312
|
+
if (event) {
|
|
11313
|
+
stripMetadataFromStackFrames(event);
|
|
11314
|
+
item[1] = event;
|
|
11315
|
+
}
|
|
11316
|
+
}
|
|
11317
|
+
});
|
|
11318
|
+
});
|
|
11319
|
+
client.on("applyFrameMetadata", (event) => {
|
|
11320
|
+
if (event.type) {
|
|
11321
|
+
return;
|
|
11322
|
+
}
|
|
11323
|
+
const stackParser = client.getOptions().stackParser;
|
|
11324
|
+
addMetadataToStackFrames(stackParser, event);
|
|
11325
|
+
});
|
|
11326
|
+
}
|
|
11327
|
+
};
|
|
11328
|
+
});
|
|
11329
|
+
|
|
10980
11330
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/utils-hoist/cookie.js
|
|
10981
11331
|
function parseCookie(str) {
|
|
10982
11332
|
const obj = {};
|
|
@@ -11407,12 +11757,132 @@ function convertReqDataIntegrationOptsToAddReqDataOpts(integrationOptions) {
|
|
|
11407
11757
|
};
|
|
11408
11758
|
}
|
|
11409
11759
|
|
|
11760
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/utils-hoist/instrument/console.js
|
|
11761
|
+
function addConsoleInstrumentationHandler(handler) {
|
|
11762
|
+
const type = "console";
|
|
11763
|
+
addHandler(type, handler);
|
|
11764
|
+
maybeInstrument(type, instrumentConsole);
|
|
11765
|
+
}
|
|
11766
|
+
function instrumentConsole() {
|
|
11767
|
+
if (!("console" in GLOBAL_OBJ)) {
|
|
11768
|
+
return;
|
|
11769
|
+
}
|
|
11770
|
+
CONSOLE_LEVELS.forEach(function(level) {
|
|
11771
|
+
if (!(level in GLOBAL_OBJ.console)) {
|
|
11772
|
+
return;
|
|
11773
|
+
}
|
|
11774
|
+
fill(GLOBAL_OBJ.console, level, function(originalConsoleMethod) {
|
|
11775
|
+
originalConsoleMethods[level] = originalConsoleMethod;
|
|
11776
|
+
return function(...args) {
|
|
11777
|
+
const handlerData = { args, level };
|
|
11778
|
+
triggerHandlers("console", handlerData);
|
|
11779
|
+
const log = originalConsoleMethods[level];
|
|
11780
|
+
log && log.apply(GLOBAL_OBJ.console, args);
|
|
11781
|
+
};
|
|
11782
|
+
});
|
|
11783
|
+
});
|
|
11784
|
+
}
|
|
11785
|
+
|
|
11786
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/utils-hoist/severity.js
|
|
11787
|
+
function severityLevelFromString(level) {
|
|
11788
|
+
return level === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(level) ? level : "log";
|
|
11789
|
+
}
|
|
11790
|
+
|
|
11791
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/integrations/captureconsole.js
|
|
11792
|
+
var INTEGRATION_NAME5 = "CaptureConsole";
|
|
11793
|
+
var _captureConsoleIntegration = (options = {}) => {
|
|
11794
|
+
const levels = options.levels || CONSOLE_LEVELS;
|
|
11795
|
+
const handled = !!options.handled;
|
|
11796
|
+
return {
|
|
11797
|
+
name: INTEGRATION_NAME5,
|
|
11798
|
+
setup(client) {
|
|
11799
|
+
if (!("console" in GLOBAL_OBJ)) {
|
|
11800
|
+
return;
|
|
11801
|
+
}
|
|
11802
|
+
addConsoleInstrumentationHandler(({ args, level }) => {
|
|
11803
|
+
if (getClient() !== client || !levels.includes(level)) {
|
|
11804
|
+
return;
|
|
11805
|
+
}
|
|
11806
|
+
consoleHandler(args, level, handled);
|
|
11807
|
+
});
|
|
11808
|
+
}
|
|
11809
|
+
};
|
|
11810
|
+
};
|
|
11811
|
+
var captureConsoleIntegration = defineIntegration(_captureConsoleIntegration);
|
|
11812
|
+
function consoleHandler(args, level, handled) {
|
|
11813
|
+
const captureContext = {
|
|
11814
|
+
level: severityLevelFromString(level),
|
|
11815
|
+
extra: {
|
|
11816
|
+
arguments: args
|
|
11817
|
+
}
|
|
11818
|
+
};
|
|
11819
|
+
withScope2((scope) => {
|
|
11820
|
+
scope.addEventProcessor((event) => {
|
|
11821
|
+
event.logger = "console";
|
|
11822
|
+
addExceptionMechanism(event, {
|
|
11823
|
+
handled,
|
|
11824
|
+
type: "console"
|
|
11825
|
+
});
|
|
11826
|
+
return event;
|
|
11827
|
+
});
|
|
11828
|
+
if (level === "assert") {
|
|
11829
|
+
if (!args[0]) {
|
|
11830
|
+
const message3 = `Assertion failed: ${safeJoin(args.slice(1), " ") || "console.assert"}`;
|
|
11831
|
+
scope.setExtra("arguments", args.slice(1));
|
|
11832
|
+
captureMessage(message3, captureContext);
|
|
11833
|
+
}
|
|
11834
|
+
return;
|
|
11835
|
+
}
|
|
11836
|
+
const error = args.find((arg) => arg instanceof Error);
|
|
11837
|
+
if (error) {
|
|
11838
|
+
captureException(error, captureContext);
|
|
11839
|
+
return;
|
|
11840
|
+
}
|
|
11841
|
+
const message2 = safeJoin(args, " ");
|
|
11842
|
+
captureMessage(message2, captureContext);
|
|
11843
|
+
});
|
|
11844
|
+
}
|
|
11845
|
+
|
|
11846
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/integrations/debug.js
|
|
11847
|
+
var INTEGRATION_NAME6 = "Debug";
|
|
11848
|
+
var _debugIntegration = (options = {}) => {
|
|
11849
|
+
const _options = {
|
|
11850
|
+
debugger: false,
|
|
11851
|
+
stringify: false,
|
|
11852
|
+
...options
|
|
11853
|
+
};
|
|
11854
|
+
return {
|
|
11855
|
+
name: INTEGRATION_NAME6,
|
|
11856
|
+
setup(client) {
|
|
11857
|
+
client.on("beforeSendEvent", (event, hint) => {
|
|
11858
|
+
if (_options.debugger) {
|
|
11859
|
+
debugger;
|
|
11860
|
+
}
|
|
11861
|
+
consoleSandbox(() => {
|
|
11862
|
+
if (_options.stringify) {
|
|
11863
|
+
console.log(JSON.stringify(event, null, 2));
|
|
11864
|
+
if (hint && Object.keys(hint).length) {
|
|
11865
|
+
console.log(JSON.stringify(hint, null, 2));
|
|
11866
|
+
}
|
|
11867
|
+
} else {
|
|
11868
|
+
console.log(event);
|
|
11869
|
+
if (hint && Object.keys(hint).length) {
|
|
11870
|
+
console.log(hint);
|
|
11871
|
+
}
|
|
11872
|
+
}
|
|
11873
|
+
});
|
|
11874
|
+
});
|
|
11875
|
+
}
|
|
11876
|
+
};
|
|
11877
|
+
};
|
|
11878
|
+
var debugIntegration = defineIntegration(_debugIntegration);
|
|
11879
|
+
|
|
11410
11880
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/integrations/dedupe.js
|
|
11411
|
-
var
|
|
11881
|
+
var INTEGRATION_NAME7 = "Dedupe";
|
|
11412
11882
|
var _dedupeIntegration = () => {
|
|
11413
11883
|
let previousEvent;
|
|
11414
11884
|
return {
|
|
11415
|
-
name:
|
|
11885
|
+
name: INTEGRATION_NAME7,
|
|
11416
11886
|
processEvent(currentEvent) {
|
|
11417
11887
|
if (currentEvent.type) {
|
|
11418
11888
|
return currentEvent;
|
|
@@ -11522,13 +11992,162 @@ function _getExceptionFromEvent(event) {
|
|
|
11522
11992
|
return event.exception && event.exception.values && event.exception.values[0];
|
|
11523
11993
|
}
|
|
11524
11994
|
|
|
11995
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/integrations/extraerrordata.js
|
|
11996
|
+
var INTEGRATION_NAME8 = "ExtraErrorData";
|
|
11997
|
+
var _extraErrorDataIntegration = (options = {}) => {
|
|
11998
|
+
const { depth = 3, captureErrorCause = true } = options;
|
|
11999
|
+
return {
|
|
12000
|
+
name: INTEGRATION_NAME8,
|
|
12001
|
+
processEvent(event, hint, client) {
|
|
12002
|
+
const { maxValueLength = 250 } = client.getOptions();
|
|
12003
|
+
return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause, maxValueLength);
|
|
12004
|
+
}
|
|
12005
|
+
};
|
|
12006
|
+
};
|
|
12007
|
+
var extraErrorDataIntegration = defineIntegration(_extraErrorDataIntegration);
|
|
12008
|
+
function _enhanceEventWithErrorData(event, hint = {}, depth, captureErrorCause, maxValueLength) {
|
|
12009
|
+
if (!hint.originalException || !isError(hint.originalException)) {
|
|
12010
|
+
return event;
|
|
12011
|
+
}
|
|
12012
|
+
const exceptionName = hint.originalException.name || hint.originalException.constructor.name;
|
|
12013
|
+
const errorData = _extractErrorData(hint.originalException, captureErrorCause, maxValueLength);
|
|
12014
|
+
if (errorData) {
|
|
12015
|
+
const contexts = {
|
|
12016
|
+
...event.contexts
|
|
12017
|
+
};
|
|
12018
|
+
const normalizedErrorData = normalize(errorData, depth);
|
|
12019
|
+
if (isPlainObject(normalizedErrorData)) {
|
|
12020
|
+
addNonEnumerableProperty(normalizedErrorData, "__sentry_skip_normalization__", true);
|
|
12021
|
+
contexts[exceptionName] = normalizedErrorData;
|
|
12022
|
+
}
|
|
12023
|
+
return {
|
|
12024
|
+
...event,
|
|
12025
|
+
contexts
|
|
12026
|
+
};
|
|
12027
|
+
}
|
|
12028
|
+
return event;
|
|
12029
|
+
}
|
|
12030
|
+
function _extractErrorData(error, captureErrorCause, maxValueLength) {
|
|
12031
|
+
try {
|
|
12032
|
+
const nativeKeys = [
|
|
12033
|
+
"name",
|
|
12034
|
+
"message",
|
|
12035
|
+
"stack",
|
|
12036
|
+
"line",
|
|
12037
|
+
"column",
|
|
12038
|
+
"fileName",
|
|
12039
|
+
"lineNumber",
|
|
12040
|
+
"columnNumber",
|
|
12041
|
+
"toJSON"
|
|
12042
|
+
];
|
|
12043
|
+
const extraErrorInfo = {};
|
|
12044
|
+
for (const key of Object.keys(error)) {
|
|
12045
|
+
if (nativeKeys.indexOf(key) !== -1) {
|
|
12046
|
+
continue;
|
|
12047
|
+
}
|
|
12048
|
+
const value = error[key];
|
|
12049
|
+
extraErrorInfo[key] = isError(value) || typeof value === "string" ? truncate(`${value}`, maxValueLength) : value;
|
|
12050
|
+
}
|
|
12051
|
+
if (captureErrorCause && error.cause !== void 0) {
|
|
12052
|
+
extraErrorInfo.cause = isError(error.cause) ? error.cause.toString() : error.cause;
|
|
12053
|
+
}
|
|
12054
|
+
if (typeof error.toJSON === "function") {
|
|
12055
|
+
const serializedError = error.toJSON();
|
|
12056
|
+
for (const key of Object.keys(serializedError)) {
|
|
12057
|
+
const value = serializedError[key];
|
|
12058
|
+
extraErrorInfo[key] = isError(value) ? value.toString() : value;
|
|
12059
|
+
}
|
|
12060
|
+
}
|
|
12061
|
+
return extraErrorInfo;
|
|
12062
|
+
} catch (oO) {
|
|
12063
|
+
DEBUG_BUILD && logger.error("Unable to extract extra data from the Error object:", oO);
|
|
12064
|
+
}
|
|
12065
|
+
return null;
|
|
12066
|
+
}
|
|
12067
|
+
|
|
11525
12068
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/utils-hoist/path.js
|
|
12069
|
+
function normalizeArray(parts, allowAboveRoot) {
|
|
12070
|
+
let up = 0;
|
|
12071
|
+
for (let i = parts.length - 1; i >= 0; i--) {
|
|
12072
|
+
const last = parts[i];
|
|
12073
|
+
if (last === ".") {
|
|
12074
|
+
parts.splice(i, 1);
|
|
12075
|
+
} else if (last === "..") {
|
|
12076
|
+
parts.splice(i, 1);
|
|
12077
|
+
up++;
|
|
12078
|
+
} else if (up) {
|
|
12079
|
+
parts.splice(i, 1);
|
|
12080
|
+
up--;
|
|
12081
|
+
}
|
|
12082
|
+
}
|
|
12083
|
+
if (allowAboveRoot) {
|
|
12084
|
+
for (; up--; up) {
|
|
12085
|
+
parts.unshift("..");
|
|
12086
|
+
}
|
|
12087
|
+
}
|
|
12088
|
+
return parts;
|
|
12089
|
+
}
|
|
11526
12090
|
var splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
|
|
11527
12091
|
function splitPath(filename) {
|
|
11528
12092
|
const truncated = filename.length > 1024 ? `<truncated>${filename.slice(-1024)}` : filename;
|
|
11529
12093
|
const parts = splitPathRe.exec(truncated);
|
|
11530
12094
|
return parts ? parts.slice(1) : [];
|
|
11531
12095
|
}
|
|
12096
|
+
function resolve(...args) {
|
|
12097
|
+
let resolvedPath = "";
|
|
12098
|
+
let resolvedAbsolute = false;
|
|
12099
|
+
for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
12100
|
+
const path = i >= 0 ? args[i] : "/";
|
|
12101
|
+
if (!path) {
|
|
12102
|
+
continue;
|
|
12103
|
+
}
|
|
12104
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
12105
|
+
resolvedAbsolute = path.charAt(0) === "/";
|
|
12106
|
+
}
|
|
12107
|
+
resolvedPath = normalizeArray(
|
|
12108
|
+
resolvedPath.split("/").filter((p) => !!p),
|
|
12109
|
+
!resolvedAbsolute
|
|
12110
|
+
).join("/");
|
|
12111
|
+
return (resolvedAbsolute ? "/" : "") + resolvedPath || ".";
|
|
12112
|
+
}
|
|
12113
|
+
function trim(arr) {
|
|
12114
|
+
let start = 0;
|
|
12115
|
+
for (; start < arr.length; start++) {
|
|
12116
|
+
if (arr[start] !== "") {
|
|
12117
|
+
break;
|
|
12118
|
+
}
|
|
12119
|
+
}
|
|
12120
|
+
let end = arr.length - 1;
|
|
12121
|
+
for (; end >= 0; end--) {
|
|
12122
|
+
if (arr[end] !== "") {
|
|
12123
|
+
break;
|
|
12124
|
+
}
|
|
12125
|
+
}
|
|
12126
|
+
if (start > end) {
|
|
12127
|
+
return [];
|
|
12128
|
+
}
|
|
12129
|
+
return arr.slice(start, end - start + 1);
|
|
12130
|
+
}
|
|
12131
|
+
function relative(from, to) {
|
|
12132
|
+
from = resolve(from).slice(1);
|
|
12133
|
+
to = resolve(to).slice(1);
|
|
12134
|
+
const fromParts = trim(from.split("/"));
|
|
12135
|
+
const toParts = trim(to.split("/"));
|
|
12136
|
+
const length = Math.min(fromParts.length, toParts.length);
|
|
12137
|
+
let samePartsLength = length;
|
|
12138
|
+
for (let i = 0; i < length; i++) {
|
|
12139
|
+
if (fromParts[i] !== toParts[i]) {
|
|
12140
|
+
samePartsLength = i;
|
|
12141
|
+
break;
|
|
12142
|
+
}
|
|
12143
|
+
}
|
|
12144
|
+
let outputParts = [];
|
|
12145
|
+
for (let i = samePartsLength; i < fromParts.length; i++) {
|
|
12146
|
+
outputParts.push("..");
|
|
12147
|
+
}
|
|
12148
|
+
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
12149
|
+
return outputParts.join("/");
|
|
12150
|
+
}
|
|
11532
12151
|
function basename(path, ext) {
|
|
11533
12152
|
let f = splitPath(path)[2] || "";
|
|
11534
12153
|
if (ext && f.slice(ext.length * -1) === ext) {
|
|
@@ -11537,6 +12156,283 @@ function basename(path, ext) {
|
|
|
11537
12156
|
return f;
|
|
11538
12157
|
}
|
|
11539
12158
|
|
|
12159
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/integrations/rewriteframes.js
|
|
12160
|
+
var INTEGRATION_NAME9 = "RewriteFrames";
|
|
12161
|
+
var rewriteFramesIntegration = defineIntegration((options = {}) => {
|
|
12162
|
+
const root = options.root;
|
|
12163
|
+
const prefix = options.prefix || "app:///";
|
|
12164
|
+
const isBrowser = "window" in GLOBAL_OBJ && GLOBAL_OBJ.window !== void 0;
|
|
12165
|
+
const iteratee = options.iteratee || generateIteratee({ isBrowser, root, prefix });
|
|
12166
|
+
function _processExceptionsEvent(event) {
|
|
12167
|
+
try {
|
|
12168
|
+
return {
|
|
12169
|
+
...event,
|
|
12170
|
+
exception: {
|
|
12171
|
+
...event.exception,
|
|
12172
|
+
// The check for this is performed inside `process` call itself, safe to skip here
|
|
12173
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12174
|
+
values: event.exception.values.map((value) => ({
|
|
12175
|
+
...value,
|
|
12176
|
+
...value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) }
|
|
12177
|
+
}))
|
|
12178
|
+
}
|
|
12179
|
+
};
|
|
12180
|
+
} catch (_oO) {
|
|
12181
|
+
return event;
|
|
12182
|
+
}
|
|
12183
|
+
}
|
|
12184
|
+
function _processStacktrace(stacktrace) {
|
|
12185
|
+
return {
|
|
12186
|
+
...stacktrace,
|
|
12187
|
+
frames: stacktrace && stacktrace.frames && stacktrace.frames.map((f) => iteratee(f))
|
|
12188
|
+
};
|
|
12189
|
+
}
|
|
12190
|
+
return {
|
|
12191
|
+
name: INTEGRATION_NAME9,
|
|
12192
|
+
processEvent(originalEvent) {
|
|
12193
|
+
let processedEvent = originalEvent;
|
|
12194
|
+
if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {
|
|
12195
|
+
processedEvent = _processExceptionsEvent(processedEvent);
|
|
12196
|
+
}
|
|
12197
|
+
return processedEvent;
|
|
12198
|
+
}
|
|
12199
|
+
};
|
|
12200
|
+
});
|
|
12201
|
+
function generateIteratee({
|
|
12202
|
+
isBrowser,
|
|
12203
|
+
root,
|
|
12204
|
+
prefix
|
|
12205
|
+
}) {
|
|
12206
|
+
return (frame) => {
|
|
12207
|
+
if (!frame.filename) {
|
|
12208
|
+
return frame;
|
|
12209
|
+
}
|
|
12210
|
+
const isWindowsFrame = /^[a-zA-Z]:\\/.test(frame.filename) || // or the presence of a backslash without a forward slash (which are not allowed on Windows)
|
|
12211
|
+
frame.filename.includes("\\") && !frame.filename.includes("/");
|
|
12212
|
+
const startsWithSlash = /^\//.test(frame.filename);
|
|
12213
|
+
if (isBrowser) {
|
|
12214
|
+
if (root) {
|
|
12215
|
+
const oldFilename = frame.filename;
|
|
12216
|
+
if (oldFilename.indexOf(root) === 0) {
|
|
12217
|
+
frame.filename = oldFilename.replace(root, prefix);
|
|
12218
|
+
}
|
|
12219
|
+
}
|
|
12220
|
+
} else {
|
|
12221
|
+
if (isWindowsFrame || startsWithSlash) {
|
|
12222
|
+
const filename = isWindowsFrame ? frame.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : frame.filename;
|
|
12223
|
+
const base = root ? relative(root, filename) : basename(filename);
|
|
12224
|
+
frame.filename = `${prefix}${base}`;
|
|
12225
|
+
}
|
|
12226
|
+
}
|
|
12227
|
+
return frame;
|
|
12228
|
+
};
|
|
12229
|
+
}
|
|
12230
|
+
|
|
12231
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/integrations/zoderrors.js
|
|
12232
|
+
var DEFAULT_LIMIT2 = 10;
|
|
12233
|
+
var INTEGRATION_NAME10 = "ZodErrors";
|
|
12234
|
+
function originalExceptionIsZodError(originalException) {
|
|
12235
|
+
return isError(originalException) && originalException.name === "ZodError" && Array.isArray(originalException.issues);
|
|
12236
|
+
}
|
|
12237
|
+
function flattenIssue(issue) {
|
|
12238
|
+
return {
|
|
12239
|
+
...issue,
|
|
12240
|
+
path: "path" in issue && Array.isArray(issue.path) ? issue.path.join(".") : void 0,
|
|
12241
|
+
keys: "keys" in issue ? JSON.stringify(issue.keys) : void 0,
|
|
12242
|
+
unionErrors: "unionErrors" in issue ? JSON.stringify(issue.unionErrors) : void 0
|
|
12243
|
+
};
|
|
12244
|
+
}
|
|
12245
|
+
function flattenIssuePath(path) {
|
|
12246
|
+
return path.map((p) => {
|
|
12247
|
+
if (typeof p === "number") {
|
|
12248
|
+
return "<array>";
|
|
12249
|
+
} else {
|
|
12250
|
+
return p;
|
|
12251
|
+
}
|
|
12252
|
+
}).join(".");
|
|
12253
|
+
}
|
|
12254
|
+
function formatIssueMessage(zodError) {
|
|
12255
|
+
const errorKeyMap = /* @__PURE__ */ new Set();
|
|
12256
|
+
for (const iss of zodError.issues) {
|
|
12257
|
+
const issuePath = flattenIssuePath(iss.path);
|
|
12258
|
+
if (issuePath.length > 0) {
|
|
12259
|
+
errorKeyMap.add(issuePath);
|
|
12260
|
+
}
|
|
12261
|
+
}
|
|
12262
|
+
const errorKeys = Array.from(errorKeyMap);
|
|
12263
|
+
if (errorKeys.length === 0) {
|
|
12264
|
+
let rootExpectedType = "variable";
|
|
12265
|
+
if (zodError.issues.length > 0) {
|
|
12266
|
+
const iss = zodError.issues[0];
|
|
12267
|
+
if (iss !== void 0 && "expected" in iss && typeof iss.expected === "string") {
|
|
12268
|
+
rootExpectedType = iss.expected;
|
|
12269
|
+
}
|
|
12270
|
+
}
|
|
12271
|
+
return `Failed to validate ${rootExpectedType}`;
|
|
12272
|
+
}
|
|
12273
|
+
return `Failed to validate keys: ${truncate(errorKeys.join(", "), 100)}`;
|
|
12274
|
+
}
|
|
12275
|
+
function applyZodErrorsToEvent(limit, saveZodIssuesAsAttachment = false, event, hint) {
|
|
12276
|
+
if (!event.exception || !event.exception.values || !hint || !hint.originalException || !originalExceptionIsZodError(hint.originalException) || hint.originalException.issues.length === 0) {
|
|
12277
|
+
return event;
|
|
12278
|
+
}
|
|
12279
|
+
try {
|
|
12280
|
+
const issuesToFlatten = saveZodIssuesAsAttachment ? hint.originalException.issues : hint.originalException.issues.slice(0, limit);
|
|
12281
|
+
const flattenedIssues = issuesToFlatten.map(flattenIssue);
|
|
12282
|
+
if (saveZodIssuesAsAttachment) {
|
|
12283
|
+
if (!Array.isArray(hint.attachments)) {
|
|
12284
|
+
hint.attachments = [];
|
|
12285
|
+
}
|
|
12286
|
+
hint.attachments.push({
|
|
12287
|
+
filename: "zod_issues.json",
|
|
12288
|
+
data: JSON.stringify({
|
|
12289
|
+
issues: flattenedIssues
|
|
12290
|
+
})
|
|
12291
|
+
});
|
|
12292
|
+
}
|
|
12293
|
+
return {
|
|
12294
|
+
...event,
|
|
12295
|
+
exception: {
|
|
12296
|
+
...event.exception,
|
|
12297
|
+
values: [
|
|
12298
|
+
{
|
|
12299
|
+
...event.exception.values[0],
|
|
12300
|
+
value: formatIssueMessage(hint.originalException)
|
|
12301
|
+
},
|
|
12302
|
+
...event.exception.values.slice(1)
|
|
12303
|
+
]
|
|
12304
|
+
},
|
|
12305
|
+
extra: {
|
|
12306
|
+
...event.extra,
|
|
12307
|
+
"zoderror.issues": flattenedIssues.slice(0, limit)
|
|
12308
|
+
}
|
|
12309
|
+
};
|
|
12310
|
+
} catch (e) {
|
|
12311
|
+
return {
|
|
12312
|
+
...event,
|
|
12313
|
+
extra: {
|
|
12314
|
+
...event.extra,
|
|
12315
|
+
"zoderrors sentry integration parse error": {
|
|
12316
|
+
message: "an exception was thrown while processing ZodError within applyZodErrorsToEvent()",
|
|
12317
|
+
error: e instanceof Error ? `${e.name}: ${e.message}
|
|
12318
|
+
${e.stack}` : "unknown"
|
|
12319
|
+
}
|
|
12320
|
+
}
|
|
12321
|
+
};
|
|
12322
|
+
}
|
|
12323
|
+
}
|
|
12324
|
+
var _zodErrorsIntegration = (options = {}) => {
|
|
12325
|
+
const limit = typeof options.limit === "undefined" ? DEFAULT_LIMIT2 : options.limit;
|
|
12326
|
+
return {
|
|
12327
|
+
name: INTEGRATION_NAME10,
|
|
12328
|
+
processEvent(originalEvent, hint) {
|
|
12329
|
+
const processedEvent = applyZodErrorsToEvent(limit, options.saveZodIssuesAsAttachment, originalEvent, hint);
|
|
12330
|
+
return processedEvent;
|
|
12331
|
+
}
|
|
12332
|
+
};
|
|
12333
|
+
};
|
|
12334
|
+
var zodErrorsIntegration = defineIntegration(_zodErrorsIntegration);
|
|
12335
|
+
|
|
12336
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/metrics/constants.js
|
|
12337
|
+
var COUNTER_METRIC_TYPE = "c";
|
|
12338
|
+
var GAUGE_METRIC_TYPE = "g";
|
|
12339
|
+
var SET_METRIC_TYPE = "s";
|
|
12340
|
+
var DISTRIBUTION_METRIC_TYPE = "d";
|
|
12341
|
+
|
|
12342
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/metrics/exports.js
|
|
12343
|
+
function getMetricsAggregatorForClient(client, Aggregator) {
|
|
12344
|
+
const globalMetricsAggregators = getGlobalSingleton(
|
|
12345
|
+
"globalMetricsAggregators",
|
|
12346
|
+
() => /* @__PURE__ */ new WeakMap()
|
|
12347
|
+
);
|
|
12348
|
+
const aggregator = globalMetricsAggregators.get(client);
|
|
12349
|
+
if (aggregator) {
|
|
12350
|
+
return aggregator;
|
|
12351
|
+
}
|
|
12352
|
+
const newAggregator = new Aggregator(client);
|
|
12353
|
+
client.on("flush", () => newAggregator.flush());
|
|
12354
|
+
client.on("close", () => newAggregator.close());
|
|
12355
|
+
globalMetricsAggregators.set(client, newAggregator);
|
|
12356
|
+
return newAggregator;
|
|
12357
|
+
}
|
|
12358
|
+
function addToMetricsAggregator(Aggregator, metricType, name, value, data = {}) {
|
|
12359
|
+
const client = data.client || getClient();
|
|
12360
|
+
if (!client) {
|
|
12361
|
+
return;
|
|
12362
|
+
}
|
|
12363
|
+
const span = getActiveSpan();
|
|
12364
|
+
const rootSpan = span ? getRootSpan(span) : void 0;
|
|
12365
|
+
const transactionName = rootSpan && spanToJSON(rootSpan).description;
|
|
12366
|
+
const { unit, tags, timestamp } = data;
|
|
12367
|
+
const { release, environment } = client.getOptions();
|
|
12368
|
+
const metricTags = {};
|
|
12369
|
+
if (release) {
|
|
12370
|
+
metricTags.release = release;
|
|
12371
|
+
}
|
|
12372
|
+
if (environment) {
|
|
12373
|
+
metricTags.environment = environment;
|
|
12374
|
+
}
|
|
12375
|
+
if (transactionName) {
|
|
12376
|
+
metricTags.transaction = transactionName;
|
|
12377
|
+
}
|
|
12378
|
+
DEBUG_BUILD && logger.log(`Adding value of ${value} to ${metricType} metric ${name}`);
|
|
12379
|
+
const aggregator = getMetricsAggregatorForClient(client, Aggregator);
|
|
12380
|
+
aggregator.add(metricType, name, value, unit, { ...metricTags, ...tags }, timestamp);
|
|
12381
|
+
}
|
|
12382
|
+
function increment(aggregator, name, value = 1, data) {
|
|
12383
|
+
addToMetricsAggregator(aggregator, COUNTER_METRIC_TYPE, name, ensureNumber(value), data);
|
|
12384
|
+
}
|
|
12385
|
+
function distribution(aggregator, name, value, data) {
|
|
12386
|
+
addToMetricsAggregator(aggregator, DISTRIBUTION_METRIC_TYPE, name, ensureNumber(value), data);
|
|
12387
|
+
}
|
|
12388
|
+
function timing(aggregator, name, value, unit = "second", data) {
|
|
12389
|
+
if (typeof value === "function") {
|
|
12390
|
+
const startTime = timestampInSeconds();
|
|
12391
|
+
return startSpanManual(
|
|
12392
|
+
{
|
|
12393
|
+
op: "metrics.timing",
|
|
12394
|
+
name,
|
|
12395
|
+
startTime,
|
|
12396
|
+
onlyIfParent: true
|
|
12397
|
+
},
|
|
12398
|
+
(span) => {
|
|
12399
|
+
return handleCallbackErrors(
|
|
12400
|
+
() => value(),
|
|
12401
|
+
() => {
|
|
12402
|
+
},
|
|
12403
|
+
() => {
|
|
12404
|
+
const endTime = timestampInSeconds();
|
|
12405
|
+
const timeDiff = endTime - startTime;
|
|
12406
|
+
distribution(aggregator, name, timeDiff, { ...data, unit: "second" });
|
|
12407
|
+
span.end(endTime);
|
|
12408
|
+
}
|
|
12409
|
+
);
|
|
12410
|
+
}
|
|
12411
|
+
);
|
|
12412
|
+
}
|
|
12413
|
+
distribution(aggregator, name, value, { ...data, unit });
|
|
12414
|
+
}
|
|
12415
|
+
function set(aggregator, name, value, data) {
|
|
12416
|
+
addToMetricsAggregator(aggregator, SET_METRIC_TYPE, name, value, data);
|
|
12417
|
+
}
|
|
12418
|
+
function gauge(aggregator, name, value, data) {
|
|
12419
|
+
addToMetricsAggregator(aggregator, GAUGE_METRIC_TYPE, name, ensureNumber(value), data);
|
|
12420
|
+
}
|
|
12421
|
+
var metrics = {
|
|
12422
|
+
increment,
|
|
12423
|
+
distribution,
|
|
12424
|
+
set,
|
|
12425
|
+
gauge,
|
|
12426
|
+
timing,
|
|
12427
|
+
/**
|
|
12428
|
+
* @ignore This is for internal use only.
|
|
12429
|
+
*/
|
|
12430
|
+
getMetricsAggregatorForClient
|
|
12431
|
+
};
|
|
12432
|
+
function ensureNumber(number) {
|
|
12433
|
+
return typeof number === "string" ? parseInt(number) : number;
|
|
12434
|
+
}
|
|
12435
|
+
|
|
11540
12436
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/fetch.js
|
|
11541
12437
|
function instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeaders, spans, spanOrigin = "auto.http.browser") {
|
|
11542
12438
|
if (!handlerData.fetchData) {
|
|
@@ -11689,6 +12585,88 @@ function isHeaders(headers) {
|
|
|
11689
12585
|
return typeof Headers !== "undefined" && isInstanceOf(headers, Headers);
|
|
11690
12586
|
}
|
|
11691
12587
|
|
|
12588
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/trpc.js
|
|
12589
|
+
var trpcCaptureContext = { mechanism: { handled: false, data: { function: "trpcMiddleware" } } };
|
|
12590
|
+
function captureIfError(nextResult) {
|
|
12591
|
+
if (typeof nextResult === "object" && nextResult !== null && "ok" in nextResult && !nextResult.ok && "error" in nextResult) {
|
|
12592
|
+
captureException(nextResult.error, trpcCaptureContext);
|
|
12593
|
+
}
|
|
12594
|
+
}
|
|
12595
|
+
function trpcMiddleware(options = {}) {
|
|
12596
|
+
return async function(opts) {
|
|
12597
|
+
const { path, type, next, rawInput, getRawInput } = opts;
|
|
12598
|
+
const client = getClient();
|
|
12599
|
+
const clientOptions = client && client.getOptions();
|
|
12600
|
+
const trpcContext = {
|
|
12601
|
+
procedure_path: path,
|
|
12602
|
+
procedure_type: type
|
|
12603
|
+
};
|
|
12604
|
+
if (options.attachRpcInput !== void 0 ? options.attachRpcInput : clientOptions && clientOptions.sendDefaultPii) {
|
|
12605
|
+
if (rawInput !== void 0) {
|
|
12606
|
+
trpcContext.input = normalize(rawInput);
|
|
12607
|
+
}
|
|
12608
|
+
if (getRawInput !== void 0 && typeof getRawInput === "function") {
|
|
12609
|
+
try {
|
|
12610
|
+
const rawRes = await getRawInput();
|
|
12611
|
+
trpcContext.input = normalize(rawRes);
|
|
12612
|
+
} catch (err) {
|
|
12613
|
+
}
|
|
12614
|
+
}
|
|
12615
|
+
}
|
|
12616
|
+
return withScope2((scope) => {
|
|
12617
|
+
scope.setContext("trpc", trpcContext);
|
|
12618
|
+
return startSpanManual(
|
|
12619
|
+
{
|
|
12620
|
+
name: `trpc/${path}`,
|
|
12621
|
+
op: "rpc.server",
|
|
12622
|
+
attributes: {
|
|
12623
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "route",
|
|
12624
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.rpc.trpc"
|
|
12625
|
+
}
|
|
12626
|
+
},
|
|
12627
|
+
async (span) => {
|
|
12628
|
+
try {
|
|
12629
|
+
const nextResult = await next();
|
|
12630
|
+
captureIfError(nextResult);
|
|
12631
|
+
span.end();
|
|
12632
|
+
return nextResult;
|
|
12633
|
+
} catch (e) {
|
|
12634
|
+
captureException(e, trpcCaptureContext);
|
|
12635
|
+
span.end();
|
|
12636
|
+
throw e;
|
|
12637
|
+
}
|
|
12638
|
+
}
|
|
12639
|
+
);
|
|
12640
|
+
});
|
|
12641
|
+
};
|
|
12642
|
+
}
|
|
12643
|
+
|
|
12644
|
+
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/feedback.js
|
|
12645
|
+
function captureFeedback(params, hint = {}, scope = getCurrentScope()) {
|
|
12646
|
+
const { message: message2, name, email, url, source, associatedEventId, tags } = params;
|
|
12647
|
+
const feedbackEvent = {
|
|
12648
|
+
contexts: {
|
|
12649
|
+
feedback: dropUndefinedKeys({
|
|
12650
|
+
contact_email: email,
|
|
12651
|
+
name,
|
|
12652
|
+
message: message2,
|
|
12653
|
+
url,
|
|
12654
|
+
source,
|
|
12655
|
+
associated_event_id: associatedEventId
|
|
12656
|
+
})
|
|
12657
|
+
},
|
|
12658
|
+
type: "feedback",
|
|
12659
|
+
level: "info",
|
|
12660
|
+
tags
|
|
12661
|
+
};
|
|
12662
|
+
const client = scope && scope.getClient() || getClient();
|
|
12663
|
+
if (client) {
|
|
12664
|
+
client.emit("beforeSendFeedback", feedbackEvent, hint);
|
|
12665
|
+
}
|
|
12666
|
+
const eventId = scope.captureEvent(feedbackEvent, hint);
|
|
12667
|
+
return eventId;
|
|
12668
|
+
}
|
|
12669
|
+
|
|
11692
12670
|
// ../../node_modules/@sentry/cloudflare/node_modules/@sentry/core/build/esm/utils-hoist/breadcrumb-log-level.js
|
|
11693
12671
|
function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {
|
|
11694
12672
|
if (statusCode === void 0) {
|
|
@@ -12088,7 +13066,7 @@ var CloudflareClient = class extends ServerRuntimeClient {
|
|
|
12088
13066
|
};
|
|
12089
13067
|
|
|
12090
13068
|
// ../../node_modules/@sentry/cloudflare/build/esm/integrations/fetch.js
|
|
12091
|
-
var
|
|
13069
|
+
var INTEGRATION_NAME11 = "Fetch";
|
|
12092
13070
|
var HAS_CLIENT_MAP = /* @__PURE__ */ new WeakMap();
|
|
12093
13071
|
var _fetchIntegration = (options = {}) => {
|
|
12094
13072
|
const breadcrumbs = options.breadcrumbs === void 0 ? true : options.breadcrumbs;
|
|
@@ -12126,7 +13104,7 @@ var _fetchIntegration = (options = {}) => {
|
|
|
12126
13104
|
return decision;
|
|
12127
13105
|
}
|
|
12128
13106
|
return {
|
|
12129
|
-
name:
|
|
13107
|
+
name: INTEGRATION_NAME11,
|
|
12130
13108
|
setupOnce() {
|
|
12131
13109
|
addFetchInstrumentationHandler((handlerData) => {
|
|
12132
13110
|
const client = getClient();
|
|
@@ -12435,6 +13413,198 @@ function isInstrumented(handler) {
|
|
|
12435
13413
|
}
|
|
12436
13414
|
}
|
|
12437
13415
|
|
|
13416
|
+
// ../../node_modules/@sentry/cloudflare/build/esm/pages-plugin.js
|
|
13417
|
+
function sentryPagesPlugin(handlerOrOptions) {
|
|
13418
|
+
setAsyncLocalStorageAsyncContextStrategy();
|
|
13419
|
+
return (context) => {
|
|
13420
|
+
const options = typeof handlerOrOptions === "function" ? handlerOrOptions(context) : handlerOrOptions;
|
|
13421
|
+
return wrapRequestHandler({ options, request: context.request, context }, () => context.next());
|
|
13422
|
+
};
|
|
13423
|
+
}
|
|
13424
|
+
|
|
13425
|
+
// ../../node_modules/@sentry/cloudflare/build/esm/d1.js
|
|
13426
|
+
var patchedStatement = /* @__PURE__ */ new WeakSet();
|
|
13427
|
+
function instrumentD1PreparedStatementQueries(statement, query) {
|
|
13428
|
+
if (patchedStatement.has(statement)) {
|
|
13429
|
+
return statement;
|
|
13430
|
+
}
|
|
13431
|
+
statement.first = new Proxy(statement.first, {
|
|
13432
|
+
apply(target, thisArg, args) {
|
|
13433
|
+
return startSpan(createStartSpanOptions(query, "first"), async () => {
|
|
13434
|
+
const res = await Reflect.apply(target, thisArg, args);
|
|
13435
|
+
createD1Breadcrumb(query, "first");
|
|
13436
|
+
return res;
|
|
13437
|
+
});
|
|
13438
|
+
}
|
|
13439
|
+
});
|
|
13440
|
+
statement.run = new Proxy(statement.run, {
|
|
13441
|
+
apply(target, thisArg, args) {
|
|
13442
|
+
return startSpan(createStartSpanOptions(query, "run"), async (span) => {
|
|
13443
|
+
const d1Response = await Reflect.apply(target, thisArg, args);
|
|
13444
|
+
applyD1ReturnObjectToSpan(span, d1Response);
|
|
13445
|
+
createD1Breadcrumb(query, "run", d1Response);
|
|
13446
|
+
return d1Response;
|
|
13447
|
+
});
|
|
13448
|
+
}
|
|
13449
|
+
});
|
|
13450
|
+
statement.all = new Proxy(statement.all, {
|
|
13451
|
+
apply(target, thisArg, args) {
|
|
13452
|
+
return startSpan(createStartSpanOptions(query, "all"), async (span) => {
|
|
13453
|
+
const d1Result = await Reflect.apply(target, thisArg, args);
|
|
13454
|
+
applyD1ReturnObjectToSpan(span, d1Result);
|
|
13455
|
+
createD1Breadcrumb(query, "all", d1Result);
|
|
13456
|
+
return d1Result;
|
|
13457
|
+
});
|
|
13458
|
+
}
|
|
13459
|
+
});
|
|
13460
|
+
statement.raw = new Proxy(statement.raw, {
|
|
13461
|
+
apply(target, thisArg, args) {
|
|
13462
|
+
return startSpan(createStartSpanOptions(query, "raw"), async () => {
|
|
13463
|
+
const res = await Reflect.apply(target, thisArg, args);
|
|
13464
|
+
createD1Breadcrumb(query, "raw");
|
|
13465
|
+
return res;
|
|
13466
|
+
});
|
|
13467
|
+
}
|
|
13468
|
+
});
|
|
13469
|
+
patchedStatement.add(statement);
|
|
13470
|
+
return statement;
|
|
13471
|
+
}
|
|
13472
|
+
function instrumentD1PreparedStatement(statement, query) {
|
|
13473
|
+
statement.bind = new Proxy(statement.bind, {
|
|
13474
|
+
apply(target, thisArg, args) {
|
|
13475
|
+
return instrumentD1PreparedStatementQueries(Reflect.apply(target, thisArg, args), query);
|
|
13476
|
+
}
|
|
13477
|
+
});
|
|
13478
|
+
return instrumentD1PreparedStatementQueries(statement, query);
|
|
13479
|
+
}
|
|
13480
|
+
function applyD1ReturnObjectToSpan(span, d1Result) {
|
|
13481
|
+
if (!d1Result.success) {
|
|
13482
|
+
span.setStatus({ code: SPAN_STATUS_ERROR });
|
|
13483
|
+
}
|
|
13484
|
+
span.setAttributes(getAttributesFromD1Response(d1Result));
|
|
13485
|
+
}
|
|
13486
|
+
function getAttributesFromD1Response(d1Result) {
|
|
13487
|
+
return {
|
|
13488
|
+
"cloudflare.d1.duration": d1Result.meta.duration,
|
|
13489
|
+
"cloudflare.d1.rows_read": d1Result.meta.rows_read,
|
|
13490
|
+
"cloudflare.d1.rows_written": d1Result.meta.rows_written
|
|
13491
|
+
};
|
|
13492
|
+
}
|
|
13493
|
+
function createD1Breadcrumb(query, type, d1Result) {
|
|
13494
|
+
addBreadcrumb({
|
|
13495
|
+
category: "query",
|
|
13496
|
+
message: query,
|
|
13497
|
+
data: {
|
|
13498
|
+
...d1Result ? getAttributesFromD1Response(d1Result) : {},
|
|
13499
|
+
"cloudflare.d1.query_type": type
|
|
13500
|
+
}
|
|
13501
|
+
});
|
|
13502
|
+
}
|
|
13503
|
+
function createStartSpanOptions(query, type) {
|
|
13504
|
+
return {
|
|
13505
|
+
op: "db.query",
|
|
13506
|
+
name: query,
|
|
13507
|
+
attributes: {
|
|
13508
|
+
"cloudflare.d1.query_type": type,
|
|
13509
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.db.cloudflare.d1"
|
|
13510
|
+
}
|
|
13511
|
+
};
|
|
13512
|
+
}
|
|
13513
|
+
function instrumentD1WithSentry(db) {
|
|
13514
|
+
db.prepare = new Proxy(db.prepare, {
|
|
13515
|
+
apply(target, thisArg, args) {
|
|
13516
|
+
const [query] = args;
|
|
13517
|
+
return instrumentD1PreparedStatement(Reflect.apply(target, thisArg, args), query);
|
|
13518
|
+
}
|
|
13519
|
+
});
|
|
13520
|
+
return db;
|
|
13521
|
+
}
|
|
13522
|
+
|
|
13523
|
+
// ../../node_modules/@wix/monitoring-common-sentry/build/index.js
|
|
13524
|
+
var isPromise = (value) => typeof value?.then === "function";
|
|
13525
|
+
var runWithMaybePromise = (value, cb) => {
|
|
13526
|
+
if (!cb) {
|
|
13527
|
+
return value;
|
|
13528
|
+
}
|
|
13529
|
+
if (isPromise(value)) {
|
|
13530
|
+
return value.then((res) => {
|
|
13531
|
+
cb(res, true);
|
|
13532
|
+
return res;
|
|
13533
|
+
});
|
|
13534
|
+
} else {
|
|
13535
|
+
cb(value, false);
|
|
13536
|
+
return value;
|
|
13537
|
+
}
|
|
13538
|
+
};
|
|
13539
|
+
var runWithMaybeDelay = (cb, maybeTimeCompensation) => {
|
|
13540
|
+
if (!cb) {
|
|
13541
|
+
return;
|
|
13542
|
+
}
|
|
13543
|
+
if (maybeTimeCompensation) {
|
|
13544
|
+
setTimeout(cb, maybeTimeCompensation);
|
|
13545
|
+
} else {
|
|
13546
|
+
cb();
|
|
13547
|
+
}
|
|
13548
|
+
};
|
|
13549
|
+
var ManualSpanRegistryImpl = class {
|
|
13550
|
+
constructor(options) {
|
|
13551
|
+
this.options = options;
|
|
13552
|
+
this.spanMap = /* @__PURE__ */ new Map();
|
|
13553
|
+
}
|
|
13554
|
+
createSpan(spanOptions, sentryOptionsOrPromise) {
|
|
13555
|
+
let resolveSpan;
|
|
13556
|
+
let rejectSpan;
|
|
13557
|
+
let error;
|
|
13558
|
+
const startTime = Date.now();
|
|
13559
|
+
let maybeDurationCompensation;
|
|
13560
|
+
const maybePromise = runWithMaybePromise(
|
|
13561
|
+
sentryOptionsOrPromise,
|
|
13562
|
+
({ sentrySDK, scope }, isPromise2) => {
|
|
13563
|
+
if (isPromise2) {
|
|
13564
|
+
maybeDurationCompensation = Date.now() - startTime;
|
|
13565
|
+
}
|
|
13566
|
+
const promise = sentrySDK.startSpan(
|
|
13567
|
+
{
|
|
13568
|
+
...spanOptions,
|
|
13569
|
+
scope,
|
|
13570
|
+
forceTransaction: this.options.forceTransaction
|
|
13571
|
+
},
|
|
13572
|
+
() => new Promise((resolve2, reject) => {
|
|
13573
|
+
resolveSpan = resolve2;
|
|
13574
|
+
rejectSpan = reject;
|
|
13575
|
+
})
|
|
13576
|
+
);
|
|
13577
|
+
promise?.catch((e) => {
|
|
13578
|
+
if (e?.message !== error?.message) {
|
|
13579
|
+
throw e;
|
|
13580
|
+
}
|
|
13581
|
+
});
|
|
13582
|
+
}
|
|
13583
|
+
);
|
|
13584
|
+
const endSpan2 = (cb) => {
|
|
13585
|
+
this.spanMap.delete(spanOptions.name);
|
|
13586
|
+
runWithMaybePromise(maybePromise, () => {
|
|
13587
|
+
runWithMaybeDelay(cb, maybeDurationCompensation);
|
|
13588
|
+
});
|
|
13589
|
+
};
|
|
13590
|
+
const span = {
|
|
13591
|
+
end: () => {
|
|
13592
|
+
endSpan2(() => resolveSpan?.());
|
|
13593
|
+
},
|
|
13594
|
+
fail: (_error) => {
|
|
13595
|
+
error = error ?? _error;
|
|
13596
|
+
endSpan2(() => rejectSpan?.(_error));
|
|
13597
|
+
}
|
|
13598
|
+
};
|
|
13599
|
+
this.spanMap.set(spanOptions.name, span);
|
|
13600
|
+
return span;
|
|
13601
|
+
}
|
|
13602
|
+
getSpan(spanOptions) {
|
|
13603
|
+
return this.spanMap.get(spanOptions.name);
|
|
13604
|
+
}
|
|
13605
|
+
};
|
|
13606
|
+
var createManualSpanRegistry = (options) => new ManualSpanRegistryImpl(options);
|
|
13607
|
+
|
|
12438
13608
|
// ../../node_modules/@wix/monitoring-cloudflare-sentry/build/index.js
|
|
12439
13609
|
var UNHANDLED_MARK_KEY = "_markAsUnhandled";
|
|
12440
13610
|
var captureUnhandledException = (error) => {
|
|
@@ -12518,6 +13688,7 @@ var instrumentWithData = (options) => {
|
|
|
12518
13688
|
};
|
|
12519
13689
|
var SentryCloudflareClient = class {
|
|
12520
13690
|
constructor() {
|
|
13691
|
+
this.manualSpanRegistry = createManualSpanRegistry({ forceTransaction: false });
|
|
12521
13692
|
this.addBreadcrumb = (breadcrumb) => {
|
|
12522
13693
|
addBreadcrumb(breadcrumb);
|
|
12523
13694
|
};
|
|
@@ -12535,9 +13706,19 @@ var SentryCloudflareClient = class {
|
|
|
12535
13706
|
contexts: captureContext?.contexts
|
|
12536
13707
|
});
|
|
12537
13708
|
};
|
|
12538
|
-
this.startSpan =
|
|
13709
|
+
this.startSpan = (spanOptions, callback) => {
|
|
12539
13710
|
return startSpan(spanOptions, callback);
|
|
12540
13711
|
};
|
|
13712
|
+
this.startSpanManual = (spanOptions) => {
|
|
13713
|
+
const span = this.manualSpanRegistry.createSpan(spanOptions, {
|
|
13714
|
+
sentrySDK: esm_exports
|
|
13715
|
+
});
|
|
13716
|
+
return span;
|
|
13717
|
+
};
|
|
13718
|
+
this.endSpanManual = (spanOptions) => {
|
|
13719
|
+
const span = this.manualSpanRegistry.getSpan(spanOptions);
|
|
13720
|
+
span?.end();
|
|
13721
|
+
};
|
|
12541
13722
|
}
|
|
12542
13723
|
};
|
|
12543
13724
|
var createSentryCloudflareClient = (options) => {
|