@snapfail/browser 0.0.4 → 0.0.6
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/dist/assembler.d.ts +1 -0
- package/dist/index.js +7 -5
- package/package.json +6 -12
package/dist/assembler.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -4029,6 +4029,7 @@ var DeviceSchema = exports_external.object({
|
|
|
4029
4029
|
var StackFrameSchema = exports_external.object({
|
|
4030
4030
|
file: exports_external.string(),
|
|
4031
4031
|
line: exports_external.number().optional(),
|
|
4032
|
+
col: exports_external.number().optional(),
|
|
4032
4033
|
fn: exports_external.string().optional()
|
|
4033
4034
|
});
|
|
4034
4035
|
var NetworkEntrySchema = exports_external.object({
|
|
@@ -4217,7 +4218,8 @@ function buildPayload(config, error, buffers) {
|
|
|
4217
4218
|
mode: config.environment,
|
|
4218
4219
|
url: window.location.href,
|
|
4219
4220
|
route: window.location.pathname,
|
|
4220
|
-
framework: detectFramework()
|
|
4221
|
+
framework: detectFramework(),
|
|
4222
|
+
buildId: config.buildId
|
|
4221
4223
|
},
|
|
4222
4224
|
device: detectDevice(),
|
|
4223
4225
|
consoleEntries: scrubConsoleEntries(buffers.console),
|
|
@@ -4232,13 +4234,13 @@ function parseStackFromError(stack) {
|
|
|
4232
4234
|
return [];
|
|
4233
4235
|
return stack.split(`
|
|
4234
4236
|
`).slice(1).map((line) => line.trim()).filter((line) => line.startsWith("at ")).map((line) => {
|
|
4235
|
-
const withFn = line.match(/^at (.+?) \((.+):(\d+)
|
|
4237
|
+
const withFn = line.match(/^at (.+?) \((.+):(\d+):(\d+)\)$/);
|
|
4236
4238
|
if (withFn) {
|
|
4237
|
-
return { fn: withFn[1], file: withFn[2], line: parseInt(withFn[3], 10) };
|
|
4239
|
+
return { fn: withFn[1], file: withFn[2], line: parseInt(withFn[3], 10), col: parseInt(withFn[4], 10) };
|
|
4238
4240
|
}
|
|
4239
|
-
const bare = line.match(/^at (.+):(\d+)
|
|
4241
|
+
const bare = line.match(/^at (.+):(\d+):(\d+)$/);
|
|
4240
4242
|
if (bare) {
|
|
4241
|
-
return { file: bare[1], line: parseInt(bare[2], 10) };
|
|
4243
|
+
return { file: bare[1], line: parseInt(bare[2], 10), col: parseInt(bare[3], 10) };
|
|
4242
4244
|
}
|
|
4243
4245
|
return { file: line.replace(/^at /, "") };
|
|
4244
4246
|
});
|
package/package.json
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snapfail/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Browser SDK for snapfail — error capture, replay and transport",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "./
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
".":
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"main": "./dist/index.js",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"import": "./dist/index.js",
|
|
16
|
-
"types": "./dist/index.d.ts"
|
|
17
|
-
}
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
18
12
|
}
|
|
19
13
|
},
|
|
20
14
|
"files": ["dist"],
|
|
@@ -23,6 +17,6 @@
|
|
|
23
17
|
"prepublishOnly": "bun run build"
|
|
24
18
|
},
|
|
25
19
|
"dependencies": {
|
|
26
|
-
"@snapfail/protocol": "
|
|
20
|
+
"@snapfail/protocol": ">=0.0.1"
|
|
27
21
|
}
|
|
28
22
|
}
|