ushman-characterize 0.4.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/AGENTS.md +110 -0
- package/CHANGELOG.md +41 -0
- package/LICENSE.md +21 -0
- package/README.md +193 -0
- package/bin/ushman-characterize +19 -0
- package/dist/babel-config.d.ts +7 -0
- package/dist/babel-config.d.ts.map +1 -0
- package/dist/babel-config.js +17 -0
- package/dist/capture-server.d.ts +31 -0
- package/dist/capture-server.d.ts.map +1 -0
- package/dist/capture-server.js +199 -0
- package/dist/capture.d.ts +97 -0
- package/dist/capture.d.ts.map +1 -0
- package/dist/capture.js +620 -0
- package/dist/cli/logger.d.ts +7 -0
- package/dist/cli/logger.d.ts.map +1 -0
- package/dist/cli/logger.js +14 -0
- package/dist/cli/parse-flags.d.ts +8 -0
- package/dist/cli/parse-flags.d.ts.map +1 -0
- package/dist/cli/parse-flags.js +60 -0
- package/dist/cli.d.ts +39 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +439 -0
- package/dist/constants.d.ts +20 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +19 -0
- package/dist/dedupe-contract.d.ts +26 -0
- package/dist/dedupe-contract.d.ts.map +1 -0
- package/dist/dedupe-contract.js +12 -0
- package/dist/default-export.d.ts +6 -0
- package/dist/default-export.d.ts.map +1 -0
- package/dist/default-export.js +52 -0
- package/dist/format-contract.d.ts +25 -0
- package/dist/format-contract.d.ts.map +1 -0
- package/dist/format-contract.js +96 -0
- package/dist/function-utils.d.ts +6 -0
- package/dist/function-utils.d.ts.map +1 -0
- package/dist/function-utils.js +22 -0
- package/dist/generate-replay.d.ts +18 -0
- package/dist/generate-replay.d.ts.map +1 -0
- package/dist/generate-replay.js +158 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/instrument.d.ts +39 -0
- package/dist/instrument.d.ts.map +1 -0
- package/dist/instrument.js +605 -0
- package/dist/ledger.d.ts +19 -0
- package/dist/ledger.d.ts.map +1 -0
- package/dist/ledger.js +50 -0
- package/dist/puppeteer-harness.d.ts +74 -0
- package/dist/puppeteer-harness.d.ts.map +1 -0
- package/dist/puppeteer-harness.js +248 -0
- package/dist/purity-classifier.d.ts +28 -0
- package/dist/purity-classifier.d.ts.map +1 -0
- package/dist/purity-classifier.js +363 -0
- package/dist/rebind.d.ts +26 -0
- package/dist/rebind.d.ts.map +1 -0
- package/dist/rebind.js +356 -0
- package/dist/replay-report.d.ts +18 -0
- package/dist/replay-report.d.ts.map +1 -0
- package/dist/replay-report.js +12 -0
- package/dist/scene.d.ts +24 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/scene.js +235 -0
- package/dist/schema-types.d.ts +40 -0
- package/dist/schema-types.d.ts.map +1 -0
- package/dist/schema-types.js +32 -0
- package/dist/seed-scaffolds.d.ts +31 -0
- package/dist/seed-scaffolds.d.ts.map +1 -0
- package/dist/seed-scaffolds.js +96 -0
- package/dist/shared.d.ts +36 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +390 -0
- package/dist/state-dag.d.ts +5 -0
- package/dist/state-dag.d.ts.map +1 -0
- package/dist/state-dag.js +27 -0
- package/dist/stub-pure.d.ts +57 -0
- package/dist/stub-pure.d.ts.map +1 -0
- package/dist/stub-pure.js +987 -0
- package/dist/time.d.ts +3 -0
- package/dist/time.d.ts.map +1 -0
- package/dist/time.js +10 -0
- package/dist/trace-format.d.ts +24 -0
- package/dist/trace-format.d.ts.map +1 -0
- package/dist/trace-format.js +213 -0
- package/dist/trace-serializer.d.ts +94 -0
- package/dist/trace-serializer.d.ts.map +1 -0
- package/dist/trace-serializer.js +607 -0
- package/dist/tracer-runtime.d.ts +25 -0
- package/dist/tracer-runtime.d.ts.map +1 -0
- package/dist/tracer-runtime.js +291 -0
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +0 -0
- package/dist/workspace-paths.d.ts +64 -0
- package/dist/workspace-paths.d.ts.map +1 -0
- package/dist/workspace-paths.js +288 -0
- package/package.json +86 -0
package/dist/time.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,cAAyD,CAAC;AAE7E,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,qBAQ/B,CAAC"}
|
package/dist/time.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const nowIso = () => new Date().toISOString().replace(/\.\d+Z$/, 'Z');
|
|
2
|
+
export const sleep = (ms) => {
|
|
3
|
+
if (!Number.isFinite(ms)) {
|
|
4
|
+
throw new TypeError(`sleep(ms) requires a finite number; received ${String(ms)}`);
|
|
5
|
+
}
|
|
6
|
+
if (ms < 0) {
|
|
7
|
+
throw new RangeError(`sleep(ms) requires a non-negative number; received ${ms}`);
|
|
8
|
+
}
|
|
9
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
10
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type CanonicalizeTraceOptions, canonicalizeSceneTree, canonicalizeThrownValue, canonicalizeTraceValue, compareTraceValues, EXEMPT_FIELD_MARKER, hydrateTraceValue, type SceneCanonicalizeOptions } from './trace-serializer.ts';
|
|
2
|
+
export declare const workspaceHarnessPaths: (workspaceRoot: string) => {
|
|
3
|
+
characterizeDir: string;
|
|
4
|
+
harnessFile: string;
|
|
5
|
+
modulesDir: string;
|
|
6
|
+
pureFixturesDir: string;
|
|
7
|
+
replayFixturesDir: string;
|
|
8
|
+
reportsDir: string;
|
|
9
|
+
sceneFixturesDir: string;
|
|
10
|
+
tracesDir: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const ensureWorkspaceTraceHarness: (workspaceRoot: string) => Promise<{
|
|
13
|
+
characterizeDir: string;
|
|
14
|
+
harnessFile: string;
|
|
15
|
+
modulesDir: string;
|
|
16
|
+
pureFixturesDir: string;
|
|
17
|
+
replayFixturesDir: string;
|
|
18
|
+
reportsDir: string;
|
|
19
|
+
sceneFixturesDir: string;
|
|
20
|
+
tracesDir: string;
|
|
21
|
+
}>;
|
|
22
|
+
export type { CanonicalizeTraceOptions, SceneCanonicalizeOptions };
|
|
23
|
+
export { canonicalizeSceneTree, canonicalizeThrownValue, canonicalizeTraceValue, compareTraceValues, EXEMPT_FIELD_MARKER, hydrateTraceValue, };
|
|
24
|
+
//# sourceMappingURL=trace-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-format.d.ts","sourceRoot":"","sources":["../src/trace-format.ts"],"names":[],"mappings":"AAQA,OAAO,EAEH,KAAK,wBAAwB,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,KAAK,wBAAwB,EAChC,MAAM,uBAAuB,CAAC;AAkM/B,eAAO,MAAM,qBAAqB,GAAI,eAAe,MAAM;;;;;;;;;CASzD,CAAC;AAEH,eAAO,MAAM,2BAA2B,GAAU,eAAe,MAAM;;;;;;;;;EAKtE,CAAC;AAEF,YAAY,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,CAAC;AACnE,OAAO,EACH,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GACpB,CAAC"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { mkdir } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { CHARACTERIZE_SUPPORT_VERSION, REPLAY_FIXTURE_SCHEMA_NAME, REPLAY_FIXTURE_SCHEMA_VERSION, } from "./constants.js";
|
|
4
|
+
import { sanitizeSymbolName } from "./shared.js";
|
|
5
|
+
import { buildTraceRuntimeSupportSource, canonicalizeSceneTree, canonicalizeThrownValue, canonicalizeTraceValue, compareTraceValues, EXEMPT_FIELD_MARKER, hydrateTraceValue, } from "./trace-serializer.js";
|
|
6
|
+
const renderWorkspaceHarnessSource = () => `import { expect } from 'bun:test';
|
|
7
|
+
|
|
8
|
+
${buildTraceRuntimeSupportSource()}
|
|
9
|
+
|
|
10
|
+
const sanitizeFixtureName = ${sanitizeSymbolName.toString()};
|
|
11
|
+
const replayFixtureSchemaName = ${JSON.stringify(REPLAY_FIXTURE_SCHEMA_NAME)};
|
|
12
|
+
const replayFixtureSchemaVersion = ${JSON.stringify(REPLAY_FIXTURE_SCHEMA_VERSION)};
|
|
13
|
+
const characterizeSupportVersion = ${JSON.stringify(CHARACTERIZE_SUPPORT_VERSION)};
|
|
14
|
+
const defaultFloatMatchDigits = 4;
|
|
15
|
+
|
|
16
|
+
const fixtureFile = (kind, name) => new URL(\`./\${kind}/\${sanitizeFixtureName(name)}.json\`, import.meta.url);
|
|
17
|
+
|
|
18
|
+
const describeObservedFixtureVersion = (value) => {
|
|
19
|
+
if (!value || typeof value !== 'object') {
|
|
20
|
+
return 'an invalid non-object payload';
|
|
21
|
+
}
|
|
22
|
+
const schemaName = typeof value.schemaName === 'string' ? value.schemaName : 'unknown-schema';
|
|
23
|
+
const schemaVersion = typeof value.schemaVersion === 'string' ? value.schemaVersion : 'unknown-version';
|
|
24
|
+
const supportVersion = typeof value.supportVersion === 'string' ? value.supportVersion : 'unknown-support';
|
|
25
|
+
return \`\${schemaName}@\${schemaVersion} support=\${supportVersion}\`;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const parseReplayFixture = (name, value) => {
|
|
29
|
+
if (!value || typeof value !== 'object') {
|
|
30
|
+
throw new Error(\`Replay fixture "\${name}" must be an object. Re-run ushman-characterize generate-replay for this workspace.\`);
|
|
31
|
+
}
|
|
32
|
+
if (
|
|
33
|
+
value.schemaName !== replayFixtureSchemaName ||
|
|
34
|
+
value.schemaVersion !== replayFixtureSchemaVersion ||
|
|
35
|
+
value.supportVersion !== characterizeSupportVersion
|
|
36
|
+
) {
|
|
37
|
+
throw new Error(
|
|
38
|
+
\`Replay fixture "\${name}" is incompatible. Expected \${replayFixtureSchemaName}@\${replayFixtureSchemaVersion} support=\${characterizeSupportVersion}, found \${describeObservedFixtureVersion(value)}. Re-run ushman-characterize generate-replay for this workspace.\`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
if (!Array.isArray(value.cases)) {
|
|
42
|
+
throw new Error(\`Replay fixture "\${name}" is missing its cases array. Re-run ushman-characterize generate-replay for this workspace.\`);
|
|
43
|
+
}
|
|
44
|
+
for (const [index, entry] of value.cases.entries()) {
|
|
45
|
+
if (!entry || typeof entry !== 'object' || typeof entry.i !== 'number' || typeof entry.state !== 'string') {
|
|
46
|
+
throw new Error(\`Replay fixture "\${name}" has an invalid case at index \${index}. Re-run ushman-characterize generate-replay for this workspace.\`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return value.cases;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const fixture = async (kind, name) => {
|
|
53
|
+
const value = JSON.parse(await Bun.file(fixtureFile(kind, name)).text());
|
|
54
|
+
return kind === 'replay' ? parseReplayFixture(name, value) : value;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const hydrateArgs = (value) => {
|
|
58
|
+
const raw = hydrateTraceValue(value);
|
|
59
|
+
if (!Array.isArray(raw)) {
|
|
60
|
+
throw new Error('Expected replay args to hydrate to an array.');
|
|
61
|
+
}
|
|
62
|
+
return raw;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const invokeManagedTraceCase = async (callable, entry) => {
|
|
66
|
+
const hydratedArgs = hydrateArgs(entry?.args);
|
|
67
|
+
const hydratedThisArg = hydrateTraceValue(entry?.thisArg);
|
|
68
|
+
try {
|
|
69
|
+
return {
|
|
70
|
+
threw: null,
|
|
71
|
+
value: await callable.apply(hydratedThisArg, hydratedArgs),
|
|
72
|
+
};
|
|
73
|
+
} catch (error) {
|
|
74
|
+
return {
|
|
75
|
+
threw: error,
|
|
76
|
+
value: undefined,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const assertObservedTraceValue = (actual, expected, options = {}) => {
|
|
82
|
+
const digits = typeof options.floatDigits === 'number' ? options.floatDigits : defaultFloatMatchDigits;
|
|
83
|
+
if (typeof actual === 'number' && typeof expected === 'number' && Number.isFinite(actual) && Number.isFinite(expected)) {
|
|
84
|
+
expect(actual).toBeCloseTo(expected, digits);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
expect(canonicalizeTraceValue(actual)).toEqual(expected);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const installSideEffectRecorder = () => {
|
|
91
|
+
const sideEffects = [];
|
|
92
|
+
const restore = [];
|
|
93
|
+
const recordSideEffect = (effect) => {
|
|
94
|
+
sideEffects.push(canonicalizeTraceValue(effect));
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
if (globalThis.fetch) {
|
|
98
|
+
const originalFetch = globalThis.fetch.bind(globalThis);
|
|
99
|
+
const wrappedFetch = (...args) => {
|
|
100
|
+
recordSideEffect({ type: 'fetch', url: String(args[0]), method: args[1]?.method ?? 'GET' });
|
|
101
|
+
return originalFetch(...args);
|
|
102
|
+
};
|
|
103
|
+
globalThis.fetch = wrappedFetch;
|
|
104
|
+
restore.push(() => {
|
|
105
|
+
globalThis.fetch = originalFetch;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (globalThis.localStorage) {
|
|
110
|
+
const storage = globalThis.localStorage;
|
|
111
|
+
const setItem = storage.setItem.bind(storage);
|
|
112
|
+
const removeItem = storage.removeItem.bind(storage);
|
|
113
|
+
storage.setItem = (key, value) => {
|
|
114
|
+
recordSideEffect({ type: 'localStorage.setItem', key, value });
|
|
115
|
+
return setItem(key, value);
|
|
116
|
+
};
|
|
117
|
+
storage.removeItem = (key) => {
|
|
118
|
+
recordSideEffect({ type: 'localStorage.removeItem', key });
|
|
119
|
+
return removeItem(key);
|
|
120
|
+
};
|
|
121
|
+
restore.push(() => {
|
|
122
|
+
storage.setItem = setItem;
|
|
123
|
+
storage.removeItem = removeItem;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return () => {
|
|
128
|
+
for (const undo of restore.reverse()) {
|
|
129
|
+
undo();
|
|
130
|
+
}
|
|
131
|
+
return sideEffects;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export const replay = {
|
|
136
|
+
async callMethod(instance, methodName, input) {
|
|
137
|
+
const args = hydrateArgs(input?.args);
|
|
138
|
+
const receiver = instance ?? {};
|
|
139
|
+
return await receiver[methodName](...args);
|
|
140
|
+
},
|
|
141
|
+
async capture(run) {
|
|
142
|
+
const uninstall = installSideEffectRecorder();
|
|
143
|
+
try {
|
|
144
|
+
const value = await run();
|
|
145
|
+
return {
|
|
146
|
+
sideEffects: uninstall(),
|
|
147
|
+
threw: null,
|
|
148
|
+
value,
|
|
149
|
+
};
|
|
150
|
+
} catch (error) {
|
|
151
|
+
return {
|
|
152
|
+
sideEffects: uninstall(),
|
|
153
|
+
threw: error,
|
|
154
|
+
value: undefined,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
hydrate(ClassCtor, snapshot) {
|
|
159
|
+
const raw = hydrateTraceValue(snapshot);
|
|
160
|
+
if (!ClassCtor || !ClassCtor.prototype || !raw || typeof raw !== 'object') {
|
|
161
|
+
return raw;
|
|
162
|
+
}
|
|
163
|
+
return Object.assign(Object.create(ClassCtor.prototype), raw);
|
|
164
|
+
},
|
|
165
|
+
async invoke(fn, input) {
|
|
166
|
+
const args = hydrateArgs(input?.args);
|
|
167
|
+
const thisArg = hydrateTraceValue(input?.thisArg);
|
|
168
|
+
return await fn.apply(thisArg, args);
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
let matchersRegistered = false;
|
|
173
|
+
export const registerTraceMatchers = () => {
|
|
174
|
+
if (matchersRegistered) return;
|
|
175
|
+
matchersRegistered = true;
|
|
176
|
+
expect.extend({
|
|
177
|
+
toMatchTrace(received, expected) {
|
|
178
|
+
const actual = canonicalizeTraceValue(received);
|
|
179
|
+
const mode = process.env.USHMAN_CHARACTERIZE_MATCH_MODE ?? 'strict';
|
|
180
|
+
const pass = compareTraceValues(expected, actual, mode);
|
|
181
|
+
return {
|
|
182
|
+
pass,
|
|
183
|
+
message: () => \`Expected trace \${pass ? 'not ' : ''}to match in \${mode} mode.\\nexpected=\${JSON.stringify(expected, null, 2)}\\nactual=\${JSON.stringify(actual, null, 2)}\`,
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export {
|
|
190
|
+
EXEMPT_FIELD_MARKER,
|
|
191
|
+
canonicalizeSceneTree,
|
|
192
|
+
canonicalizeThrownValue,
|
|
193
|
+
canonicalizeTraceValue,
|
|
194
|
+
hydrateTraceValue,
|
|
195
|
+
};
|
|
196
|
+
`;
|
|
197
|
+
export const workspaceHarnessPaths = (workspaceRoot) => ({
|
|
198
|
+
characterizeDir: path.join(workspaceRoot, '.lab', 'characterize'),
|
|
199
|
+
harnessFile: path.join(workspaceRoot, '.lab', 'characterize', 'index.ts'),
|
|
200
|
+
modulesDir: path.join(workspaceRoot, '.lab', 'characterize', 'modules'),
|
|
201
|
+
pureFixturesDir: path.join(workspaceRoot, '.lab', 'characterize', 'pure'),
|
|
202
|
+
replayFixturesDir: path.join(workspaceRoot, '.lab', 'characterize', 'replay'),
|
|
203
|
+
reportsDir: path.join(workspaceRoot, '.lab', 'characterize', 'reports'),
|
|
204
|
+
sceneFixturesDir: path.join(workspaceRoot, '.lab', 'characterize', 'scene'),
|
|
205
|
+
tracesDir: path.join(workspaceRoot, '.lab', 'characterize', 'traces'),
|
|
206
|
+
});
|
|
207
|
+
export const ensureWorkspaceTraceHarness = async (workspaceRoot) => {
|
|
208
|
+
const paths = workspaceHarnessPaths(workspaceRoot);
|
|
209
|
+
await mkdir(paths.characterizeDir, { recursive: true });
|
|
210
|
+
await Bun.write(paths.harnessFile, `${renderWorkspaceHarnessSource().trimEnd()}\n`);
|
|
211
|
+
return paths;
|
|
212
|
+
};
|
|
213
|
+
export { canonicalizeSceneTree, canonicalizeThrownValue, canonicalizeTraceValue, compareTraceValues, EXEMPT_FIELD_MARKER, hydrateTraceValue, };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { EXEMPT_FIELD_MARKER } from './constants.ts';
|
|
2
|
+
export type CanonicalizeTraceOptions = {
|
|
3
|
+
readonly depthLimit?: number;
|
|
4
|
+
};
|
|
5
|
+
export type SceneCanonicalizeOptions = {
|
|
6
|
+
readonly exemptFields?: readonly string[];
|
|
7
|
+
};
|
|
8
|
+
export type TraceMatchMode = 'lenient' | 'strict';
|
|
9
|
+
export declare const roundTraceNumber: (value: number) => number;
|
|
10
|
+
export declare const canonicalizeNumericValue: (value: number) => number | {
|
|
11
|
+
__t: string;
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const isPlainObject: (value: unknown) => value is Record<string, unknown>;
|
|
15
|
+
export declare const buildStableHash: (value: string) => string;
|
|
16
|
+
export declare const canonicalizeThreeLikeValue: (value: Record<string, unknown>) => {
|
|
17
|
+
x: number | {
|
|
18
|
+
__t: string;
|
|
19
|
+
value: string;
|
|
20
|
+
};
|
|
21
|
+
y: number | {
|
|
22
|
+
__t: string;
|
|
23
|
+
value: string;
|
|
24
|
+
};
|
|
25
|
+
w?: number | {
|
|
26
|
+
__t: string;
|
|
27
|
+
value: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
z?: number | {
|
|
30
|
+
__t: string;
|
|
31
|
+
value: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
__t: string;
|
|
34
|
+
} | {
|
|
35
|
+
__t: string;
|
|
36
|
+
order: string | null;
|
|
37
|
+
x: number | {
|
|
38
|
+
__t: string;
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
41
|
+
y: number | {
|
|
42
|
+
__t: string;
|
|
43
|
+
value: string;
|
|
44
|
+
};
|
|
45
|
+
z: number | {
|
|
46
|
+
__t: string;
|
|
47
|
+
value: string;
|
|
48
|
+
};
|
|
49
|
+
} | {
|
|
50
|
+
__t: string;
|
|
51
|
+
elements: any[];
|
|
52
|
+
} | {
|
|
53
|
+
__t: string;
|
|
54
|
+
hex: string;
|
|
55
|
+
} | {
|
|
56
|
+
__t: string;
|
|
57
|
+
children: number;
|
|
58
|
+
name: string;
|
|
59
|
+
path: string;
|
|
60
|
+
type: string;
|
|
61
|
+
} | {
|
|
62
|
+
__t: string;
|
|
63
|
+
attributeKeys: string[];
|
|
64
|
+
hash: string;
|
|
65
|
+
hasIndex: boolean;
|
|
66
|
+
type: string;
|
|
67
|
+
} | {
|
|
68
|
+
__t: string;
|
|
69
|
+
color: string | null;
|
|
70
|
+
opacity: number | {
|
|
71
|
+
__t: string;
|
|
72
|
+
value: string;
|
|
73
|
+
} | null;
|
|
74
|
+
transparent: boolean | null;
|
|
75
|
+
type: string;
|
|
76
|
+
} | {
|
|
77
|
+
__t: string;
|
|
78
|
+
image: {
|
|
79
|
+
height: number | null;
|
|
80
|
+
src: string | null;
|
|
81
|
+
width: number | null;
|
|
82
|
+
} | null;
|
|
83
|
+
name: string;
|
|
84
|
+
} | null;
|
|
85
|
+
export declare const canonicalizeTraceValue: (value: unknown, options?: CanonicalizeTraceOptions) => unknown;
|
|
86
|
+
export declare const canonicalizeThrownValue: (value: unknown) => unknown;
|
|
87
|
+
export declare const hydrateTraceValue: (value: unknown, state?: {
|
|
88
|
+
refs: Map<number, object>;
|
|
89
|
+
}) => unknown;
|
|
90
|
+
export declare const compareTraceValues: (expected: unknown, actual: unknown, mode?: TraceMatchMode) => boolean;
|
|
91
|
+
export declare const canonicalizeSceneTree: (value: unknown, options?: SceneCanonicalizeOptions) => unknown;
|
|
92
|
+
export declare const buildTraceRuntimeSupportSource: () => string;
|
|
93
|
+
export { EXEMPT_FIELD_MARKER };
|
|
94
|
+
//# sourceMappingURL=trace-serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-serializer.d.ts","sourceRoot":"","sources":["../src/trace-serializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,mBAAmB,EAAyB,MAAM,gBAAgB,CAAC;AAEvG,MAAM,MAAM,wBAAwB,GAAG;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACnC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAqBlD,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,WAAsE,CAAC;AAErH,eAAO,MAAM,wBAAwB,GAAI,OAAO,MAAM;;;CAcrD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAM7E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,WAO5C,CAAC;AA8OF,eAAO,MAAM,0BAA0B,GAAI,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAQxE,CAAC;AA6KF,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,EAAE,UAAS,wBAA6B,KAAG,OAK1F,CAAC;AAEP,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,YAAkC,CAAC;AA8GzF,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,EAAE;;CAA8B,KAAG,OAiClF,CAAC;AAwBF,eAAO,MAAM,kBAAkB,GAAI,UAAU,OAAO,EAAE,QAAQ,OAAO,EAAE,OAAM,cAAyB,KAAG,OAexG,CAAC;AA6BF,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,EAAE,UAAS,wBAA6B,KAAG,OAC5B,CAAC;AA+CpE,eAAO,MAAM,8BAA8B,cA0BzB,CAAC;AAEnB,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|