@newtalaria/browser 0.1.17 → 0.1.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 +136 -15
- package/dist/client.d.ts +13 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +628 -37
- package/dist/index.js.map +4 -4
- package/dist/replay/hooks.d.ts +45 -2
- package/dist/replay/hooks.d.ts.map +1 -1
- package/dist/replay/privacy.d.ts +1 -1
- package/dist/replay/privacy.d.ts.map +1 -1
- package/dist/sdk_meta.d.ts +1 -1
- package/dist/talaria.browser.iife.js +610 -36
- package/dist/talaria.browser.iife.js.map +4 -4
- package/dist/transport/events.d.ts +4 -1
- package/dist/transport/events.d.ts.map +1 -1
- package/dist/types.d.ts +112 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/browser_context.d.ts +4 -3
- package/dist/utils/browser_context.d.ts.map +1 -1
- package/dist/utils/network_error.d.ts +5 -0
- package/dist/utils/network_error.d.ts.map +1 -1
- package/dist/utils/stacktrace.d.ts +35 -0
- package/dist/utils/stacktrace.d.ts.map +1 -0
- package/dist/utils/tags.d.ts +28 -0
- package/dist/utils/tags.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Browser SDK for [Talaria](https://github.com/) — error capture and **session replay** (rrweb event streams, not video).
|
|
4
4
|
|
|
5
|
+
Network calls (`fetch` / XHR) are instrumented as replay breadcrumbs; **only first-party (same-origin) or allowlisted origins** promote failed requests to error events — see [Failed HTTP / network requests](#failed-http--network-requests--events).
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -59,6 +61,35 @@ Every ingested event includes browser runtime tags (`browser.name`, `browser.ver
|
|
|
59
61
|
|
|
60
62
|
Optional init `tags` are merged into every captured event (per-call tags win on key conflict).
|
|
61
63
|
|
|
64
|
+
### Tags (low-cardinality dimensions)
|
|
65
|
+
|
|
66
|
+
Use **tags** for dimensions you will filter/group on (`feature`, `operation`, `service`, …). Put diagnostic fields (`business_id`, request payloads) in `extra` / capture context — not tags.
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
Talaria.init({
|
|
70
|
+
dsn: '…',
|
|
71
|
+
apiKey: '…',
|
|
72
|
+
environment: 'production',
|
|
73
|
+
tags: { service: 'admin-web', platform: 'web' },
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const checkout = Talaria.withTags({
|
|
77
|
+
feature: 'checkout',
|
|
78
|
+
operation: 'pay',
|
|
79
|
+
});
|
|
80
|
+
await checkout.captureMessage('Payment started', 'info');
|
|
81
|
+
await checkout.captureException(err, {
|
|
82
|
+
tags: { component: 'stripe' }, // merges on top of withTags
|
|
83
|
+
extra: { cart_id: 'abc123' }, // high-cardinality → extra
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Merge order (later wins):** automatic browser tags → init `tags` → `withTags` scope → per-call `context.tags`.
|
|
88
|
+
|
|
89
|
+
**Limits:** max 20 tags, key ≤64 (`[a-z0-9_.-]`), value ≤128, ~2KB total. Invalid keys are dropped. In non-production, high-cardinality-looking keys/values log a console warning.
|
|
90
|
+
|
|
91
|
+
Do **not** put `environment` / `release` in tags — use the first-class init fields.
|
|
92
|
+
|
|
62
93
|
`environment` must resolve to a wire value: `production` | `staging` | `development`. Common aliases are accepted (`test`/`uat` → `staging`, `prod`/`live` → `production`, `dev`/`local` → `development`), matching the PHP SDK. Invalid values throw at `init`. Permanent `events/ingest` 4xx responses disable further capture for that page session so misconfig cannot spin forever.
|
|
63
94
|
|
|
64
95
|
## Script tag (IIFE)
|
|
@@ -187,15 +218,24 @@ Set `inlineStylesheet: true` so same-origin stylesheet rules are embedded while
|
|
|
187
218
|
|
|
188
219
|
### Failed HTTP / network requests → events
|
|
189
220
|
|
|
190
|
-
|
|
221
|
+
All instrumented `fetch` / XHR calls are recorded as replay breadcrumbs (`talaria-network`). **Error events are promoted only for first-party (same-origin) or explicitly allowlisted origins.**
|
|
222
|
+
|
|
223
|
+
| Request | HTTP 5xx | Transport failure / timeout | Abort |
|
|
224
|
+
| --- | --- | --- | --- |
|
|
225
|
+
| Same-origin | Error event | Error event | Breadcrumb only |
|
|
226
|
+
| Allowlisted third-party (`networkErrorOrigins`) | Error event | Error event | Breadcrumb only |
|
|
227
|
+
| Other third-party (analytics, ads, widgets, …) | Breadcrumb only | Breadcrumb only | Breadcrumb only |
|
|
191
228
|
|
|
192
|
-
|
|
229
|
+
This avoids Issue spam from Google Analytics, ad pixels, privacy blockers, and similar third-party noise—without a hardcoded domain denylist. Add origins you intentionally depend on (payments, CMS APIs, widgets):
|
|
193
230
|
|
|
194
|
-
|
|
231
|
+
```ts
|
|
232
|
+
networkErrorOrigins: ['https://api.stripe.com', 'https://widget.yonder.example'],
|
|
233
|
+
// Escape hatch (not recommended): networkErrorOrigins: ['*']
|
|
234
|
+
```
|
|
195
235
|
|
|
196
|
-
**URL privacy:** network telemetry stores `origin + pathname` only (plus `hostname` / `pathname`). Query strings and fragments are stripped by default
|
|
236
|
+
**URL privacy:** network telemetry stores `origin + pathname` only (plus `hostname` / `pathname`). Query strings and fragments are stripped by default. Set `captureRequestQueryParameters: true` to keep query params after redaction of secrets **and** common tracking keys (`token`, `api_key`, `gclid`, `fbclid`, `_ga`, `cid`, `sid`, …). Bodies and auth headers are never captured.
|
|
197
237
|
|
|
198
|
-
Both **`fetch`** and **`XMLHttpRequest`** are instrumented (`
|
|
238
|
+
Both **`fetch`** and **`XMLHttpRequest`** are instrumented (`network.transport`: `fetch` | `xhr`). Failure kinds are only claimed when detectable:
|
|
199
239
|
|
|
200
240
|
| `failure.kind` | Meaning |
|
|
201
241
|
| --- | --- |
|
|
@@ -204,16 +244,37 @@ Both **`fetch`** and **`XMLHttpRequest`** are instrumented (`http.transport`: `f
|
|
|
204
244
|
| `timeout` | `TimeoutError` or XHR `timeout` event |
|
|
205
245
|
| `abort` | `AbortError` / XHR abort — recorded in breadcrumbs, **not** promoted as events |
|
|
206
246
|
|
|
207
|
-
We **do not** classify status 0 as `cors` — browsers do not expose that reliably.
|
|
247
|
+
We **do not** classify status 0 as `cors` — browsers do not expose that reliably. Tags include `network.party` (`first_party` \| `third_party`).
|
|
208
248
|
|
|
209
|
-
Promoted events use structured `extra`:
|
|
249
|
+
Promoted events use structured `extra` (server groups on method + host + path + kind + status) plus a first-class `exception` with synthetic type `HttpError` | `NetworkError` | `TimeoutError`:
|
|
210
250
|
|
|
211
251
|
```json
|
|
212
252
|
{
|
|
213
|
-
"http": {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
253
|
+
"http": {
|
|
254
|
+
"method": "POST",
|
|
255
|
+
"url": "https://app.example.com/api/orders",
|
|
256
|
+
"origin": "https://app.example.com",
|
|
257
|
+
"hostname": "app.example.com",
|
|
258
|
+
"pathname": "/api/orders",
|
|
259
|
+
"transport": "fetch"
|
|
260
|
+
},
|
|
261
|
+
"failure": { "kind": "network", "name": "TypeError", "message": "Failed to fetch" },
|
|
262
|
+
"network": { "party": "first_party", "durationMs": 842, "aborted": false, "ok": false },
|
|
263
|
+
"status_code": null
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Wire `exception` (not `extra`):
|
|
268
|
+
|
|
269
|
+
```json
|
|
270
|
+
{
|
|
271
|
+
"values": [
|
|
272
|
+
{
|
|
273
|
+
"type": "NetworkError",
|
|
274
|
+
"value": "Network error: GET https://app.example.com/api/orders — TypeError: Failed to fetch",
|
|
275
|
+
"mechanism": { "type": "http", "handled": true, "synthetic": true }
|
|
276
|
+
}
|
|
277
|
+
]
|
|
217
278
|
}
|
|
218
279
|
```
|
|
219
280
|
|
|
@@ -224,10 +285,12 @@ Talaria.init({
|
|
|
224
285
|
dsn: 'https://api.example.com',
|
|
225
286
|
apiKey: 'tal_live_…',
|
|
226
287
|
environment: 'production',
|
|
227
|
-
// Default true — HTTP status promotion
|
|
288
|
+
// Default true — HTTP status promotion (first-party / allowlisted only)
|
|
228
289
|
captureFailedRequests: true,
|
|
229
|
-
// Default true — transport failures (
|
|
290
|
+
// Default true — transport failures (first-party / allowlisted only)
|
|
230
291
|
captureNetworkErrors: true,
|
|
292
|
+
// Extra origins to treat like first-party for promotion
|
|
293
|
+
networkErrorOrigins: ['https://api.stripe.com'],
|
|
231
294
|
// Default false — do not store ?query on network URLs
|
|
232
295
|
captureRequestQueryParameters: false,
|
|
233
296
|
// Default [[500, 599]]. CMS admin often wants 4xx too:
|
|
@@ -237,7 +300,38 @@ Talaria.init({
|
|
|
237
300
|
});
|
|
238
301
|
```
|
|
239
302
|
|
|
240
|
-
`AbortError` is never promoted and is ignored by the global `unhandledrejection` handler.
|
|
303
|
+
`AbortError` is never promoted and is ignored by the global `unhandledrejection` handler. Bare `TypeError: Failed to fetch` / `TimeoutError` rejections are correlated with recent network breadcrumbs: promoted failures and third-party noise are suppressed; first-party failures with promotion off keep the exception and merge request context.
|
|
304
|
+
|
|
305
|
+
#### Network event tags (low cardinality)
|
|
306
|
+
|
|
307
|
+
| Tag | Values | Notes |
|
|
308
|
+
| --- | --- | --- |
|
|
309
|
+
| `http.method` | `GET`, `POST`, … | |
|
|
310
|
+
| `http.status_code` | e.g. `500` | Present on HTTP promotions only |
|
|
311
|
+
| `network.failure_kind` | `http` \| `network` \| `timeout` | |
|
|
312
|
+
| `network.transport` | `fetch` \| `xhr` | |
|
|
313
|
+
| `network.party` | `first_party` \| `third_party` | Same-origin vs cross-origin (allowlist does not change this tag) |
|
|
314
|
+
| `network.error_name` | e.g. `TypeError`, `TimeoutError` | When available |
|
|
315
|
+
|
|
316
|
+
Hostname, pathname, full sanitized URL, and duration live in `extra` — not tags — to avoid high-cardinality facets.
|
|
317
|
+
|
|
318
|
+
#### Issue grouping (server)
|
|
319
|
+
|
|
320
|
+
Promoted network events set first-class `exception.values[0].type` (`HttpError` \| `NetworkError` \| `TimeoutError`) and `extra.status_code`. The server fingerprints them on **method + hostname + pathname + failure kind + status** (not the human message), so query strings and volatile error text do not fragment Issues. See [`planning/fingerprints.md`](../../../planning/fingerprints.md) §6.4.
|
|
321
|
+
|
|
322
|
+
### Exceptions and stack frames
|
|
323
|
+
|
|
324
|
+
`captureException` sends:
|
|
325
|
+
|
|
326
|
+
| Field | Meaning |
|
|
327
|
+
| --- | --- |
|
|
328
|
+
| `platform` | Always `javascript` |
|
|
329
|
+
| `stackTrace` | Raw `Error.stack` string (kept for compatibility) |
|
|
330
|
+
| `exception.values[0]` | `type` = `err.name`, `value` = `err.message`, parsed `stacktrace.frames` (oldest → newest), `mechanism` |
|
|
331
|
+
|
|
332
|
+
Frames use wire field `functionName` (not `function`). `inApp` is **true** for same-origin frames (and `inAppOrigins` / `inAppAllowUrls`); **false** for cross-origin CDN/third-party scripts, `@newtalaria/browser`, `node_modules`, browser extensions, and `inAppDenyUrls`.
|
|
333
|
+
|
|
334
|
+
Global handlers set `mechanism.type` to `onerror` / `unhandledrejection` (`handled: false`). Manual captures default to `generic` (`handled: true`). Do **not** put `exception_class`, `file`, `line`, or `code` in `extra` — those belong on the exception / frame payload.
|
|
241
335
|
|
|
242
336
|
### Event timestamps
|
|
243
337
|
|
|
@@ -248,11 +342,38 @@ Talaria.init({
|
|
|
248
342
|
|
|
249
343
|
If replay upload runs before event ingest, `extra.sdk.queuedMs` records how long capture waited (ms). A large `createdAt - timestamp` gap is usually flush/queue delay or clock skew — not a wrong failure classification.
|
|
250
344
|
|
|
345
|
+
## Init options reference
|
|
346
|
+
|
|
347
|
+
| Option | Default | Description |
|
|
348
|
+
| --- | --- | --- |
|
|
349
|
+
| `dsn` / `baseUrl` | *(required)* | Serverpod host, e.g. `https://api.example.com` |
|
|
350
|
+
| `apiKey` | *(required)* | Project API key (`tal_live_…`) |
|
|
351
|
+
| `environment` | *(required)* | `production` \| `staging` \| `development` (aliases accepted) |
|
|
352
|
+
| `release` | — | Optional release string on every event |
|
|
353
|
+
| `userId` | — | Optional app user id |
|
|
354
|
+
| `tags` | — | Tags merged into every event |
|
|
355
|
+
| `replaysSessionSampleRate` | `0` | Fraction of sessions that upload continuously |
|
|
356
|
+
| `replaysOnErrorSampleRate` | `1` | Fraction of errors that promote the ring buffer |
|
|
357
|
+
| `replaysErrorAfterMs` | `15000` | Post-error upload window; `0` = continue to 5 min cap |
|
|
358
|
+
| `maskAllInputs` | `true` | rrweb input masking |
|
|
359
|
+
| `inlineStylesheet` | `false` | Embed same-origin CSS (CMS/admin) |
|
|
360
|
+
| `blockSelector` | — | Extra CSS selectors blocked from the DOM snapshot |
|
|
361
|
+
| `disableDefaultIntegrations` | `false` | Skip `window.onerror` / `unhandledrejection` |
|
|
362
|
+
| `captureFailedRequests` | `true` | Promote HTTP status failures (**first-party / allowlisted only**) |
|
|
363
|
+
| `captureNetworkErrors` | `true` | Promote transport/timeout failures (**first-party / allowlisted only**) |
|
|
364
|
+
| `networkErrorOrigins` | `[]` | Extra origins eligible for promotion; same-origin always eligible; `['*']` = all (not recommended) |
|
|
365
|
+
| `failedRequestStatusCodes` | `[[500, 599]]` | Status codes/ranges to promote when origin is eligible |
|
|
366
|
+
| `failedRequestIgnoreUrls` | `[]` | URL substrings never promoted (Talaria `/events` + `/replays` always ignored) |
|
|
367
|
+
| `captureRequestQueryParameters` | `false` | Keep `?query` on network URLs after redaction (`includeNetworkUrlQuery` alias) |
|
|
368
|
+
| `inAppOrigins` | `[]` | Extra origins treated as app code for stack `inApp` (exact origin strings; same-origin always included) |
|
|
369
|
+
| `inAppAllowUrls` | `[]` | Path substrings or RegExps that force `inApp: true` |
|
|
370
|
+
| `inAppDenyUrls` | `[]` | Path substrings or RegExps that force `inApp: false` |
|
|
371
|
+
|
|
251
372
|
## Public API
|
|
252
373
|
|
|
253
374
|
| API | Description |
|
|
254
375
|
| --- | --- |
|
|
255
|
-
| `Talaria.init(options)` | Configure + start recording |
|
|
376
|
+
| `Talaria.init(options)` | Configure + start recording + install network/console hooks |
|
|
256
377
|
| `Talaria.captureException(error)` | Ingest error (+ replay link when sampled) |
|
|
257
378
|
| `Talaria.captureMessage(message, level?)` | Ingest message |
|
|
258
379
|
| `Talaria.getReplayId()` | Active upload replay id, or `null` |
|
package/dist/client.d.ts
CHANGED
|
@@ -49,6 +49,11 @@ export declare class TalariaClient {
|
|
|
49
49
|
getReplayId(): string | null;
|
|
50
50
|
captureException(error: unknown, context?: CaptureContext): Promise<void>;
|
|
51
51
|
captureMessage(message: string, level?: SeverityLevel, context?: CaptureContext): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns a scoped capture facade that merges [tags] into every event.
|
|
54
|
+
* Nested `withTags` calls merge further (later keys win).
|
|
55
|
+
*/
|
|
56
|
+
withTags(tags: Record<string, string>): ScopedTalaria;
|
|
52
57
|
flush(opts?: {
|
|
53
58
|
reason?: string;
|
|
54
59
|
keepalive?: boolean;
|
|
@@ -104,10 +109,11 @@ export declare class TalariaClient {
|
|
|
104
109
|
*/
|
|
105
110
|
private abortUnusableClip;
|
|
106
111
|
private stopUploadingAfterLimit;
|
|
112
|
+
private inAppFrameOptions;
|
|
107
113
|
private pruneRecentNetworkFailures;
|
|
108
114
|
private rememberNetworkFailure;
|
|
109
115
|
/**
|
|
110
|
-
* Find a recent transport failure for a bare fetch TypeError.
|
|
116
|
+
* Find a recent transport failure for a bare fetch TypeError / TimeoutError.
|
|
111
117
|
* Consumes the entry so a later duplicate path cannot reuse it.
|
|
112
118
|
*/
|
|
113
119
|
private consumeCorrelatedNetworkFailure;
|
|
@@ -125,4 +131,10 @@ export declare class TalariaClient {
|
|
|
125
131
|
private takeFittedSegment;
|
|
126
132
|
private finishOnServer;
|
|
127
133
|
}
|
|
134
|
+
/** Capture surface that inherits tags from `withTags`. */
|
|
135
|
+
export interface ScopedTalaria {
|
|
136
|
+
captureException(error: unknown, context?: CaptureContext): Promise<void>;
|
|
137
|
+
captureMessage(message: string, level?: SeverityLevel, context?: CaptureContext): Promise<void>;
|
|
138
|
+
withTags(tags: Record<string, string>): ScopedTalaria;
|
|
139
|
+
}
|
|
128
140
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAId,aAAa,EACb,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAuFpB,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAkPrC,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,MAAM,CAAuB;IACrC,yEAAyE;IACzE,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,uBAAuB,CAAK;IACpC,0EAA0E;IAC1E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
package/dist/index.d.ts
CHANGED
|
@@ -25,14 +25,19 @@ export declare const Talaria: {
|
|
|
25
25
|
init(options: TalariaInitOptions): void;
|
|
26
26
|
captureException(error: unknown, context?: CaptureContext): Promise<void>;
|
|
27
27
|
captureMessage(message: string, level?: SeverityLevel, context?: CaptureContext): Promise<void>;
|
|
28
|
+
withTags(tags: Record<string, string>): import("./client.js").ScopedTalaria;
|
|
28
29
|
getReplayId(): string | null;
|
|
29
30
|
flush(): Promise<void>;
|
|
30
31
|
close(): Promise<void>;
|
|
31
32
|
};
|
|
32
33
|
export { TalariaClient } from './client.js';
|
|
34
|
+
export type { ScopedTalaria } from './client.js';
|
|
35
|
+
export { mergeTags, normalizeTags, RESERVED_TAG_KEYS, } from './utils/tags.js';
|
|
33
36
|
export { computeErrorClipDeadlineMs, fitCompressedPrefix, isErrorClipBudgetExhausted, planOversizedRetry, } from './replay/fit_segment.js';
|
|
34
37
|
export { MAX_SEGMENTS_ERROR_CLIP, MAX_ERROR_CLIP_COMPRESSED_BYTES, TARGET_COMPRESSED_SEGMENT_BYTES, MAX_COMPRESSED_SEGMENT_BYTES, } from './replay/segment_buffer.js';
|
|
35
|
-
export type { CaptureContext, Environment, FailedRequestStatusCode, SeverityLevel, TalariaInitOptions, } from './types.js';
|
|
38
|
+
export type { CaptureContext, DebugImage, DebugMeta, Environment, ExceptionData, ExceptionMechanism, ExceptionValue, FailedRequestStatusCode, SeverityLevel, StackFrame, StackTrace, TalariaInitOptions, } from './types.js';
|
|
39
|
+
export { applySourceLocation, isInAppFrame, parseStackLine, parseStackTrace, resolvePageOrigin, } from './utils/stacktrace.js';
|
|
40
|
+
export type { InAppFrameOptions } from './utils/stacktrace.js';
|
|
36
41
|
export { REPLAY_CAPTURE_TAG, REPLAY_CAPTURE_REASON_TAG, } from './replay/capture_outcome.js';
|
|
37
42
|
export type { ReplayCaptureOutcome, ReplayCaptureReason, ReplayCaptureStatus, } from './replay/capture_outcome.js';
|
|
38
43
|
export default Talaria;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAIpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,OAAO;kBACJ,kBAAkB,GAAG,IAAI;4BAIf,OAAO,YAAY,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;4BAK9D,MAAM,UACP,aAAa,YACX,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;mBAID,MAAM,GAAG,IAAI;aAInB,OAAO,CAAC,IAAI,CAAC;aAIb,OAAO,CAAC,IAAI,CAAC;CAGvB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,cAAc,EACd,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAErC,eAAe,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAIpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,OAAO;kBACJ,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