@overkill-dev/engine 0.0.1 → 0.0.2
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/LICENSE +21 -0
- package/assertion-protocol/assertion-evaluation.d.ts +13 -0
- package/assertion-protocol/assertion-evaluation.d.ts.map +1 -0
- package/assertion-protocol/assertion-evaluation.js +6 -0
- package/assertion-protocol/assertion-evaluation.js.map +1 -0
- package/assertion-protocol/assertion-node-shape.d.ts +71 -0
- package/assertion-protocol/assertion-node-shape.d.ts.map +1 -0
- package/assertion-protocol/assertion-node.d.ts +97 -0
- package/assertion-protocol/assertion-node.d.ts.map +1 -0
- package/assertion-protocol/assertion-node.js +33 -0
- package/assertion-protocol/assertion-node.js.map +1 -0
- package/assertion-protocol/assertion-reference.d.ts +73 -0
- package/assertion-protocol/assertion-reference.d.ts.map +1 -0
- package/assertion-protocol/assertion-reference.js +49 -0
- package/assertion-protocol/assertion-reference.js.map +1 -0
- package/assertion-protocol/assertions/boolean.d.ts +11 -0
- package/assertion-protocol/assertions/boolean.d.ts.map +1 -0
- package/assertion-protocol/assertions/boolean.js +12 -0
- package/assertion-protocol/assertions/boolean.js.map +1 -0
- package/assertion-protocol/assertions/collection.d.ts +22 -0
- package/assertion-protocol/assertions/collection.d.ts.map +1 -0
- package/assertion-protocol/assertions/collection.js +21 -0
- package/assertion-protocol/assertions/collection.js.map +1 -0
- package/assertion-protocol/assertions/dispatch.d.ts +88 -0
- package/assertion-protocol/assertions/dispatch.d.ts.map +1 -0
- package/assertion-protocol/assertions/dispatch.js +47 -0
- package/assertion-protocol/assertions/dispatch.js.map +1 -0
- package/assertion-protocol/assertions/equality.d.ts +17 -0
- package/assertion-protocol/assertions/equality.d.ts.map +1 -0
- package/assertion-protocol/assertions/equality.js +24 -0
- package/assertion-protocol/assertions/equality.js.map +1 -0
- package/assertion-protocol/assertions/fail.d.ts +13 -0
- package/assertion-protocol/assertions/fail.d.ts.map +1 -0
- package/assertion-protocol/assertions/fail.js +8 -0
- package/assertion-protocol/assertions/fail.js.map +1 -0
- package/assertion-protocol/assertions/numeric.d.ts +29 -0
- package/assertion-protocol/assertions/numeric.d.ts.map +1 -0
- package/assertion-protocol/assertions/numeric.js +43 -0
- package/assertion-protocol/assertions/numeric.js.map +1 -0
- package/assertion-protocol/assertions/partial.d.ts +14 -0
- package/assertion-protocol/assertions/partial.d.ts.map +1 -0
- package/assertion-protocol/assertions/partial.js +17 -0
- package/assertion-protocol/assertions/partial.js.map +1 -0
- package/assertion-protocol/assertions/presence.d.ts +17 -0
- package/assertion-protocol/assertions/presence.d.ts.map +1 -0
- package/assertion-protocol/assertions/presence.js +20 -0
- package/assertion-protocol/assertions/presence.js.map +1 -0
- package/assertion-protocol/assertions/string.d.ts +28 -0
- package/assertion-protocol/assertions/string.d.ts.map +1 -0
- package/assertion-protocol/assertions/string.js +33 -0
- package/assertion-protocol/assertions/string.js.map +1 -0
- package/assertion-protocol/assertions/type-shape.d.ts +42 -0
- package/assertion-protocol/assertions/type-shape.d.ts.map +1 -0
- package/assertion-protocol/assertions/type-shape.js +43 -0
- package/assertion-protocol/assertions/type-shape.js.map +1 -0
- package/assertion-protocol/collection-count.d.ts +6 -0
- package/assertion-protocol/collection-count.d.ts.map +1 -0
- package/assertion-protocol/collection-count.js +42 -0
- package/assertion-protocol/collection-count.js.map +1 -0
- package/assertion-protocol/evaluation.d.ts +32 -0
- package/assertion-protocol/evaluation.d.ts.map +1 -0
- package/assertion-protocol/evaluation.js +170 -0
- package/assertion-protocol/evaluation.js.map +1 -0
- package/assertion-protocol/partial-matching.d.ts +4 -0
- package/assertion-protocol/partial-matching.d.ts.map +1 -0
- package/assertion-protocol/partial-matching.js +13 -0
- package/assertion-protocol/partial-matching.js.map +1 -0
- package/assertion-protocol/source-location.d.ts +6 -0
- package/assertion-protocol/source-location.d.ts.map +1 -0
- package/assertion-protocol/source-location.js +76 -0
- package/assertion-protocol/source-location.js.map +1 -0
- package/assertion-protocol/thrown-error-record.d.ts +8 -0
- package/assertion-protocol/thrown-error-record.d.ts.map +1 -0
- package/assertion-protocol/thrown-error-record.js +17 -0
- package/assertion-protocol/thrown-error-record.js.map +1 -0
- package/assertion-protocol/thrown-matcher.d.ts +51 -0
- package/assertion-protocol/thrown-matcher.d.ts.map +1 -0
- package/assertion-protocol/thrown-matcher.js +201 -0
- package/assertion-protocol/thrown-matcher.js.map +1 -0
- package/compare/comparison-result.d.ts +25 -0
- package/compare/comparison-result.d.ts.map +1 -0
- package/compare/comparison-result.js +47 -0
- package/compare/comparison-result.js.map +1 -0
- package/compare/comparison-state.d.ts +7 -0
- package/compare/comparison-state.d.ts.map +1 -0
- package/compare/comparison-state.js +20 -0
- package/compare/comparison-state.js.map +1 -0
- package/compare/comparison.d.ts +12 -0
- package/compare/comparison.d.ts.map +1 -0
- package/compare/comparison.js +78 -0
- package/compare/comparison.js.map +1 -0
- package/compare/diff-path.d.ts +8 -0
- package/compare/diff-path.d.ts.map +1 -0
- package/compare/diff-path.js +37 -0
- package/compare/diff-path.js.map +1 -0
- package/compare/raw-comparison.d.ts +24 -0
- package/compare/raw-comparison.d.ts.map +1 -0
- package/compare/raw-comparison.js +285 -0
- package/compare/raw-comparison.js.map +1 -0
- package/compare/serialized-value-classification.d.ts +12 -0
- package/compare/serialized-value-classification.d.ts.map +1 -0
- package/compare/serialized-value-classification.js +99 -0
- package/compare/serialized-value-classification.js.map +1 -0
- package/compare/serialized-value-shape.d.ts +143 -0
- package/compare/serialized-value-shape.d.ts.map +1 -0
- package/compare/serialized-value-shape.js +12 -0
- package/compare/serialized-value-shape.js.map +1 -0
- package/compare/serialized-value-state.d.ts +12 -0
- package/compare/serialized-value-state.d.ts.map +1 -0
- package/compare/serialized-value-state.js +55 -0
- package/compare/serialized-value-state.js.map +1 -0
- package/compare/serialized-value.d.ts +11 -0
- package/compare/serialized-value.d.ts.map +1 -0
- package/compare/serialized-value.js +389 -0
- package/compare/serialized-value.js.map +1 -0
- package/compare/structured-diff.d.ts +4 -0
- package/compare/structured-diff.d.ts.map +1 -0
- package/compare/structured-diff.js +382 -0
- package/compare/structured-diff.js.map +1 -0
- package/compare/value-classification.d.ts +26 -0
- package/compare/value-classification.d.ts.map +1 -0
- package/compare/value-classification.js +112 -0
- package/compare/value-classification.js.map +1 -0
- package/diff/binary-diff.d.ts +4 -0
- package/diff/binary-diff.d.ts.map +1 -0
- package/diff/binary-diff.js +49 -0
- package/diff/binary-diff.js.map +1 -0
- package/diff/diff-shape.d.ts +117 -0
- package/diff/diff-shape.d.ts.map +1 -0
- package/diff/string-diff.d.ts +3 -0
- package/diff/string-diff.d.ts.map +1 -0
- package/diff/string-diff.js +22 -0
- package/diff/string-diff.js.map +1 -0
- package/engine/assertion-facade.d.ts +50 -0
- package/engine/assertion-facade.d.ts.map +1 -0
- package/engine/assertion-facade.js +361 -0
- package/engine/assertion-facade.js.map +1 -0
- package/engine/case-execution.d.ts +10 -0
- package/engine/case-execution.d.ts.map +1 -0
- package/engine/case-execution.js +408 -0
- package/engine/case-execution.js.map +1 -0
- package/engine/custom-assertion-recording.d.ts +33 -0
- package/engine/custom-assertion-recording.d.ts.map +1 -0
- package/engine/custom-assertion-recording.js +175 -0
- package/engine/custom-assertion-recording.js.map +1 -0
- package/engine/engine.d.ts +24 -0
- package/engine/engine.d.ts.map +1 -0
- package/engine/engine.js +33 -0
- package/engine/engine.js.map +1 -0
- package/engine/execution.d.ts +16 -0
- package/engine/execution.d.ts.map +1 -0
- package/engine/execution.js +223 -0
- package/engine/execution.js.map +1 -0
- package/engine/identity.d.ts +12 -0
- package/engine/identity.d.ts.map +1 -0
- package/engine/identity.js +20 -0
- package/engine/identity.js.map +1 -0
- package/engine/reporter.d.ts +103 -0
- package/engine/reporter.d.ts.map +1 -0
- package/engine/reporter.js +177 -0
- package/engine/reporter.js.map +1 -0
- package/engine/require-assertion-facade.d.ts +21 -0
- package/engine/require-assertion-facade.d.ts.map +1 -0
- package/engine/require-assertion-facade.js +127 -0
- package/engine/require-assertion-facade.js.map +1 -0
- package/engine/run-if-main.d.ts +20 -0
- package/engine/run-if-main.d.ts.map +1 -0
- package/engine/run-if-main.js +30 -0
- package/engine/run-if-main.js.map +1 -0
- package/engine/run-result.d.ts +110 -0
- package/engine/run-result.d.ts.map +1 -0
- package/engine/run-result.js +13 -0
- package/engine/run-result.js.map +1 -0
- package/engine/test-node.d.ts +88 -0
- package/engine/test-node.d.ts.map +1 -0
- package/engine/test-node.js +103 -0
- package/engine/test-node.js.map +1 -0
- package/engine/test-plan.d.ts +20 -0
- package/engine/test-plan.d.ts.map +1 -0
- package/engine/test-plan.js +115 -0
- package/engine/test-plan.js.map +1 -0
- package/package.json +78 -6
- package/packages/engine/assertion-protocol.entry-point.d.ts +9 -0
- package/packages/engine/assertion-protocol.entry-point.d.ts.map +1 -0
- package/packages/engine/assertion-protocol.entry-point.js +4 -0
- package/packages/engine/assertion-protocol.entry-point.js.map +1 -0
- package/packages/engine/engine.entry-point.d.ts +39 -0
- package/packages/engine/engine.entry-point.d.ts.map +1 -0
- package/packages/engine/engine.entry-point.js +47 -0
- package/packages/engine/engine.entry-point.js.map +1 -0
- package/readme.md +121 -5
- package/sbom.cdx.json +67 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
function constructorNameFromPrototype(prototype) {
|
|
2
|
+
if (prototype === null || typeof prototype !== 'object') {
|
|
3
|
+
return 'Object';
|
|
4
|
+
}
|
|
5
|
+
const descriptor = Object.getOwnPropertyDescriptor(prototype, 'constructor');
|
|
6
|
+
const constructorValue = descriptor?.value;
|
|
7
|
+
const name = typeof constructorValue === 'function' ? constructorValue.name : 'Object';
|
|
8
|
+
return name.length === 0 ? '(anonymous)' : name;
|
|
9
|
+
}
|
|
10
|
+
export function constructorName(value) {
|
|
11
|
+
try {
|
|
12
|
+
const prototype = Object.getPrototypeOf(value);
|
|
13
|
+
return constructorNameFromPrototype(prototype);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return 'Unavailable';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function prototypeIs(value, prototype) {
|
|
20
|
+
try {
|
|
21
|
+
return Object.getPrototypeOf(value) === prototype;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function isBufferValue(value) {
|
|
28
|
+
try {
|
|
29
|
+
return Buffer.isBuffer(value);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export function isArrayBufferView(value) {
|
|
36
|
+
try {
|
|
37
|
+
return ArrayBuffer.isView(value);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export function isArrayBufferValue(value) {
|
|
44
|
+
try {
|
|
45
|
+
return value instanceof ArrayBuffer;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export function isDateValue(value) {
|
|
52
|
+
try {
|
|
53
|
+
return value instanceof Date;
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export function isRegExpValue(value) {
|
|
60
|
+
try {
|
|
61
|
+
return value instanceof RegExp;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export function isErrorValue(value) {
|
|
68
|
+
try {
|
|
69
|
+
return value instanceof Error;
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export function isPromiseValue(value) {
|
|
76
|
+
try {
|
|
77
|
+
return value instanceof Promise;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
export function isWeakMapValue(value) {
|
|
84
|
+
try {
|
|
85
|
+
return value instanceof WeakMap;
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export function isWeakSetValue(value) {
|
|
92
|
+
try {
|
|
93
|
+
return value instanceof WeakSet;
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=serialized-value-classification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized-value-classification.js","sourceRoot":"","sources":["../../../../source/compare/serialized-value-classification.ts"],"names":[],"mappings":"AAAA,SAAS,4BAA4B,CAAC,SAAkB;IACpD,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QACtD,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAC7E,MAAM,gBAAgB,GAAY,UAAU,EAAE,KAAK,CAAC;IACpD,MAAM,IAAI,GAAG,OAAO,gBAAgB,KAAK,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvF,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,IAAI,CAAC;QACD,MAAM,SAAS,GAAY,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAExD,OAAO,4BAA4B,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,aAAa,CAAC;IACzB,CAAC;AACL,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAc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Ac;IACzC,IAAI,CAAC;QACD,OAAO,KAAK,YAAY,OAAO,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED,MAAM,UAAU,cAAc,CAC1B,KAAc;IAEd,IAAI,CAAC;QACD,OAAO,KAAK,YAAY,OAAO,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAc;IACzC,IAAI,CAAC;QACD,OAAO,KAAK,YAAY,OAAO,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
type CollectionTruncationReason = 'array-entries' | 'object-entries';
|
|
2
|
+
type ValueTruncationReason = 'depth' | 'serialized-bytes' | 'string-bytes' | 'visited-nodes';
|
|
3
|
+
type SerializationTruncationReason = CollectionTruncationReason | ValueTruncationReason;
|
|
4
|
+
export type SerializationTruncation = {
|
|
5
|
+
readonly budget: number;
|
|
6
|
+
readonly reason: SerializationTruncationReason;
|
|
7
|
+
};
|
|
8
|
+
type SerializedStringPropertyKey = {
|
|
9
|
+
readonly kind: 'string';
|
|
10
|
+
readonly value: string;
|
|
11
|
+
};
|
|
12
|
+
type SerializedSymbolPropertyKey = {
|
|
13
|
+
readonly kind: 'symbol';
|
|
14
|
+
readonly value: string;
|
|
15
|
+
};
|
|
16
|
+
export type SerializedPropertyKey = SerializedStringPropertyKey | SerializedSymbolPropertyKey;
|
|
17
|
+
export type SerializedProperty = {
|
|
18
|
+
readonly key: SerializedPropertyKey;
|
|
19
|
+
readonly value: SerializedValue;
|
|
20
|
+
};
|
|
21
|
+
export type SerializedMapEntry = {
|
|
22
|
+
readonly key: SerializedValue;
|
|
23
|
+
readonly value: SerializedValue;
|
|
24
|
+
};
|
|
25
|
+
export type SerializedBytes = {
|
|
26
|
+
readonly bytes: readonly number[];
|
|
27
|
+
readonly byteLength: number;
|
|
28
|
+
readonly truncation: SerializationTruncation | null;
|
|
29
|
+
};
|
|
30
|
+
type SerializedObjectValue = {
|
|
31
|
+
readonly constructorName: string;
|
|
32
|
+
readonly entries: readonly SerializedProperty[];
|
|
33
|
+
readonly kind: 'object';
|
|
34
|
+
readonly truncation: SerializationTruncation | null;
|
|
35
|
+
};
|
|
36
|
+
type SerializedErrorValue = {
|
|
37
|
+
readonly entries: readonly SerializedProperty[];
|
|
38
|
+
readonly kind: 'error';
|
|
39
|
+
readonly message: string;
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly truncation: SerializationTruncation | null;
|
|
42
|
+
};
|
|
43
|
+
type SerializedArrayValue = {
|
|
44
|
+
readonly entries: readonly SerializedProperty[];
|
|
45
|
+
readonly kind: 'array';
|
|
46
|
+
readonly length: number;
|
|
47
|
+
readonly truncation: SerializationTruncation | null;
|
|
48
|
+
};
|
|
49
|
+
type SerializedMapValue = {
|
|
50
|
+
readonly entries: readonly SerializedMapEntry[];
|
|
51
|
+
readonly kind: 'map';
|
|
52
|
+
readonly size: number;
|
|
53
|
+
readonly truncation: SerializationTruncation | null;
|
|
54
|
+
};
|
|
55
|
+
type SerializedSetValue = {
|
|
56
|
+
readonly kind: 'set';
|
|
57
|
+
readonly size: number;
|
|
58
|
+
readonly truncation: SerializationTruncation | null;
|
|
59
|
+
readonly values: readonly SerializedValue[];
|
|
60
|
+
};
|
|
61
|
+
type SerializedCollectionValue = SerializedArrayValue | SerializedMapValue | SerializedObjectValue | SerializedSetValue;
|
|
62
|
+
type SerializedFunctionValue = {
|
|
63
|
+
readonly id: number;
|
|
64
|
+
readonly kind: 'function';
|
|
65
|
+
readonly name: string | null;
|
|
66
|
+
};
|
|
67
|
+
type SerializedBigIntValue = {
|
|
68
|
+
readonly kind: 'bigint';
|
|
69
|
+
readonly value: string;
|
|
70
|
+
};
|
|
71
|
+
type SerializedBooleanValue = {
|
|
72
|
+
readonly kind: 'boolean';
|
|
73
|
+
readonly value: boolean;
|
|
74
|
+
};
|
|
75
|
+
type SerializedNullValue = {
|
|
76
|
+
readonly kind: 'null';
|
|
77
|
+
};
|
|
78
|
+
type SerializedNumberValue = {
|
|
79
|
+
readonly kind: 'number';
|
|
80
|
+
readonly value: number | '-0' | '-Infinity' | 'Infinity' | 'NaN';
|
|
81
|
+
};
|
|
82
|
+
type SerializedStringValue = {
|
|
83
|
+
readonly kind: 'string';
|
|
84
|
+
readonly truncation: SerializationTruncation | null;
|
|
85
|
+
readonly value: string;
|
|
86
|
+
};
|
|
87
|
+
type SerializedSymbolValue = {
|
|
88
|
+
readonly kind: 'symbol';
|
|
89
|
+
readonly value: string;
|
|
90
|
+
};
|
|
91
|
+
type SerializedUndefinedValue = {
|
|
92
|
+
readonly kind: 'undefined';
|
|
93
|
+
};
|
|
94
|
+
type SerializedNullishValue = SerializedNullValue | SerializedUndefinedValue;
|
|
95
|
+
type SerializedNumericValue = SerializedBigIntValue | SerializedNumberValue;
|
|
96
|
+
type SerializedScalarValue = SerializedBooleanValue | SerializedNullishValue | SerializedNumericValue;
|
|
97
|
+
type SerializedTextValue = SerializedStringValue | SerializedSymbolValue | SerializedUndefinedValue;
|
|
98
|
+
type SerializedPrimitiveValue = SerializedScalarValue | SerializedTextValue;
|
|
99
|
+
type SerializedCircularValue = {
|
|
100
|
+
readonly kind: 'circular';
|
|
101
|
+
readonly reference: number;
|
|
102
|
+
};
|
|
103
|
+
type SerializedDateValue = {
|
|
104
|
+
readonly kind: 'date';
|
|
105
|
+
readonly value: string | null;
|
|
106
|
+
};
|
|
107
|
+
type SerializedOpaqueValue = {
|
|
108
|
+
readonly kind: 'opaque';
|
|
109
|
+
readonly type: 'promise' | 'weak-map' | 'weak-set';
|
|
110
|
+
};
|
|
111
|
+
type SerializedRegExpValue = {
|
|
112
|
+
readonly kind: 'regexp';
|
|
113
|
+
readonly flags: string;
|
|
114
|
+
readonly source: string;
|
|
115
|
+
};
|
|
116
|
+
type SerializedUnavailableValue = {
|
|
117
|
+
readonly kind: 'unavailable';
|
|
118
|
+
readonly reason: string;
|
|
119
|
+
};
|
|
120
|
+
type SerializedBuiltInCoreValue = SerializedCircularValue | SerializedDateValue | SerializedOpaqueValue;
|
|
121
|
+
type SerializedBuiltInValue = SerializedBuiltInCoreValue | SerializedRegExpValue | SerializedUnavailableValue;
|
|
122
|
+
type SerializedTypedArrayValue = SerializedBytes & {
|
|
123
|
+
readonly constructorName: string;
|
|
124
|
+
readonly kind: 'typed-array';
|
|
125
|
+
readonly length: number;
|
|
126
|
+
};
|
|
127
|
+
type SerializedByteViewValue = SerializedBytes & {
|
|
128
|
+
readonly kind: 'array-buffer' | 'data-view';
|
|
129
|
+
};
|
|
130
|
+
type SerializedReferenceValue = SerializedByteViewValue | SerializedCollectionValue | SerializedTypedArrayValue;
|
|
131
|
+
type SerializedRuntimeValue = SerializedBuiltInValue | SerializedErrorValue | SerializedFunctionValue;
|
|
132
|
+
export type SerializedValue = SerializedPrimitiveValue | SerializedReferenceValue | SerializedRuntimeValue;
|
|
133
|
+
export type SerializationBudget = {
|
|
134
|
+
readonly arrayEntries: number;
|
|
135
|
+
readonly depth: number;
|
|
136
|
+
readonly objectEntries: number;
|
|
137
|
+
readonly operandBytes: number;
|
|
138
|
+
readonly stringBytes: number;
|
|
139
|
+
readonly visitedNodes: number;
|
|
140
|
+
};
|
|
141
|
+
export declare const defaultSerializationBudget: SerializationBudget;
|
|
142
|
+
export {};
|
|
143
|
+
//# sourceMappingURL=serialized-value-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized-value-shape.d.ts","sourceRoot":"","sources":["../../../../source/compare/serialized-value-shape.ts"],"names":[],"mappings":"AAAA,KAAK,0BAA0B,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAErE,KAAK,qBAAqB,GAAG,OAAO,GAAG,kBAAkB,GAAG,cAAc,GAAG,eAAe,CAAC;AAE7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AAsB,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,uBAAuB,CAAC;AAEtG,MAAM,MAAM,eAAe,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,sBAAsB,CAAC;AAE3G,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CACjC,CAAC;AAMF,eAAO,MAAM,0BAA0B,EAAE,mBAOxC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const bytesPerKilobyte = 1024;
|
|
2
|
+
const defaultOperandKilobytes = 64;
|
|
3
|
+
const defaultStringKilobytes = 8;
|
|
4
|
+
export const defaultSerializationBudget = {
|
|
5
|
+
arrayEntries: 100,
|
|
6
|
+
depth: 8,
|
|
7
|
+
objectEntries: 100,
|
|
8
|
+
operandBytes: defaultOperandKilobytes * bytesPerKilobyte,
|
|
9
|
+
stringBytes: defaultStringKilobytes * bytesPerKilobyte,
|
|
10
|
+
visitedNodes: 2000
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=serialized-value-shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized-value-shape.js","sourceRoot":"","sources":["../../../../source/compare/serialized-value-shape.ts"],"names":[],"mappings":"AA4IA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,0BAA0B,GAAwB;IAC3D,YAAY,EAAE,GAAG;IACjB,KAAK,EAAE,CAAC;IACR,aAAa,EAAE,GAAG;IAClB,YAAY,EAAE,uBAAuB,GAAG,gBAAgB;IACxD,WAAW,EAAE,sBAAsB,GAAG,gBAAgB;IACtD,YAAY,EAAE,IAAI;CACrB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SerializationBudget, SerializationTruncation, SerializedValue } from './serialized-value-shape.ts';
|
|
2
|
+
export type SerializationState = {
|
|
3
|
+
readonly budget: SerializationBudget;
|
|
4
|
+
readonly counters: Int32Array;
|
|
5
|
+
readonly seen: WeakMap<WeakKey, number>;
|
|
6
|
+
};
|
|
7
|
+
export declare function nextReferenceId(state: SerializationState): number;
|
|
8
|
+
export declare function truncation(reason: SerializationTruncation['reason'], budget: number): SerializationTruncation;
|
|
9
|
+
export declare function createState(budget: SerializationBudget): SerializationState;
|
|
10
|
+
export declare function accountValue(state: SerializationState, value: SerializedValue): SerializedValue;
|
|
11
|
+
export declare function referenceFor(state: SerializationState, value: WeakKey): number | null;
|
|
12
|
+
//# sourceMappingURL=serialized-value-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized-value-state.d.ts","sourceRoot":"","sources":["../../../../source/compare/serialized-value-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EAClB,MAAM,6BAA6B,CAAC;AAMrC,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;CAC3C,CAAC;AAYF,wBAAgB,eAAe,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAEjE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,uBAAuB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,uBAAuB,CAE7G;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,mBAAmB,GAAG,kBAAkB,CAM3E;AAMD,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,eAAe,GAAG,eAAe,CAsB/F;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAarF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const nextReferenceIndex = 0;
|
|
2
|
+
const serializedBytesIndex = 1;
|
|
3
|
+
const visitedNodesIndex = 2;
|
|
4
|
+
function counterValue(state, index) {
|
|
5
|
+
return state.counters[index] ?? 0;
|
|
6
|
+
}
|
|
7
|
+
function setCounterValue(state, index, value) {
|
|
8
|
+
const { counters } = state;
|
|
9
|
+
counters[index] = value;
|
|
10
|
+
}
|
|
11
|
+
export function nextReferenceId(state) {
|
|
12
|
+
return counterValue(state, nextReferenceIndex);
|
|
13
|
+
}
|
|
14
|
+
export function truncation(reason, budget) {
|
|
15
|
+
return { budget, reason };
|
|
16
|
+
}
|
|
17
|
+
export function createState(budget) {
|
|
18
|
+
return {
|
|
19
|
+
budget,
|
|
20
|
+
counters: Int32Array.from([1, 0, 0]),
|
|
21
|
+
seen: new WeakMap()
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function estimatedBytes(value) {
|
|
25
|
+
return Buffer.byteLength(JSON.stringify(value), 'utf8');
|
|
26
|
+
}
|
|
27
|
+
export function accountValue(state, value) {
|
|
28
|
+
const visitedNodes = counterValue(state, visitedNodesIndex) + 1;
|
|
29
|
+
setCounterValue(state, visitedNodesIndex, visitedNodes);
|
|
30
|
+
if (visitedNodes > state.budget.visitedNodes) {
|
|
31
|
+
return {
|
|
32
|
+
kind: 'unavailable',
|
|
33
|
+
reason: `visited node budget reached: ${state.budget.visitedNodes}`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const serializedBytes = counterValue(state, serializedBytesIndex) + estimatedBytes(value);
|
|
37
|
+
setCounterValue(state, serializedBytesIndex, serializedBytes);
|
|
38
|
+
return serializedBytes > state.budget.operandBytes
|
|
39
|
+
? {
|
|
40
|
+
kind: 'unavailable',
|
|
41
|
+
reason: `serialized byte budget reached: ${state.budget.operandBytes}`
|
|
42
|
+
}
|
|
43
|
+
: value;
|
|
44
|
+
}
|
|
45
|
+
export function referenceFor(state, value) {
|
|
46
|
+
const existing = state.seen.get(value);
|
|
47
|
+
if (existing !== undefined) {
|
|
48
|
+
return existing;
|
|
49
|
+
}
|
|
50
|
+
const nextReference = counterValue(state, nextReferenceIndex);
|
|
51
|
+
state.seen.set(value, nextReference);
|
|
52
|
+
setCounterValue(state, nextReferenceIndex, nextReference + 1);
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=serialized-value-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized-value-state.js","sourceRoot":"","sources":["../../../../source/compare/serialized-value-state.ts"],"names":[],"mappings":"AAMA,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAQ5B,SAAS,YAAY,CAAC,KAAyB,EAAE,KAAa;IAC1D,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,eAAe,CAAC,KAAyB,EAAE,KAAa,EAAE,KAAa;IAC5E,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAyB;IACrD,OAAO,YAAY,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,MAAyC,EAAE,MAAc;IAChF,OAAO,EAAE,M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I,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAEvC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAE9D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,kBAAkB,EAAE,aAAa,GAAG,CAAC,CAAC,CAAC;IAE9D,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type SerializationBudget as SerializationBudgetShape, type SerializationTruncation as SerializationTruncationShape, type SerializedMapEntry as SerializedMapEntryShape, type SerializedProperty as SerializedPropertyShape, type SerializedPropertyKey as SerializedPropertyKeyShape, type SerializedValue as SerializedValueShape } from './serialized-value-shape.ts';
|
|
2
|
+
export type SerializationTruncation = SerializationTruncationShape;
|
|
3
|
+
export type SerializedPropertyKey = SerializedPropertyKeyShape;
|
|
4
|
+
export type SerializedProperty = SerializedPropertyShape;
|
|
5
|
+
export type SerializedMapEntry = SerializedMapEntryShape;
|
|
6
|
+
export type SerializedValue = SerializedValueShape;
|
|
7
|
+
export type SerializationBudget = SerializationBudgetShape;
|
|
8
|
+
export declare const defaultSerializationBudget: SerializationBudget;
|
|
9
|
+
export declare function serializeValue(value: unknown): SerializedValue;
|
|
10
|
+
export declare function serializeValueWithBudget(value: unknown, budget: SerializationBudget): SerializedValue;
|
|
11
|
+
//# sourceMappingURL=serialized-value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized-value.d.ts","sourceRoot":"","sources":["../../../../source/compare/serialized-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,mBAAmB,IAAI,wBAAwB,EACpD,KAAK,uBAAuB,IAAI,4BAA4B,EAE5D,KAAK,kBAAkB,IAAI,uBAAuB,EAClD,KAAK,kBAAkB,IAAI,uBAAuB,EAClD,KAAK,qBAAqB,IAAI,0BAA0B,EACxD,KAAK,eAAe,IAAI,oBAAoB,EAC/C,MAAM,6BAA6B,CAAC;AAuBrC,MAAM,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AACnE,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AACzD,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AACzD,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC;AACnD,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AAE3D,eAAO,MAAM,0BAA0B,EAAE,mBAA2C,CAAC;AA+iBrF,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAE9D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,GAAG,eAAe,CAErG"}
|