@bynder/compact-view 5.2.1 → 5.2.2
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/AccessToken.js +5 -0
- package/AccessToken2.js +176 -0
- package/AccessToken3.js +4 -0
- package/ActiveFilter.js +6 -5
- package/ActiveFilters.js +24 -24
- package/AddMedia.js +1 -1
- package/AdditionalInfo.js +18 -0
- package/Advanced.js +3 -3
- package/App.js +46 -43
- package/Arrow.js +14 -0
- package/AssetCard.js +32 -29
- package/AssetCardMetaproperties.js +14 -13
- package/AssetFilter.js +36 -35
- package/AssetFilterContext.js +3 -3
- package/AssetItem.js +14 -13
- package/AssetList.js +7 -7
- package/AssetTypeItem.js +13 -12
- package/Autocomplete_new.js +41 -37
- package/Axios2.js +136 -0
- package/AxiosError.js +54 -0
- package/AxiosHeaders.js +181 -0
- package/AxiosURLSearchParams.js +33 -0
- package/Badge.js +44 -0
- package/Baloon.js +42 -0
- package/BaseStyles.js +10 -0
- package/Blob.js +4 -0
- package/Box.js +22 -0
- package/Button.js +39 -0
- package/Button.styles.js +40 -0
- package/ButtonAction.js +3 -3
- package/ButtonLegacy.js +48 -0
- package/ButtonLegacy.styles.js +28 -0
- package/CancelToken.js +77 -0
- package/CanceledError.js +11 -0
- package/Card.js +84 -0
- package/CardSkeleton.js +15 -14
- package/Checkbox.js +85 -0
- package/Checkbox.styles.js +2 -2
- package/Checkmark.js +7 -0
- package/Chip.js +70 -40
- package/Chip2.js +42 -0
- package/CollectionCard.js +9 -8
- package/CollectionItem.js +15 -14
- package/CollectionList.js +2 -2
- package/CollectionView.js +2 -2
- package/CollectionsView.js +6 -6
- package/ColorHexInput.js +31 -0
- package/ColorPicker.js +66 -0
- package/ColorPickerSolid.js +20 -0
- package/ColorPickerWithOpacity.js +37 -0
- package/Combobox.js +61 -0
- package/ConcealedAction.js +16 -0
- package/ConnectButton.js +1 -1
- package/Container.js +14 -13
- package/Container2.js +31 -0
- package/Content.js +16 -0
- package/ContextAction.js +18 -17
- package/ContextActionButton.js +29 -0
- package/ControlGroup.js +32 -0
- package/DOMFunctions.js +27 -0
- package/Dat.js +62 -50
- package/DatDropdownItem.js +20 -19
- package/DesignSystemContext.js +4 -4
- package/DesignSystemProvider.js +29 -0
- package/DirectionSelect.js +16 -15
- package/Divider.js +21 -0
- package/DomainInput.js +15 -14
- package/DragRange.js +25 -0
- package/DragSelect.js +11 -11
- package/Dropdown.js +12 -11
- package/Dropdown2.js +169 -0
- package/DropdownContent.js +2 -2
- package/DropdownListItem.js +3 -3
- package/Enum.js +12 -0
- package/ErrorMessage.js +20 -19
- package/FieldSelect.js +4 -4
- package/FilePlaceholder.js +19 -0
- package/FileSelector.js +11 -10
- package/Flex.js +21 -0
- package/FontPicker.js +104 -0
- package/Footer.js +16 -0
- package/Form.js +23 -0
- package/FormData.js +4 -0
- package/Frame.js +64 -0
- package/Group.js +17 -0
- package/Group2.js +26 -0
- package/Header2.js +43 -0
- package/Header22.js +15 -0
- package/HelperText.js +26 -0
- package/HorizontalScroll.js +4 -4
- package/HttpHandler.js +74 -0
- package/HttpResponse.js +85 -0
- package/HttpStatusCode.js +71 -0
- package/IconPlaceholder.js +18 -0
- package/Image.js +19 -0
- package/Images.js +30 -0
- package/Indicator.js +74 -0
- package/InfiniteScroll.js +8 -8
- package/InlineBanner.js +51 -0
- package/Input.js +109 -0
- package/Input.styles.js +71 -0
- package/InputContainer.js +9 -0
- package/InputField.js +74 -0
- package/InputRow.js +18 -0
- package/Inspector.js +34 -0
- package/InteractiveIcon.js +28 -0
- package/InterceptorManager.js +58 -0
- package/Item.js +107 -0
- package/Item2.js +14 -0
- package/Item4.js +190 -0
- package/Label.js +33 -0
- package/LeftArrow.js +3 -3
- package/List.js +25 -0
- package/ListItem.js +11 -0
- package/ListItem2.js +58 -0
- package/ListItem4.js +37 -0
- package/MetapropertyFilterContent.js +2 -2
- package/MetapropertyOption.js +2 -3
- package/Middleware.js +49 -0
- package/Middleware2.js +49 -0
- package/Modal.js +2 -2
- package/Modal2.js +31 -0
- package/ModalBase.js +117 -0
- package/ModalBase.styles.js +75 -0
- package/ModalConfirmation.js +8 -0
- package/NoResults.js +16 -15
- package/OffsetContext.js +9 -0
- package/Oops.js +1 -1
- package/OpacityInput.js +17 -0
- package/Option_new.js +19 -18
- package/Overlay.js +35 -0
- package/Parser.js +131 -0
- package/Prefixer.js +187 -0
- package/Radio.js +78 -0
- package/RadioGroup.js +25 -0
- package/RangeInput.js +41 -0
- package/RefreshingSpinner.js +3 -3
- package/ReportModal.js +16 -14
- package/RequestHandler.js +119 -0
- package/RightArrow.js +4 -4
- package/Row.js +16 -0
- package/SearchInput.js +15 -15
- package/SearchInput2.js +46 -0
- package/SectionTitle.js +17 -0
- package/Select.js +49 -0
- package/SelectButtonText.js +16 -0
- package/SelectedItemContainer.js +11 -10
- package/SelectedItems.js +2 -2
- package/SelectionFooter.js +8 -7
- package/Serializer.js +27 -0
- package/ShadowRootInternal.js +17 -17
- package/Sidebar.js +17 -0
- package/Skeleton.js +6 -6
- package/Slider.constants.js +6 -0
- package/Slider.js +128 -0
- package/SmartFilterContent.js +2 -2
- package/SmartFilterSelect_new.js +2 -2
- package/Smartfilters_new.js +53 -50
- package/Spinner.js +2 -2
- package/Spinner2.js +15 -0
- package/StatefulAssetList.js +15 -15
- package/Stats.js +16 -0
- package/StatsItem.js +23 -0
- package/Status.js +32 -0
- package/Switch.js +82 -0
- package/SwitchNLS.js +26 -23
- package/Tabs2.js +10 -0
- package/TagItem.js +8 -8
- package/Tags.js +9 -9
- package/Text2.js +11 -0
- package/Text22.js +18 -0
- package/Text4.js +18 -0
- package/Textarea.js +92 -0
- package/Theming.js +4 -4
- package/Thumb.js +28 -0
- package/Thumbnail.js +91 -0
- package/Tokenizer.js +147 -0
- package/Toolbar.js +13 -12
- package/Tooltip.js +2 -2
- package/Tooltip2.js +111 -0
- package/TruncatedText.js +34 -0
- package/URLSearchParams.js +5 -0
- package/Utility.js +56 -0
- package/ViewSwitch.js +8 -7
- package/_check_private_redeclaration.js +7 -0
- package/_class_apply_descriptor_get.js +6 -0
- package/_class_apply_descriptor_set.js +11 -0
- package/_class_extract_field_descriptor.js +7 -0
- package/_class_private_field_get.js +9 -0
- package/_class_private_field_init.js +7 -0
- package/_class_private_field_set.js +9 -0
- package/_commonjsHelpers.js +6 -0
- package/adapters.js +53 -0
- package/api.js +25 -0
- package/api2.js +40 -0
- package/api3.js +406 -0
- package/applyScopeDataToEvent.js +83 -0
- package/applyScopeDataToEvent2.js +55 -0
- package/asset.type.js +9 -9
- package/autocomplete.js +2 -2
- package/axios.js +46 -0
- package/base.js +57 -0
- package/baseclient.js +498 -0
- package/bind.js +8 -0
- package/browser.js +44 -0
- package/buildFullPath.js +9 -0
- package/buildURL.js +23 -0
- package/bundle.esm.js +81 -0
- package/calculateContainerMaxHeight.js +12 -0
- package/calculateNodeHeight.js +35 -0
- package/carrier.js +13 -0
- package/chain.js +8 -0
- package/checkGlobals.js +13 -0
- package/checks.js +178 -0
- package/chunk-6HYIRFX2.js +1 -0
- package/cleanUrl.js +11 -0
- package/client.js +76 -0
- package/clientreport.js +15 -0
- package/clsx.js +17 -0
- package/colorTransforms.js +12 -0
- package/combineMetaproperties.js +1 -1
- package/combineURLs.js +6 -0
- package/composeSignals.js +30 -0
- package/constants.js +2 -12
- package/constants2.js +82 -0
- package/constants3.js +14 -0
- package/constants4.js +8 -0
- package/constants5.js +4 -0
- package/constants6.js +4 -0
- package/context.js +12 -0
- package/context10.js +12 -0
- package/context2.js +9 -0
- package/context3.js +12 -0
- package/context6.js +5 -0
- package/cookieStore.js +116 -0
- package/cookies.js +32 -0
- package/core.js +42 -0
- package/currentScopes.js +9 -0
- package/data.js +4 -0
- package/de_DE.json.js +18 -0
- package/debug-build.js +4 -0
- package/debug-build2.js +4 -0
- package/debug-build3.js +4 -0
- package/debug-build4.js +4 -0
- package/debug-build5.js +4 -0
- package/debug-build6.js +4 -0
- package/decorators.js +37 -0
- package/defaultScopes.js +12 -0
- package/devUtils.js +20 -0
- package/dispatchRequest.js +31 -0
- package/doc.js +26 -0
- package/domHelpers.js +15 -0
- package/dsn.js +54 -0
- package/dynamicSamplingContext.js +34 -0
- package/dynamicSamplingContext2.js +34 -0
- package/emotion-unitless.esm.js +52 -0
- package/en_US.json.js +23 -0
- package/englishText-12403056.js +6 -0
- package/env.js +6 -0
- package/envelope.js +113 -0
- package/envelope2.js +23 -0
- package/envelope3.js +24 -0
- package/error.js +9 -0
- package/errors.js +33 -0
- package/errors2.js +55 -0
- package/es_ES.json.js +18 -0
- package/es_MX.json.js +18 -0
- package/eventProcessors.js +27 -0
- package/eventProcessors2.js +23 -0
- package/eventbuilder.js +128 -0
- package/exports.js +11 -0
- package/exports2.js +16 -0
- package/exports3.js +8 -0
- package/fetch.js +44 -0
- package/fetch2.js +141 -0
- package/filterAssets.js +1 -1
- package/fixFontSpaceInUrl.js +8 -0
- package/focusWithoutScrolling.js +45 -0
- package/forceHiddenStyles.js +19 -0
- package/formDataToJSON.js +31 -0
- package/fr_FR.json.js +18 -0
- package/getAbsoluteUrl.js +13 -0
- package/getAsset.js +1 -1
- package/getAssetCounts.js +1 -1
- package/getAssets.js +2 -2
- package/getCallFrame.js +12 -0
- package/getCollections.js +1 -1
- package/getFilterOptions.js +1 -1
- package/getFilters.js +1 -1
- package/getFilters_new.js +1 -1
- package/getRequestCookies.js +40 -0
- package/getRootSpan.js +6 -0
- package/getRootSpan2.js +6 -0
- package/getSimilarityAssets.js +1 -1
- package/getSizingData.js +45 -0
- package/getStatusCodeColor.js +6 -0
- package/getThumbPosition.js +6 -0
- package/getTimestamp.js +7 -0
- package/getUseLayerOptions.js +49 -0
- package/handlers.js +92 -6
- package/handlers2.js +6 -0
- package/helpers.js +3 -4
- package/helpers2.js +6 -0
- package/hexFromPercentage.js +7 -0
- package/http.js +17 -0
- package/hub.js +446 -0
- package/hub2.js +442 -0
- package/immer.js +472 -0
- package/import.js +7 -0
- package/index-esm.js +10781 -0
- package/index-esm2.js +138 -0
- package/index-esm3.js +131 -0
- package/index.browser.js +11 -0
- package/index.module.js +57 -0
- package/index.module2.js +72 -0
- package/index.module3.js +57 -0
- package/index10.js +20 -0
- package/index102.js +273 -0
- package/index11.js +18 -0
- package/index112.js +29 -0
- package/index12.js +38 -0
- package/index13.js +2432 -0
- package/index14.js +558 -0
- package/index15.js +58 -0
- package/index16.js +4 -0
- package/index17.js +89 -0
- package/index18.js +9 -0
- package/index19.js +62 -0
- package/index20.js +15 -0
- package/index21.js +11 -0
- package/index22.js +42 -0
- package/index23.js +9 -0
- package/index24.js +10 -0
- package/index25.js +7 -0
- package/index26.js +12 -0
- package/index27.js +11 -0
- package/index28.js +639 -0
- package/index29.js +76 -0
- package/index3.js +5 -53
- package/index30.js +7 -0
- package/index31.js +22 -0
- package/index32.js +2 -0
- package/index33.js +7 -0
- package/index34.js +20 -0
- package/index35.js +8 -0
- package/index36.js +4 -0
- package/index37.js +13 -0
- package/index38.js +13 -0
- package/index39.js +15 -0
- package/index4.js +1684 -17
- package/index40.js +13 -0
- package/index41.js +21 -0
- package/index42.js +66 -0
- package/index43.js +8 -0
- package/index44.js +57 -0
- package/index45.js +69 -0
- package/index46.js +33 -0
- package/index47.js +13 -0
- package/index48.js +123 -0
- package/index49.js +88 -0
- package/index5.js +27 -0
- package/index50.js +10 -0
- package/index51.js +13 -0
- package/index52.js +16 -0
- package/index53.js +16 -0
- package/index54.js +9 -0
- package/index55.js +9 -0
- package/index56.js +17 -0
- package/index57.js +31 -0
- package/index58.js +18 -0
- package/index6.js +315 -0
- package/index7.js +4 -0
- package/index72.js +228 -0
- package/index8.js +5051 -0
- package/index82.js +8 -0
- package/index9.js +55 -0
- package/index92.js +12 -0
- package/integration.js +38 -0
- package/is.js +77 -0
- package/is2.js +14 -0
- package/is3.js +14 -0
- package/isAbsoluteURL.js +6 -0
- package/isAbsoluteUrl2.js +6 -0
- package/isAxiosError.js +7 -0
- package/isCancel.js +6 -0
- package/isIterable.js +6 -0
- package/isStringEqual.js +6 -0
- package/isURLSameOrigin.js +8 -0
- package/isValidHexValue.js +6 -0
- package/isVirtualEvent.js +11 -0
- package/iso.js +38 -0
- package/it_IT.json.js +18 -0
- package/itemContext.js +5 -0
- package/ja_JP.json.js +18 -0
- package/ko_KR.json.js +18 -0
- package/localStorageHelper.js +32 -0
- package/localStorageHelper2.js +4 -0
- package/localization.js +46 -0
- package/logger2.js +56 -0
- package/logger3.js +56 -0
- package/logger4.js +56 -0
- package/makeHexWithOpacity.js +12 -0
- package/makeInternalTokens.js +22 -0
- package/matchRequestUrl.js +23 -0
- package/memo.js +25 -0
- package/merge.js +13 -0
- package/mergeConfig.js +70 -0
- package/mergeProps.js +22 -0
- package/mergeRefs.js +9 -0
- package/middleware.js +177 -0
- package/middleware2.js +177 -0
- package/misc.js +58 -0
- package/misc2.js +28 -0
- package/misc3.js +24 -0
- package/nl_NL.json.js +18 -0
- package/normalize.js +97 -0
- package/normalizePath.js +11 -0
- package/normalizeResponse.js +1 -1
- package/normalizeRows.js +10 -0
- package/notify.js +52 -0
- package/null.js +4 -0
- package/object.js +110 -0
- package/object2.js +39 -0
- package/object3.js +17 -0
- package/opacityPercentageFromHex.js +9 -0
- package/openLink.js +27 -0
- package/package.json +1 -1
- package/packageVersion.js +4 -0
- package/parse.js +9 -0
- package/parse2.js +44 -0
- package/parseHeaders.js +30 -0
- package/parseProtocol.js +7 -0
- package/pl_PL.json.js +18 -0
- package/platform.js +42 -0
- package/prepareEvent.js +141 -0
- package/prepareEvent2.js +5 -0
- package/prepareEvent3.js +5 -0
- package/progressEventReducer.js +35 -0
- package/promisebuffer.js +44 -0
- package/propagationContext.js +11 -0
- package/pt_BR.json.js +18 -0
- package/ratelimit.js +37 -0
- package/react.js +19 -0
- package/react2.js +19 -0
- package/regexes.js +51 -0
- package/registries.js +41 -0
- package/resolveConfig.js +33 -0
- package/ru_RU.json.js +18 -0
- package/runAfterTransition.js +35 -0
- package/schemas.js +368 -0
- package/schemas2.js +691 -0
- package/scope.js +412 -0
- package/scope2.js +407 -0
- package/scope3.js +348 -0
- package/sdk-DhxX43BH.js +4813 -0
- package/sdkMetadata.js +15 -0
- package/serializeRequest.js +12 -0
- package/serializeResponse.js +14 -0
- package/session.js +57 -0
- package/session2.js +57 -0
- package/session3.js +16 -0
- package/settle.js +14 -0
- package/shadowdom.js +13 -0
- package/shadowdom2.js +13 -0
- package/spanOnScope.js +12 -0
- package/spanUtils.js +31 -0
- package/spanUtils2.js +31 -0
- package/speedometer.js +19 -0
- package/spread.js +8 -0
- package/stack-parsers.js +48 -0
- package/stackStrategy.js +98 -0
- package/stacktrace.js +49 -0
- package/state.js +106 -0
- package/store/useDatStore.d.ts +11 -8
- package/string.js +6 -0
- package/styled-components.browser.esm.js +530 -0
- package/styles.js +55 -0
- package/styles2.js +17 -0
- package/supports.js +6 -0
- package/syncpromise.js +121 -0
- package/syncpromise2.js +109 -0
- package/textSelection.js +33 -0
- package/textStyles.js +20 -0
- package/theme.js +238 -0
- package/themeContainers.js +20 -0
- package/themes3.js +26 -0
- package/throttle.js +15 -0
- package/time.js +24 -0
- package/time2.js +24 -0
- package/time3.js +24 -0
- package/toFormData.js +85 -0
- package/toPublicUrl.js +9 -0
- package/toURLEncodedForm.js +13 -0
- package/token.js +236 -0
- package/tokenExpirationHelper.js +48 -0
- package/tokenExpirationHelper2.js +4 -0
- package/tokensAndThemes.js +92 -0
- package/tr_TR.json.js +18 -0
- package/trackStream.js +63 -0
- package/transformData.js +13 -0
- package/transitional.js +8 -0
- package/trimMetapropertyValue.js +1 -1
- package/tslib.es6.js +18 -0
- package/typeof.js +11 -0
- package/urlHelper.js +15 -0
- package/urlHelper2.js +4 -0
- package/useAutoHeight.js +25 -0
- package/useDatStore.js +31 -27
- package/useEffectEvent.js +18 -0
- package/useFocus.js +30 -0
- package/useFocusRing.js +34 -0
- package/useFocusVisible.js +92 -0
- package/useFocusWithin.js +57 -0
- package/useFonts.js +118 -0
- package/useGlobalListeners.js +34 -0
- package/useGroupContext.js +10 -0
- package/useHover.js +79 -0
- package/useId.js +8 -0
- package/useId2.js +17 -0
- package/useKeyDown.js +14 -0
- package/useLayoutEffect.js +6 -0
- package/useOrderingStore.js +6 -6
- package/usePress.js +359 -0
- package/useRouterStore.js +6 -6
- package/useScrollHighlightedIntoView.js +24 -0
- package/useSearchStore.js +5 -5
- package/useSimilaritySearchStore.js +6 -6
- package/useSyncRef.js +12 -0
- package/useTranslate.js +13 -0
- package/useZIndex.js +9 -0
- package/userfeedback.js +28 -0
- package/util.js +265 -0
- package/utils/fixFontSpaceInUrl.d.ts +1 -0
- package/utils.js +26 -44
- package/utils2.js +43 -45
- package/utils3.js +50 -0
- package/utils4.js +12 -0
- package/utils5.js +71 -0
- package/utils6.js +222 -0
- package/utils7.js +9 -0
- package/utils8.js +70 -0
- package/validator.js +54 -0
- package/vanilla.js +14 -0
- package/vanilla2.js +14 -0
- package/version.js +4 -0
- package/version2.js +4 -0
- package/version3.js +4 -0
- package/versionContext.js +9 -0
- package/versions.js +8 -0
- package/worldwide.js +19 -0
- package/worldwide2.js +15 -0
- package/worldwide3.js +10 -0
- package/xhr.js +71 -0
- package/zh_CN.json.js +18 -0
- package/zh_TW.json.js +18 -0
package/hub2.js
ADDED
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { DEFAULT_ENVIRONMENT as b } from "./constants6.js";
|
|
2
|
+
import { DEBUG_BUILD as g } from "./debug-build4.js";
|
|
3
|
+
import { Scope as d } from "./scope2.js";
|
|
4
|
+
import { closeSession as x, makeSession as I, updateSession as v } from "./session2.js";
|
|
5
|
+
import { SDK_VERSION as C } from "./version2.js";
|
|
6
|
+
import { GLOBAL_OBJ as p, getGlobalSingleton as k } from "./worldwide2.js";
|
|
7
|
+
import { isThenable as R } from "./is2.js";
|
|
8
|
+
import { uuid4 as h } from "./misc2.js";
|
|
9
|
+
import { consoleSandbox as N, logger as a } from "./logger3.js";
|
|
10
|
+
import { dateTimestampInSeconds as y } from "./time2.js";
|
|
11
|
+
const E = parseFloat(C), B = 100;
|
|
12
|
+
class T {
|
|
13
|
+
/** Is a {@link Layer}[] containing the client and scope */
|
|
14
|
+
/** Contains the last event id of a captured event. */
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new instance of the hub, will push one {@link Layer} into the
|
|
17
|
+
* internal stack on creation.
|
|
18
|
+
*
|
|
19
|
+
* @param client bound to the hub.
|
|
20
|
+
* @param scope bound to the hub.
|
|
21
|
+
* @param version number, higher number means higher priority.
|
|
22
|
+
*
|
|
23
|
+
* @deprecated Instantiation of Hub objects is deprecated and the constructor will be removed in version 8 of the SDK.
|
|
24
|
+
*
|
|
25
|
+
* If you are currently using the Hub for multi-client use like so:
|
|
26
|
+
*
|
|
27
|
+
* ```
|
|
28
|
+
* // OLD
|
|
29
|
+
* const hub = new Hub();
|
|
30
|
+
* hub.bindClient(client);
|
|
31
|
+
* makeMain(hub)
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* instead initialize the client as follows:
|
|
35
|
+
*
|
|
36
|
+
* ```
|
|
37
|
+
* // NEW
|
|
38
|
+
* Sentry.withIsolationScope(() => {
|
|
39
|
+
* Sentry.setCurrentClient(client);
|
|
40
|
+
* client.init();
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* If you are using the Hub to capture events like so:
|
|
45
|
+
*
|
|
46
|
+
* ```
|
|
47
|
+
* // OLD
|
|
48
|
+
* const client = new Client();
|
|
49
|
+
* const hub = new Hub(client);
|
|
50
|
+
* hub.captureException()
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* instead capture isolated events as follows:
|
|
54
|
+
*
|
|
55
|
+
* ```
|
|
56
|
+
* // NEW
|
|
57
|
+
* const client = new Client();
|
|
58
|
+
* const scope = new Scope();
|
|
59
|
+
* scope.setClient(client);
|
|
60
|
+
* scope.captureException();
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
constructor(t, e, s, n = E) {
|
|
64
|
+
this._version = n;
|
|
65
|
+
let i;
|
|
66
|
+
e ? i = e : (i = new d(), i.setClient(t));
|
|
67
|
+
let r;
|
|
68
|
+
s ? r = s : (r = new d(), r.setClient(t)), this._stack = [{ scope: i }], t && this.bindClient(t), this._isolationScope = r;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Checks if this hub's version is older than the given version.
|
|
72
|
+
*
|
|
73
|
+
* @param version A version number to compare to.
|
|
74
|
+
* @return True if the given version is newer; otherwise false.
|
|
75
|
+
*
|
|
76
|
+
* @deprecated This will be removed in v8.
|
|
77
|
+
*/
|
|
78
|
+
isOlderThan(t) {
|
|
79
|
+
return this._version < t;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* This binds the given client to the current scope.
|
|
83
|
+
* @param client An SDK client (client) instance.
|
|
84
|
+
*
|
|
85
|
+
* @deprecated Use `initAndBind()` directly, or `setCurrentClient()` and/or `client.init()` instead.
|
|
86
|
+
*/
|
|
87
|
+
bindClient(t) {
|
|
88
|
+
const e = this.getStackTop();
|
|
89
|
+
e.client = t, e.scope.setClient(t), t && t.setupIntegrations && t.setupIntegrations();
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @inheritDoc
|
|
93
|
+
*
|
|
94
|
+
* @deprecated Use `withScope` instead.
|
|
95
|
+
*/
|
|
96
|
+
pushScope() {
|
|
97
|
+
const t = this.getScope().clone();
|
|
98
|
+
return this.getStack().push({
|
|
99
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
100
|
+
client: this.getClient(),
|
|
101
|
+
scope: t
|
|
102
|
+
}), t;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @inheritDoc
|
|
106
|
+
*
|
|
107
|
+
* @deprecated Use `withScope` instead.
|
|
108
|
+
*/
|
|
109
|
+
popScope() {
|
|
110
|
+
return this.getStack().length <= 1 ? !1 : !!this.getStack().pop();
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @inheritDoc
|
|
114
|
+
*
|
|
115
|
+
* @deprecated Use `Sentry.withScope()` instead.
|
|
116
|
+
*/
|
|
117
|
+
withScope(t) {
|
|
118
|
+
const e = this.pushScope();
|
|
119
|
+
let s;
|
|
120
|
+
try {
|
|
121
|
+
s = t(e);
|
|
122
|
+
} catch (n) {
|
|
123
|
+
throw this.popScope(), n;
|
|
124
|
+
}
|
|
125
|
+
return R(s) ? s.then(
|
|
126
|
+
(n) => (this.popScope(), n),
|
|
127
|
+
(n) => {
|
|
128
|
+
throw this.popScope(), n;
|
|
129
|
+
}
|
|
130
|
+
) : (this.popScope(), s);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @inheritDoc
|
|
134
|
+
*
|
|
135
|
+
* @deprecated Use `Sentry.getClient()` instead.
|
|
136
|
+
*/
|
|
137
|
+
getClient() {
|
|
138
|
+
return this.getStackTop().client;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Returns the scope of the top stack.
|
|
142
|
+
*
|
|
143
|
+
* @deprecated Use `Sentry.getCurrentScope()` instead.
|
|
144
|
+
*/
|
|
145
|
+
getScope() {
|
|
146
|
+
return this.getStackTop().scope;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Use `Sentry.getIsolationScope()` instead.
|
|
150
|
+
*/
|
|
151
|
+
getIsolationScope() {
|
|
152
|
+
return this._isolationScope;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Returns the scope stack for domains or the process.
|
|
156
|
+
* @deprecated This will be removed in v8.
|
|
157
|
+
*/
|
|
158
|
+
getStack() {
|
|
159
|
+
return this._stack;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Returns the topmost scope layer in the order domain > local > process.
|
|
163
|
+
* @deprecated This will be removed in v8.
|
|
164
|
+
*/
|
|
165
|
+
getStackTop() {
|
|
166
|
+
return this._stack[this._stack.length - 1];
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* @inheritDoc
|
|
170
|
+
*
|
|
171
|
+
* @deprecated Use `Sentry.captureException()` instead.
|
|
172
|
+
*/
|
|
173
|
+
captureException(t, e) {
|
|
174
|
+
const s = this._lastEventId = e && e.event_id ? e.event_id : h(), n = new Error("Sentry syntheticException");
|
|
175
|
+
return this.getScope().captureException(t, {
|
|
176
|
+
originalException: t,
|
|
177
|
+
syntheticException: n,
|
|
178
|
+
...e,
|
|
179
|
+
event_id: s
|
|
180
|
+
}), s;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* @inheritDoc
|
|
184
|
+
*
|
|
185
|
+
* @deprecated Use `Sentry.captureMessage()` instead.
|
|
186
|
+
*/
|
|
187
|
+
captureMessage(t, e, s) {
|
|
188
|
+
const n = this._lastEventId = s && s.event_id ? s.event_id : h(), i = new Error(t);
|
|
189
|
+
return this.getScope().captureMessage(t, e, {
|
|
190
|
+
originalException: t,
|
|
191
|
+
syntheticException: i,
|
|
192
|
+
...s,
|
|
193
|
+
event_id: n
|
|
194
|
+
}), n;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* @inheritDoc
|
|
198
|
+
*
|
|
199
|
+
* @deprecated Use `Sentry.captureEvent()` instead.
|
|
200
|
+
*/
|
|
201
|
+
captureEvent(t, e) {
|
|
202
|
+
const s = e && e.event_id ? e.event_id : h();
|
|
203
|
+
return t.type || (this._lastEventId = s), this.getScope().captureEvent(t, { ...e, event_id: s }), s;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* @inheritDoc
|
|
207
|
+
*
|
|
208
|
+
* @deprecated This will be removed in v8.
|
|
209
|
+
*/
|
|
210
|
+
lastEventId() {
|
|
211
|
+
return this._lastEventId;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* @inheritDoc
|
|
215
|
+
*
|
|
216
|
+
* @deprecated Use `Sentry.addBreadcrumb()` instead.
|
|
217
|
+
*/
|
|
218
|
+
addBreadcrumb(t, e) {
|
|
219
|
+
const { scope: s, client: n } = this.getStackTop();
|
|
220
|
+
if (!n) return;
|
|
221
|
+
const { beforeBreadcrumb: i = null, maxBreadcrumbs: r = B } = n.getOptions && n.getOptions() || {};
|
|
222
|
+
if (r <= 0) return;
|
|
223
|
+
const c = { timestamp: y(), ...t }, S = i ? N(() => i(c, e)) : c;
|
|
224
|
+
S !== null && (n.emit && n.emit("beforeAddBreadcrumb", S, e), s.addBreadcrumb(S, r));
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* @inheritDoc
|
|
228
|
+
* @deprecated Use `Sentry.setUser()` instead.
|
|
229
|
+
*/
|
|
230
|
+
setUser(t) {
|
|
231
|
+
this.getScope().setUser(t), this.getIsolationScope().setUser(t);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* @inheritDoc
|
|
235
|
+
* @deprecated Use `Sentry.setTags()` instead.
|
|
236
|
+
*/
|
|
237
|
+
setTags(t) {
|
|
238
|
+
this.getScope().setTags(t), this.getIsolationScope().setTags(t);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* @inheritDoc
|
|
242
|
+
* @deprecated Use `Sentry.setExtras()` instead.
|
|
243
|
+
*/
|
|
244
|
+
setExtras(t) {
|
|
245
|
+
this.getScope().setExtras(t), this.getIsolationScope().setExtras(t);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* @inheritDoc
|
|
249
|
+
* @deprecated Use `Sentry.setTag()` instead.
|
|
250
|
+
*/
|
|
251
|
+
setTag(t, e) {
|
|
252
|
+
this.getScope().setTag(t, e), this.getIsolationScope().setTag(t, e);
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* @inheritDoc
|
|
256
|
+
* @deprecated Use `Sentry.setExtra()` instead.
|
|
257
|
+
*/
|
|
258
|
+
setExtra(t, e) {
|
|
259
|
+
this.getScope().setExtra(t, e), this.getIsolationScope().setExtra(t, e);
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* @inheritDoc
|
|
263
|
+
* @deprecated Use `Sentry.setContext()` instead.
|
|
264
|
+
*/
|
|
265
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
266
|
+
setContext(t, e) {
|
|
267
|
+
this.getScope().setContext(t, e), this.getIsolationScope().setContext(t, e);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @inheritDoc
|
|
271
|
+
*
|
|
272
|
+
* @deprecated Use `getScope()` directly.
|
|
273
|
+
*/
|
|
274
|
+
configureScope(t) {
|
|
275
|
+
const { scope: e, client: s } = this.getStackTop();
|
|
276
|
+
s && t(e);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* @inheritDoc
|
|
280
|
+
*/
|
|
281
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
282
|
+
run(t) {
|
|
283
|
+
const e = f(this);
|
|
284
|
+
try {
|
|
285
|
+
t(this);
|
|
286
|
+
} finally {
|
|
287
|
+
f(e);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @inheritDoc
|
|
292
|
+
* @deprecated Use `Sentry.getClient().getIntegrationByName()` instead.
|
|
293
|
+
*/
|
|
294
|
+
getIntegration(t) {
|
|
295
|
+
const e = this.getClient();
|
|
296
|
+
if (!e) return null;
|
|
297
|
+
try {
|
|
298
|
+
return e.getIntegration(t);
|
|
299
|
+
} catch {
|
|
300
|
+
return g && a.warn(`Cannot retrieve integration ${t.id} from the current Hub`), null;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
|
|
305
|
+
*
|
|
306
|
+
* A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
|
|
307
|
+
* new child span within the transaction or any span, call the respective `.startChild()` method.
|
|
308
|
+
*
|
|
309
|
+
* Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
|
|
310
|
+
*
|
|
311
|
+
* The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its
|
|
312
|
+
* finished child spans will be sent to Sentry.
|
|
313
|
+
*
|
|
314
|
+
* @param context Properties of the new `Transaction`.
|
|
315
|
+
* @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
|
|
316
|
+
* default values). See {@link Options.tracesSampler}.
|
|
317
|
+
*
|
|
318
|
+
* @returns The transaction which was just started
|
|
319
|
+
*
|
|
320
|
+
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
|
|
321
|
+
*/
|
|
322
|
+
startTransaction(t, e) {
|
|
323
|
+
const s = this._callExtensionMethod("startTransaction", t, e);
|
|
324
|
+
return g && !s && (this.getClient() ? a.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
325
|
+
Sentry.addTracingExtensions();
|
|
326
|
+
Sentry.init({...});
|
|
327
|
+
`) : a.warn(
|
|
328
|
+
"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'"
|
|
329
|
+
)), s;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* @inheritDoc
|
|
333
|
+
* @deprecated Use `spanToTraceHeader()` instead.
|
|
334
|
+
*/
|
|
335
|
+
traceHeaders() {
|
|
336
|
+
return this._callExtensionMethod("traceHeaders");
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* @inheritDoc
|
|
340
|
+
*
|
|
341
|
+
* @deprecated Use top level `captureSession` instead.
|
|
342
|
+
*/
|
|
343
|
+
captureSession(t = !1) {
|
|
344
|
+
if (t)
|
|
345
|
+
return this.endSession();
|
|
346
|
+
this._sendSessionUpdate();
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* @inheritDoc
|
|
350
|
+
* @deprecated Use top level `endSession` instead.
|
|
351
|
+
*/
|
|
352
|
+
endSession() {
|
|
353
|
+
const e = this.getStackTop().scope, s = e.getSession();
|
|
354
|
+
s && x(s), this._sendSessionUpdate(), e.setSession();
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* @inheritDoc
|
|
358
|
+
* @deprecated Use top level `startSession` instead.
|
|
359
|
+
*/
|
|
360
|
+
startSession(t) {
|
|
361
|
+
const { scope: e, client: s } = this.getStackTop(), { release: n, environment: i = b } = s && s.getOptions() || {}, { userAgent: r } = p.navigator || {}, l = I({
|
|
362
|
+
release: n,
|
|
363
|
+
environment: i,
|
|
364
|
+
user: e.getUser(),
|
|
365
|
+
...r && { userAgent: r },
|
|
366
|
+
...t
|
|
367
|
+
}), c = e.getSession && e.getSession();
|
|
368
|
+
return c && c.status === "ok" && v(c, { status: "exited" }), this.endSession(), e.setSession(l), l;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Returns if default PII should be sent to Sentry and propagated in ourgoing requests
|
|
372
|
+
* when Tracing is used.
|
|
373
|
+
*
|
|
374
|
+
* @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function
|
|
375
|
+
* only unnecessarily increased API surface but only wrapped accessing the option.
|
|
376
|
+
*/
|
|
377
|
+
shouldSendDefaultPii() {
|
|
378
|
+
const t = this.getClient(), e = t && t.getOptions();
|
|
379
|
+
return !!(e && e.sendDefaultPii);
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Sends the current Session on the scope
|
|
383
|
+
*/
|
|
384
|
+
_sendSessionUpdate() {
|
|
385
|
+
const { scope: t, client: e } = this.getStackTop(), s = t.getSession();
|
|
386
|
+
s && e && e.captureSession && e.captureSession(s);
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Calls global extension method and binding current instance to the function call
|
|
390
|
+
*/
|
|
391
|
+
// @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
|
|
392
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
393
|
+
_callExtensionMethod(t, ...e) {
|
|
394
|
+
const n = u().__SENTRY__;
|
|
395
|
+
if (n && n.extensions && typeof n.extensions[t] == "function")
|
|
396
|
+
return n.extensions[t].apply(this, e);
|
|
397
|
+
g && a.warn(`Extension method ${t} couldn't be found, doing nothing.`);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function u() {
|
|
401
|
+
return p.__SENTRY__ = p.__SENTRY__ || {
|
|
402
|
+
extensions: {},
|
|
403
|
+
hub: void 0
|
|
404
|
+
}, p;
|
|
405
|
+
}
|
|
406
|
+
function f(o) {
|
|
407
|
+
const t = u(), e = _(t);
|
|
408
|
+
return m(t, o), e;
|
|
409
|
+
}
|
|
410
|
+
function V() {
|
|
411
|
+
const o = u();
|
|
412
|
+
if (o.__SENTRY__ && o.__SENTRY__.acs) {
|
|
413
|
+
const t = o.__SENTRY__.acs.getCurrentHub();
|
|
414
|
+
if (t)
|
|
415
|
+
return t;
|
|
416
|
+
}
|
|
417
|
+
return O(o);
|
|
418
|
+
}
|
|
419
|
+
function O(o = u()) {
|
|
420
|
+
return (!w(o) || // eslint-disable-next-line deprecation/deprecation
|
|
421
|
+
_(o).isOlderThan(E)) && m(o, new T()), _(o);
|
|
422
|
+
}
|
|
423
|
+
function w(o) {
|
|
424
|
+
return !!(o && o.__SENTRY__ && o.__SENTRY__.hub);
|
|
425
|
+
}
|
|
426
|
+
function _(o) {
|
|
427
|
+
return k("hub", () => new T(), o);
|
|
428
|
+
}
|
|
429
|
+
function m(o, t) {
|
|
430
|
+
if (!o) return !1;
|
|
431
|
+
const e = o.__SENTRY__ = o.__SENTRY__ || {};
|
|
432
|
+
return e.hub = t, !0;
|
|
433
|
+
}
|
|
434
|
+
export {
|
|
435
|
+
E as API_VERSION,
|
|
436
|
+
T as Hub,
|
|
437
|
+
V as getCurrentHub,
|
|
438
|
+
_ as getHubFromCarrier,
|
|
439
|
+
u as getMainCarrier,
|
|
440
|
+
f as makeMain,
|
|
441
|
+
m as setHubOnCarrier
|
|
442
|
+
};
|