@sentry/svelte 7.67.0 → 7.68.0
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/package.json +5 -5
- package/types-ts3.8/config.d.ts +11 -0
- package/types-ts3.8/constants.d.ts +4 -0
- package/types-ts3.8/index.d.ts +7 -0
- package/types-ts3.8/performance.d.ts +10 -0
- package/types-ts3.8/preprocessors.d.ts +13 -0
- package/types-ts3.8/sdk.d.ts +23 -0
- package/types-ts3.8/types.d.ts +56 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/svelte",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.68.0",
|
|
4
4
|
"description": "Official Sentry SDK for Svelte",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/svelte",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"types": "types/index.d.ts",
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
"<4.9": {
|
|
17
|
-
"
|
|
17
|
+
"types/index.d.ts": [
|
|
18
18
|
"types-ts3.8/index.d.ts"
|
|
19
19
|
]
|
|
20
20
|
}
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@sentry/browser": "7.
|
|
27
|
-
"@sentry/types": "7.
|
|
28
|
-
"@sentry/utils": "7.
|
|
26
|
+
"@sentry/browser": "7.68.0",
|
|
27
|
+
"@sentry/types": "7.68.0",
|
|
28
|
+
"@sentry/utils": "7.68.0",
|
|
29
29
|
"magic-string": "^0.30.0",
|
|
30
30
|
"tslib": "^2.4.1 || ^1.9.3"
|
|
31
31
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SentrySvelteConfigOptions, SvelteConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Add Sentry options to the Svelte config to be exported from the user's `svelte.config.js` file.
|
|
4
|
+
*
|
|
5
|
+
* @param originalConfig The existing config to be exported prior to adding Sentry
|
|
6
|
+
* @param sentryOptions The configuration of the Sentry-added options
|
|
7
|
+
*
|
|
8
|
+
* @return The wrapped and modified config to be exported
|
|
9
|
+
*/
|
|
10
|
+
export declare function withSentryConfig(originalConfig: SvelteConfig, sentryOptions?: SentrySvelteConfigOptions): SvelteConfig;
|
|
11
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ComponentTrackingInitOptions as ComponentTrackingOptions, TrackComponentOptions as TrackingOptions, } from './types';
|
|
2
|
+
export * from '@sentry/browser';
|
|
3
|
+
export { init } from './sdk';
|
|
4
|
+
export { componentTrackingPreprocessor } from './preprocessors';
|
|
5
|
+
export { trackComponent } from './performance';
|
|
6
|
+
export { withSentryConfig } from './config';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TrackComponentOptions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Tracks the Svelte component's intialization and mounting operation as well as
|
|
4
|
+
* updates and records them as spans.
|
|
5
|
+
* This function is injected automatically into your Svelte components' code
|
|
6
|
+
* if you are using the Sentry componentTrackingPreprocessor.
|
|
7
|
+
* Alternatively, you can call it yourself if you don't want to use the preprocessor.
|
|
8
|
+
*/
|
|
9
|
+
export declare function trackComponent(options?: TrackComponentOptions): void;
|
|
10
|
+
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PreprocessorGroup } from 'svelte/types/compiler/preprocess';
|
|
2
|
+
import { ComponentTrackingInitOptions } from './types';
|
|
3
|
+
export declare const defaultComponentTrackingOptions: Required<ComponentTrackingInitOptions>;
|
|
4
|
+
export declare const FIRST_PASS_COMPONENT_TRACKING_PREPROC_ID = "FIRST_PASS_COMPONENT_TRACKING_PREPROCESSOR";
|
|
5
|
+
/**
|
|
6
|
+
* Svelte Preprocessor to inject Sentry performance monitoring related code
|
|
7
|
+
* into Svelte components.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Use `withSentryConfig` which is the new way of making compile-time modifications
|
|
10
|
+
* to Svelte apps going forward.
|
|
11
|
+
*/
|
|
12
|
+
export declare function componentTrackingPreprocessor(options?: ComponentTrackingInitOptions): PreprocessorGroup;
|
|
13
|
+
//# sourceMappingURL=preprocessors.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BrowserOptions } from '@sentry/browser';
|
|
2
|
+
/**
|
|
3
|
+
* Inits the Svelte SDK
|
|
4
|
+
*/
|
|
5
|
+
export declare function init(options: BrowserOptions): void;
|
|
6
|
+
/**
|
|
7
|
+
* Adds a global event processor to detect if the SDK is initialized in a SvelteKit frontend,
|
|
8
|
+
* in which case we add SvelteKit an event.modules entry to outgoing events.
|
|
9
|
+
* SvelteKit detection is performed only once, when the event processor is called for the
|
|
10
|
+
* first time. We cannot perform this check upfront (directly when init is called) because
|
|
11
|
+
* at this time, the HTML element might not yet be accessible.
|
|
12
|
+
*/
|
|
13
|
+
export declare function detectAndReportSvelteKit(): void;
|
|
14
|
+
/**
|
|
15
|
+
* To actually detect a SvelteKit frontend, we search the DOM for a special
|
|
16
|
+
* div that's inserted by SvelteKit when the page is rendered. It's identifyed
|
|
17
|
+
* by its id, 'svelte-announcer', and it's used to improve page accessibility.
|
|
18
|
+
* This div is not present when only using Svelte without SvelteKit.
|
|
19
|
+
*
|
|
20
|
+
* @see https://github.com/sveltejs/kit/issues/307 for more information
|
|
21
|
+
*/
|
|
22
|
+
export declare function isSvelteKitApp(): boolean;
|
|
23
|
+
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CompileOptions } from 'svelte/types/compiler';
|
|
2
|
+
import { PreprocessorGroup } from 'svelte/types/compiler/preprocess';
|
|
3
|
+
export interface SentryPreprocessorGroup extends PreprocessorGroup {
|
|
4
|
+
sentryId?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The object exported from `svelte.config.js`
|
|
8
|
+
*/
|
|
9
|
+
export type SvelteConfig = {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
preprocess?: PreprocessorGroup[] | PreprocessorGroup;
|
|
12
|
+
compilerOptions?: CompileOptions;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Options users can provide to `withSentryConfig` to customize what Sentry adds too the Svelte config
|
|
16
|
+
*/
|
|
17
|
+
export type SentrySvelteConfigOptions = {
|
|
18
|
+
componentTracking?: ComponentTrackingInitOptions;
|
|
19
|
+
};
|
|
20
|
+
export type SpanOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* If true, a span is recorded between a component's intialization and its
|
|
23
|
+
* onMount lifecycle hook. This span tells how long it takes a component
|
|
24
|
+
* to be created and inserted into the DOM.
|
|
25
|
+
*
|
|
26
|
+
* Defaults to true if component tracking is enabled
|
|
27
|
+
*/
|
|
28
|
+
trackInit?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* If true, a span is recorded between a component's beforeUpdate and afterUpdate
|
|
31
|
+
* lifecycle hooks.
|
|
32
|
+
*
|
|
33
|
+
* Defaults to true if component tracking is enabled
|
|
34
|
+
*/
|
|
35
|
+
trackUpdates?: boolean;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Control which components and which operations should be tracked
|
|
39
|
+
* and recorded as spans
|
|
40
|
+
*/
|
|
41
|
+
export type ComponentTrackingInitOptions = {
|
|
42
|
+
/**
|
|
43
|
+
* Control if all your Svelte components should be tracked or only a specified list
|
|
44
|
+
* of components.
|
|
45
|
+
* If set to true, all components will be tracked.
|
|
46
|
+
* If you only want to track a selection of components, specify the component names
|
|
47
|
+
* as an array.
|
|
48
|
+
*
|
|
49
|
+
* Defaults to true if the preprocessor is used
|
|
50
|
+
*/
|
|
51
|
+
trackComponents?: boolean | string[];
|
|
52
|
+
} & SpanOptions;
|
|
53
|
+
export type TrackComponentOptions = {
|
|
54
|
+
componentName?: string;
|
|
55
|
+
} & SpanOptions;
|
|
56
|
+
//# sourceMappingURL=types.d.ts.map
|