@sentry/browser 9.0.1 → 9.1.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/build/npm/cjs/index.js +2 -0
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/cjs/integrations/breadcrumbs.js +40 -35
- package/build/npm/cjs/integrations/breadcrumbs.js.map +1 -1
- package/build/npm/cjs/integrations/graphqlClient.js +180 -0
- package/build/npm/cjs/integrations/graphqlClient.js.map +1 -0
- package/build/npm/cjs/tracing/request.js +5 -0
- package/build/npm/cjs/tracing/request.js.map +1 -1
- package/build/npm/cjs/utils/lazyLoadIntegration.js +1 -0
- package/build/npm/cjs/utils/lazyLoadIntegration.js.map +1 -1
- package/build/npm/esm/index.js +1 -0
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/integrations/breadcrumbs.js +40 -35
- package/build/npm/esm/integrations/breadcrumbs.js.map +1 -1
- package/build/npm/esm/integrations/graphqlClient.js +175 -0
- package/build/npm/esm/integrations/graphqlClient.js.map +1 -0
- package/build/npm/esm/package.json +1 -1
- package/build/npm/esm/tracing/request.js +6 -1
- package/build/npm/esm/tracing/request.js.map +1 -1
- package/build/npm/esm/utils/lazyLoadIntegration.js +1 -0
- package/build/npm/esm/utils/lazyLoadIntegration.js.map +1 -1
- package/build/npm/types/index.d.ts +1 -0
- package/build/npm/types/index.d.ts.map +1 -1
- package/build/npm/types/integrations/breadcrumbs.d.ts.map +1 -1
- package/build/npm/types/integrations/graphqlClient.d.ts +41 -0
- package/build/npm/types/integrations/graphqlClient.d.ts.map +1 -0
- package/build/npm/types/integrations-bundle/index.graphqlclient.d.ts +2 -0
- package/build/npm/types/integrations-bundle/index.graphqlclient.d.ts.map +1 -0
- package/build/npm/types/tracing/request.d.ts.map +1 -1
- package/build/npm/types/utils/lazyLoadIntegration.d.ts +1 -0
- package/build/npm/types/utils/lazyLoadIntegration.d.ts.map +1 -1
- package/build/npm/types-ts3.8/index.d.ts +1 -0
- package/build/npm/types-ts3.8/integrations/graphqlClient.d.ts +41 -0
- package/build/npm/types-ts3.8/integrations-bundle/index.graphqlclient.d.ts +2 -0
- package/build/npm/types-ts3.8/utils/lazyLoadIntegration.d.ts +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { FetchHint, XhrHint } from '@sentry-internal/browser-utils';
|
|
2
|
+
interface GraphQLClientOptions {
|
|
3
|
+
endpoints: Array<string | RegExp>;
|
|
4
|
+
}
|
|
5
|
+
/** Standard graphql request shape: https://graphql.org/learn/serving-over-http/#post-request-and-body */
|
|
6
|
+
interface GraphQLRequestPayload {
|
|
7
|
+
query: string;
|
|
8
|
+
operationName?: string;
|
|
9
|
+
variables?: Record<string, unknown>;
|
|
10
|
+
extensions?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
interface GraphQLOperation {
|
|
13
|
+
operationType?: string;
|
|
14
|
+
operationName?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get the request body/payload based on the shape of the hint.
|
|
18
|
+
*
|
|
19
|
+
* Exported for tests only.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getRequestPayloadXhrOrFetch(hint: XhrHint | FetchHint): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Extract the name and type of the operation from the GraphQL query.
|
|
24
|
+
*
|
|
25
|
+
* Exported for tests only.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseGraphQLQuery(query: string): GraphQLOperation;
|
|
28
|
+
/**
|
|
29
|
+
* Extract the payload of a request if it's GraphQL.
|
|
30
|
+
* Exported for tests only.
|
|
31
|
+
* @param payload - A valid JSON string
|
|
32
|
+
* @returns A POJO or undefined
|
|
33
|
+
*/
|
|
34
|
+
export declare function getGraphQLRequestPayload(payload: string): GraphQLRequestPayload | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* This integration ensures that GraphQL requests made in the browser
|
|
37
|
+
* have their GraphQL-specific data captured and attached to spans and breadcrumbs.
|
|
38
|
+
*/
|
|
39
|
+
export declare const graphqlClientIntegration: (options: GraphQLClientOptions) => import("@sentry/core").Integration;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=graphqlClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphqlClient.d.ts","sourceRoot":"","sources":["../../../../src/integrations/graphqlClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAYzE,UAAU,oBAAoB;IAC5B,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACnC;AAED,yGAAyG;AACzG,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,UAAU,gBAAgB;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA2FD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAczF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAuBjE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAgB3F;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,uEAA+C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.graphqlclient.d.ts","sourceRoot":"","sources":["../../../../src/integrations-bundle/index.graphqlclient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/tracing/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/tracing/request.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAA+B,IAAI,EAAE,MAAM,cAAc,CAAC;AAsB9F,0CAA0C;AAC1C,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,uBAAuB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEjD;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;;;OAQG;IACH,2BAA2B,EAAE,OAAO,CAAC;IAErC;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;;;OAKG;IACH,0BAA0B,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/D;AAKD,eAAO,MAAM,oCAAoC,EAAE,6BAKlD,CAAC;AAEF,0DAA0D;AAC1D,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAAG,IAAI,CAoFlH;AAkED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,uBAAuB,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,SAAS,GACvD,OAAO,CAqCT;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,WAAW,EAAE,cAAc,EAC3B,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,EAC1C,mBAAmB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,EAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAC1B,IAAI,GAAG,SAAS,CAkElB"}
|
|
@@ -10,6 +10,7 @@ declare const LazyLoadableIntegrations: {
|
|
|
10
10
|
readonly linkedErrorsIntegration: "linkederrors";
|
|
11
11
|
readonly dedupeIntegration: "dedupe";
|
|
12
12
|
readonly extraErrorDataIntegration: "extraerrordata";
|
|
13
|
+
readonly graphqlClientIntegration: "graphqlclient";
|
|
13
14
|
readonly httpClientIntegration: "httpclient";
|
|
14
15
|
readonly reportingObserverIntegration: "reportingobserver";
|
|
15
16
|
readonly rewriteFramesIntegration: "rewriteframes";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyLoadIntegration.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazyLoadIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAKlD,QAAA,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"lazyLoadIntegration.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazyLoadIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAKlD,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CAiBpB,CAAC;AAMX;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,OAAO,wBAAwB,EAC3C,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,aAAa,CAAC,CAwDxB"}
|
|
@@ -2,6 +2,7 @@ export * from './exports';
|
|
|
2
2
|
export { reportingObserverIntegration } from './integrations/reportingobserver';
|
|
3
3
|
export { httpClientIntegration } from './integrations/httpclient';
|
|
4
4
|
export { contextLinesIntegration } from './integrations/contextlines';
|
|
5
|
+
export { graphqlClientIntegration } from './integrations/graphqlClient';
|
|
5
6
|
export { captureConsoleIntegration, extraErrorDataIntegration, rewriteFramesIntegration, captureFeedback, } from '@sentry/core';
|
|
6
7
|
export { replayIntegration, getReplay } from '@sentry-internal/replay';
|
|
7
8
|
export { ReplayEventType, ReplayEventWithTime, ReplayBreadcrumbFrame, ReplayBreadcrumbFrameEvent, ReplayOptionFrameEvent, ReplayFrame, ReplayFrameEvent, ReplaySpanFrame, ReplaySpanFrameEvent, } from '@sentry-internal/replay';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FetchHint, XhrHint } from '@sentry-internal/browser-utils';
|
|
2
|
+
interface GraphQLClientOptions {
|
|
3
|
+
endpoints: Array<string | RegExp>;
|
|
4
|
+
}
|
|
5
|
+
/** Standard graphql request shape: https://graphql.org/learn/serving-over-http/#post-request-and-body */
|
|
6
|
+
interface GraphQLRequestPayload {
|
|
7
|
+
query: string;
|
|
8
|
+
operationName?: string;
|
|
9
|
+
variables?: Record<string, unknown>;
|
|
10
|
+
extensions?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
interface GraphQLOperation {
|
|
13
|
+
operationType?: string;
|
|
14
|
+
operationName?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get the request body/payload based on the shape of the hint.
|
|
18
|
+
*
|
|
19
|
+
* Exported for tests only.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getRequestPayloadXhrOrFetch(hint: XhrHint | FetchHint): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Extract the name and type of the operation from the GraphQL query.
|
|
24
|
+
*
|
|
25
|
+
* Exported for tests only.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseGraphQLQuery(query: string): GraphQLOperation;
|
|
28
|
+
/**
|
|
29
|
+
* Extract the payload of a request if it's GraphQL.
|
|
30
|
+
* Exported for tests only.
|
|
31
|
+
* @param payload - A valid JSON string
|
|
32
|
+
* @returns A POJO or undefined
|
|
33
|
+
*/
|
|
34
|
+
export declare function getGraphQLRequestPayload(payload: string): GraphQLRequestPayload | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* This integration ensures that GraphQL requests made in the browser
|
|
37
|
+
* have their GraphQL-specific data captured and attached to spans and breadcrumbs.
|
|
38
|
+
*/
|
|
39
|
+
export declare const graphqlClientIntegration: (options: GraphQLClientOptions) => import("@sentry/core").Integration;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=graphqlClient.d.ts.map
|
|
@@ -10,6 +10,7 @@ declare const LazyLoadableIntegrations: {
|
|
|
10
10
|
readonly linkedErrorsIntegration: "linkederrors";
|
|
11
11
|
readonly dedupeIntegration: "dedupe";
|
|
12
12
|
readonly extraErrorDataIntegration: "extraerrordata";
|
|
13
|
+
readonly graphqlClientIntegration: "graphqlclient";
|
|
13
14
|
readonly httpClientIntegration: "httpclient";
|
|
14
15
|
readonly reportingObserverIntegration: "reportingobserver";
|
|
15
16
|
readonly rewriteFramesIntegration: "rewriteframes";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/browser",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "Official Sentry SDK for browsers",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@sentry-internal/browser-utils": "9.0
|
|
43
|
-
"@sentry-internal/feedback": "9.0
|
|
44
|
-
"@sentry-internal/replay": "9.0
|
|
45
|
-
"@sentry-internal/replay-canvas": "9.0
|
|
46
|
-
"@sentry/core": "9.0
|
|
42
|
+
"@sentry-internal/browser-utils": "9.1.0",
|
|
43
|
+
"@sentry-internal/feedback": "9.1.0",
|
|
44
|
+
"@sentry-internal/replay": "9.1.0",
|
|
45
|
+
"@sentry-internal/replay-canvas": "9.1.0",
|
|
46
|
+
"@sentry/core": "9.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@sentry-internal/integration-shims": "9.0
|
|
49
|
+
"@sentry-internal/integration-shims": "9.1.0",
|
|
50
50
|
"fake-indexeddb": "^4.0.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|