@slicemachine/manager 0.26.3-beta.1 → 0.26.3-beta.3

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.
Files changed (116) hide show
  1. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.cjs +6 -6
  2. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.js +4 -4
  3. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.js.map +1 -1
  4. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.cjs +4 -4
  5. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.cjs.map +1 -1
  6. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js +4 -4
  7. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js.map +1 -1
  8. package/dist/errors.cjs +7 -0
  9. package/dist/errors.cjs.map +1 -1
  10. package/dist/errors.d.ts +5 -1
  11. package/dist/errors.js +7 -0
  12. package/dist/errors.js.map +1 -1
  13. package/dist/index.cjs +1 -0
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +2 -1
  17. package/dist/managers/customTypes/CustomTypesManager.cjs +17 -7
  18. package/dist/managers/customTypes/CustomTypesManager.cjs.map +1 -1
  19. package/dist/managers/customTypes/CustomTypesManager.js +19 -9
  20. package/dist/managers/customTypes/CustomTypesManager.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/errors.ts +12 -1
  23. package/src/index.ts +1 -0
  24. package/src/managers/customTypes/CustomTypesManager.ts +29 -18
  25. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.cjs +0 -5
  26. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.cjs.map +0 -1
  27. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.js +0 -5
  28. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.js.map +0 -1
  29. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.cjs +0 -5
  30. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.cjs.map +0 -1
  31. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.js +0 -5
  32. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.js.map +0 -1
  33. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs +0 -29
  34. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs.map +0 -1
  35. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js +0 -29
  36. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js.map +0 -1
  37. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs +0 -17
  38. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs.map +0 -1
  39. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js +0 -17
  40. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js.map +0 -1
  41. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs +0 -535
  42. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs.map +0 -1
  43. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js +0 -535
  44. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js.map +0 -1
  45. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs +0 -545
  46. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs.map +0 -1
  47. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js +0 -545
  48. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js.map +0 -1
  49. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs +0 -109
  50. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs.map +0 -1
  51. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js +0 -109
  52. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js.map +0 -1
  53. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs +0 -50
  54. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs.map +0 -1
  55. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js +0 -50
  56. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js.map +0 -1
  57. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs +0 -85
  58. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs.map +0 -1
  59. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js +0 -85
  60. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js.map +0 -1
  61. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.cjs +0 -7
  62. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.cjs.map +0 -1
  63. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.js +0 -7
  64. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.js.map +0 -1
  65. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs +0 -35
  66. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs.map +0 -1
  67. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js +0 -35
  68. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js.map +0 -1
  69. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs +0 -39
  70. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs.map +0 -1
  71. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js +0 -39
  72. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js.map +0 -1
  73. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.cjs +0 -5
  74. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.cjs.map +0 -1
  75. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.js +0 -5
  76. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.js.map +0 -1
  77. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.cjs +0 -5
  78. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.cjs.map +0 -1
  79. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.js +0 -5
  80. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.js.map +0 -1
  81. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs +0 -15
  82. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs.map +0 -1
  83. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js +0 -15
  84. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js.map +0 -1
  85. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs +0 -69
  86. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs.map +0 -1
  87. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js +0 -69
  88. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js.map +0 -1
  89. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs +0 -34
  90. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs.map +0 -1
  91. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js +0 -34
  92. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js.map +0 -1
  93. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs +0 -49
  94. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs.map +0 -1
  95. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js +0 -49
  96. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js.map +0 -1
  97. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs +0 -142
  98. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs.map +0 -1
  99. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js +0 -142
  100. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js.map +0 -1
  101. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs +0 -45
  102. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs.map +0 -1
  103. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js +0 -45
  104. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js.map +0 -1
  105. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs +0 -18
  106. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs.map +0 -1
  107. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js +0 -18
  108. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js.map +0 -1
  109. package/dist/lib/checkIsSentryEnabled.d.ts +0 -9
  110. package/dist/lib/sentryErrorHandlers.cjs +0 -10
  111. package/dist/lib/sentryErrorHandlers.cjs.map +0 -1
  112. package/dist/lib/sentryErrorHandlers.d.ts +0 -1
  113. package/dist/lib/sentryErrorHandlers.js +0 -10
  114. package/dist/lib/sentryErrorHandlers.js.map +0 -1
  115. package/src/lib/checkIsSentryEnabled.ts +0 -12
  116. package/src/lib/sentryErrorHandlers.ts +0 -13
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const is = require("./is.cjs");
4
- function dropUndefinedKeys(inputValue) {
5
- const memoizationMap = /* @__PURE__ */ new Map();
6
- return _dropUndefinedKeys(inputValue, memoizationMap);
7
- }
8
- function _dropUndefinedKeys(inputValue, memoizationMap) {
9
- if (isPojo(inputValue)) {
10
- const memoVal = memoizationMap.get(inputValue);
11
- if (memoVal !== void 0) {
12
- return memoVal;
13
- }
14
- const returnValue = {};
15
- memoizationMap.set(inputValue, returnValue);
16
- for (const key of Object.keys(inputValue)) {
17
- if (typeof inputValue[key] !== "undefined") {
18
- returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);
19
- }
20
- }
21
- return returnValue;
22
- }
23
- if (Array.isArray(inputValue)) {
24
- const memoVal = memoizationMap.get(inputValue);
25
- if (memoVal !== void 0) {
26
- return memoVal;
27
- }
28
- const returnValue = [];
29
- memoizationMap.set(inputValue, returnValue);
30
- inputValue.forEach((item) => {
31
- returnValue.push(_dropUndefinedKeys(item, memoizationMap));
32
- });
33
- return returnValue;
34
- }
35
- return inputValue;
36
- }
37
- function isPojo(input) {
38
- if (!is.isPlainObject(input)) {
39
- return false;
40
- }
41
- try {
42
- const name = Object.getPrototypeOf(input).constructor.name;
43
- return !name || name === "Object";
44
- } catch (e) {
45
- return true;
46
- }
47
- }
48
- exports.dropUndefinedKeys = dropUndefinedKeys;
49
- //# sourceMappingURL=object.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/object.js"],"sourcesContent":["import { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(\n value,\n)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input) {\n if (!isPlainObject(input)) {\n return false;\n }\n\n try {\n const name = (Object.getPrototypeOf(input) ).constructor.name;\n return !name || name === 'Object';\n } catch (e) {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n//# sourceMappingURL=object.js.map\n"],"names":["isPlainObject"],"mappings":";;;AAiMA,SAAS,kBAAkB,YAAY;AAIrC,QAAM,iBAAiB,oBAAI,IAAG;AAG9B,SAAO,mBAAmB,YAAY,cAAc;AACtD;AAEA,SAAS,mBAAmB,YAAY,gBAAgB;AACtD,MAAI,OAAO,UAAU,GAAG;AAEtB,UAAM,UAAU,eAAe,IAAI,UAAU;AAC7C,QAAI,YAAY,QAAW;AACzB,aAAO;AAAA,IACT;AAEA,UAAM,cAAc,CAAA;AAEpB,mBAAe,IAAI,YAAY,WAAW;AAE1C,eAAW,OAAO,OAAO,KAAK,UAAU,GAAG;AACzC,UAAI,OAAO,WAAW,GAAG,MAAM,aAAa;AAC1C,oBAAY,GAAG,IAAI,mBAAmB,WAAW,GAAG,GAAG,cAAc;AAAA,MACvE;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,QAAQ,UAAU,GAAG;AAE7B,UAAM,UAAU,eAAe,IAAI,UAAU;AAC7C,QAAI,YAAY,QAAW;AACzB,aAAO;AAAA,IACT;AAEA,UAAM,cAAc,CAAA;AAEpB,mBAAe,IAAI,YAAY,WAAW;AAE1C,eAAW,QAAQ,CAAC,SAAS;AAC3B,kBAAY,KAAK,mBAAmB,MAAM,cAAc,CAAC;AAAA,IAC3D,CAAC;AAED,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAEA,SAAS,OAAO,OAAO;AACrB,MAAI,CAACA,GAAAA,cAAc,KAAK,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,MAAI;AACF,UAAM,OAAQ,OAAO,eAAe,KAAK,EAAI,YAAY;AACzD,WAAO,CAAC,QAAQ,SAAS;AAAA,EAC3B,SAAS,GAAG;AACV,WAAO;AAAA,EACT;AACF;;","x_google_ignoreList":[0]}
@@ -1,49 +0,0 @@
1
- import { isPlainObject } from "./is.js";
2
- function dropUndefinedKeys(inputValue) {
3
- const memoizationMap = /* @__PURE__ */ new Map();
4
- return _dropUndefinedKeys(inputValue, memoizationMap);
5
- }
6
- function _dropUndefinedKeys(inputValue, memoizationMap) {
7
- if (isPojo(inputValue)) {
8
- const memoVal = memoizationMap.get(inputValue);
9
- if (memoVal !== void 0) {
10
- return memoVal;
11
- }
12
- const returnValue = {};
13
- memoizationMap.set(inputValue, returnValue);
14
- for (const key of Object.keys(inputValue)) {
15
- if (typeof inputValue[key] !== "undefined") {
16
- returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);
17
- }
18
- }
19
- return returnValue;
20
- }
21
- if (Array.isArray(inputValue)) {
22
- const memoVal = memoizationMap.get(inputValue);
23
- if (memoVal !== void 0) {
24
- return memoVal;
25
- }
26
- const returnValue = [];
27
- memoizationMap.set(inputValue, returnValue);
28
- inputValue.forEach((item) => {
29
- returnValue.push(_dropUndefinedKeys(item, memoizationMap));
30
- });
31
- return returnValue;
32
- }
33
- return inputValue;
34
- }
35
- function isPojo(input) {
36
- if (!isPlainObject(input)) {
37
- return false;
38
- }
39
- try {
40
- const name = Object.getPrototypeOf(input).constructor.name;
41
- return !name || name === "Object";
42
- } catch (e) {
43
- return true;
44
- }
45
- }
46
- export {
47
- dropUndefinedKeys
48
- };
49
- //# sourceMappingURL=object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/object.js"],"sourcesContent":["import { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(\n value,\n)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input) {\n if (!isPlainObject(input)) {\n return false;\n }\n\n try {\n const name = (Object.getPrototypeOf(input) ).constructor.name;\n return !name || name === 'Object';\n } catch (e) {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n//# sourceMappingURL=object.js.map\n"],"names":[],"mappings":";AAiMA,SAAS,kBAAkB,YAAY;AAIrC,QAAM,iBAAiB,oBAAI,IAAG;AAG9B,SAAO,mBAAmB,YAAY,cAAc;AACtD;AAEA,SAAS,mBAAmB,YAAY,gBAAgB;AACtD,MAAI,OAAO,UAAU,GAAG;AAEtB,UAAM,UAAU,eAAe,IAAI,UAAU;AAC7C,QAAI,YAAY,QAAW;AACzB,aAAO;AAAA,IACT;AAEA,UAAM,cAAc,CAAA;AAEpB,mBAAe,IAAI,YAAY,WAAW;AAE1C,eAAW,OAAO,OAAO,KAAK,UAAU,GAAG;AACzC,UAAI,OAAO,WAAW,GAAG,MAAM,aAAa;AAC1C,oBAAY,GAAG,IAAI,mBAAmB,WAAW,GAAG,GAAG,cAAc;AAAA,MACvE;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,QAAQ,UAAU,GAAG;AAE7B,UAAM,UAAU,eAAe,IAAI,UAAU;AAC7C,QAAI,YAAY,QAAW;AACzB,aAAO;AAAA,IACT;AAEA,UAAM,cAAc,CAAA;AAEpB,mBAAe,IAAI,YAAY,WAAW;AAE1C,eAAW,QAAQ,CAAC,SAAS;AAC3B,kBAAY,KAAK,mBAAmB,MAAM,cAAc,CAAC;AAAA,IAC3D,CAAC;AAED,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAEA,SAAS,OAAO,OAAO;AACrB,MAAI,CAAC,cAAc,KAAK,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,MAAI;AACF,UAAM,OAAQ,OAAO,eAAe,KAAK,EAAI,YAAY;AACzD,WAAO,CAAC,QAAQ,SAAS;AAAA,EAC3B,SAAS,GAAG;AACV,WAAO;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
@@ -1,142 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const is = require("./is.cjs");
4
- var States;
5
- (function(States2) {
6
- const PENDING = 0;
7
- States2[States2["PENDING"] = PENDING] = "PENDING";
8
- const RESOLVED = 1;
9
- States2[States2["RESOLVED"] = RESOLVED] = "RESOLVED";
10
- const REJECTED = 2;
11
- States2[States2["REJECTED"] = REJECTED] = "REJECTED";
12
- })(States || (States = {}));
13
- class SyncPromise {
14
- constructor(executor) {
15
- SyncPromise.prototype.__init.call(this);
16
- SyncPromise.prototype.__init2.call(this);
17
- SyncPromise.prototype.__init3.call(this);
18
- SyncPromise.prototype.__init4.call(this);
19
- this._state = States.PENDING;
20
- this._handlers = [];
21
- try {
22
- executor(this._resolve, this._reject);
23
- } catch (e) {
24
- this._reject(e);
25
- }
26
- }
27
- /** JSDoc */
28
- then(onfulfilled, onrejected) {
29
- return new SyncPromise((resolve, reject) => {
30
- this._handlers.push([
31
- false,
32
- (result) => {
33
- if (!onfulfilled) {
34
- resolve(result);
35
- } else {
36
- try {
37
- resolve(onfulfilled(result));
38
- } catch (e) {
39
- reject(e);
40
- }
41
- }
42
- },
43
- (reason) => {
44
- if (!onrejected) {
45
- reject(reason);
46
- } else {
47
- try {
48
- resolve(onrejected(reason));
49
- } catch (e) {
50
- reject(e);
51
- }
52
- }
53
- }
54
- ]);
55
- this._executeHandlers();
56
- });
57
- }
58
- /** JSDoc */
59
- catch(onrejected) {
60
- return this.then((val) => val, onrejected);
61
- }
62
- /** JSDoc */
63
- finally(onfinally) {
64
- return new SyncPromise((resolve, reject) => {
65
- let val;
66
- let isRejected;
67
- return this.then(
68
- (value) => {
69
- isRejected = false;
70
- val = value;
71
- if (onfinally) {
72
- onfinally();
73
- }
74
- },
75
- (reason) => {
76
- isRejected = true;
77
- val = reason;
78
- if (onfinally) {
79
- onfinally();
80
- }
81
- }
82
- ).then(() => {
83
- if (isRejected) {
84
- reject(val);
85
- return;
86
- }
87
- resolve(val);
88
- });
89
- });
90
- }
91
- /** JSDoc */
92
- __init() {
93
- this._resolve = (value) => {
94
- this._setResult(States.RESOLVED, value);
95
- };
96
- }
97
- /** JSDoc */
98
- __init2() {
99
- this._reject = (reason) => {
100
- this._setResult(States.REJECTED, reason);
101
- };
102
- }
103
- /** JSDoc */
104
- __init3() {
105
- this._setResult = (state, value) => {
106
- if (this._state !== States.PENDING) {
107
- return;
108
- }
109
- if (is.isThenable(value)) {
110
- void value.then(this._resolve, this._reject);
111
- return;
112
- }
113
- this._state = state;
114
- this._value = value;
115
- this._executeHandlers();
116
- };
117
- }
118
- /** JSDoc */
119
- __init4() {
120
- this._executeHandlers = () => {
121
- if (this._state === States.PENDING) {
122
- return;
123
- }
124
- const cachedHandlers = this._handlers.slice();
125
- this._handlers = [];
126
- cachedHandlers.forEach((handler) => {
127
- if (handler[0]) {
128
- return;
129
- }
130
- if (this._state === States.RESOLVED) {
131
- handler[1](this._value);
132
- }
133
- if (this._state === States.REJECTED) {
134
- handler[2](this._value);
135
- }
136
- handler[0] = true;
137
- });
138
- };
139
- }
140
- }
141
- exports.SyncPromise = SyncPromise;
142
- //# sourceMappingURL=syncpromise.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"syncpromise.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/syncpromise.js"],"sourcesContent":["import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n"],"names":["States","isThenable"],"mappings":"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","x_google_ignoreList":[0]}
@@ -1,142 +0,0 @@
1
- import { isThenable } from "./is.js";
2
- var States;
3
- (function(States2) {
4
- const PENDING = 0;
5
- States2[States2["PENDING"] = PENDING] = "PENDING";
6
- const RESOLVED = 1;
7
- States2[States2["RESOLVED"] = RESOLVED] = "RESOLVED";
8
- const REJECTED = 2;
9
- States2[States2["REJECTED"] = REJECTED] = "REJECTED";
10
- })(States || (States = {}));
11
- class SyncPromise {
12
- constructor(executor) {
13
- SyncPromise.prototype.__init.call(this);
14
- SyncPromise.prototype.__init2.call(this);
15
- SyncPromise.prototype.__init3.call(this);
16
- SyncPromise.prototype.__init4.call(this);
17
- this._state = States.PENDING;
18
- this._handlers = [];
19
- try {
20
- executor(this._resolve, this._reject);
21
- } catch (e) {
22
- this._reject(e);
23
- }
24
- }
25
- /** JSDoc */
26
- then(onfulfilled, onrejected) {
27
- return new SyncPromise((resolve, reject) => {
28
- this._handlers.push([
29
- false,
30
- (result) => {
31
- if (!onfulfilled) {
32
- resolve(result);
33
- } else {
34
- try {
35
- resolve(onfulfilled(result));
36
- } catch (e) {
37
- reject(e);
38
- }
39
- }
40
- },
41
- (reason) => {
42
- if (!onrejected) {
43
- reject(reason);
44
- } else {
45
- try {
46
- resolve(onrejected(reason));
47
- } catch (e) {
48
- reject(e);
49
- }
50
- }
51
- }
52
- ]);
53
- this._executeHandlers();
54
- });
55
- }
56
- /** JSDoc */
57
- catch(onrejected) {
58
- return this.then((val) => val, onrejected);
59
- }
60
- /** JSDoc */
61
- finally(onfinally) {
62
- return new SyncPromise((resolve, reject) => {
63
- let val;
64
- let isRejected;
65
- return this.then(
66
- (value) => {
67
- isRejected = false;
68
- val = value;
69
- if (onfinally) {
70
- onfinally();
71
- }
72
- },
73
- (reason) => {
74
- isRejected = true;
75
- val = reason;
76
- if (onfinally) {
77
- onfinally();
78
- }
79
- }
80
- ).then(() => {
81
- if (isRejected) {
82
- reject(val);
83
- return;
84
- }
85
- resolve(val);
86
- });
87
- });
88
- }
89
- /** JSDoc */
90
- __init() {
91
- this._resolve = (value) => {
92
- this._setResult(States.RESOLVED, value);
93
- };
94
- }
95
- /** JSDoc */
96
- __init2() {
97
- this._reject = (reason) => {
98
- this._setResult(States.REJECTED, reason);
99
- };
100
- }
101
- /** JSDoc */
102
- __init3() {
103
- this._setResult = (state, value) => {
104
- if (this._state !== States.PENDING) {
105
- return;
106
- }
107
- if (isThenable(value)) {
108
- void value.then(this._resolve, this._reject);
109
- return;
110
- }
111
- this._state = state;
112
- this._value = value;
113
- this._executeHandlers();
114
- };
115
- }
116
- /** JSDoc */
117
- __init4() {
118
- this._executeHandlers = () => {
119
- if (this._state === States.PENDING) {
120
- return;
121
- }
122
- const cachedHandlers = this._handlers.slice();
123
- this._handlers = [];
124
- cachedHandlers.forEach((handler) => {
125
- if (handler[0]) {
126
- return;
127
- }
128
- if (this._state === States.RESOLVED) {
129
- handler[1](this._value);
130
- }
131
- if (this._state === States.REJECTED) {
132
- handler[2](this._value);
133
- }
134
- handler[0] = true;
135
- });
136
- };
137
- }
138
- }
139
- export {
140
- SyncPromise
141
- };
142
- //# sourceMappingURL=syncpromise.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"syncpromise.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/syncpromise.js"],"sourcesContent":["import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n"],"names":["States"],"mappings":"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","x_google_ignoreList":[0]}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const worldwide = require("./worldwide.cjs");
4
- const ONE_SECOND_IN_MS = 1e3;
5
- function dateTimestampInSeconds() {
6
- return Date.now() / ONE_SECOND_IN_MS;
7
- }
8
- function createUnixTimestampInSecondsFunc() {
9
- const { performance } = worldwide.GLOBAL_OBJ;
10
- if (!performance || !performance.now) {
11
- return dateTimestampInSeconds;
12
- }
13
- const approxStartingTimeOrigin = Date.now() - performance.now();
14
- const timeOrigin = performance.timeOrigin == void 0 ? approxStartingTimeOrigin : performance.timeOrigin;
15
- return () => {
16
- return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;
17
- };
18
- }
19
- const timestampInSeconds = createUnixTimestampInSecondsFunc();
20
- (() => {
21
- const { performance } = worldwide.GLOBAL_OBJ;
22
- if (!performance || !performance.now) {
23
- return void 0;
24
- }
25
- const threshold = 3600 * 1e3;
26
- const performanceNow = performance.now();
27
- const dateNow = Date.now();
28
- const timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold;
29
- const timeOriginIsReliable = timeOriginDelta < threshold;
30
- const navigationStart = performance.timing && performance.timing.navigationStart;
31
- const hasNavigationStart = typeof navigationStart === "number";
32
- const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;
33
- const navigationStartIsReliable = navigationStartDelta < threshold;
34
- if (timeOriginIsReliable || navigationStartIsReliable) {
35
- if (timeOriginDelta <= navigationStartDelta) {
36
- return performance.timeOrigin;
37
- } else {
38
- return navigationStart;
39
- }
40
- }
41
- return dateNow;
42
- })();
43
- exports.dateTimestampInSeconds = dateTimestampInSeconds;
44
- exports.timestampInSeconds = timestampInSeconds;
45
- //# sourceMappingURL=time.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"time.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/time.js"],"sourcesContent":["import { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nfunction dateTimestampInSeconds() {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs };\n//# sourceMappingURL=time.js.map\n"],"names":["GLOBAL_OBJ"],"mappings":";;;AAEA,MAAM,mBAAmB;AAYzB,SAAS,yBAAyB;AAChC,SAAO,KAAK,IAAG,IAAK;AACtB;AAQA,SAAS,mCAAmC;AAC1C,QAAM,EAAE,YAAW,IAAKA,UAAAA;AACxB,MAAI,CAAC,eAAe,CAAC,YAAY,KAAK;AACpC,WAAO;AAAA,EACT;AAIA,QAAM,2BAA2B,KAAK,IAAG,IAAK,YAAY,IAAG;AAC7D,QAAM,aAAa,YAAY,cAAc,SAAY,2BAA2B,YAAY;AAWhG,SAAO,MAAM;AACX,YAAQ,aAAa,YAAY,IAAG,KAAM;AAAA,EAC5C;AACF;AAWK,MAAC,qBAAqB,iCAAgC;AAAA,CAmBrB,MAAM;AAK1C,QAAM,EAAE,YAAW,IAAKA,UAAAA;AACxB,MAAI,CAAC,eAAe,CAAC,YAAY,KAAK;AAEpC,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,OAAO;AACzB,QAAM,iBAAiB,YAAY,IAAG;AACtC,QAAM,UAAU,KAAK,IAAG;AAGxB,QAAM,kBAAkB,YAAY,aAChC,KAAK,IAAI,YAAY,aAAa,iBAAiB,OAAO,IAC1D;AACJ,QAAM,uBAAuB,kBAAkB;AAQ/C,QAAM,kBAAkB,YAAY,UAAU,YAAY,OAAO;AACjE,QAAM,qBAAqB,OAAO,oBAAoB;AAEtD,QAAM,uBAAuB,qBAAqB,KAAK,IAAI,kBAAkB,iBAAiB,OAAO,IAAI;AACzG,QAAM,4BAA4B,uBAAuB;AAEzD,MAAI,wBAAwB,2BAA2B;AAErD,QAAI,mBAAmB,sBAAsB;AAE3C,aAAO,YAAY;AAAA,IACrB,OAAO;AAEL,aAAO;AAAA,IACT;AAAA,EACF;AAIA,SAAO;AACT,GAAC;;;","x_google_ignoreList":[0]}
@@ -1,45 +0,0 @@
1
- import { GLOBAL_OBJ } from "./worldwide.js";
2
- const ONE_SECOND_IN_MS = 1e3;
3
- function dateTimestampInSeconds() {
4
- return Date.now() / ONE_SECOND_IN_MS;
5
- }
6
- function createUnixTimestampInSecondsFunc() {
7
- const { performance } = GLOBAL_OBJ;
8
- if (!performance || !performance.now) {
9
- return dateTimestampInSeconds;
10
- }
11
- const approxStartingTimeOrigin = Date.now() - performance.now();
12
- const timeOrigin = performance.timeOrigin == void 0 ? approxStartingTimeOrigin : performance.timeOrigin;
13
- return () => {
14
- return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;
15
- };
16
- }
17
- const timestampInSeconds = createUnixTimestampInSecondsFunc();
18
- (() => {
19
- const { performance } = GLOBAL_OBJ;
20
- if (!performance || !performance.now) {
21
- return void 0;
22
- }
23
- const threshold = 3600 * 1e3;
24
- const performanceNow = performance.now();
25
- const dateNow = Date.now();
26
- const timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold;
27
- const timeOriginIsReliable = timeOriginDelta < threshold;
28
- const navigationStart = performance.timing && performance.timing.navigationStart;
29
- const hasNavigationStart = typeof navigationStart === "number";
30
- const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;
31
- const navigationStartIsReliable = navigationStartDelta < threshold;
32
- if (timeOriginIsReliable || navigationStartIsReliable) {
33
- if (timeOriginDelta <= navigationStartDelta) {
34
- return performance.timeOrigin;
35
- } else {
36
- return navigationStart;
37
- }
38
- }
39
- return dateNow;
40
- })();
41
- export {
42
- dateTimestampInSeconds,
43
- timestampInSeconds
44
- };
45
- //# sourceMappingURL=time.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"time.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/time.js"],"sourcesContent":["import { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nfunction dateTimestampInSeconds() {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs };\n//# sourceMappingURL=time.js.map\n"],"names":[],"mappings":";AAEA,MAAM,mBAAmB;AAYzB,SAAS,yBAAyB;AAChC,SAAO,KAAK,IAAG,IAAK;AACtB;AAQA,SAAS,mCAAmC;AAC1C,QAAM,EAAE,YAAW,IAAK;AACxB,MAAI,CAAC,eAAe,CAAC,YAAY,KAAK;AACpC,WAAO;AAAA,EACT;AAIA,QAAM,2BAA2B,KAAK,IAAG,IAAK,YAAY,IAAG;AAC7D,QAAM,aAAa,YAAY,cAAc,SAAY,2BAA2B,YAAY;AAWhG,SAAO,MAAM;AACX,YAAQ,aAAa,YAAY,IAAG,KAAM;AAAA,EAC5C;AACF;AAWK,MAAC,qBAAqB,iCAAgC;AAAA,CAmBrB,MAAM;AAK1C,QAAM,EAAE,YAAW,IAAK;AACxB,MAAI,CAAC,eAAe,CAAC,YAAY,KAAK;AAEpC,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,OAAO;AACzB,QAAM,iBAAiB,YAAY,IAAG;AACtC,QAAM,UAAU,KAAK,IAAG;AAGxB,QAAM,kBAAkB,YAAY,aAChC,KAAK,IAAI,YAAY,aAAa,iBAAiB,OAAO,IAC1D;AACJ,QAAM,uBAAuB,kBAAkB;AAQ/C,QAAM,kBAAkB,YAAY,UAAU,YAAY,OAAO;AACjE,QAAM,qBAAqB,OAAO,oBAAoB;AAEtD,QAAM,uBAAuB,qBAAqB,KAAK,IAAI,kBAAkB,iBAAiB,OAAO,IAAI;AACzG,QAAM,4BAA4B,uBAAuB;AAEzD,MAAI,wBAAwB,2BAA2B;AAErD,QAAI,mBAAmB,sBAAsB;AAE3C,aAAO,YAAY;AAAA,IACrB,OAAO;AAEL,aAAO;AAAA,IACT;AAAA,EACF;AAIA,SAAO;AACT,GAAC;","x_google_ignoreList":[0]}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- function isGlobalObj(obj) {
4
- return obj && obj.Math == Math ? obj : void 0;
5
- }
6
- const GLOBAL_OBJ = typeof globalThis == "object" && isGlobalObj(globalThis) || // eslint-disable-next-line no-restricted-globals
7
- typeof window == "object" && isGlobalObj(window) || typeof self == "object" && isGlobalObj(self) || typeof global == "object" && isGlobalObj(global) || /* @__PURE__ */ function() {
8
- return this;
9
- }() || {};
10
- function getGlobalSingleton(name, creator, obj) {
11
- const gbl = obj || GLOBAL_OBJ;
12
- const __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {};
13
- const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
14
- return singleton;
15
- }
16
- exports.GLOBAL_OBJ = GLOBAL_OBJ;
17
- exports.getGlobalSingleton = getGlobalSingleton;
18
- //# sourceMappingURL=worldwide.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worldwide.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/utils/esm/worldwide.js"],"sourcesContent":["/** Internal global with common properties and Sentry extensions */\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function () {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nfunction getGlobalObject() {\n return GLOBAL_OBJ ;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexport { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton };\n//# sourceMappingURL=worldwide.js.map\n"],"names":[],"mappings":";;AA2BA,SAAS,YAAY,KAAK;AACxB,SAAO,OAAO,IAAI,QAAQ,OAAO,MAAM;AACzC;AAGK,MAAC,aACH,OAAO,cAAc,YAAY,YAAY,UAAU;AAEvD,OAAO,UAAU,YAAY,YAAY,MAAM,KAC/C,OAAO,QAAQ,YAAY,YAAY,IAAI,KAC3C,OAAO,UAAU,YAAY,YAAY,MAAM,KAC/C,2BAAY;AACX,SAAO;AACT,EAAC,KACD,CAAA;AAoBF,SAAS,mBAAmB,MAAM,SAAS,KAAK;AAC9C,QAAM,MAAO,OAAO;AACpB,QAAM,aAAc,IAAI,aAAa,IAAI,cAAc,CAAA;AACvD,QAAM,YAAY,WAAW,IAAI,MAAM,WAAW,IAAI,IAAI;AAC1D,SAAO;AACT;;;","x_google_ignoreList":[0]}
@@ -1,18 +0,0 @@
1
- function isGlobalObj(obj) {
2
- return obj && obj.Math == Math ? obj : void 0;
3
- }
4
- const GLOBAL_OBJ = typeof globalThis == "object" && isGlobalObj(globalThis) || // eslint-disable-next-line no-restricted-globals
5
- typeof window == "object" && isGlobalObj(window) || typeof self == "object" && isGlobalObj(self) || typeof global == "object" && isGlobalObj(global) || /* @__PURE__ */ function() {
6
- return this;
7
- }() || {};
8
- function getGlobalSingleton(name, creator, obj) {
9
- const gbl = obj || GLOBAL_OBJ;
10
- const __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {};
11
- const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
12
- return singleton;
13
- }
14
- export {
15
- GLOBAL_OBJ,
16
- getGlobalSingleton
17
- };
18
- //# sourceMappingURL=worldwide.js.map