@ah-monica/cloudflare 0.1.0 → 0.1.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/dist/client.js +3 -2
- package/dist/version.d.ts +2 -0
- package/dist/version.js +2 -0
- package/package.json +4 -4
package/dist/client.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createCoreClient, createFetchTransport, } from "@ah-monica/core";
|
|
2
|
+
import { SDK_VERSION } from "./version.js";
|
|
2
3
|
const DEFAULT_FLUSH_TIMEOUT_MS = 2_000;
|
|
3
4
|
const DEFAULT_MAX_CAUSE_DEPTH = 10;
|
|
4
5
|
const DEFAULT_MAX_STACK_FRAMES = 200;
|
|
@@ -21,7 +22,7 @@ export function createCloudflareClient(options) {
|
|
|
21
22
|
release: options.release,
|
|
22
23
|
sampleRate: options.sampleRate,
|
|
23
24
|
beforeSend: options.beforeSend,
|
|
24
|
-
sdk: { name: "@ah-monica/cloudflare", version:
|
|
25
|
+
sdk: { name: "@ah-monica/cloudflare", version: SDK_VERSION },
|
|
25
26
|
});
|
|
26
27
|
async function captureAndFlush(input, hint) {
|
|
27
28
|
try {
|
|
@@ -86,7 +87,7 @@ function contextValues(context) {
|
|
|
86
87
|
? { breadcrumbs: context.breadcrumbs.map((breadcrumb) => ({ ...breadcrumb })) }
|
|
87
88
|
: {}),
|
|
88
89
|
...(context.request ? { request: cloneRequest(context.request) } : {}),
|
|
89
|
-
...(context.fingerprint ? { fingerprint: [...context.fingerprint] } : {}),
|
|
90
|
+
...(context.fingerprint?.length ? { fingerprint: [...context.fingerprint] } : {}),
|
|
90
91
|
};
|
|
91
92
|
}
|
|
92
93
|
function cloneRequest(request) {
|
package/dist/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ah-monica/cloudflare",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Cloudflare Workers adapter for sending application errors to MONICA",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/Accel-Hack/monica.git",
|
|
30
|
-
"directory": "
|
|
29
|
+
"url": "git+https://github.com/Accel-Hack/monica-sdk-js.git",
|
|
30
|
+
"directory": "cloudflare"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@ah-monica/core": "0.1.
|
|
33
|
+
"@ah-monica/core": "0.1.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/bun": "^1.2.21",
|