@rasputin-ai/core 0.5.0-alpha.9 → 0.5.0
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 +3 -3
- package/dist/announce-deploy/announce-deploy.d.ts +2 -2
- package/dist/announce-deploy/announce-deploy.d.ts.map +1 -1
- package/dist/create-client/create-client-types.d.ts +23 -8
- package/dist/create-client/create-client-types.d.ts.map +1 -1
- package/dist/create-client/create-client.d.ts.map +1 -1
- package/dist/create-client/is-client-enabled.d.ts +17 -3
- package/dist/create-client/is-client-enabled.d.ts.map +1 -1
- package/dist/create-ingest-event/create-ingest-event-types.d.ts +4 -1
- package/dist/create-ingest-event/create-ingest-event-types.d.ts.map +1 -1
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts +104 -43
- package/dist/create-ingest-event/runtime-execution-state-types.d.ts.map +1 -1
- package/dist/derivation/canonical-json.d.ts +0 -1
- package/dist/derivation/canonical-json.d.ts.map +1 -1
- package/dist/derivation/hash-instrumentation-manifest.d.ts +2 -2
- package/dist/derivation/hash-instrumentation-manifest.d.ts.map +1 -1
- package/dist/derivation/rasputin-wire-tag.d.ts +11 -0
- package/dist/derivation/rasputin-wire-tag.d.ts.map +1 -1
- package/dist/derivation/sensitive-property-name.d.ts +3 -0
- package/dist/derivation/sensitive-property-name.d.ts.map +1 -0
- package/dist/derivation/sha256.d.ts +0 -1
- package/dist/derivation/sha256.d.ts.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +860 -1238
- package/dist/instrumentation-manifest/instrumentation-manifest-types.d.ts +26 -2
- package/dist/instrumentation-manifest/instrumentation-manifest-types.d.ts.map +1 -1
- package/dist/instrumentation-manifest/upload-instrumentation-manifest.d.ts +1 -0
- package/dist/instrumentation-manifest/upload-instrumentation-manifest.d.ts.map +1 -1
- package/dist/normalize-frames/normalize-frames.d.ts.map +1 -1
- package/dist/parse-stack/fold-synthetic-frames.d.ts +15 -0
- package/dist/parse-stack/fold-synthetic-frames.d.ts.map +1 -0
- package/dist/resolve-source-maps/resolve-source-maps.d.ts.map +1 -1
- package/dist/sdk-meta.d.ts +1 -1
- package/dist/sdk-meta.d.ts.map +1 -1
- package/dist/source-identity/source-identity.d.ts +14 -1
- package/dist/source-identity/source-identity.d.ts.map +1 -1
- package/dist/suppression/create-suppression.d.ts.map +1 -1
- package/dist/suppression/suppression-types.d.ts +2 -0
- package/dist/suppression/suppression-types.d.ts.map +1 -1
- package/dist/transport/create-transport.d.ts.map +1 -1
- package/dist/transport/node-http-fetch.d.ts +3 -0
- package/dist/transport/node-http-fetch.d.ts.map +1 -0
- package/dist/transport/process-shutdown-hooks.d.ts +8 -0
- package/dist/transport/process-shutdown-hooks.d.ts.map +1 -0
- package/dist/transport/send-batch.d.ts +1 -0
- package/dist/transport/send-batch.d.ts.map +1 -1
- package/dist/transport/transport-queue.d.ts +2 -1
- package/dist/transport/transport-queue.d.ts.map +1 -1
- package/dist/transport/transport-types.d.ts +36 -11
- package/dist/transport/transport-types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/derivation/captured-value-markers.d.ts +0 -5
- package/dist/derivation/captured-value-markers.d.ts.map +0 -1
- package/dist/derivation/evaluate-derivation-plan.d.ts +0 -53
- package/dist/derivation/evaluate-derivation-plan.d.ts.map +0 -1
- package/dist/derivation/wire-values-equal.d.ts +0 -3
- package/dist/derivation/wire-values-equal.d.ts.map +0 -1
- package/dist/instrumentation-manifest/derivation-plan-types.d.ts +0 -142
- package/dist/instrumentation-manifest/derivation-plan-types.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Rasputin AI SDK — Core
|
|
2
|
-
|
|
3
|
-
Low-level error capture, stack parsing, source maps, and ingest transport. Most applications should use [`@rasputin-ai/node`](https://www.npmjs.com/package/@rasputin-ai/node) or [`@rasputin-ai/elysia`](https://www.npmjs.com/package/@rasputin-ai/elysia) instead.
|
|
1
|
+
# Rasputin AI SDK — Core
|
|
2
|
+
|
|
3
|
+
Low-level error capture, stack parsing, source maps, and ingest transport. Most applications should use [`@rasputin-ai/node`](https://www.npmjs.com/package/@rasputin-ai/node) or [`@rasputin-ai/elysia`](https://www.npmjs.com/package/@rasputin-ai/elysia) instead.
|
|
@@ -3,7 +3,7 @@ type AnnounceDeployOptions = {
|
|
|
3
3
|
/** Full URL for `POST /deploy` (apps/api post-deploy.handler). */
|
|
4
4
|
deployUrl: string;
|
|
5
5
|
projectApiKey: string;
|
|
6
|
-
environment
|
|
6
|
+
environment?: string | null;
|
|
7
7
|
/** Commit SHA / release. Empty when it could not be detected. */
|
|
8
8
|
release?: string;
|
|
9
9
|
/** When false, no-op. Default true. */
|
|
@@ -12,7 +12,7 @@ type AnnounceDeployOptions = {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Fire-and-forget deploy announcement so clean releases still land in `deploys`.
|
|
15
|
-
* Never throws — init must not crash the host app
|
|
15
|
+
* Never throws or rejects — init must not crash the host app.
|
|
16
16
|
*/
|
|
17
17
|
export declare const announceDeploy: (options: AnnounceDeployOptions) => Promise<"ok" | "skipped" | "failed">;
|
|
18
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"announce-deploy.d.ts","sourceRoot":"","sources":["../../src/announce-deploy/announce-deploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"announce-deploy.d.ts","sourceRoot":"","sources":["../../src/announce-deploy/announce-deploy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,KAAK,qBAAqB,GAAG;IAC5B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAC1B,SAAS,qBAAqB,KAC5B,OAAO,CAAC,IAAI,GAAG,SAAS,GAAG,QAAQ,CAmCrC,CAAC"}
|
|
@@ -2,11 +2,16 @@ import type { RequestContext } from '../create-ingest-event/create-ingest-event-
|
|
|
2
2
|
import type { RuntimeExecutionState } from '../create-ingest-event/runtime-execution-state-types';
|
|
3
3
|
import type { TransportFetch, TransportStats } from '../transport/transport-types';
|
|
4
4
|
type RasputinBaseOptions = {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Project API key from the Rasputin dashboard. Required.
|
|
7
|
+
* An empty or whitespace-only value makes the SDK fully inert.
|
|
8
|
+
*/
|
|
6
9
|
projectApiKey: string;
|
|
7
10
|
/**
|
|
8
11
|
* Where the error happened — e.g. `production`, `staging`, `preview`.
|
|
9
12
|
* Shown in the UI and used when grouping errors.
|
|
13
|
+
* Blank, whitespace, or missing values skip deploy announcement and never
|
|
14
|
+
* crash initialization.
|
|
10
15
|
*/
|
|
11
16
|
environment: string;
|
|
12
17
|
/**
|
|
@@ -16,13 +21,15 @@ type RasputinBaseOptions = {
|
|
|
16
21
|
* Set `RASPUTIN_RELEASE` in your deploy environment and pass:
|
|
17
22
|
* `release: process.env.RASPUTIN_RELEASE!`
|
|
18
23
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
24
|
+
* Empty or whitespace-only values make the SDK fully inert — the same as a
|
|
25
|
+
* blank API key. Must be 7–40 hex chars. Invalid non-empty values may fall
|
|
26
|
+
* through to `RASPUTIN_RELEASE`, platform vars, or `.git` HEAD.
|
|
21
27
|
*/
|
|
22
28
|
release: string;
|
|
23
29
|
/**
|
|
24
|
-
* Master on/off switch. When `false`, nothing is captured or sent
|
|
25
|
-
*
|
|
30
|
+
* Master on/off switch. When `false`, nothing is captured or sent and no
|
|
31
|
+
* process handlers are installed. A blank `projectApiKey` or `release` is
|
|
32
|
+
* also inert. Useful for local dev or tests without removing init code.
|
|
26
33
|
*
|
|
27
34
|
* @default true
|
|
28
35
|
*/
|
|
@@ -34,6 +41,10 @@ type RasputinBaseOptions = {
|
|
|
34
41
|
* @default true
|
|
35
42
|
*/
|
|
36
43
|
logSuccess?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Rasputin API origin. Leave this unset unless you self-host or point at a
|
|
46
|
+
* non-production environment. Defaults to `https://api.rasputinai.dev`.
|
|
47
|
+
*/
|
|
37
48
|
apiUrl?: string;
|
|
38
49
|
/**
|
|
39
50
|
* Folder of this service inside the Git repo, such as `apps/api`.
|
|
@@ -87,11 +98,14 @@ export type CaptureContext = {
|
|
|
87
98
|
* a request yourself; omit for background jobs and scripts.
|
|
88
99
|
*/
|
|
89
100
|
request?: RequestContext;
|
|
90
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* Call history and captured values from the failing request or job.
|
|
103
|
+
* Integrations attach this automatically. Pass it only if you captured it yourself.
|
|
104
|
+
*/
|
|
91
105
|
runtimeState?: RuntimeExecutionState;
|
|
92
106
|
};
|
|
93
107
|
export type RasputinClientStats = {
|
|
94
|
-
/**
|
|
108
|
+
/** How many events this process has queued, sent, retried, or dropped since it started. */
|
|
95
109
|
transport: TransportStats;
|
|
96
110
|
};
|
|
97
111
|
/**
|
|
@@ -133,7 +147,7 @@ export type RasputinClient = {
|
|
|
133
147
|
* After `close`, the client stops sending — create a new client if you restart.
|
|
134
148
|
*/
|
|
135
149
|
close: () => Promise<void>;
|
|
136
|
-
/**
|
|
150
|
+
/** Counters for this process since it started. They reset when the process restarts. */
|
|
137
151
|
getStats: () => RasputinClientStats;
|
|
138
152
|
};
|
|
139
153
|
/** Integration configuration shared with official runtime and framework packages. */
|
|
@@ -143,6 +157,7 @@ export type CreateClientHooks = {
|
|
|
143
157
|
installTransportSignalHandlers?: boolean;
|
|
144
158
|
sdkVersion?: string;
|
|
145
159
|
sdkName?: string;
|
|
160
|
+
resolveRuntimeState?: (error: unknown, context?: CaptureContext) => RuntimeExecutionState | undefined;
|
|
146
161
|
};
|
|
147
162
|
export {};
|
|
148
163
|
//# sourceMappingURL=create-client-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-client-types.d.ts","sourceRoot":"","sources":["../../src/create-client/create-client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnF,KAAK,mBAAmB,GAAG;IAC1B
|
|
1
|
+
{"version":3,"file":"create-client-types.d.ts","sourceRoot":"","sources":["../../src/create-client/create-client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnF,KAAK,mBAAmB,GAAG;IAC1B;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;OAUG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAErC;;;;OAIG;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-client.d.ts","sourceRoot":"","sources":["../../src/create-client/create-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-client.d.ts","sourceRoot":"","sources":["../../src/create-client/create-client.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAuBhG,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,YAGlC,CAAC;AAaF;;;GAGG;AACH,eAAO,MAAM,YAAY,GACxB,SAAS,eAAe,EACxB,QAAO,iBAAsB,KAC3B,cAkKF,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import type { RasputinClient
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { RasputinClient } from './create-client-types';
|
|
2
|
+
type ClientActivationOptions = {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
projectApiKey?: string;
|
|
5
|
+
release?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ClientActivation = {
|
|
8
|
+
enabled: false;
|
|
9
|
+
} | {
|
|
10
|
+
enabled: true;
|
|
11
|
+
projectApiKey: string;
|
|
12
|
+
release: string;
|
|
13
|
+
};
|
|
14
|
+
/** `enabled: false`, a blank API key, or a blank/unresolved release → fully inert. */
|
|
15
|
+
export declare const resolveClientActivation: (options: ClientActivationOptions) => ClientActivation;
|
|
16
|
+
export declare const isClientEnabled: (options: ClientActivationOptions) => boolean;
|
|
4
17
|
export declare const noopClient: () => RasputinClient;
|
|
18
|
+
export {};
|
|
5
19
|
//# sourceMappingURL=is-client-enabled.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-client-enabled.d.ts","sourceRoot":"","sources":["../../src/create-client/is-client-enabled.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-client-enabled.d.ts","sourceRoot":"","sources":["../../src/create-client/is-client-enabled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,KAAK,uBAAuB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACzB;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,GAClB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,GAAI,SAAS,uBAAuB,KAAG,gBAU1E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,uBAAuB,KAAG,OAC1B,CAAC;AAE1C,eAAO,MAAM,UAAU,QAAO,cA2B5B,CAAC"}
|
|
@@ -32,10 +32,13 @@ export type IngestEvent = {
|
|
|
32
32
|
/** Bounded runtime state atomically associated with this error occurrence. */
|
|
33
33
|
runtime_state?: RuntimeExecutionState;
|
|
34
34
|
};
|
|
35
|
+
/** HTTP details attached to an error. Framework plugins fill this in for route failures. */
|
|
35
36
|
export type RequestContext = {
|
|
37
|
+
/** HTTP method, such as `GET` or `POST`. */
|
|
36
38
|
method?: string | null;
|
|
37
|
-
/** Route pattern (`/users/:id`), never a
|
|
39
|
+
/** Route pattern (`/users/:id`), never a URL with a real user id in it. */
|
|
38
40
|
route?: string | null;
|
|
41
|
+
/** Response status when the error was reported, such as `500`. */
|
|
39
42
|
status?: number | null;
|
|
40
43
|
};
|
|
41
44
|
export type CreateIngestEventInput = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-ingest-event-types.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/create-ingest-event-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,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AM,MAAM,cAAc,GAAG;IAC5B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACrC,CAAC"}
|
|
@@ -1,126 +1,187 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* The JSON snapshot attached to an error: call tree, captured values, and timings.
|
|
3
|
+
* This is the contract between the recorder and Rasputin ingest.
|
|
2
4
|
* Keep in sync with `packages/~db/schemas/occurrence-runtime-state-schema.ts`.
|
|
3
|
-
* ⚠️ DERIVATION LOCKSTEP — the published SDK cannot import Rasputin's private packages.
|
|
4
5
|
*/
|
|
5
6
|
import type { RuntimeFunctionDefinition, SourcePosition } from '../source-identity/source-identity';
|
|
7
|
+
/**
|
|
8
|
+
* What kind of work this recording belongs to.
|
|
9
|
+
* HTTP requests use `http`. Background work uses `job`, `scheduled`, or `custom`.
|
|
10
|
+
*/
|
|
6
11
|
export type RuntimeExecutionKind = 'http' | 'serverless' | 'job' | 'scheduled' | 'custom';
|
|
12
|
+
/** HTTP details for a request-scoped recording. Same shape as `RequestContext`. */
|
|
7
13
|
export type RuntimeExecutionRequest = {
|
|
8
14
|
method?: string | null;
|
|
9
15
|
route?: string | null;
|
|
10
16
|
status?: number | null;
|
|
11
17
|
};
|
|
18
|
+
/** Labels for one recording: what kind of work it is, and optional HTTP details. */
|
|
12
19
|
export type RuntimeExecutionMetadata = {
|
|
20
|
+
/** `http` for a request, `job` for a background task, and so on. */
|
|
13
21
|
kind: RuntimeExecutionKind;
|
|
22
|
+
/** Human-readable name you passed to `execution.createScope()`, such as `sync-invoices`. */
|
|
14
23
|
name?: string;
|
|
24
|
+
/** HTTP method, route, and status when this recording is a request. */
|
|
15
25
|
request?: RuntimeExecutionRequest;
|
|
16
26
|
};
|
|
27
|
+
/** A function started while this request or job was being recorded. */
|
|
17
28
|
export type RuntimeFunctionEnterEvent = {
|
|
18
29
|
type: 'function_enter';
|
|
30
|
+
/** Id of this call. Later exit or throw events use the same id. */
|
|
19
31
|
callId: number;
|
|
32
|
+
/** Looks up the function in `ExecutionState.functions`. */
|
|
20
33
|
functionId: string;
|
|
34
|
+
/** `callId` of the function that called this one, when it is also recorded. */
|
|
21
35
|
parentCallId?: number;
|
|
36
|
+
/** Milliseconds from the start of this request or job. */
|
|
22
37
|
timestampMs: number;
|
|
38
|
+
/** Arguments as captured (redacted and size-limited). */
|
|
23
39
|
args: unknown[];
|
|
40
|
+
/**
|
|
41
|
+
* `throw` when arguments were read at throw time for a previously summarized call.
|
|
42
|
+
* Omitted means they were captured at function entry.
|
|
43
|
+
*/
|
|
44
|
+
capturedAt?: 'enter' | 'throw';
|
|
24
45
|
};
|
|
46
|
+
/** A recorded function returned normally. */
|
|
25
47
|
export type RuntimeFunctionExitEvent = {
|
|
26
48
|
type: 'function_exit';
|
|
49
|
+
/** Matches the earlier `function_enter` for this call. */
|
|
27
50
|
callId: number;
|
|
51
|
+
/** Milliseconds from the start of this request or job. */
|
|
28
52
|
timestampMs: number;
|
|
53
|
+
/** How long this call ran, in milliseconds. */
|
|
29
54
|
durationMs: number;
|
|
55
|
+
/** Return value as captured (redacted and size-limited). */
|
|
30
56
|
returnValue?: unknown;
|
|
31
57
|
};
|
|
32
|
-
/**
|
|
58
|
+
/** Where the exception was thrown, after stack frames are mapped back to source. */
|
|
33
59
|
export type RuntimeThrowLocation = {
|
|
60
|
+
/** File path shown in the stack, after source maps when available. */
|
|
34
61
|
file: string;
|
|
62
|
+
/** Package-relative source location when Rasputin can resolve one. */
|
|
35
63
|
source?: SourcePosition;
|
|
64
|
+
/** Function name from the stack frame. */
|
|
36
65
|
function?: string;
|
|
37
66
|
line?: number;
|
|
38
67
|
column?: number;
|
|
68
|
+
/** True when this frame is your application code, not a dependency. */
|
|
39
69
|
inApp: boolean;
|
|
40
70
|
};
|
|
71
|
+
/** A recorded function threw. This is usually the call that failed. */
|
|
41
72
|
export type RuntimeFunctionThrowEvent = {
|
|
42
73
|
type: 'function_throw';
|
|
74
|
+
/** Matches the earlier `function_enter` for this call. */
|
|
43
75
|
callId: number;
|
|
76
|
+
/** Milliseconds from the start of this request or job. */
|
|
44
77
|
timestampMs: number;
|
|
78
|
+
/** How long this call ran before it threw, in milliseconds. */
|
|
45
79
|
durationMs: number;
|
|
80
|
+
/** The thrown value, captured the same way as other values. */
|
|
46
81
|
error?: unknown;
|
|
47
|
-
/**
|
|
82
|
+
/** Source location of the throw, when the stack could be mapped. */
|
|
48
83
|
throwLocation?: RuntimeThrowLocation;
|
|
49
84
|
};
|
|
50
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Extra successful calls of the same function that were counted instead of stored
|
|
87
|
+
* in full, after `maxCapturedCallsPerFunction`.
|
|
88
|
+
*/
|
|
51
89
|
export type RuntimeFunctionCallsSuppressedEvent = {
|
|
52
90
|
type: 'function_calls_suppressed';
|
|
53
91
|
functionId: string;
|
|
54
92
|
parentCallId?: number;
|
|
55
|
-
/**
|
|
93
|
+
/** When the first extra call happened, in milliseconds from execution start. */
|
|
56
94
|
timestampMs: number;
|
|
57
|
-
/**
|
|
95
|
+
/** When the most recent extra call finished. */
|
|
58
96
|
lastTimestampMs: number;
|
|
97
|
+
/** How many extra successful calls this row stands in for. */
|
|
59
98
|
suppressedCallCount: number;
|
|
60
|
-
/**
|
|
99
|
+
/** Combined run time of those extra calls, in milliseconds. */
|
|
61
100
|
totalDurationMs: number;
|
|
62
101
|
};
|
|
102
|
+
/** One step in the recorded call history. */
|
|
63
103
|
export type RuntimeExecutionEvent = RuntimeFunctionEnterEvent | RuntimeFunctionExitEvent | RuntimeFunctionThrowEvent | RuntimeFunctionCallsSuppressedEvent;
|
|
64
|
-
|
|
65
|
-
rootId: number;
|
|
66
|
-
callId: number;
|
|
67
|
-
value: unknown;
|
|
68
|
-
completeness: 'exact' | 'partial';
|
|
69
|
-
};
|
|
70
|
-
export type RuntimeCapturedControlFact = {
|
|
71
|
-
factId: number;
|
|
72
|
-
callId: number;
|
|
73
|
-
value: boolean;
|
|
74
|
-
};
|
|
75
|
-
export type RuntimeDerivationCapture = {
|
|
76
|
-
manifestHash: string;
|
|
77
|
-
roots: RuntimeCapturedRoot[];
|
|
78
|
-
controlFacts: RuntimeCapturedControlFact[];
|
|
79
|
-
};
|
|
80
|
-
export type RuntimeDerivationMetrics = {
|
|
81
|
-
derivationCandidateFunctions: number;
|
|
82
|
-
derivationElidedFunctionCalls: number;
|
|
83
|
-
derivationRootsCaptured: number;
|
|
84
|
-
derivationControlFactsCaptured: number;
|
|
85
|
-
derivationValuesAvoided: number;
|
|
86
|
-
derivationFallbackFunctions: number;
|
|
87
|
-
derivationFallbackExpressions: number;
|
|
88
|
-
derivationFallbackReasons: Record<string, number>;
|
|
89
|
-
derivationRootBytes: number;
|
|
90
|
-
};
|
|
104
|
+
/** Recorder cost for this one request or job, not process-wide totals. */
|
|
91
105
|
export type RuntimeExecutionRecorderMetrics = {
|
|
92
|
-
/**
|
|
106
|
+
/** Time spent inside recorder code for this execution, in milliseconds. */
|
|
93
107
|
inlineWallTimeMs: number;
|
|
94
|
-
derivation?: RuntimeDerivationMetrics;
|
|
95
108
|
};
|
|
109
|
+
/** What was dropped when the snapshot hit `maxRuntimeStateBytes`. */
|
|
110
|
+
export type RuntimeStateSizeTruncation = {
|
|
111
|
+
reason: 'runtime_state_size_budget';
|
|
112
|
+
/** Size of the snapshot before anything was dropped, in bytes. */
|
|
113
|
+
originalBytes: number;
|
|
114
|
+
/** Size after dropping, in bytes. */
|
|
115
|
+
finalBytes: number;
|
|
116
|
+
/** Soft size goal (`runtimeStateTargetBytes`). */
|
|
117
|
+
targetBytes: number;
|
|
118
|
+
/** Hard size limit (`maxRuntimeStateBytes`). */
|
|
119
|
+
maximumBytes: number;
|
|
120
|
+
/** Argument and return values cleared from events. */
|
|
121
|
+
eventValuesDropped: number;
|
|
122
|
+
/** Whole call events removed. */
|
|
123
|
+
eventsDropped: number;
|
|
124
|
+
functionDefinitionsDropped: number;
|
|
125
|
+
};
|
|
126
|
+
/** How complete one kind of recording is for this execution. */
|
|
96
127
|
export type RuntimeCaptureCoverage = 'full' | 'partial' | 'none';
|
|
97
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* Completeness of one snapshot. Values are independently observed, late-captured,
|
|
130
|
+
* summarized, truncated, or unavailable — this profile describes the snapshot as
|
|
131
|
+
* a whole, not that every field is a lossless JavaScript original.
|
|
132
|
+
*/
|
|
98
133
|
export type RuntimeCaptureProfile = {
|
|
134
|
+
/** `automatic` when functions were wrapped for you; `manual` when you used `trace()`. */
|
|
99
135
|
source: 'automatic' | 'manual' | 'scope-only';
|
|
136
|
+
/**
|
|
137
|
+
* Whether enter/exit/throw events were kept for recorded function boundaries.
|
|
138
|
+
* `full` means every retained boundary is complete, not that every invocation
|
|
139
|
+
* was stored individually. Repeated successful calls may be summarized.
|
|
140
|
+
*/
|
|
100
141
|
functionBoundaries: RuntimeCaptureCoverage;
|
|
142
|
+
/**
|
|
143
|
+
* Whether arguments and return values were stored on those events.
|
|
144
|
+
* `selective` means some helper calls omitted values to stay under the size budget.
|
|
145
|
+
*/
|
|
101
146
|
functionValues: 'full' | 'selective' | 'none';
|
|
147
|
+
/** Whether call timings were kept. */
|
|
102
148
|
timings: RuntimeCaptureCoverage;
|
|
103
|
-
derivation: 'available' | 'none';
|
|
104
149
|
};
|
|
105
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Snapshot of the request or job that failed: which functions ran, with what
|
|
152
|
+
* arguments and return values, up to the recorder's size and redaction limits.
|
|
153
|
+
* Captured values are bounded JSON snapshots (special numbers are tagged), not
|
|
154
|
+
* live JavaScript objects. Successful calls may be summarized.
|
|
155
|
+
*/
|
|
106
156
|
export type RuntimeExecutionState = {
|
|
107
157
|
version: 4;
|
|
158
|
+
/** How complete this snapshot is, and whether wrapping was automatic or manual. */
|
|
108
159
|
captureProfile: RuntimeCaptureProfile;
|
|
160
|
+
/** Id of this recording. Unique within the process. */
|
|
109
161
|
executionId: string;
|
|
162
|
+
/** When this request or job started, as an ISO timestamp. */
|
|
110
163
|
startedAt: string;
|
|
164
|
+
/** How long it had been running when the snapshot was taken, in milliseconds. */
|
|
111
165
|
durationMs: number;
|
|
166
|
+
/** Recorder cost for this execution only. */
|
|
112
167
|
recorder?: RuntimeExecutionRecorderMetrics;
|
|
168
|
+
/** Kind of work, optional name, and HTTP details. */
|
|
113
169
|
execution: RuntimeExecutionMetadata;
|
|
114
|
-
/**
|
|
170
|
+
/** Functions that appear in `events`, stored once each. */
|
|
115
171
|
functions: RuntimeFunctionDefinition[];
|
|
172
|
+
/** Call history in time order. */
|
|
116
173
|
events: RuntimeExecutionEvent[];
|
|
117
|
-
|
|
174
|
+
/** Present when the event cap or size limit dropped data. */
|
|
118
175
|
truncated?: {
|
|
176
|
+
/** Events removed because of `maxEventsPerExecution`. */
|
|
119
177
|
eventsDropped: number;
|
|
178
|
+
/** Extra drops from the snapshot size limit. */
|
|
179
|
+
size?: RuntimeStateSizeTruncation;
|
|
120
180
|
};
|
|
181
|
+
/** Present when capture was degraded or the retained snapshot was evicted. */
|
|
121
182
|
capture?: {
|
|
122
|
-
completeness: 'partial';
|
|
123
|
-
reason: 'process_memory_budget';
|
|
183
|
+
completeness: 'partial' | 'unavailable';
|
|
184
|
+
reason: 'process_memory_budget' | 'long_lived_execution_budget' | 'retained_state_evicted' | 'attribution_invariant' | 'plan_disabled_after_attribution_invariant';
|
|
124
185
|
valuesDropped: number;
|
|
125
186
|
eventsDropped: number;
|
|
126
187
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-execution-state-types.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/runtime-execution-state-types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"runtime-execution-state-types.d.ts","sourceRoot":"","sources":["../../src/create-ingest-event/runtime-execution-state-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpG;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,YAAY,GAAG,KAAK,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1F,mFAAmF;AACnF,MAAM,MAAM,uBAAuB,GAAG;IACrC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,wBAAwB,GAAG;IACtC,oEAAoE;IACpE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,CAAC,EAAE,uBAAuB,CAAC;CAClC,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,gBAAgB,CAAC;IACvB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,YAAY,CAA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;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,mFAAmF;IACnF,cAAc,EAAE,qBAAqB,CAAC;IACtC,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,+BAA+B,CAAC;IAC3C,qDAAqD;IACrD,SAAS,EAAE,wBAAwB,CAAC;IACpC,2DAA2D;IAC3D,SAAS,EAAE,yBAAyB,EAAE,CAAC;IACvC,kCAAkC;IAClC,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,6DAA6D;IAC7D,SAAS,CAAC,EAAE;QACX,yDAAyD;QACzD,aAAa,EAAE,MAAM,CAAC;QACtB,gDAAgD;QAChD,IAAI,CAAC,EAAE,0BAA0B,CAAC;KAClC,CAAC;IACF,8EAA8E;IAC9E,OAAO,CAAC,EAAE;QACT,YAAY,EAAE,SAAS,GAAG,aAAa,CAAC;QACxC,MAAM,EACH,uBAAuB,GACvB,6BAA6B,GAC7B,wBAAwB,GACxB,uBAAuB,GACvB,2CAA2C,CAAC;QAC/C,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACtB,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-json.d.ts","sourceRoot":"","sources":["../../src/derivation/canonical-json.ts"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"canonical-json.d.ts","sourceRoot":"","sources":["../../src/derivation/canonical-json.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,MA2B9C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Fingerprints a manifest so investigation can tell whether the release source still matches
|
|
3
|
+
* what ran at capture time.
|
|
4
4
|
*/
|
|
5
5
|
import type { InstrumentationManifestContent } from '../instrumentation-manifest/instrumentation-manifest-types';
|
|
6
6
|
export declare const hashInstrumentationManifest: (manifest: InstrumentationManifestContent) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-instrumentation-manifest.d.ts","sourceRoot":"","sources":["../../src/derivation/hash-instrumentation-manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAC;
|
|
1
|
+
{"version":3,"file":"hash-instrumentation-manifest.d.ts","sourceRoot":"","sources":["../../src/derivation/hash-instrumentation-manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAC;AAgBjH,eAAO,MAAM,2BAA2B,GAAI,UAAU,8BAA8B,KAAG,MAatF,CAAC"}
|
|
@@ -6,21 +6,32 @@
|
|
|
6
6
|
* ⚠️ DERIVATION LOCKSTEP — tagged holes must decode the same way on the server.
|
|
7
7
|
*/
|
|
8
8
|
export declare const RASPUTIN_WIRE_TAG: "\0rasputin";
|
|
9
|
+
/** A captured value Rasputin could not read (for example a getter that threw). */
|
|
9
10
|
export type RasputinTaggedUnknown = readonly [typeof RASPUTIN_WIRE_TAG, 'unknown'];
|
|
11
|
+
/** A value dropped to stay under a size or memory limit. The string is a short reason. */
|
|
10
12
|
export type RasputinTaggedUnavailable = readonly [typeof RASPUTIN_WIRE_TAG, 'unavailable', string];
|
|
13
|
+
/** A nested field skipped because it can be reconstructed later. */
|
|
11
14
|
export type RasputinTaggedOmitted = readonly [typeof RASPUTIN_WIRE_TAG, 'omitted'];
|
|
15
|
+
/** A field hidden because its name matched a redaction rule. */
|
|
12
16
|
export type RasputinTaggedRedacted = readonly [typeof RASPUTIN_WIRE_TAG, 'redacted'];
|
|
17
|
+
/** A value that was cut short (too deep, too many keys, or too large). */
|
|
13
18
|
export type RasputinTaggedTruncated = readonly [
|
|
14
19
|
typeof RASPUTIN_WIRE_TAG,
|
|
15
20
|
'truncated',
|
|
16
21
|
{
|
|
22
|
+
/** Why capture stopped, such as `max_depth` or `max_string_length`. */
|
|
17
23
|
reason: string;
|
|
24
|
+
/** Length or size before truncation, when that is known. */
|
|
18
25
|
originalLength?: number;
|
|
26
|
+
/** How many items or keys were kept. */
|
|
19
27
|
capturedCount?: number;
|
|
28
|
+
/** How many items or keys were skipped. */
|
|
20
29
|
omittedCount?: number;
|
|
30
|
+
/** The partial value, when one was kept. */
|
|
21
31
|
value?: unknown;
|
|
22
32
|
}
|
|
23
33
|
];
|
|
34
|
+
/** Marker Rasputin stores instead of a real value when capture is incomplete. */
|
|
24
35
|
export type RasputinTaggedValue = RasputinTaggedUnknown | RasputinTaggedUnavailable | RasputinTaggedOmitted | RasputinTaggedRedacted | RasputinTaggedTruncated;
|
|
25
36
|
export declare const rasputinUnknown: () => RasputinTaggedUnknown;
|
|
26
37
|
export declare const rasputinUnavailable: (reason: string) => RasputinTaggedUnavailable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rasputin-wire-tag.d.ts","sourceRoot":"","sources":["../../src/derivation/rasputin-wire-tag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAG,YAAyB,CAAC;AAE3D,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC;AACnF,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;AACnG,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC,CAAC;AACnF,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,OAAO,iBAAiB,EAAE,UAAU,CAAC,CAAC;AACrF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A,eAAO,MAAM,6BAA6B,QAAO,WAAW,CAAC,MAAM,CAC/B,CAAC;AAErC,eAAO,MAAM,uBAAuB,GAAI,KAAK,MAAM,KAAG,OAsBrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../../src/derivation/sha256.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../../src/derivation/sha256.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,KAAG,MACO,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,18 +5,17 @@ export { isClientEnabled } from './create-client/is-client-enabled';
|
|
|
5
5
|
export { resolveEndpointUrls } from './create-client/resolve-endpoint-urls';
|
|
6
6
|
export { createIngestEvent } from './create-ingest-event/create-ingest-event';
|
|
7
7
|
export type { RequestContext } from './create-ingest-event/create-ingest-event-types';
|
|
8
|
-
export type { RuntimeCaptureCoverage,
|
|
9
|
-
export { capturedValueCompleteness, isRedactedCapturedValue, isSerializerMarker, } from './derivation/captured-value-markers';
|
|
10
|
-
export { type DerivationValidation, type EvaluateDerivationResult, type EvaluatedFunctionState, type EvaluatedRuntimeValue, evaluatedValueAtLine, evaluateRuntimeDerivation, } from './derivation/evaluate-derivation-plan';
|
|
8
|
+
export type { RuntimeCaptureCoverage, RuntimeCaptureProfile, RuntimeExecutionEvent, RuntimeExecutionKind, RuntimeExecutionMetadata, RuntimeExecutionRecorderMetrics, RuntimeExecutionRequest, RuntimeExecutionState, RuntimeFunctionCallsSuppressedEvent, RuntimeFunctionEnterEvent, RuntimeFunctionExitEvent, RuntimeFunctionThrowEvent, RuntimeStateSizeTruncation, RuntimeThrowLocation, } from './create-ingest-event/runtime-execution-state-types';
|
|
11
9
|
export { hashInstrumentationManifest } from './derivation/hash-instrumentation-manifest';
|
|
12
10
|
export { isRasputinTaggedValue, RASPUTIN_WIRE_TAG, type RasputinTaggedValue, rasputinOmitted, rasputinRedacted, rasputinTagKind, rasputinTruncated, rasputinUnavailable, rasputinUnknown, } from './derivation/rasputin-wire-tag';
|
|
11
|
+
export { defaultSensitivePropertyNames, propertyNameIsSensitive, } from './derivation/sensitive-property-name';
|
|
13
12
|
export { detectRelease } from './detect-release/detect-release';
|
|
14
|
-
export type {
|
|
15
|
-
export type { InstrumentationArgIdentifier, InstrumentationManifestCallSite, InstrumentationManifestContent, InstrumentationManifestDestructure, InstrumentationManifestFunction, InstrumentationParamBinding, SourceVerification, SourceVerificationIssue, } from './instrumentation-manifest/instrumentation-manifest-types';
|
|
13
|
+
export type { InstrumentationArgIdentifier, InstrumentationManifestCallSite, InstrumentationManifestContent, InstrumentationManifestDestructure, InstrumentationManifestFunction, InstrumentationParamBinding, InstrumentationSkipReason, SourceVerification, SourceVerificationIssue, } from './instrumentation-manifest/instrumentation-manifest-types';
|
|
16
14
|
export { INSTRUMENTATION_MANIFEST_SCHEMA_VERSION } from './instrumentation-manifest/instrumentation-manifest-types';
|
|
17
15
|
export { uploadInstrumentationManifest } from './instrumentation-manifest/upload-instrumentation-manifest';
|
|
18
16
|
export type { Frame } from './normalize-frames/normalize-frames';
|
|
19
17
|
export { normalizeFrames } from './normalize-frames/normalize-frames';
|
|
18
|
+
export { foldSyntheticFrames, isRasputinHandleRunFrame, isRasputinShellFrame, } from './parse-stack/fold-synthetic-frames';
|
|
20
19
|
export { parseStack } from './parse-stack/parse-stack';
|
|
21
20
|
export type { RawFrame } from './parse-stack/raw-frame';
|
|
22
21
|
export { repoRootFrom } from './repo-root/repo-root-from';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,YAAY,EACX,cA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