@volter/twin-sentry 0.1.1 → 0.1.3
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.
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
//
|
|
11
11
|
// Delivery is an INJECTED seam (the auth-boundary): tests pass a fake deliverer, live runs
|
|
12
12
|
// pass the HTTP deliverer. verify() in the manifest stays fully offline.
|
|
13
|
-
import { applyTwinWrite, projectResources, nodeBuiltin } from '@volter/world-core';
|
|
13
|
+
import { applyTwinWrite, projectResources, nodeBuiltin, deliveryTraceHeaders } from '@volter/world-core';
|
|
14
14
|
import { appDestination, appFetch } from '@volter/world-core/app-route';
|
|
15
15
|
import { worldEgressRefusal } from '@volter/world-core/network-policy';
|
|
16
16
|
const SERVICE = 'sentry';
|
|
@@ -72,7 +72,7 @@ const httpDelivery = async (url, payload, headers) => {
|
|
|
72
72
|
if (!appDestination(url) && worldEgressRefusal(url) !== null)
|
|
73
73
|
return; // the World's egress rule, the application's own hostnames reaching it inside the World: refused like an unreachable endpoint
|
|
74
74
|
try {
|
|
75
|
-
await appFetch(url, { method: 'POST', headers: { 'content-type': 'application/json', ...headers }, body: payload });
|
|
75
|
+
await appFetch(url, { method: 'POST', headers: { 'content-type': 'application/json', ...headers, ...deliveryTraceHeaders() }, body: payload });
|
|
76
76
|
}
|
|
77
77
|
catch {
|
|
78
78
|
/* fire-and-forget, like Sentry */
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
// The pure format/level helpers live here so they can be unit-tested AND shared by the
|
|
11
11
|
// React client (Bun tree-shakes the server-only exports out of the browser bundle).
|
|
12
12
|
import { readFile } from 'node:fs/promises';
|
|
13
|
-
import { bundleClient, fileResponse } from '@volter/world-core';
|
|
13
|
+
import { bundleClient, fileResponse, filePathOf } from '@volter/world-core';
|
|
14
14
|
import { serveHttp } from '@volter/world-core';
|
|
15
15
|
import { createSentryTwinFetch } from "./sentry-server.js";
|
|
16
16
|
import { DEFAULT_ORG, DEFAULT_PROJECT } from "./sentry-ingest.js";
|
|
17
|
-
const CLIENT_ENTRY = () => new URL('../client/sentry-mirror.tsx', import.meta.url)
|
|
18
|
-
const CLIENT_CSS = () => new URL('../client/sentry-mirror.css', import.meta.url)
|
|
17
|
+
const CLIENT_ENTRY = () => filePathOf(new URL('../client/sentry-mirror.tsx', import.meta.url)); // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
|
|
18
|
+
const CLIENT_CSS = () => filePathOf(new URL('../client/sentry-mirror.css', import.meta.url)); // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
|
|
19
19
|
/** Map a Sentry level to a UI tone class. */
|
|
20
20
|
export function levelTone(level) {
|
|
21
21
|
const l = String(level ?? '').toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-sentry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Local Sentry twin — a faithful, stateful local Sentry error-monitoring API your real `@sentry/node` SDK talks to unmodified. Ingest captureException events into grouped issues, browse the Web API + dashboard mirror, simulate, and fork. Built on @volter/world-core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"twin",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"react-dom": "^19.2.7"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@volter/world-core": "2.0.
|
|
60
|
+
"@volter/world-core": "2.0.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@volter/world-core": "2.0.
|
|
63
|
+
"@volter/world-core": "2.0.3",
|
|
64
64
|
"@volter/world-tooling": "0.1.0",
|
|
65
65
|
"@sentry/node": "^10.64.0",
|
|
66
66
|
"@types/bun": "^1.2.20",
|
package/src/sentry-events.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
//
|
|
11
11
|
// Delivery is an INJECTED seam (the auth-boundary): tests pass a fake deliverer, live runs
|
|
12
12
|
// pass the HTTP deliverer. verify() in the manifest stays fully offline.
|
|
13
|
-
import { applyTwinWrite, projectResources, nodeBuiltin } from '@volter/world-core';
|
|
13
|
+
import { applyTwinWrite, projectResources, nodeBuiltin, deliveryTraceHeaders } from '@volter/world-core';
|
|
14
14
|
import type { TwinResource } from '@volter/world-core';
|
|
15
15
|
import { appDestination, appFetch } from '@volter/world-core/app-route';
|
|
16
16
|
import { worldEgressRefusal } from '@volter/world-core/network-policy';
|
|
@@ -109,7 +109,7 @@ export function listAlertRules(projectId: string | undefined, root?: string): Tw
|
|
|
109
109
|
const httpDelivery: SentryWebhookDelivery = async (url, payload, headers) => {
|
|
110
110
|
if (!appDestination(url) && worldEgressRefusal(url) !== null) return; // the World's egress rule, the application's own hostnames reaching it inside the World: refused like an unreachable endpoint
|
|
111
111
|
try {
|
|
112
|
-
await appFetch(url, { method: 'POST', headers: { 'content-type': 'application/json', ...headers }, body: payload });
|
|
112
|
+
await appFetch(url, { method: 'POST', headers: { 'content-type': 'application/json', ...headers, ...deliveryTraceHeaders() }, body: payload });
|
|
113
113
|
} catch {
|
|
114
114
|
/* fire-and-forget, like Sentry */
|
|
115
115
|
}
|
package/src/sentry-mirror-ui.ts
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
// The pure format/level helpers live here so they can be unit-tested AND shared by the
|
|
11
11
|
// React client (Bun tree-shakes the server-only exports out of the browser bundle).
|
|
12
12
|
import { readFile } from 'node:fs/promises';
|
|
13
|
-
import { bundleClient, fileResponse } from '@volter/world-core';
|
|
13
|
+
import { bundleClient, fileResponse, filePathOf } from '@volter/world-core';
|
|
14
14
|
import { serveHttp } from '@volter/world-core';
|
|
15
15
|
import { createSentryTwinFetch } from './sentry-server.ts';
|
|
16
16
|
import { DEFAULT_ORG, DEFAULT_PROJECT } from './sentry-ingest.ts';
|
|
17
17
|
|
|
18
|
-
const CLIENT_ENTRY = () => new URL('../client/sentry-mirror.tsx', import.meta.url)
|
|
19
|
-
const CLIENT_CSS = () => new URL('../client/sentry-mirror.css', import.meta.url)
|
|
18
|
+
const CLIENT_ENTRY = () => filePathOf(new URL('../client/sentry-mirror.tsx', import.meta.url)); // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
|
|
19
|
+
const CLIENT_CSS = () => filePathOf(new URL('../client/sentry-mirror.css', import.meta.url)); // lazy: workerd rejects top-level relative URL from import.meta.url (bundled via pack index)
|
|
20
20
|
|
|
21
21
|
// ---------------------------------------------------------------------------
|
|
22
22
|
// Pure, dependency-free render/format helpers (plain data in → plain data out).
|