@rasputin-ai/node 0.5.3 → 0.6.1
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 +2 -216
- package/dist/auto-instrumentation/instrumentation-manifest-registry.d.ts +1 -3
- package/dist/auto-instrumentation/instrumentation-manifest-registry.d.ts.map +1 -1
- package/dist/auto-instrumentation/schedule-instrumentation-manifest-upload.d.ts.map +1 -1
- package/dist/auto-instrumentation/source-map-locations.d.ts +1 -1
- package/dist/auto-instrumentation/source-map-locations.d.ts.map +1 -1
- package/dist/auto-instrumentation/transform-disk-cache.d.ts +1 -1
- package/dist/auto-instrumentation/transform-disk-cache.d.ts.map +1 -1
- package/dist/execution-recorder/automatic-runtime.d.ts +2 -33
- package/dist/execution-recorder/automatic-runtime.d.ts.map +1 -1
- package/dist/execution-recorder/encode-frozen.d.ts +0 -8
- package/dist/execution-recorder/encode-frozen.d.ts.map +1 -1
- package/dist/execution-recorder/execution-recorder-types.d.ts +3 -4
- package/dist/execution-recorder/execution-recorder-types.d.ts.map +1 -1
- package/dist/execution-recorder/execution-recorder.d.ts.map +1 -1
- package/dist/execution-recorder/function-plan.d.ts +7 -22
- package/dist/execution-recorder/function-plan.d.ts.map +1 -1
- package/dist/execution-recorder/redact-keys.d.ts +0 -1
- package/dist/execution-recorder/redact-keys.d.ts.map +1 -1
- package/dist/execution-recorder/runtime-state-size-budget.d.ts +0 -2
- package/dist/execution-recorder/runtime-state-size-budget.d.ts.map +1 -1
- package/dist/execution-recorder/safe-serialize.d.ts +0 -2
- package/dist/execution-recorder/safe-serialize.d.ts.map +1 -1
- package/dist/execution-recorder/value-freeze.d.ts +0 -1
- package/dist/execution-recorder/value-freeze.d.ts.map +1 -1
- package/dist/index.js +146 -125
- package/dist/instrument/build.js +852 -588
- package/dist/instrument/bun.js +639 -373
- package/dist/instrument/node.js +605 -339
- package/dist/internal.js +143 -122
- package/dist/rasputin-init.d.ts +1 -0
- package/dist/rasputin-init.d.ts.map +1 -1
- package/dist/sdk-meta.d.ts +1 -1
- package/package.json +4 -2
- package/dist/auto-instrumentation/collect-instrumentation-delta.d.ts +0 -29
- package/dist/auto-instrumentation/collect-instrumentation-delta.d.ts.map +0 -1
- package/dist/auto-instrumentation/instrumentation-manifest-delta.d.ts +0 -49
- package/dist/auto-instrumentation/instrumentation-manifest-delta.d.ts.map +0 -1
- package/dist/auto-instrumentation/parameter-initializer-may-run-code.d.ts +0 -3
- package/dist/auto-instrumentation/parameter-initializer-may-run-code.d.ts.map +0 -1
- package/dist/auto-instrumentation/suspension-whitelist.d.ts +0 -33
- package/dist/auto-instrumentation/suspension-whitelist.d.ts.map +0 -1
- package/dist/auto-instrumentation/transform-source.d.ts +0 -27
- package/dist/auto-instrumentation/transform-source.d.ts.map +0 -1
- package/dist/auto-instrumentation/verify-instrumentation-isomorphism.d.ts +0 -2
- package/dist/auto-instrumentation/verify-instrumentation-isomorphism.d.ts.map +0 -1
- package/dist/auto-instrumentation/verify-transformed-source.d.ts +0 -2
- package/dist/auto-instrumentation/verify-transformed-source.d.ts.map +0 -1
- package/dist/execution-recorder/run-exactly-once.d.ts +0 -7
- package/dist/execution-recorder/run-exactly-once.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,219 +1,5 @@
|
|
|
1
1
|
# Official Rasputin AI SDK for Node and Bun
|
|
2
2
|
|
|
3
|
-
Report application errors to Rasputin.
|
|
3
|
+
Report application errors to Rasputin from Node or Bun services.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Initialize once when your application starts:
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
import { RasputinInit } from '@rasputin-ai/node';
|
|
11
|
-
|
|
12
|
-
export const rasputin = RasputinInit({
|
|
13
|
-
projectApiKey: process.env.RASPUTIN_PROJECT_API_KEY!,
|
|
14
|
-
release: process.env.RASPUTIN_RELEASE!,
|
|
15
|
-
environment: process.env.NODE_ENV ?? 'development',
|
|
16
|
-
enabled: ['staging', 'production'].includes(process.env.NODE_ENV ?? 'development'),
|
|
17
|
-
});
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Uncaught exceptions and unhandled rejections are reported automatically.
|
|
21
|
-
|
|
22
|
-
## Capture handled errors
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
try {
|
|
26
|
-
await processPayment();
|
|
27
|
-
} catch (error) {
|
|
28
|
-
rasputin.captureException(error);
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Configuration
|
|
33
|
-
|
|
34
|
-
| Field | Required | Description |
|
|
35
|
-
| --- | --- | --- |
|
|
36
|
-
| `projectApiKey` | yes | Project API key from the Rasputin dashboard |
|
|
37
|
-
| `environment` | yes | Environment such as `production`, `staging`, or `preview` |
|
|
38
|
-
| `release` | yes | Git commit SHA for the deployed version |
|
|
39
|
-
| `enabled` | no | Enables or disables the SDK; defaults to `true` |
|
|
40
|
-
| `logSuccess` | no | Prints a configuration summary when setup succeeds; defaults to `true`. Failures always log. |
|
|
41
|
-
| `moduleUrl` | no | `import.meta.url` from the initialization file; helps normalize local stack paths |
|
|
42
|
-
| `sourceRoot` | no | Git repository folder for a single-package service, such as `apps/api` |
|
|
43
|
-
| `sourceRoots` | no | Package-name to Git-folder mappings for ambiguous monorepos |
|
|
44
|
-
| `repoRoot` | no | Local filesystem display root; it does not control instrumentation or Git identity |
|
|
45
|
-
|
|
46
|
-
Rasputin normally identifies source from the nearest `package.json` and verifies it against the exact release on the server. Filesystem paths such as `/container` are never used as source identity.
|
|
47
|
-
|
|
48
|
-
For deployment checks, call:
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
const verification = await rasputin.verifyConfiguration();
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
`verified` means every instrumented source file maps uniquely to the configured Git release. If a monorepo is ambiguous, set `sourceRoot` or `sourceRoots` using repository-relative folders, never Docker paths.
|
|
55
|
-
|
|
56
|
-
Rasputin also prints a configuration summary after the instrumentation manifest is uploaded. Set `logSuccess: false` if you do not want that banner in production logs. Mapping failures still warn.
|
|
57
|
-
|
|
58
|
-
## Shutdown
|
|
59
|
-
|
|
60
|
-
Events are sent in the background. Flush before a short-lived process exits:
|
|
61
|
-
|
|
62
|
-
```ts
|
|
63
|
-
await rasputin.flush();
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Call `await rasputin.close()` during graceful shutdown when the process stays alive afterward.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
# Runtime recorder
|
|
71
|
-
|
|
72
|
-
Optionally attach the runtime state that led to an error — arguments, return values, and call history from the failing execution.
|
|
73
|
-
|
|
74
|
-
## Automatic instrumentation
|
|
75
|
-
|
|
76
|
-
Rasputin wraps your functions so it can show what ran when an error happened.
|
|
77
|
-
|
|
78
|
-
**Compiled JavaScript (use this in production)**
|
|
79
|
-
|
|
80
|
-
Build as you already do, then run `rasputin-instrument` on the output. Start the process normally — no extra flags:
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"scripts": {
|
|
85
|
-
"build": "tsc && rasputin-instrument dist",
|
|
86
|
-
"start:node": "node dist/app.js",
|
|
87
|
-
"start:bun": "bun dist/app.js"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Have TypeScript write `.js.map` files next to the output so recorded functions still point at your `.ts` sources. The instrumenter writes `.rasputin/instrumentation-manifest.json` beside `dist`, and `RasputinInit` loads it automatically.
|
|
93
|
-
|
|
94
|
-
**Running TypeScript directly**
|
|
95
|
-
|
|
96
|
-
`rasputin-instrument` rewrites compiled `.js` files on disk. It does not run when you start TypeScript with Bun (`bun src/app.ts`, `bun run src/app.ts`, and similar). Use `--preload` so Bun wraps files as they load:
|
|
97
|
-
|
|
98
|
-
```json
|
|
99
|
-
{
|
|
100
|
-
"scripts": {
|
|
101
|
-
"start:bun": "bun --preload @rasputin-ai/node/instrument/bun src/app.ts"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
On Node you can wrap compiled files as they load instead of instrumenting at build time:
|
|
107
|
-
|
|
108
|
-
```json
|
|
109
|
-
{
|
|
110
|
-
"scripts": {
|
|
111
|
-
"start:node": "node --import @rasputin-ai/node/instrument/node dist/app.js"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Use `--preload` / `--import` while you run TypeScript locally. In production, instrument at build time instead — wrapping files at startup is slower and uses more memory.
|
|
117
|
-
|
|
118
|
-
Runtime state is kept only while a request or job is running, and is attached when that work throws.
|
|
119
|
-
|
|
120
|
-
## Manual capture
|
|
121
|
-
|
|
122
|
-
Wrap each meaningful unit of work — an HTTP request, background job, scheduled task, or worker iteration — in an execution:
|
|
123
|
-
|
|
124
|
-
```ts
|
|
125
|
-
const scope = rasputin.execution.createScope({
|
|
126
|
-
kind: 'job',
|
|
127
|
-
name: 'sync-invoices',
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
try {
|
|
131
|
-
return await scope.run(() => syncInvoices())
|
|
132
|
-
} catch (error) {
|
|
133
|
-
scope.associateError(error)
|
|
134
|
-
throw error
|
|
135
|
-
} finally {
|
|
136
|
-
scope.finish()
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
`scope.run()` executes the callback under this recording's async context and returns exactly what the callback returned. It does not wrap, replace, or observe Promises. The caller owns `await`, error association, and `finish()`.
|
|
141
|
-
|
|
142
|
-
When automatic instrumentation is unavailable, mark individual functions explicitly:
|
|
143
|
-
|
|
144
|
-
```ts
|
|
145
|
-
const syncInvoices = rasputin.execution.trace(
|
|
146
|
-
'src/jobs/sync-invoices.ts:syncInvoices',
|
|
147
|
-
async () => {
|
|
148
|
-
// ...
|
|
149
|
-
},
|
|
150
|
-
);
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
`trace()` preserves the call receiver (`this`) for methods and `.call` / `.apply` / `.bind`. It is not a constructor — do not use `new` on the wrapped function.
|
|
154
|
-
|
|
155
|
-
Framework packages such as `@rasputin-ai/elysia` create HTTP executions automatically.
|
|
156
|
-
|
|
157
|
-
## Runtime support
|
|
158
|
-
|
|
159
|
-
| Environment | Support |
|
|
160
|
-
| --- | --- |
|
|
161
|
-
| TypeScript compiled to multiple JavaScript files | Use `rasputin-instrument dist` after `tsc`, with adjacent source maps |
|
|
162
|
-
| Bun 1.3.x running `.ts` or `.js` files directly | Use `--preload @rasputin-ai/node/instrument/bun` |
|
|
163
|
-
| Node.js 22.15 or newer, unbundled ESM/CJS | Use `rasputin-instrument`, or `--import @rasputin-ai/node/instrument/node`; Node 22 and 24 are the supported LTS lines |
|
|
164
|
-
|
|
165
|
-
On Node.js 22, start the process with `--experimental-async-context-frame` (or set `NODE_OPTIONS`) so `AsyncLocalStorage` uses the faster implementation that Node.js 24 enables by default. Rasputin logs this once when the flag is missing; set `RASPUTIN_SUPPRESS_ASYNC_CONTEXT_FRAME_WARNING=1` to hide it.
|
|
166
|
-
| Single-file bundles (esbuild, tsup, webpack, Vite SSR, Next.js) | Automatic instrumentation is not supported |
|
|
167
|
-
| `tsx`, custom Node loader stacks, and Node's native TypeScript execution | Automatic instrumentation is not supported |
|
|
168
|
-
| Deno and edge runtimes | Not supported |
|
|
169
|
-
|
|
170
|
-
Tested on Bun 1.3.13 and Node.js 24.19.0. Node.js 22.15.0 is the minimum for automatic instrumentation. Use `execution.createScope()` and `execution.trace()` when automatic instrumentation is not available.
|
|
171
|
-
|
|
172
|
-
## Recorder configuration
|
|
173
|
-
|
|
174
|
-
Defaults work for most apps. Customize to exclude noisy sources, redact fields, or retain less state:
|
|
175
|
-
|
|
176
|
-
| Field | Default | Description |
|
|
177
|
-
| --- | ---: | --- |
|
|
178
|
-
| `enabled` | `true` | Enables runtime-state capture |
|
|
179
|
-
| `maxEventsPerExecution` | `500` | Maximum events retained for one execution |
|
|
180
|
-
| `maxCapturedCallsPerFunction` | `3` | Detailed successful calls retained before similar calls are summarized |
|
|
181
|
-
| `maxActiveMemoryBytes` | `64 MiB` | Maximum recorder memory shared across active executions |
|
|
182
|
-
| `maxDepth` | `3` | Maximum captured value depth |
|
|
183
|
-
| `maxObjectKeys` | `30` | Maximum properties retained from one object |
|
|
184
|
-
| `maxArrayElements` | `20` | Maximum items retained from one array, map, or set |
|
|
185
|
-
| `maxStringLength` | `500` | Maximum characters retained from one string |
|
|
186
|
-
| `maxSerializedValueBytes` | `16 KiB` | Maximum retained size of one captured value |
|
|
187
|
-
| `runtimeStateTargetBytes` | `256 KiB` | Soft size goal for the snapshot sent with an error; extra reconstruction data is dropped first |
|
|
188
|
-
| `maxRuntimeStateBytes` | `512 KiB` | Hard size limit for that snapshot; values are dropped before call history |
|
|
189
|
-
| `redactKeys` | `[]` | Additional property names to redact (case- and separator-insensitive, trailing digits ignored) |
|
|
190
|
-
| `excludeSources` | `[]` | Source globs or function-name patterns to exclude |
|
|
191
|
-
| `maxExecutionHoldMs` | `60s` | How long one recording may hold process-wide memory, including finished work with in-flight calls |
|
|
192
|
-
| `maxRetainedErrorRecordings` | `32` | Finished error snapshots kept for later `getErrorState`. Older ones report `unavailable` / `retained_state_evicted` |
|
|
193
|
-
|
|
194
|
-
```ts
|
|
195
|
-
const rasputin = RasputinInit({
|
|
196
|
-
// ...required options
|
|
197
|
-
executionRecorder: {
|
|
198
|
-
excludeSources: ['src/logger/**', 'packages/shared-logger/**'],
|
|
199
|
-
redactKeys: ['customerEmail'],
|
|
200
|
-
maxEventsPerExecution: 200,
|
|
201
|
-
},
|
|
202
|
-
});
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Runtime state can include application data. Rasputin redacts **property names** that look like secrets (`password`, `token`, `DATABASE_URL`, `jwt`, `sessionId`, and similar, including digit suffixes like `password2`). It does **not** scan ordinary string values for embedded secrets. Use `redactKeys` for additional field names.
|
|
206
|
-
|
|
207
|
-
`captureProfile.functionBoundaries: "full"` means every retained function boundary is complete. Repeated successful calls may still be summarized into `function_calls_suppressed` events.
|
|
208
|
-
|
|
209
|
-
Short-lived processes flush telemetry for at most about two seconds on exit. If ingest is unreachable, Rasputin drops the leftover events and prints one stderr line rather than holding a CLI or cron job open.
|
|
210
|
-
|
|
211
|
-
The on-disk transform cache includes the verification mode in its key, so an unverified rewrite cannot be reused by a verifying process. On POSIX the cache directory must be owned by the process user and not world-writable. Windows cannot enforce those ownership bits, so a project-local cache is trusted when the directory can be created.
|
|
212
|
-
|
|
213
|
-
## Diagnostics
|
|
214
|
-
|
|
215
|
-
```ts
|
|
216
|
-
const { recorder, transport } = rasputin.getStats();
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
These counters describe what this process has recorded and sent since it started. They reset on restart. Compare two snapshots if you want activity over a window, rather than dividing lifetime totals by one request.
|
|
5
|
+
See the [Node documentation](https://rasputinai.dev/docs/node/installation).
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type InstrumentationManifestContent } from '@rasputin-ai/core';
|
|
2
|
-
import type { InstrumentationManifestDelta } from '
|
|
3
|
-
export declare const INSTRUMENTATION_MANIFEST_SYMBOL = "rasputin.instrumentation.manifest.v3";
|
|
2
|
+
import type { InstrumentationManifestDelta } from '@rasputin-ai/instrumentation';
|
|
4
3
|
type SnapshotOptions = {
|
|
5
4
|
sourceRoot?: string;
|
|
6
5
|
sourceRoots?: Record<string, string>;
|
|
7
6
|
};
|
|
8
7
|
export declare const recordInstrumentationManifestDelta: (filePath: string, delta: InstrumentationManifestDelta) => void;
|
|
9
8
|
export declare const recordPrebuiltInstrumentationManifest: (manifest: InstrumentationManifestContent) => void;
|
|
10
|
-
export declare const loadInstrumentationManifestFile: (path: string) => boolean;
|
|
11
9
|
export declare const loadInstrumentationManifestIfPresent: (path: string | undefined) => void;
|
|
12
10
|
export declare const isInstrumentationManifestDirty: () => boolean;
|
|
13
11
|
export declare const instrumentationManifestGeneration: () => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation-manifest-registry.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrumentation-manifest-registry.ts"],"names":[],"mappings":"AAOA,OAAO,EAGN,KAAK,8BAA8B,EAKnC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentation-manifest-registry.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/instrumentation-manifest-registry.ts"],"names":[],"mappings":"AAOA,OAAO,EAGN,KAAK,8BAA8B,EAKnC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAwBjF,KAAK,eAAe,GAAG;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC;AAoCF,eAAO,MAAM,kCAAkC,GAC9C,UAAU,MAAM,EAChB,OAAO,4BAA4B,KACjC,IASF,CAAC;AAEF,eAAO,MAAM,qCAAqC,GACjD,UAAU,8BAA8B,KACtC,IAKF,CAAC;AAcF,eAAO,MAAM,oCAAoC,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,IAG/E,CAAC;AAEF,eAAO,MAAM,8BAA8B,QAAO,OAMjD,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAAO,MAAkC,CAAC;AAExF,eAAO,MAAM,4BAA4B,QAAO;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CA0BxC,CAAC;AAEF,eAAO,MAAM,kCAAkC,QAAO,MAKrD,CAAC;AAQF,eAAO,MAAM,+BAA+B,GAC3C,UAAS,eAAoB,KAC3B,8BAA8B,GAAG,SA+GnC,CAAC;AAEF,eAAO,MAAM,mCAAmC,GAAI,YAAY,MAAM,KAAG,IAGxE,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAI,UAAU,MAAM,IAAI,KAAG,IAExE,CAAC;AAEF,eAAO,MAAM,oCAAoC,QAAO,IAEvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-instrumentation-manifest-upload.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/schedule-instrumentation-manifest-upload.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAGN,KAAK,kBAAkB,EAEvB,MAAM,mBAAmB,CAAC;AAY3B,KAAK,4CAA4C,GAAG;IACnD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjF,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,KAAK,mCAAmC,GAAG;IAC1C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC1C,CAAC;AAkBF,eAAO,MAAM,qCAAqC,GACjD,SAAS,4CAA4C,KACnD,
|
|
1
|
+
{"version":3,"file":"schedule-instrumentation-manifest-upload.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/schedule-instrumentation-manifest-upload.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAGN,KAAK,kBAAkB,EAEvB,MAAM,mBAAmB,CAAC;AAY3B,KAAK,4CAA4C,GAAG;IACnD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjF,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,KAAK,mCAAmC,GAAG;IAC1C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC1C,CAAC;AAkBF,eAAO,MAAM,qCAAqC,GACjD,SAAS,4CAA4C,KACnD,mCA2LF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SourceLocationMapper } from '
|
|
1
|
+
import type { SourceLocationMapper } from '@rasputin-ai/instrumentation';
|
|
2
2
|
export declare const sourceMapPayloadForCache: (generatedPath: string, source: string) => string;
|
|
3
3
|
export declare const createSourceMapLocationMapper: (generatedPath: string, source: string) => SourceLocationMapper | undefined;
|
|
4
4
|
//# sourceMappingURL=source-map-locations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-map-locations.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/source-map-locations.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAkB,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"source-map-locations.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/source-map-locations.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAkB,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAgCzF,eAAO,MAAM,wBAAwB,GAAI,eAAe,MAAM,EAAE,QAAQ,MAAM,KAAG,MAMhF,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACzC,eAAe,MAAM,EACrB,QAAQ,MAAM,KACZ,oBAAoB,GAAG,SA8BzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TransformedSource, TransformSourceOptions } from '@rasputin-ai/instrumentation';
|
|
2
2
|
export declare const resolveTransformCacheDir: () => string;
|
|
3
3
|
export declare const transformSourceCached: (source: string, options: TransformSourceOptions, cache?: {
|
|
4
4
|
directory?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-disk-cache.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/transform-disk-cache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform-disk-cache.d.ts","sourceRoot":"","sources":["../../src/auto-instrumentation/transform-disk-cache.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAGX,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,8BAA8B,CAAC;AAkCtC,eAAO,MAAM,wBAAwB,QAAO,MAGoB,CAAC;AAwIjE,eAAO,MAAM,qBAAqB,GACjC,QAAQ,MAAM,EACd,SAAS,sBAAsB,EAC/B,QAAO;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,KAChD,iBAAiB,GAAG,SAgBtB,CAAC"}
|
|
@@ -3,40 +3,9 @@
|
|
|
3
3
|
* versioned global registry joins them without generated code importing a physical SDK file. Source
|
|
4
4
|
* identity is encoded once per module as a compact plan table so call sites pass only a numeric index.
|
|
5
5
|
*/
|
|
6
|
+
import { AUTOMATIC_RUNTIME_SYMBOL, getAutomaticRuntimeRegistry, resetAutomaticExecutionRuntime } from '@rasputin-ai/recorder';
|
|
6
7
|
import type { ExecutionRuntime } from './execution-recorder-types';
|
|
7
|
-
|
|
8
|
-
export declare const AUTOMATIC_RUNTIME_SYMBOL = "rasputin.execution.runtime.v3";
|
|
9
|
-
type CallHandle = {
|
|
10
|
-
leave: (value?: unknown) => unknown;
|
|
11
|
-
fail: (error: unknown, liveArgs?: ArrayLike<unknown>) => void;
|
|
12
|
-
end: () => void;
|
|
13
|
-
run: <T>(callback: () => T) => T;
|
|
14
|
-
suspend: (value?: unknown) => unknown;
|
|
15
|
-
resume: (value?: unknown) => unknown;
|
|
16
|
-
};
|
|
17
|
-
type ModuleRun = <T>(planIndex: number, args: ArrayLike<unknown>, callback: () => T, omitValues?: boolean) => T;
|
|
18
|
-
type ModuleRunner = ModuleRun & {
|
|
19
|
-
enter: (planIndex: number, args: ArrayLike<unknown>, omitValues?: boolean) => CallHandle;
|
|
20
|
-
};
|
|
21
|
-
type DispatchCell = {
|
|
22
|
-
run: ModuleRun;
|
|
23
|
-
enter: ModuleRunner['enter'];
|
|
24
|
-
};
|
|
25
|
-
type RegisteredModule = {
|
|
26
|
-
plans: readonly EncodedFunctionPlan[];
|
|
27
|
-
cell: DispatchCell;
|
|
28
|
-
};
|
|
29
|
-
type AutomaticRuntime = {
|
|
30
|
-
bind: (module: RegisteredModule) => void;
|
|
31
|
-
};
|
|
32
|
-
type AutomaticRuntimeRegistry = {
|
|
33
|
-
runtimes: AutomaticRuntime[];
|
|
34
|
-
modules: RegisteredModule[];
|
|
35
|
-
register: (plans: readonly EncodedFunctionPlan[]) => ModuleRunner;
|
|
36
|
-
};
|
|
37
|
-
export declare const getAutomaticRuntimeRegistry: () => AutomaticRuntimeRegistry;
|
|
38
|
-
export declare const resetAutomaticExecutionRuntime: () => void;
|
|
8
|
+
export { AUTOMATIC_RUNTIME_SYMBOL, getAutomaticRuntimeRegistry, resetAutomaticExecutionRuntime };
|
|
39
9
|
/** Connect transformed application functions to this SDK instance. */
|
|
40
10
|
export declare const installAutomaticExecutionRuntime: (execution: ExecutionRuntime) => (() => void);
|
|
41
|
-
export {};
|
|
42
11
|
//# sourceMappingURL=automatic-runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automatic-runtime.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/automatic-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"automatic-runtime.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/automatic-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACN,wBAAwB,EAGxB,2BAA2B,EAI3B,8BAA8B,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,8BAA8B,EAAE,CAAC;AAoBjG,sEAAsE;AACtE,eAAO,MAAM,gCAAgC,GAAI,WAAW,gBAAgB,KAAG,CAAC,MAAM,IAAI,CAkBzF,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export declare const typeMarker: (type: string, value?: unknown) => {
|
|
2
|
-
value?: {} | null | undefined;
|
|
3
|
-
__rasputin_type: string;
|
|
4
|
-
};
|
|
5
|
-
export declare const truncation: (reason: string, extra?: Record<string, unknown>) => {
|
|
6
|
-
__rasputin_truncated: boolean;
|
|
7
|
-
__reason: string;
|
|
8
|
-
};
|
|
9
1
|
export declare const jsonLiteralUtf8Bytes: (value: unknown) => number;
|
|
10
2
|
export declare const encodeFrozen: (value: unknown) => unknown;
|
|
11
3
|
export declare const encodeFrozenWithBytes: (frozen: unknown, visitedNodes: number, maxSerializedValueBytes: number) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode-frozen.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/encode-frozen.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"encode-frozen.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/encode-frozen.ts"],"names":[],"mappings":"AAgFA,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,MAmCrD,CAAC;AA2KF,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,OAc7C,CAAC;AAWF,eAAO,MAAM,qBAAqB,GACjC,QAAQ,OAAO,EACf,cAAc,MAAM,EACpB,yBAAyB,MAAM,KAC7B;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAQvD,CAAC"}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* event model explicit allows the same bounded state to represent HTTP requests, jobs, scheduled
|
|
4
4
|
* work, and future serverless invocations without coupling the recorder to one framework lifecycle.
|
|
5
5
|
*/
|
|
6
|
-
import type { RuntimeExecutionEvent, RuntimeExecutionKind, RuntimeExecutionMetadata, RuntimeExecutionState,
|
|
7
|
-
import type { EncodedFunctionPlan
|
|
6
|
+
import type { RuntimeExecutionEvent, RuntimeExecutionKind, RuntimeExecutionMetadata, RuntimeExecutionState, RuntimeFunctionDefinition, SourcePosition } from '@rasputin-ai/core';
|
|
7
|
+
import type { EncodedFunctionPlan } from '@rasputin-ai/recorder';
|
|
8
|
+
import type { PreparedFunctionPlan } from './function-plan';
|
|
8
9
|
/** A file glob (`src/logger/**`) or a regular expression matched against a function id. */
|
|
9
10
|
export type ExecutionSourceExclusion = string | RegExp;
|
|
10
11
|
/** Limits and redaction for the runtime recorder. Defaults work for most apps. */
|
|
@@ -71,8 +72,6 @@ export type ExecutionRecorderOptions = {
|
|
|
71
72
|
export type ExecutionMetadata = RuntimeExecutionMetadata;
|
|
72
73
|
/** `http` for a request, `job` for a background task, and so on. */
|
|
73
74
|
export type ExecutionKind = RuntimeExecutionKind;
|
|
74
|
-
export type ExecutionFunctionEnterEvent = RuntimeFunctionEnterEvent;
|
|
75
|
-
export type ExecutionFunctionCallsSuppressedEvent = RuntimeFunctionCallsSuppressedEvent;
|
|
76
75
|
export type ExecutionEvent = RuntimeExecutionEvent;
|
|
77
76
|
/**
|
|
78
77
|
* Snapshot of the request or job that failed: which functions ran, with what
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-recorder-types.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACX,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"execution-recorder-types.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACX,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,2FAA2F;AAC3F,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD,kFAAkF;AAClF,MAAM,MAAM,wBAAwB,GAAG;IACtC,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sGAAsG;IACtG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,wBAAwB,EAAE,CA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KAChB,kBAAkB,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-recorder.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution-recorder.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/execution-recorder.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAGX,wBAAwB,EACxB,gBAAgB,EAGhB,MAAM,4BAA4B,CAAC;AAwOpC,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,GACnC,SAAS,wBAAwB,GAAG,SAAS,KAC3C,gBAq8CF,CAAC"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
column: number | null,
|
|
9
|
-
omitCallValues?: 1,
|
|
10
|
-
preBodyParameterEvaluation?: 1
|
|
11
|
-
];
|
|
1
|
+
/**
|
|
2
|
+
* Node-prepared function plan.
|
|
3
|
+
*
|
|
4
|
+
* Adds exclusion, byte estimates, and omit flags used by the ALS journal.
|
|
5
|
+
* Encoding of the compact tuple lives in `@rasputin-ai/recorder`.
|
|
6
|
+
*/
|
|
7
|
+
import type { RuntimeFunctionDefinition } from '@rasputin-ai/core';
|
|
12
8
|
export type PreparedFunctionPlan = {
|
|
13
9
|
runtimePlanId: number;
|
|
14
10
|
definition: RuntimeFunctionDefinition;
|
|
@@ -18,16 +14,5 @@ export type PreparedFunctionPlan = {
|
|
|
18
14
|
omitCallValues: boolean;
|
|
19
15
|
disabled?: boolean;
|
|
20
16
|
};
|
|
21
|
-
export declare const encodedPlanOmitsCallValues: (plan: EncodedFunctionPlan) => boolean;
|
|
22
|
-
export declare const withOmittedCallValues: (plan: EncodedFunctionPlan) => EncodedFunctionPlan;
|
|
23
|
-
export declare const withPreBodyParameterEvaluation: (plan: EncodedFunctionPlan) => EncodedFunctionPlan;
|
|
24
|
-
export type AutomaticFunctionSource = {
|
|
25
|
-
filePath: string;
|
|
26
|
-
name: string;
|
|
27
|
-
line: number;
|
|
28
|
-
column: number;
|
|
29
|
-
};
|
|
30
|
-
export declare const encodeFunctionPlan: (source: AutomaticFunctionSource) => EncodedFunctionPlan;
|
|
31
|
-
export declare const definitionFromEncodedPlan: (plan: EncodedFunctionPlan) => RuntimeFunctionDefinition;
|
|
32
17
|
export declare const estimatedCallBytesFor: (functionId: string) => number;
|
|
33
18
|
//# sourceMappingURL=function-plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-plan.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/function-plan.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"function-plan.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/function-plan.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAAG;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,yBAAyB,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAIF,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,KAAG,MACiB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const compileRedactKeys: (extra: readonly string[] | undefined) => ReadonlySet<string>;
|
|
2
2
|
export declare const keyIsRedacted: (key: string, redactKeys: ReadonlySet<string>) => boolean;
|
|
3
|
-
export declare const propertyNameIsRedacted: (key: string) => boolean;
|
|
4
3
|
//# sourceMappingURL=redact-keys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redact-keys.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/redact-keys.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,MAAM,EAAE,GAAG,SAAS,KAAG,WAAW,CAAC,MAAM,CAG1F,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,YAAY,WAAW,CAAC,MAAM,CAAC,KAAG,OAM5E,CAAC
|
|
1
|
+
{"version":3,"file":"redact-keys.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/redact-keys.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,MAAM,EAAE,GAAG,SAAS,KAAG,WAAW,CAAC,MAAM,CAG1F,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,YAAY,WAAW,CAAC,MAAM,CAAC,KAAG,OAM5E,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type RuntimeExecutionState } from '@rasputin-ai/core';
|
|
2
|
-
export declare const DEFAULT_RUNTIME_STATE_TARGET_BYTES: number;
|
|
3
|
-
export declare const DEFAULT_MAX_RUNTIME_STATE_BYTES: number;
|
|
4
2
|
/**
|
|
5
3
|
* Bound the complete compact-JSON runtime state after materialization. Captured function values
|
|
6
4
|
* are only omitted above the hard ceiling; call boundaries and timings remain until a final
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-state-size-budget.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/runtime-state-size-budget.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,qBAAqB,EAG1B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-state-size-budget.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/runtime-state-size-budget.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,qBAAqB,EAG1B,MAAM,mBAAmB,CAAC;AAkI3B;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,GACzC,OAAO,qBAAqB,EAC5B,UAAS;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,KAC3D,qBA6EF,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAlNR,OAAO,WAkNgB,CAAC"}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import type { ExecutionRecorderOptions } from './execution-recorder-types';
|
|
6
6
|
import { type FrozenSnapshot } from './value-freeze';
|
|
7
7
|
export { jsonLiteralUtf8Bytes } from './encode-frozen';
|
|
8
|
-
export type { FrozenSnapshot } from './value-freeze';
|
|
9
8
|
export type SafeSerializedValue = {
|
|
10
9
|
value: unknown;
|
|
11
10
|
bytes: number;
|
|
@@ -19,6 +18,5 @@ export type SafeSerializer = {
|
|
|
19
18
|
serializeWithBytes: (value: unknown) => SafeSerializedValue;
|
|
20
19
|
};
|
|
21
20
|
export declare const createSafeSerializer: (options?: ExecutionRecorderOptions) => SafeSerializer;
|
|
22
|
-
export declare const safeSerializeWithBytes: (value: unknown, options?: ExecutionRecorderOptions) => SafeSerializedValue;
|
|
23
21
|
export declare const safeSerialize: (value: unknown, options?: ExecutionRecorderOptions) => unknown;
|
|
24
22
|
//# sourceMappingURL=safe-serialize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-serialize.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/safe-serialize.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"safe-serialize.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/safe-serialize.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,cAAc,CAAC;IAC3C,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IACrC,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACvC,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,mBAAmB,CAAC;CAC5D,CAAC;AAUF,eAAO,MAAM,oBAAoB,GAAI,UAAS,wBAA6B,KAAG,cAgB7E,CAAC;AAaF,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,EAAE,UAAS,wBAA6B,KAAG,OAC1C,CAAC"}
|
|
@@ -7,7 +7,6 @@ export type FreezeLimits = {
|
|
|
7
7
|
maxStringLength: number;
|
|
8
8
|
maxSerializedValueBytes: number;
|
|
9
9
|
};
|
|
10
|
-
export declare const compileFreezeLimits: (options: ExecutionRecorderOptions) => FreezeLimits;
|
|
11
10
|
export declare const FROZEN: unique symbol;
|
|
12
11
|
export type FrozenKind = 'undefined' | 'NaN' | 'Infinity' | '-Infinity' | '-0' | 'bigint' | 'symbol' | 'function' | 'Proxy' | 'circular' | 'Date' | 'Error' | 'Buffer' | 'Promise' | 'Map' | 'Set' | 'accessor' | 'unserializable' | 'truncated' | 'instance' | 'hole';
|
|
13
12
|
export type FrozenAtom = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-freeze.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/value-freeze.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAG3E,eAAO,MAAM,QAAQ,wBAAwB,CAAC;AAU9C,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;CAChC,CAAC;
|
|
1
|
+
{"version":3,"file":"value-freeze.d.ts","sourceRoot":"","sources":["../../src/execution-recorder/value-freeze.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAG3E,eAAO,MAAM,QAAQ,wBAAwB,CAAC;AAU9C,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;CAChC,CAAC;AAUF,eAAO,MAAM,MAAM,eAA4B,CAAC;AAEhD,MAAM,MAAM,UAAU,GACnB,WAAW,GACX,KAAK,GACL,UAAU,GACV,WAAW,GACX,IAAI,GACJ,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,OAAO,GACP,UAAU,GACV,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,KAAK,GACL,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,WAAW,GACX,UAAU,GACV,MAAM,CAAC;AAEV,MAAM,MAAM,UAAU,GAAG;IACxB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OA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