@absolutejs/beacon 0.4.17 → 0.4.19
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/README.md +32 -8
- package/dist/index.d.ts +86 -2
- package/dist/index.js +738 -9
- package/dist/index.js.map +3 -3
- package/dist/manifest.js +2 -2
- package/dist/manifest.js.map +2 -2
- package/dist/manifest.json +1 -1
- package/package.json +1 -1
package/dist/manifest.js
CHANGED
|
@@ -77,7 +77,7 @@ var manifest = defineManifest()({
|
|
|
77
77
|
})),
|
|
78
78
|
signals: Type.Optional(Type.Boolean({
|
|
79
79
|
default: true,
|
|
80
|
-
description: "Capture
|
|
80
|
+
description: "Capture actionable browser reliability, accessibility, network, policy, worker, and realtime-transport failures.",
|
|
81
81
|
title: "Actionable browser signals"
|
|
82
82
|
})),
|
|
83
83
|
redact: Type.Optional(Type.Boolean({
|
|
@@ -109,5 +109,5 @@ export {
|
|
|
109
109
|
manifest
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
//# debugId=
|
|
112
|
+
//# debugId=5E24C9ADBCBE083164756E2164756E21
|
|
113
113
|
//# sourceMappingURL=manifest.js.map
|
package/dist/manifest.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/manifest.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { defineManifest } from \"@absolutejs/manifest\";\nimport { Type } from \"@sinclair/typebox\";\nimport type { BeaconOptions } from \"./index\";\n\nconst MAX_BATCH = 100;\nconst MAX_BREADCRUMBS = 200;\nconst MIN_FLUSH_INTERVAL_MS = 250;\n\n/* Serializable, browser-safe subset of BeaconOptions. `key`, `transport`,\n * `beforeSend`, and `getReplayId` are host capabilities and must never be\n * generated from settings. In particular, a browser manifest must not invite\n * an agent to embed an ingest credential. */\nexport const manifest = defineManifest<BeaconOptions>()({\n contract: 2,\n identity: {\n accent: \"#f97316\",\n category: \"observability\",\n description:\n \"Tiny browser observability SDK for uncaught errors, rejected promises, breadcrumbs, actionable UX/network signals, Core Web Vitals, trace correlation, and an optional session-replay id. Envelopes are validated by @absolutejs/errors/ingest; no credential belongs in browser settings.\",\n docsUrl: \"https://github.com/absolutejs/beacon\",\n name: \"@absolutejs/beacon\",\n tagline: \"Learn what visitors experience when a site goes wrong.\",\n },\n settings: Type.Object({\n endpoint: Type.Optional(\n Type.String({\n default: \"/api/errors/ingest\",\n description:\n \"Same-origin or explicitly allowed error-ingest endpoint. Never put credentials in this URL.\",\n title: \"Error ingest endpoint\",\n }),\n ),\n environment: Type.Optional(\n Type.String({\n description: \"Deployment environment attached to each event.\",\n examples: [\"production\"],\n title: \"Environment\",\n }),\n ),\n filterKnownNoise: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n \"Drop signatures known to originate in browser hosts and scanners rather than application code.\",\n title: \"Filter known browser noise\",\n \"x-group\": \"advanced\",\n }),\n ),\n flushIntervalMs: Type.Optional(\n Type.Integer({\n description:\n \"How often buffered errors are flushed, in milliseconds. Default is 5000.\",\n minimum: MIN_FLUSH_INTERVAL_MS,\n title: \"Flush interval\",\n \"x-group\": \"advanced\",\n }),\n ),\n maxBatch: Type.Optional(\n Type.Integer({\n description: \"Flush once this many events are buffered. Default is 30.\",\n maximum: MAX_BATCH,\n minimum: 1,\n title: \"Events per batch\",\n \"x-group\": \"advanced\",\n }),\n ),\n maxBreadcrumbs: Type.Optional(\n Type.Integer({\n description:\n \"Recent browser actions retained with an event. Default is 30.\",\n maximum: MAX_BREADCRUMBS,\n minimum: 0,\n title: \"Breadcrumb limit\",\n \"x-group\": \"advanced\",\n }),\n ),\n project: Type.String({\n default: \"web\",\n description:\n \"Project identifier accepted by the host ingest boundary. Managed hosts replace this with their tenant id.\",\n title: \"Project\",\n }),\n release: Type.Optional(\n Type.String({\n description: \"Immutable application release identifier.\",\n title: \"Release\",\n }),\n ),\n sampleRate: Type.Optional(\n Type.Number({\n default: 1,\n description: \"Fraction of captured events retained, from 0 to 1.\",\n maximum: 1,\n minimum: 0,\n title: \"Event sample rate\",\n }),\n ),\n signals: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n \"Capture
|
|
5
|
+
"import { defineManifest } from \"@absolutejs/manifest\";\nimport { Type } from \"@sinclair/typebox\";\nimport type { BeaconOptions } from \"./index\";\n\nconst MAX_BATCH = 100;\nconst MAX_BREADCRUMBS = 200;\nconst MIN_FLUSH_INTERVAL_MS = 250;\n\n/* Serializable, browser-safe subset of BeaconOptions. `key`, `transport`,\n * `beforeSend`, and `getReplayId` are host capabilities and must never be\n * generated from settings. In particular, a browser manifest must not invite\n * an agent to embed an ingest credential. */\nexport const manifest = defineManifest<BeaconOptions>()({\n contract: 2,\n identity: {\n accent: \"#f97316\",\n category: \"observability\",\n description:\n \"Tiny browser observability SDK for uncaught errors, rejected promises, breadcrumbs, actionable UX/network signals, Core Web Vitals, trace correlation, and an optional session-replay id. Envelopes are validated by @absolutejs/errors/ingest; no credential belongs in browser settings.\",\n docsUrl: \"https://github.com/absolutejs/beacon\",\n name: \"@absolutejs/beacon\",\n tagline: \"Learn what visitors experience when a site goes wrong.\",\n },\n settings: Type.Object({\n endpoint: Type.Optional(\n Type.String({\n default: \"/api/errors/ingest\",\n description:\n \"Same-origin or explicitly allowed error-ingest endpoint. Never put credentials in this URL.\",\n title: \"Error ingest endpoint\",\n }),\n ),\n environment: Type.Optional(\n Type.String({\n description: \"Deployment environment attached to each event.\",\n examples: [\"production\"],\n title: \"Environment\",\n }),\n ),\n filterKnownNoise: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n \"Drop signatures known to originate in browser hosts and scanners rather than application code.\",\n title: \"Filter known browser noise\",\n \"x-group\": \"advanced\",\n }),\n ),\n flushIntervalMs: Type.Optional(\n Type.Integer({\n description:\n \"How often buffered errors are flushed, in milliseconds. Default is 5000.\",\n minimum: MIN_FLUSH_INTERVAL_MS,\n title: \"Flush interval\",\n \"x-group\": \"advanced\",\n }),\n ),\n maxBatch: Type.Optional(\n Type.Integer({\n description: \"Flush once this many events are buffered. Default is 30.\",\n maximum: MAX_BATCH,\n minimum: 1,\n title: \"Events per batch\",\n \"x-group\": \"advanced\",\n }),\n ),\n maxBreadcrumbs: Type.Optional(\n Type.Integer({\n description:\n \"Recent browser actions retained with an event. Default is 30.\",\n maximum: MAX_BREADCRUMBS,\n minimum: 0,\n title: \"Breadcrumb limit\",\n \"x-group\": \"advanced\",\n }),\n ),\n project: Type.String({\n default: \"web\",\n description:\n \"Project identifier accepted by the host ingest boundary. Managed hosts replace this with their tenant id.\",\n title: \"Project\",\n }),\n release: Type.Optional(\n Type.String({\n description: \"Immutable application release identifier.\",\n title: \"Release\",\n }),\n ),\n sampleRate: Type.Optional(\n Type.Number({\n default: 1,\n description: \"Fraction of captured events retained, from 0 to 1.\",\n maximum: 1,\n minimum: 0,\n title: \"Event sample rate\",\n }),\n ),\n signals: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n \"Capture actionable browser reliability, accessibility, network, policy, worker, and realtime-transport failures.\",\n title: \"Actionable browser signals\",\n }),\n ),\n redact: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n \"Remove credential-bearing fields and URL query/hash values before events are buffered. Keep this on unless an equivalent trusted boundary owns redaction.\",\n title: \"Redact sensitive data\",\n }),\n ),\n vitals: Type.Optional(\n Type.Boolean({\n description:\n \"Capture Core Web Vitals through the optional web-vitals peer.\",\n title: \"Core Web Vitals\",\n }),\n ),\n }),\n wiring: [\n {\n description:\n \"Initialize privacy-conscious browser error and experience capture. A host can add replay correlation through getReplayId without exposing it as configuration.\",\n id: \"default\",\n client: {\n client: {\n code: \"const beacon = initBeacon(${settings});\",\n imports: [{ from: \"@absolutejs/beacon\", names: [\"initBeacon\"] }],\n placement: \"client-entry\",\n },\n },\n title: \"Capture browser errors and experience signals\",\n },\n ],\n});\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";;;;;;;;;AAAA;AACA;AAGA,IAAM,YAAY;AAClB,IAAM,kBAAk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,YAAY,KAAK,SACf,KAAK,OAAO;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,SAAS;AAAA,MACT,SAAS;AAAA,MACT,OAAO;AAAA,IACT,CAAC,CACH;AAAA,IACA,SAAS,KAAK,SACZ,KAAK,QAAQ;AAAA,MACX,SAAS;AAAA,MACT,aACE;AAAA,MACF,OAAO;AAAA,IACT,CAAC,CACH;AAAA,IACA,QAAQ,KAAK,SACX,KAAK,QAAQ;AAAA,MACX,SAAS;AAAA,MACT,aACE;AAAA,MACF,OAAO;AAAA,IACT,CAAC,CACH;AAAA,IACA,QAAQ,KAAK,SACX,KAAK,QAAQ;AAAA,MACX,aACE;AAAA,MACF,OAAO;AAAA,IACT,CAAC,CACH;AAAA,EACF,CAAC;AAAA,EACD,QAAQ;AAAA,IACN;AAAA,MACE,aACE;AAAA,MACF,IAAI;AAAA,MACJ,QAAQ;AAAA,QACN,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,SAAS,CAAC,EAAE,MAAM,sBAAsB,OAAO,CAAC,YAAY,EAAE,CAAC;AAAA,UAC/D,WAAW;AAAA,QACb;AAAA,MACF;AAAA,MACA,OAAO;AAAA,IACT;AAAA,EACF;AACF,CAAC;",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "5E24C9ADBCBE083164756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"signals": {
|
|
81
81
|
"default": true,
|
|
82
|
-
"description": "Capture
|
|
82
|
+
"description": "Capture actionable browser reliability, accessibility, network, policy, worker, and realtime-transport failures.",
|
|
83
83
|
"title": "Actionable browser signals",
|
|
84
84
|
"type": "boolean"
|
|
85
85
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/beacon",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
4
|
"description": "Tiny, zero-dependency browser SDK for the AbsoluteJS observability stack. Captures uncaught errors + unhandled rejections, breadcrumbs (console/click/fetch/history), batches, and POSTs an envelope to @absolutejs/errors/ingest via sendBeacon/keepalive. ~2-5KB gz, no Effect in the browser; end-to-end type-safe via the shared erased envelope contract.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|