@sentry/wasm 7.105.0 → 8.0.0-alpha.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/cjs/index.js +0 -20
- package/cjs/index.js.map +1 -1
- package/esm/index.js +2 -21
- package/esm/index.js.map +1 -1
- package/package.json +6 -6
- package/types/index.d.ts +0 -18
- package/types/index.d.ts.map +1 -1
- package/types-ts3.8/index.d.ts +0 -18
package/cjs/index.js
CHANGED
|
@@ -35,25 +35,6 @@ const _wasmIntegration = (() => {
|
|
|
35
35
|
|
|
36
36
|
const wasmIntegration = core.defineIntegration(_wasmIntegration);
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* Process WASM stack traces to support server-side symbolication.
|
|
40
|
-
*
|
|
41
|
-
* This also hooks the WebAssembly loading browser API so that module
|
|
42
|
-
* registrations are intercepted.
|
|
43
|
-
*
|
|
44
|
-
* @deprecated Use `wasmIntegration` export instead
|
|
45
|
-
*
|
|
46
|
-
* import { wasmIntegration } from '@sentry/wasm';
|
|
47
|
-
*
|
|
48
|
-
* ```
|
|
49
|
-
* Sentry.init({ integrations: [wasmIntegration()] });
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
53
|
-
const Wasm = core.convertIntegrationFnToClass(INTEGRATION_NAME, wasmIntegration)
|
|
54
|
-
|
|
55
|
-
;
|
|
56
|
-
|
|
57
38
|
/**
|
|
58
39
|
* Patches a list of stackframes with wasm data needed for server-side symbolication
|
|
59
40
|
* if applicable. Returns true if any frames were patched.
|
|
@@ -79,6 +60,5 @@ function patchFrames(frames) {
|
|
|
79
60
|
return haveWasm;
|
|
80
61
|
}
|
|
81
62
|
|
|
82
|
-
exports.Wasm = Wasm;
|
|
83
63
|
exports.wasmIntegration = wasmIntegration;
|
|
84
64
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import { defineIntegration } from '@sentry/core';\nimport type { Event, IntegrationFn, StackFrame } from '@sentry/types';\n\nimport { patchWebAssembly } from './patchWebAssembly';\nimport { getImage, getImages } from './registry';\n\nconst INTEGRATION_NAME = 'Wasm';\n\nconst _wasmIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n patchWebAssembly();\n },\n processEvent(event: Event): Event {\n let haveWasm = false;\n\n if (event.exception && event.exception.values) {\n event.exception.values.forEach(exception => {\n if (exception.stacktrace && exception.stacktrace.frames) {\n haveWasm = haveWasm || patchFrames(exception.stacktrace.frames);\n }\n });\n }\n\n if (haveWasm) {\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = [...(event.debug_meta.images || []), ...getImages()];\n }\n\n return event;\n },\n };\n}) satisfies IntegrationFn;\n\nexport const wasmIntegration = defineIntegration(_wasmIntegration);\n\n/**\n * Patches a list of stackframes with wasm data needed for server-side symbolication\n * if applicable. Returns true if any frames were patched.\n */\nfunction patchFrames(frames: Array<StackFrame>): boolean {\n let haveWasm = false;\n frames.forEach(frame => {\n if (!frame.filename) {\n return;\n }\n const match = frame.filename.match(/^(.*?):wasm-function\\[\\d+\\]:(0x[a-fA-F0-9]+)$/);\n if (match !== null) {\n const index = getImage(match[1]);\n if (index >= 0) {\n frame.instruction_addr = match[2];\n frame.addr_mode = `rel:${index}`;\n frame.filename = match[1];\n frame.platform = 'native';\n haveWasm = true;\n }\n }\n });\n return haveWasm;\n}\n"],"names":["patchWebAssembly","getImages","defineIntegration","getImage"],"mappings":";;;;;;AAMA,MAAM,gBAAA,GAAmB,MAAM,CAAA;AAC/B;AACA,MAAM,gBAAiB,IAAG,MAAM;AAChC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAMA,iCAA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AE;AACxB,MAAM,MAAM,QAAQC,iBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AACtC,MAAM,IAAI,KAAM,IAAG,CAAC,EAAE;AACtB,QAAQ,KAAK,CAAC,gBAAA,GAAmB,KAAK,CAAC,CAAC,CAAC,CAAA;AACzC,QAAQ,KAAK,CAAC,SAAU,GAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA,CAAA;AACA,QAAA,KAAA,CAAA,QAAA,GAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,QAAA,KAAA,CAAA,QAAA,GAAA,QAAA,CAAA;AACA,QAAA,QAAA,GAAA,IAAA,CAAA;AACA,OAAA;AACA,KAAA;AACA,GAAA,CAAA,CAAA;AACA,EAAA,OAAA,QAAA,CAAA;AACA;;;;"}
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineIntegration
|
|
1
|
+
import { defineIntegration } from '@sentry/core';
|
|
2
2
|
import { patchWebAssembly } from './patchWebAssembly.js';
|
|
3
3
|
import { getImages, getImage } from './registry.js';
|
|
4
4
|
|
|
@@ -33,25 +33,6 @@ const _wasmIntegration = (() => {
|
|
|
33
33
|
|
|
34
34
|
const wasmIntegration = defineIntegration(_wasmIntegration);
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* Process WASM stack traces to support server-side symbolication.
|
|
38
|
-
*
|
|
39
|
-
* This also hooks the WebAssembly loading browser API so that module
|
|
40
|
-
* registrations are intercepted.
|
|
41
|
-
*
|
|
42
|
-
* @deprecated Use `wasmIntegration` export instead
|
|
43
|
-
*
|
|
44
|
-
* import { wasmIntegration } from '@sentry/wasm';
|
|
45
|
-
*
|
|
46
|
-
* ```
|
|
47
|
-
* Sentry.init({ integrations: [wasmIntegration()] });
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
51
|
-
const Wasm = convertIntegrationFnToClass(INTEGRATION_NAME, wasmIntegration)
|
|
52
|
-
|
|
53
|
-
;
|
|
54
|
-
|
|
55
36
|
/**
|
|
56
37
|
* Patches a list of stackframes with wasm data needed for server-side symbolication
|
|
57
38
|
* if applicable. Returns true if any frames were patched.
|
|
@@ -77,5 +58,5 @@ function patchFrames(frames) {
|
|
|
77
58
|
return haveWasm;
|
|
78
59
|
}
|
|
79
60
|
|
|
80
|
-
export {
|
|
61
|
+
export { wasmIntegration };
|
|
81
62
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import { defineIntegration } from '@sentry/core';\nimport type { Event, IntegrationFn, StackFrame } from '@sentry/types';\n\nimport { patchWebAssembly } from './patchWebAssembly';\nimport { getImage, getImages } from './registry';\n\nconst INTEGRATION_NAME = 'Wasm';\n\nconst _wasmIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n patchWebAssembly();\n },\n processEvent(event: Event): Event {\n let haveWasm = false;\n\n if (event.exception && event.exception.values) {\n event.exception.values.forEach(exception => {\n if (exception.stacktrace && exception.stacktrace.frames) {\n haveWasm = haveWasm || patchFrames(exception.stacktrace.frames);\n }\n });\n }\n\n if (haveWasm) {\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = [...(event.debug_meta.images || []), ...getImages()];\n }\n\n return event;\n },\n };\n}) satisfies IntegrationFn;\n\nexport const wasmIntegration = defineIntegration(_wasmIntegration);\n\n/**\n * Patches a list of stackframes with wasm data needed for server-side symbolication\n * if applicable. Returns true if any frames were patched.\n */\nfunction patchFrames(frames: Array<StackFrame>): boolean {\n let haveWasm = false;\n frames.forEach(frame => {\n if (!frame.filename) {\n return;\n }\n const match = frame.filename.match(/^(.*?):wasm-function\\[\\d+\\]:(0x[a-fA-F0-9]+)$/);\n if (match !== null) {\n const index = getImage(match[1]);\n if (index >= 0) {\n frame.instruction_addr = match[2];\n frame.addr_mode = `rel:${index}`;\n frame.filename = match[1];\n frame.platform = 'native';\n haveWasm = true;\n }\n }\n });\n return haveWasm;\n}\n"],"names":[],"mappings":";;;;AAMA,MAAM,gBAAA,GAAmB,MAAM,CAAA;AAC/B;AACA,MAAM,gBAAiB,IAAG,MAAM;AAChC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,gBAAgB,EAAE,CAAA;AACxB,KAAK;AACL,IAAI,YAAY,CAAC,KAAK,EAAgB;AACtC,MAAM,IAAI,QAAS,GAAE,KAAK,CAAA;AAC1B;AACA,MAAM,IAAI,KAAK,CAAC,SAAA,IAAa,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE;AACrD,QAAQ,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,SAAA,IAAa;AACpD,UAAU,IAAI,SAAS,CAAC,UAAA,IAAc,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE;AACnE,YAAY,QAAA,GAAW,QAAA,IAAY,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;AAC3E,WAAU;AACV,SAAS,CAAC,CAAA;AACV,OAAM;AACN;AACA,MAAM,IAAI,QAAQ,EAAE;AACpB,QAAQ,KAAK,CAAC,UAAW,GAAE,KAAK,CAAC,UAAA,IAAc,EAAE,CAAA;AACjD,QAAQ,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,MAAA,IAAU,EAAE,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAA;AACtF,OAAM;AACN;AACA,MAAM,OAAO,KAAK,CAAA;AAClB,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;MACa,eAAgB,GAAE,iBAAiB,CAAC,gBAAgB,EAAC;AAClE;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,MAAM,EAA8B;AACzD,EAAE,IAAI,QAAS,GAAE,KAAK,CAAA;AACtB,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS;AAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AACzB,MAAM,OAAM;AACZ,KAAI;AACJ,IAAI,MAAM,KAAM,GAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAA;AACvF,IAAI,IAAI,KAAM,KAAI,IAAI,EAAE;AACxB,MAAM,MAAM,QAAQ,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AACtC,MAAM,IAAI,KAAM,IAAG,CAAC,EAAE;AACtB,QAAQ,KAAK,CAAC,gBAAA,GAAmB,KAAK,CAAC,CAAC,CAAC,CAAA;AACzC,QAAQ,KAAK,CAAC,SAAU,GAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA,CAAA;AACA,QAAA,KAAA,CAAA,QAAA,GAAA,KAAA,CAAA,CAAA,CAAA,CAAA;AACA,QAAA,KAAA,CAAA,QAAA,GAAA,QAAA,CAAA;AACA,QAAA,QAAA,GAAA,IAAA,CAAA;AACA,OAAA;AACA,KAAA;AACA,GAAA,CAAA,CAAA;AACA,EAAA,OAAA,QAAA,CAAA;AACA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/wasm",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-alpha.2",
|
|
4
4
|
"description": "Support for WASM.",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/wasm",
|
|
7
7
|
"author": "Sentry",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": ">=8"
|
|
10
|
+
"node": ">=14.8"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"cjs",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@sentry/browser": "
|
|
33
|
-
"@sentry/core": "
|
|
34
|
-
"@sentry/types": "
|
|
35
|
-
"@sentry/utils": "
|
|
32
|
+
"@sentry/browser": "8.0.0-alpha.2",
|
|
33
|
+
"@sentry/core": "8.0.0-alpha.2",
|
|
34
|
+
"@sentry/types": "8.0.0-alpha.2",
|
|
35
|
+
"@sentry/utils": "8.0.0-alpha.2"
|
|
36
36
|
},
|
|
37
37
|
"sideEffects": false
|
|
38
38
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
import type { Event, Integration, IntegrationClass } from '@sentry/types';
|
|
2
1
|
export declare const wasmIntegration: () => import("@sentry/types").IntegrationFnResult;
|
|
3
|
-
/**
|
|
4
|
-
* Process WASM stack traces to support server-side symbolication.
|
|
5
|
-
*
|
|
6
|
-
* This also hooks the WebAssembly loading browser API so that module
|
|
7
|
-
* registrations are intercepted.
|
|
8
|
-
*
|
|
9
|
-
* @deprecated Use `wasmIntegration` export instead
|
|
10
|
-
*
|
|
11
|
-
* import { wasmIntegration } from '@sentry/wasm';
|
|
12
|
-
*
|
|
13
|
-
* ```
|
|
14
|
-
* Sentry.init({ integrations: [wasmIntegration()] });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare const Wasm: IntegrationClass<Integration & {
|
|
18
|
-
processEvent: (event: Event) => Event;
|
|
19
|
-
}>;
|
|
20
2
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAmCA,eAAO,MAAM,eAAe,mDAAsC,CAAC"}
|
package/types-ts3.8/index.d.ts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
import { Event, Integration, IntegrationClass } from '@sentry/types';
|
|
2
1
|
export declare const wasmIntegration: () => import("@sentry/types").IntegrationFnResult;
|
|
3
|
-
/**
|
|
4
|
-
* Process WASM stack traces to support server-side symbolication.
|
|
5
|
-
*
|
|
6
|
-
* This also hooks the WebAssembly loading browser API so that module
|
|
7
|
-
* registrations are intercepted.
|
|
8
|
-
*
|
|
9
|
-
* @deprecated Use `wasmIntegration` export instead
|
|
10
|
-
*
|
|
11
|
-
* import { wasmIntegration } from '@sentry/wasm';
|
|
12
|
-
*
|
|
13
|
-
* ```
|
|
14
|
-
* Sentry.init({ integrations: [wasmIntegration()] });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare const Wasm: IntegrationClass<Integration & {
|
|
18
|
-
processEvent: (event: Event) => Event;
|
|
19
|
-
}>;
|
|
20
2
|
//# sourceMappingURL=index.d.ts.map
|