cesr-ts 0.2.3 → 0.3.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 +36 -3
- package/esm/src/adapters/async-iterable.js +9 -9
- package/esm/src/annotate/annotator.js +18 -10
- package/esm/src/annotate/comments.js +3 -6
- package/esm/src/annotate/render.js +123 -24
- package/esm/src/bench/parser-benchmark.js +134 -0
- package/esm/src/core/bytes.js +6 -0
- package/esm/src/core/errors.js +24 -0
- package/esm/src/core/parser-attachment-collector.js +154 -0
- package/esm/src/core/parser-constants.js +74 -0
- package/esm/src/core/parser-deferred-frames.js +73 -0
- package/esm/src/core/parser-engine.js +128 -505
- package/esm/src/core/parser-frame-parser.js +643 -0
- package/esm/src/core/parser-policy.js +137 -0
- package/esm/src/core/parser-stream-state.js +62 -0
- package/esm/src/core/recovery-diagnostics.js +25 -0
- package/esm/src/index.js +4 -0
- package/esm/src/parser/attachment-fallback-policy.js +142 -0
- package/esm/src/parser/group-dispatch.js +547 -233
- package/esm/src/primitives/counter.js +4 -5
- package/esm/src/primitives/mapper.js +126 -45
- package/esm/src/primitives/matter.js +1 -1
- package/esm/src/router/router-stub.js +6 -6
- package/esm/src/serder/serder.js +44 -7
- package/esm/src/serder/smell.js +2 -1
- package/esm/src/tables/counter-version-registry.js +201 -0
- package/esm/src/version.js +2 -2
- package/package.json +3 -1
- package/types/_dnt.polyfills.d.ts +5 -0
- package/types/_dnt.polyfills.d.ts.map +1 -1
- package/types/src/adapters/async-iterable.d.ts +2 -2
- package/types/src/adapters/async-iterable.d.ts.map +1 -1
- package/types/src/adapters/effection.d.ts +2 -2
- package/types/src/adapters/effection.d.ts.map +1 -1
- package/types/src/annotate/annotator.d.ts.map +1 -1
- package/types/src/annotate/comments.d.ts.map +1 -1
- package/types/src/annotate/render.d.ts +8 -2
- package/types/src/annotate/render.d.ts.map +1 -1
- package/types/src/annotate/types.d.ts +2 -2
- package/types/src/annotate/types.d.ts.map +1 -1
- package/types/src/bench/parser-benchmark.d.ts +70 -0
- package/types/src/bench/parser-benchmark.d.ts.map +1 -0
- package/types/src/core/bytes.d.ts +6 -0
- package/types/src/core/bytes.d.ts.map +1 -1
- package/types/src/core/errors.d.ts +10 -0
- package/types/src/core/errors.d.ts.map +1 -1
- package/types/src/core/parser-attachment-collector.d.ts +51 -0
- package/types/src/core/parser-attachment-collector.d.ts.map +1 -0
- package/types/src/core/parser-constants.d.ts +30 -0
- package/types/src/core/parser-constants.d.ts.map +1 -0
- package/types/src/core/parser-deferred-frames.d.ts +38 -0
- package/types/src/core/parser-deferred-frames.d.ts.map +1 -0
- package/types/src/core/parser-engine.d.ts +53 -44
- package/types/src/core/parser-engine.d.ts.map +1 -1
- package/types/src/core/parser-frame-parser.d.ts +89 -0
- package/types/src/core/parser-frame-parser.d.ts.map +1 -0
- package/types/src/core/parser-policy.d.ts +27 -0
- package/types/src/core/parser-policy.d.ts.map +1 -0
- package/types/src/core/parser-stream-state.d.ts +30 -0
- package/types/src/core/parser-stream-state.d.ts.map +1 -0
- package/types/src/core/recovery-diagnostics.d.ts +59 -0
- package/types/src/core/recovery-diagnostics.d.ts.map +1 -0
- package/types/src/core/types.d.ts +61 -7
- package/types/src/core/types.d.ts.map +1 -1
- package/types/src/index.d.ts +4 -0
- package/types/src/index.d.ts.map +1 -1
- package/types/src/parser/attachment-fallback-policy.d.ts +78 -0
- package/types/src/parser/attachment-fallback-policy.d.ts.map +1 -0
- package/types/src/parser/group-dispatch.d.ts +85 -15
- package/types/src/parser/group-dispatch.d.ts.map +1 -1
- package/types/src/primitives/aggor.d.ts +2 -2
- package/types/src/primitives/aggor.d.ts.map +1 -1
- package/types/src/primitives/blinder.d.ts +2 -2
- package/types/src/primitives/blinder.d.ts.map +1 -1
- package/types/src/primitives/counter.d.ts.map +1 -1
- package/types/src/primitives/mapper.d.ts +44 -1
- package/types/src/primitives/mapper.d.ts.map +1 -1
- package/types/src/primitives/mediar.d.ts +2 -2
- package/types/src/primitives/mediar.d.ts.map +1 -1
- package/types/src/primitives/sealer.d.ts +2 -2
- package/types/src/primitives/sealer.d.ts.map +1 -1
- package/types/src/router/router-stub.d.ts +5 -5
- package/types/src/router/router-stub.d.ts.map +1 -1
- package/types/src/serder/serder.d.ts +2 -2
- package/types/src/serder/serder.d.ts.map +1 -1
- package/types/src/serder/serdery.d.ts +2 -2
- package/types/src/serder/serdery.d.ts.map +1 -1
- package/types/src/serder/smell.d.ts.map +1 -1
- package/types/src/tables/counter-version-registry.d.ts +90 -0
- package/types/src/tables/counter-version-registry.d.ts.map +1 -0
- package/types/src/version.d.ts +2 -2
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { b64ToInt, codeB2ToB64, codeB64ToB2, nabSextets, sceil, } from "../core/bytes.js";
|
|
2
2
|
import { DeserializeError, ShortageError, UnknownCodeError, } from "../core/errors.js";
|
|
3
|
-
import {
|
|
3
|
+
import { COUNTER_HARDS } from "../tables/counter.tables.generated.js";
|
|
4
|
+
import { resolveCounterCodeNameTable, resolveCounterSizeTable, } from "../tables/counter-version-registry.js";
|
|
4
5
|
const COUNTER_BARDS = new Map([...COUNTER_HARDS.entries()].map(([code, hs]) => [
|
|
5
6
|
String.fromCharCode(codeB64ToB2(code)[0]) +
|
|
6
7
|
String.fromCharCode(codeB64ToB2(code)[1] ?? 0),
|
|
7
8
|
hs,
|
|
8
9
|
]));
|
|
9
10
|
function getTables(version) {
|
|
10
|
-
const sizeTable = version
|
|
11
|
-
const nameTable = version
|
|
12
|
-
? COUNTER_CODE_NAMES_V2
|
|
13
|
-
: COUNTER_CODE_NAMES_V1;
|
|
11
|
+
const sizeTable = resolveCounterSizeTable(version);
|
|
12
|
+
const nameTable = resolveCounterCodeNameTable(version);
|
|
14
13
|
return { sizeTable, nameTable };
|
|
15
14
|
}
|
|
16
15
|
export function parseCounterFromText(input, version) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { encodeB64 } from "../core/bytes.js";
|
|
2
|
-
import { DeserializeError, ShortageError, UnknownCodeError, } from "../core/errors.js";
|
|
2
|
+
import { DeserializeError, SemanticInterpretationError, ShortageError, SyntaxParseError, UnknownCodeError, } from "../core/errors.js";
|
|
3
3
|
import { parseAttachmentDispatch } from "../parser/group-dispatch.js";
|
|
4
4
|
import { CtrDexV2 } from "../tables/counter-codex.js";
|
|
5
5
|
import { parseCounter } from "./counter.js";
|
|
@@ -27,6 +27,10 @@ function asQb64(raw, domain) {
|
|
|
27
27
|
return domain === "txt" ? String.fromCharCode(...raw) : encodeB64(raw);
|
|
28
28
|
}
|
|
29
29
|
function parseCounterProbe(input, version, domain) {
|
|
30
|
+
/**
|
|
31
|
+
* Syntax probe only: attempt known major versions without committing semantic
|
|
32
|
+
* meaning until dispatch selection succeeds.
|
|
33
|
+
*/
|
|
30
34
|
// Probe both active and known majors so map parsing remains robust when
|
|
31
35
|
// streams mix legacy and current counters in nested structures.
|
|
32
36
|
const attempts = [
|
|
@@ -52,6 +56,7 @@ function parseCounterProbe(input, version, domain) {
|
|
|
52
56
|
return null;
|
|
53
57
|
}
|
|
54
58
|
function parseLabelProbe(input, domain) {
|
|
59
|
+
/** Label probe only; non-label parse failures are treated as "not a label". */
|
|
55
60
|
try {
|
|
56
61
|
return parseLabeler(input, domain);
|
|
57
62
|
}
|
|
@@ -66,89 +71,165 @@ function parseLabelProbe(input, domain) {
|
|
|
66
71
|
throw error;
|
|
67
72
|
}
|
|
68
73
|
}
|
|
69
|
-
function
|
|
74
|
+
function parseMapperValueSyntax(input, version, domain) {
|
|
75
|
+
/**
|
|
76
|
+
* Parse a single map value token artifact.
|
|
77
|
+
*
|
|
78
|
+
* If the value is itself a map-group counter, recurse into
|
|
79
|
+
* `parseMapperBodySyntax` and attach nested syntax in `children`.
|
|
80
|
+
*/
|
|
70
81
|
const counter = parseCounterProbe(input, version, domain);
|
|
71
82
|
if (counter) {
|
|
72
83
|
const dispatch = parseAttachmentDispatch(input, version, domain);
|
|
73
84
|
const raw = input.slice(0, dispatch.consumed);
|
|
74
|
-
const
|
|
85
|
+
const value = {
|
|
86
|
+
kind: "value",
|
|
75
87
|
code: dispatch.group.code,
|
|
76
88
|
qb64: asQb64(raw, domain),
|
|
77
89
|
isCounter: true,
|
|
90
|
+
consumed: dispatch.consumed,
|
|
78
91
|
};
|
|
79
92
|
if (isMapGroupCode(dispatch.group.code)) {
|
|
80
|
-
|
|
81
|
-
field.children = nested.fields;
|
|
93
|
+
value.children = parseMapperBodySyntax(input, version, domain);
|
|
82
94
|
}
|
|
83
|
-
return
|
|
95
|
+
return value;
|
|
84
96
|
}
|
|
85
97
|
const matter = parseMatter(input, domain);
|
|
86
98
|
return {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
99
|
+
kind: "value",
|
|
100
|
+
code: matter.code,
|
|
101
|
+
qb64: matter.qb64,
|
|
102
|
+
isCounter: false,
|
|
92
103
|
consumed: tokenSize(matter, domain),
|
|
93
104
|
};
|
|
94
105
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
106
|
+
function parseMapPayloadSyntax(input, version, domain, start, end) {
|
|
107
|
+
/**
|
|
108
|
+
* Tokenize payload bytes into an ordered syntax stream.
|
|
109
|
+
*
|
|
110
|
+
* This phase does not pair labels with values; pairing is deferred to
|
|
111
|
+
* `interpretMapperBodySyntax`.
|
|
112
|
+
*/
|
|
113
|
+
const entries = [];
|
|
97
114
|
let offset = start;
|
|
98
|
-
let pendingLabel = null;
|
|
99
115
|
while (offset < end) {
|
|
100
116
|
const at = input.slice(offset, end);
|
|
101
117
|
const maybeLabel = parseLabelProbe(at, domain);
|
|
102
118
|
if (maybeLabel) {
|
|
103
|
-
|
|
104
|
-
|
|
119
|
+
const consumed = tokenSize(maybeLabel, domain);
|
|
120
|
+
entries.push({
|
|
121
|
+
kind: "label",
|
|
122
|
+
code: maybeLabel.code,
|
|
123
|
+
qb64: maybeLabel.token,
|
|
124
|
+
label: maybeLabel.label,
|
|
125
|
+
consumed,
|
|
126
|
+
});
|
|
127
|
+
offset += consumed;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const value = parseMapperValueSyntax(at, version, domain);
|
|
131
|
+
entries.push(value);
|
|
132
|
+
offset += value.consumed;
|
|
133
|
+
}
|
|
134
|
+
if (offset !== end) {
|
|
135
|
+
throw new ShortageError(end, offset);
|
|
136
|
+
}
|
|
137
|
+
return entries;
|
|
138
|
+
}
|
|
139
|
+
/** Convert syntax entries into labeled semantic map fields. */
|
|
140
|
+
export function interpretMapperBodySyntax(syntax) {
|
|
141
|
+
const fields = [];
|
|
142
|
+
let pendingLabel = null;
|
|
143
|
+
for (const entry of syntax.entries) {
|
|
144
|
+
if (entry.kind === "label") {
|
|
145
|
+
pendingLabel = entry.label;
|
|
105
146
|
continue;
|
|
106
147
|
}
|
|
107
|
-
const { field, consumed } = parseMapperValue(at, version, domain);
|
|
108
148
|
fields.push({
|
|
109
149
|
label: pendingLabel,
|
|
110
|
-
code:
|
|
111
|
-
qb64:
|
|
112
|
-
isCounter:
|
|
113
|
-
children:
|
|
150
|
+
code: entry.code,
|
|
151
|
+
qb64: entry.qb64,
|
|
152
|
+
isCounter: entry.isCounter,
|
|
153
|
+
children: entry.children
|
|
154
|
+
? interpretMapperBodySyntax(entry.children)
|
|
155
|
+
: undefined,
|
|
114
156
|
});
|
|
115
157
|
pendingLabel = null;
|
|
116
|
-
offset += consumed;
|
|
117
|
-
}
|
|
118
|
-
if (offset !== end) {
|
|
119
|
-
throw new ShortageError(end, offset);
|
|
120
158
|
}
|
|
121
159
|
if (pendingLabel !== null) {
|
|
122
|
-
throw new
|
|
160
|
+
throw new SemanticInterpretationError("Dangling map label without value");
|
|
123
161
|
}
|
|
124
162
|
return fields;
|
|
125
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Parse map-style native bodies/counters into syntax artifacts.
|
|
166
|
+
* Parsing is strict: payload boundaries must be exact.
|
|
167
|
+
*/
|
|
168
|
+
export function parseMapperBodySyntax(input, version, domain) {
|
|
169
|
+
try {
|
|
170
|
+
const counter = parseCounter(input, version, domain);
|
|
171
|
+
if (!isMapGroupCode(counter.code)) {
|
|
172
|
+
throw new UnknownCodeError(`Expected map-body/group counter, got ${counter.code}`);
|
|
173
|
+
}
|
|
174
|
+
const unit = domain === "bny" ? 3 : 4;
|
|
175
|
+
const header = tokenSize(counter, domain);
|
|
176
|
+
const payload = counter.count * unit;
|
|
177
|
+
const total = header + payload;
|
|
178
|
+
if (input.length < total) {
|
|
179
|
+
throw new ShortageError(total, input.length);
|
|
180
|
+
}
|
|
181
|
+
const entries = parseMapPayloadSyntax(input, version, domain, header, total);
|
|
182
|
+
return {
|
|
183
|
+
code: counter.code,
|
|
184
|
+
count: counter.count,
|
|
185
|
+
fullSize: counter.fullSize,
|
|
186
|
+
fullSizeB2: counter.fullSizeB2,
|
|
187
|
+
totalSize: domain === "txt" ? total : Math.ceil(total * 4 / 3),
|
|
188
|
+
totalSizeB2: domain === "bny" ? total : Math.ceil(total * 3 / 4),
|
|
189
|
+
entries,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
if (error instanceof ShortageError ||
|
|
194
|
+
error instanceof UnknownCodeError ||
|
|
195
|
+
error instanceof DeserializeError) {
|
|
196
|
+
throw new SyntaxParseError(`Map-body syntax parse failed: ${error.message}`, error);
|
|
197
|
+
}
|
|
198
|
+
throw error;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
126
201
|
/**
|
|
127
202
|
* Parse map-style native bodies/counters into labeled semantic fields.
|
|
128
|
-
*
|
|
203
|
+
* Compatibility wrapper over syntax parsing + semantic interpretation phases.
|
|
129
204
|
*/
|
|
130
205
|
export function parseMapperBody(input, version, domain) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (!isMapGroupCode(counter.code)) {
|
|
135
|
-
throw new UnknownCodeError(`Expected map-body/group counter, got ${counter.code}`);
|
|
206
|
+
let syntax;
|
|
207
|
+
try {
|
|
208
|
+
syntax = parseMapperBodySyntax(input, version, domain);
|
|
136
209
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
210
|
+
catch (error) {
|
|
211
|
+
if (error instanceof SyntaxParseError && error.cause) {
|
|
212
|
+
throw error.cause;
|
|
213
|
+
}
|
|
214
|
+
throw error;
|
|
215
|
+
}
|
|
216
|
+
let fields;
|
|
217
|
+
try {
|
|
218
|
+
fields = interpretMapperBodySyntax(syntax);
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
if (error instanceof SemanticInterpretationError) {
|
|
222
|
+
throw new UnknownCodeError(error.message);
|
|
223
|
+
}
|
|
224
|
+
throw error;
|
|
143
225
|
}
|
|
144
|
-
const fields = parseMapPayload(input, version, domain, header, total);
|
|
145
226
|
return {
|
|
146
|
-
code:
|
|
147
|
-
count:
|
|
148
|
-
fullSize:
|
|
149
|
-
fullSizeB2:
|
|
150
|
-
totalSize:
|
|
151
|
-
totalSizeB2:
|
|
227
|
+
code: syntax.code,
|
|
228
|
+
count: syntax.count,
|
|
229
|
+
fullSize: syntax.fullSize,
|
|
230
|
+
fullSizeB2: syntax.fullSizeB2,
|
|
231
|
+
totalSize: syntax.totalSize,
|
|
232
|
+
totalSizeB2: syntax.totalSizeB2,
|
|
152
233
|
fields,
|
|
153
234
|
};
|
|
154
235
|
}
|
|
@@ -26,7 +26,7 @@ function parseMatterCodeFromText(txt) {
|
|
|
26
26
|
export function parseMatterFromText(input) {
|
|
27
27
|
const txt = String.fromCharCode(...input);
|
|
28
28
|
if (txt.length === 0) {
|
|
29
|
-
throw new
|
|
29
|
+
throw new ShortageError(1, 0);
|
|
30
30
|
}
|
|
31
31
|
const { code } = parseMatterCodeFromText(txt);
|
|
32
32
|
const sizage = MATTER_SIZES.get(code);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export function createRouterStub(handlers = {}) {
|
|
2
2
|
return {
|
|
3
|
-
async route(
|
|
4
|
-
if (
|
|
5
|
-
await handlers.onKeri(
|
|
3
|
+
async route(message) {
|
|
4
|
+
if (message.body.proto === "KERI" && handlers.onKeri) {
|
|
5
|
+
await handlers.onKeri(message);
|
|
6
6
|
return;
|
|
7
7
|
}
|
|
8
|
-
if (
|
|
9
|
-
await handlers.onAcdc(
|
|
8
|
+
if (message.body.proto === "ACDC" && handlers.onAcdc) {
|
|
9
|
+
await handlers.onAcdc(message);
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
if (handlers.onUnknown) {
|
|
13
|
-
await handlers.onUnknown(
|
|
13
|
+
await handlers.onUnknown(message);
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
};
|
package/esm/src/serder/serder.js
CHANGED
|
@@ -1,22 +1,59 @@
|
|
|
1
1
|
import { DeserializeError } from "../core/errors.js";
|
|
2
|
+
import { decode as decodeMsgpack } from "@msgpack/msgpack";
|
|
3
|
+
import { decode as decodeCbor } from "cbor-x/decode";
|
|
4
|
+
function normalizeDecodedMap(value, kind) {
|
|
5
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
6
|
+
if (value instanceof Map) {
|
|
7
|
+
const out = {};
|
|
8
|
+
for (const [k, v] of value.entries()) {
|
|
9
|
+
if (typeof k !== "string") {
|
|
10
|
+
throw new DeserializeError(`${kind} map key must be a string`);
|
|
11
|
+
}
|
|
12
|
+
out[k] = v;
|
|
13
|
+
}
|
|
14
|
+
return out;
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
throw new DeserializeError(`${kind} root must be a map/object`);
|
|
19
|
+
}
|
|
20
|
+
// TODO should this be called parseBody?
|
|
21
|
+
// If we're going to say parseSerder then it should doo a full deserialization
|
|
22
|
+
// and the CesrBody should be a Serder with subclasses for SerderKERI and SerderACDC
|
|
2
23
|
export function parseSerder(raw, smellage) {
|
|
3
24
|
const { proto, kind, pvrsn, gvrsn, size } = smellage;
|
|
4
25
|
let ked = null;
|
|
5
26
|
let ilk = null;
|
|
6
27
|
let said = null;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
28
|
+
try {
|
|
29
|
+
if (kind === "JSON") {
|
|
30
|
+
const text = new TextDecoder().decode(raw);
|
|
10
31
|
ked = JSON.parse(text);
|
|
32
|
+
}
|
|
33
|
+
else if (kind === "MGPK") {
|
|
34
|
+
ked = normalizeDecodedMap(decodeMsgpack(raw), kind);
|
|
35
|
+
}
|
|
36
|
+
else if (kind === "CBOR") {
|
|
37
|
+
ked = normalizeDecodedMap(decodeCbor(raw), kind);
|
|
38
|
+
}
|
|
39
|
+
if (ked) {
|
|
11
40
|
ilk = typeof ked.t === "string" ? ked.t : null;
|
|
12
41
|
said = typeof ked.d === "string" ? ked.d : null;
|
|
13
42
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (error instanceof DeserializeError) {
|
|
46
|
+
throw new DeserializeError(`Failed to decode ${kind} Serder: ${String(error.message)}`);
|
|
47
|
+
}
|
|
48
|
+
if (kind === "JSON" && error instanceof SyntaxError) {
|
|
18
49
|
throw new DeserializeError(`Failed to decode JSON Serder: ${String(error)}`);
|
|
19
50
|
}
|
|
51
|
+
if (kind === "MGPK" || kind === "CBOR") {
|
|
52
|
+
throw new DeserializeError(`Failed to decode ${kind} Serder: ${String(error)}`);
|
|
53
|
+
}
|
|
54
|
+
throw error;
|
|
20
55
|
}
|
|
56
|
+
// TODO support SerderKERI and SerderACDC.
|
|
57
|
+
// Is that done at this level or the next level up?
|
|
21
58
|
return { raw, ked, proto, kind, size, pvrsn, gvrsn, ilk, said };
|
|
22
59
|
}
|
package/esm/src/serder/smell.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { b64ToInt } from "../core/bytes.js";
|
|
2
2
|
import { ShortageError, VersionError } from "../core/errors.js";
|
|
3
|
-
|
|
3
|
+
// KERIpy parity: allow version token to begin within the first 12 bytes.
|
|
4
|
+
const MAXVSOFFSET = 12;
|
|
4
5
|
const VER1 = /(?<proto1>[A-Z]{4})(?<major1>[0-9a-f])(?<minor1>[0-9a-f])(?<kind1>[A-Z]{4})(?<size1>[0-9a-f]{6})_/;
|
|
5
6
|
const VER2 = /(?<proto2>[A-Z]{4})(?<pmajor2>[A-Za-z0-9_-])(?<pminor2>[A-Za-z0-9_-]{2})(?<gmajor2>[A-Za-z0-9_-])(?<gminor2>[A-Za-z0-9_-]{2})(?<kind2>[A-Z]{4})(?<size2>[A-Za-z0-9_-]{4})\./;
|
|
6
7
|
function byteWindowToText(raw) {
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { VersionError } from "../core/errors.js";
|
|
2
|
+
import { COUNTER_CODE_NAMES_V1, COUNTER_CODE_NAMES_V2, COUNTER_SIZES_V1, COUNTER_SIZES_V2, } from "./counter.tables.generated.js";
|
|
3
|
+
import { CtrDexV1, CtrDexV2 } from "./counter-codex.js";
|
|
4
|
+
/** Immutable helper for selecting only named codex entries. */
|
|
5
|
+
function pickCodexEntries(codex, names) {
|
|
6
|
+
const out = {};
|
|
7
|
+
for (const name of names) {
|
|
8
|
+
const code = codex[name];
|
|
9
|
+
if (!code) {
|
|
10
|
+
throw new Error(`Missing codex entry ${name}`);
|
|
11
|
+
}
|
|
12
|
+
out[name] = code;
|
|
13
|
+
}
|
|
14
|
+
return Object.freeze(out);
|
|
15
|
+
}
|
|
16
|
+
/** Immutable helper for dropping named codex entries from a codex projection. */
|
|
17
|
+
function omitCodexEntries(codex, omittedNames) {
|
|
18
|
+
const omitted = new Set(omittedNames);
|
|
19
|
+
const out = {};
|
|
20
|
+
for (const [name, code] of Object.entries(codex)) {
|
|
21
|
+
if (!omitted.has(name)) {
|
|
22
|
+
out[name] = code;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return Object.freeze(out);
|
|
26
|
+
}
|
|
27
|
+
/** Return sorted supported minors for one major registry branch. */
|
|
28
|
+
function supportedMinors(registry) {
|
|
29
|
+
return Object.keys(registry) // minor versions
|
|
30
|
+
.map((minor) => Number(minor))
|
|
31
|
+
.sort((a, b) => a - b);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a major/minor request to the latest supported compatible minor.
|
|
35
|
+
*
|
|
36
|
+
* Semantics match KERIpy parser/codex selection:
|
|
37
|
+
* - major must be supported
|
|
38
|
+
* - requested minor must not exceed latest supported minor for that major
|
|
39
|
+
* - selected value binds to latest supported minor for the major
|
|
40
|
+
*/
|
|
41
|
+
export function resolveVersionedRegistryValue(registry, version, label = "versioned registry") {
|
|
42
|
+
const byMinor = registry[version.major];
|
|
43
|
+
if (!byMinor) {
|
|
44
|
+
throw new VersionError(`Unsupported ${label} major version ${version.major}`);
|
|
45
|
+
}
|
|
46
|
+
const minors = supportedMinors(byMinor);
|
|
47
|
+
if (minors.length === 0) {
|
|
48
|
+
throw new VersionError(`No supported minors configured for ${label} major ${version.major}`);
|
|
49
|
+
}
|
|
50
|
+
const latestMinor = minors[minors.length - 1] ?? 0;
|
|
51
|
+
if (version.minor > latestMinor) {
|
|
52
|
+
throw new VersionError(`Unsupported ${label} minor version ${version.major}.${version.minor}; latest supported is ${version.major}.${latestMinor}`);
|
|
53
|
+
}
|
|
54
|
+
const value = byMinor[latestMinor];
|
|
55
|
+
if (!value) {
|
|
56
|
+
throw new VersionError(`Missing ${label} value for ${version.major}.${latestMinor}`);
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
value,
|
|
60
|
+
resolvedMajor: version.major,
|
|
61
|
+
resolvedMinor: latestMinor,
|
|
62
|
+
latestMinor,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const CtrDex_1_0 = omitCodexEntries(CtrDexV1, [
|
|
66
|
+
"SadPathSig",
|
|
67
|
+
"SadPathSigGroup",
|
|
68
|
+
]);
|
|
69
|
+
const CtrDex_2_0 = Object.freeze({ ...CtrDexV2 });
|
|
70
|
+
const UniDex_1_0 = pickCodexEntries(CtrDex_1_0, [
|
|
71
|
+
"GenericGroup",
|
|
72
|
+
"BigGenericGroup",
|
|
73
|
+
"BodyWithAttachmentGroup",
|
|
74
|
+
"BigBodyWithAttachmentGroup",
|
|
75
|
+
"AttachmentGroup",
|
|
76
|
+
"BigAttachmentGroup",
|
|
77
|
+
"NonNativeBodyGroup",
|
|
78
|
+
"BigNonNativeBodyGroup",
|
|
79
|
+
"KERIACDCGenusVersion",
|
|
80
|
+
]);
|
|
81
|
+
const UniDex_2_0 = pickCodexEntries(CtrDex_2_0, [
|
|
82
|
+
"GenericGroup",
|
|
83
|
+
"BigGenericGroup",
|
|
84
|
+
"BodyWithAttachmentGroup",
|
|
85
|
+
"BigBodyWithAttachmentGroup",
|
|
86
|
+
"AttachmentGroup",
|
|
87
|
+
"BigAttachmentGroup",
|
|
88
|
+
"DatagramSegmentGroup",
|
|
89
|
+
"BigDatagramSegmentGroup",
|
|
90
|
+
"ESSRWrapperGroup",
|
|
91
|
+
"BigESSRWrapperGroup",
|
|
92
|
+
"FixBodyGroup",
|
|
93
|
+
"BigFixBodyGroup",
|
|
94
|
+
"MapBodyGroup",
|
|
95
|
+
"BigMapBodyGroup",
|
|
96
|
+
"NonNativeBodyGroup",
|
|
97
|
+
"BigNonNativeBodyGroup",
|
|
98
|
+
"GenericMapGroup",
|
|
99
|
+
"BigGenericMapGroup",
|
|
100
|
+
"GenericListGroup",
|
|
101
|
+
"BigGenericListGroup",
|
|
102
|
+
"KERIACDCGenusVersion",
|
|
103
|
+
]);
|
|
104
|
+
const SUDex_1_0 = pickCodexEntries(UniDex_1_0, [
|
|
105
|
+
"GenericGroup",
|
|
106
|
+
"BigGenericGroup",
|
|
107
|
+
"BodyWithAttachmentGroup",
|
|
108
|
+
"BigBodyWithAttachmentGroup",
|
|
109
|
+
"AttachmentGroup",
|
|
110
|
+
"BigAttachmentGroup",
|
|
111
|
+
]);
|
|
112
|
+
const SUDex_2_0 = pickCodexEntries(UniDex_2_0, [
|
|
113
|
+
"GenericGroup",
|
|
114
|
+
"BigGenericGroup",
|
|
115
|
+
"BodyWithAttachmentGroup",
|
|
116
|
+
"BigBodyWithAttachmentGroup",
|
|
117
|
+
"AttachmentGroup",
|
|
118
|
+
"BigAttachmentGroup",
|
|
119
|
+
]);
|
|
120
|
+
const MUDex_1_0 = pickCodexEntries(UniDex_1_0, [
|
|
121
|
+
"NonNativeBodyGroup",
|
|
122
|
+
"BigNonNativeBodyGroup",
|
|
123
|
+
]);
|
|
124
|
+
const MUDex_2_0 = pickCodexEntries(UniDex_2_0, [
|
|
125
|
+
"DatagramSegmentGroup",
|
|
126
|
+
"BigDatagramSegmentGroup",
|
|
127
|
+
"ESSRWrapperGroup",
|
|
128
|
+
"BigESSRWrapperGroup",
|
|
129
|
+
"FixBodyGroup",
|
|
130
|
+
"BigFixBodyGroup",
|
|
131
|
+
"MapBodyGroup",
|
|
132
|
+
"BigMapBodyGroup",
|
|
133
|
+
"NonNativeBodyGroup",
|
|
134
|
+
"BigNonNativeBodyGroup",
|
|
135
|
+
]);
|
|
136
|
+
/** Versioned counter codex registry analogous to KERIpy `Codes`. */
|
|
137
|
+
export const CtrDexByVersion = Object.freeze({
|
|
138
|
+
1: Object.freeze({ 0: CtrDex_1_0 }),
|
|
139
|
+
2: Object.freeze({ 0: CtrDex_2_0 }),
|
|
140
|
+
});
|
|
141
|
+
/** Versioned universal codex registry analogous to KERIpy `UniDex`. */
|
|
142
|
+
export const UniDexByVersion = Object.freeze({
|
|
143
|
+
1: Object.freeze({ 0: UniDex_1_0 }),
|
|
144
|
+
2: Object.freeze({ 0: UniDex_2_0 }),
|
|
145
|
+
});
|
|
146
|
+
/** Versioned special-universal codex registry analogous to KERIpy `SUDex`. */
|
|
147
|
+
export const SUDexByVersion = Object.freeze({
|
|
148
|
+
1: Object.freeze({ 0: SUDex_1_0 }),
|
|
149
|
+
2: Object.freeze({ 0: SUDex_2_0 }),
|
|
150
|
+
});
|
|
151
|
+
/** Versioned message-universal codex registry analogous to KERIpy `MUDex`. */
|
|
152
|
+
export const MUDexByVersion = Object.freeze({
|
|
153
|
+
1: Object.freeze({ 0: MUDex_1_0 }),
|
|
154
|
+
2: Object.freeze({ 0: MUDex_2_0 }),
|
|
155
|
+
});
|
|
156
|
+
/** Generated counter size tables indexed by major/minor for parser primitives. */
|
|
157
|
+
export const COUNTER_SIZE_TABLES_BY_VERSION = Object.freeze({
|
|
158
|
+
1: Object.freeze({ 0: COUNTER_SIZES_V1 }),
|
|
159
|
+
2: Object.freeze({ 0: COUNTER_SIZES_V2 }),
|
|
160
|
+
});
|
|
161
|
+
/** Generated code-name tables indexed by major/minor for annotation/comments. */
|
|
162
|
+
export const COUNTER_CODE_NAMES_BY_VERSION = Object.freeze({
|
|
163
|
+
1: Object.freeze({ 0: COUNTER_CODE_NAMES_V1 }),
|
|
164
|
+
2: Object.freeze({ 0: COUNTER_CODE_NAMES_V2 }),
|
|
165
|
+
});
|
|
166
|
+
/** Explicit compatibility-only alias codes retained for interop continuity. */
|
|
167
|
+
export const LEGACY_COMPAT_COUNTER_CODES_BY_VERSION = Object.freeze({
|
|
168
|
+
1: Object.freeze({
|
|
169
|
+
0: new Set([
|
|
170
|
+
CtrDexV1.SadPathSig,
|
|
171
|
+
CtrDexV1.SadPathSigGroup,
|
|
172
|
+
]),
|
|
173
|
+
}),
|
|
174
|
+
2: Object.freeze({
|
|
175
|
+
0: new Set(),
|
|
176
|
+
}),
|
|
177
|
+
});
|
|
178
|
+
/** Resolve counter codex for a stream version using latest compatible minor. */
|
|
179
|
+
export function resolveCtrDex(version) {
|
|
180
|
+
return resolveVersionedRegistryValue(CtrDexByVersion, version, "counter codex").value;
|
|
181
|
+
}
|
|
182
|
+
/** Resolve universal codex for a stream version using latest compatible minor. */
|
|
183
|
+
export function resolveUniDex(version) {
|
|
184
|
+
return resolveVersionedRegistryValue(UniDexByVersion, version, "universal codex").value;
|
|
185
|
+
}
|
|
186
|
+
/** Resolve special-universal codex for a stream version. */
|
|
187
|
+
export function resolveSUDex(version) {
|
|
188
|
+
return resolveVersionedRegistryValue(SUDexByVersion, version, "special-universal codex").value;
|
|
189
|
+
}
|
|
190
|
+
/** Resolve message-universal codex for a stream version. */
|
|
191
|
+
export function resolveMUDex(version) {
|
|
192
|
+
return resolveVersionedRegistryValue(MUDexByVersion, version, "message-universal codex").value;
|
|
193
|
+
}
|
|
194
|
+
/** Resolve generated counter size table for a stream version. */
|
|
195
|
+
export function resolveCounterSizeTable(version) {
|
|
196
|
+
return resolveVersionedRegistryValue(COUNTER_SIZE_TABLES_BY_VERSION, version, "counter size table").value;
|
|
197
|
+
}
|
|
198
|
+
/** Resolve generated counter name table for a stream version. */
|
|
199
|
+
export function resolveCounterCodeNameTable(version) {
|
|
200
|
+
return resolveVersionedRegistryValue(COUNTER_CODE_NAMES_BY_VERSION, version, "counter code-name table").value;
|
|
201
|
+
}
|
package/esm/src/version.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Generated by scripts/generate_versions.ts.
|
|
3
3
|
* Do not edit by hand.
|
|
4
4
|
*/
|
|
5
|
-
export const PACKAGE_VERSION = "0.
|
|
6
|
-
export const BUILD_METADATA = "build.
|
|
5
|
+
export const PACKAGE_VERSION = "0.3.1";
|
|
6
|
+
export const BUILD_METADATA = "build.3.f47c821b";
|
|
7
7
|
export const DISPLAY_VERSION = BUILD_METADATA
|
|
8
8
|
? `${PACKAGE_VERSION}+${BUILD_METADATA}`
|
|
9
9
|
: PACKAGE_VERSION;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cesr-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "CESR parser, primitives, and annotation tooling for TypeScript/JavaScript",
|
|
5
5
|
"homepage": "https://github.com/kentbull/keri-ts/tree/main/packages/cesr",
|
|
6
6
|
"repository": {
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
"node": ">=18"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
+
"@msgpack/msgpack": "^3.1.2",
|
|
50
|
+
"cbor-x": "^1.6.0",
|
|
49
51
|
"effection": "^3.6.0"
|
|
50
52
|
},
|
|
51
53
|
"_generatedBy": "dnt@dev"
|
|
@@ -97,5 +97,10 @@ interface ImportMetaPonyfill extends ImportMetaPonyfillCommonjs, ImportMetaPonyf
|
|
|
97
97
|
export declare let import_meta_ponyfill_commonjs: ImportMetaPonyfillCommonjs;
|
|
98
98
|
export declare let import_meta_ponyfill_esmodule: ImportMetaPonyfillEsmodule;
|
|
99
99
|
export declare let import_meta_ponyfill: ImportMetaPonyfill;
|
|
100
|
+
declare global {
|
|
101
|
+
interface Error {
|
|
102
|
+
cause?: unknown;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
100
105
|
export {};
|
|
101
106
|
//# sourceMappingURL=_dnt.polyfills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAgC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB;;;;;;;;;;;;;;WAcG;QACH,GAAG,EAAE,MAAM,CAAC;QACZ;;;;;;;;;;;;WAYG;QACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,GAAG,MAAM,CAAC;QACtE;;;;;;;;WAQG;QACH,IAAI,EAAE,OAAO,CAAC;QAEd;;;;;;;;;;;;WAYG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;;;;;;;;;;;WAYG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,KAAK,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AACnD,UAAU,0BAA0B;IAClC,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;CACxD;AACD,UAAU,0BAA0B;IAClC,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;CACtC;AACD,UAAU,kBACR,SAAQ,0BAA0B,EAAE,0BAA0B;CAC/D;AAiBD,eAAO,IAAI,6BAA6B,EA2BnC,0BAA0B,CAAC;AAMhC,eAAO,IAAI,6BAA6B,EA4DnC,0BAA0B,CAAC;AAMhC,eAAO,IAAI,oBAAoB,EAoB1B,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAgC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB;;;;;;;;;;;;;;WAcG;QACH,GAAG,EAAE,MAAM,CAAC;QACZ;;;;;;;;;;;;WAYG;QACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,GAAG,MAAM,CAAC;QACtE;;;;;;;;WAQG;QACH,IAAI,EAAE,OAAO,CAAC;QAEd;;;;;;;;;;;;WAYG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;;;;;;;;;;;WAYG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,KAAK,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AACnD,UAAU,0BAA0B;IAClC,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;CACxD;AACD,UAAU,0BAA0B;IAClC,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;CACtC;AACD,UAAU,kBACR,SAAQ,0BAA0B,EAAE,0BAA0B;CAC/D;AAiBD,eAAO,IAAI,6BAA6B,EA2BnC,0BAA0B,CAAC;AAMhC,eAAO,IAAI,6BAA6B,EA4DnC,0BAA0B,CAAC;AAMhC,eAAO,IAAI,oBAAoB,EAoB1B,kBAAkB,CAAC;AACxB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CACF;AAED,OAAO,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CesrMessage } from "../core/types.js";
|
|
2
2
|
import { type ParserOptions } from "../core/parser-engine.js";
|
|
3
|
-
export declare function toAsyncFrames(source: AsyncIterable<Uint8Array>, options?: ParserOptions): AsyncGenerator<
|
|
3
|
+
export declare function toAsyncFrames(source: AsyncIterable<Uint8Array>, options?: ParserOptions): AsyncGenerator<CesrMessage>;
|
|
4
4
|
//# sourceMappingURL=async-iterable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-iterable.d.ts","sourceRoot":"","sources":["../../../src/src/adapters/async-iterable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"async-iterable.d.ts","sourceRoot":"","sources":["../../../src/src/adapters/async-iterable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE5E,wBAAuB,aAAa,CAClC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,EACjC,OAAO,GAAE,aAAkB,GAC1B,cAAc,CAAC,WAAW,CAAC,CAe7B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Operation } from "effection";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CesrMessage } from "../core/types.js";
|
|
3
3
|
import type { ParserOptions } from "../core/parser-engine.js";
|
|
4
4
|
export interface FrameChannel {
|
|
5
|
-
readonly frames: AsyncIterable<
|
|
5
|
+
readonly frames: AsyncIterable<CesrMessage>;
|
|
6
6
|
}
|
|
7
7
|
export declare function toEffectionFrames(source: AsyncIterable<Uint8Array>, options?: ParserOptions): Operation<FrameChannel>;
|
|
8
8
|
//# sourceMappingURL=effection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effection.d.ts","sourceRoot":"","sources":["../../../src/src/adapters/effection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"effection.d.ts","sourceRoot":"","sources":["../../../src/src/adapters/effection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CAC7C;AAED,wBAAiB,iBAAiB,CAChC,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,EACjC,OAAO,GAAE,aAAkB,GAC1B,SAAS,CAAC,YAAY,CAAC,CAOzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotator.d.ts","sourceRoot":"","sources":["../../../src/src/annotate/annotator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"annotator.d.ts","sourceRoot":"","sources":["../../../src/src/annotate/annotator.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA6BlE,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,GAAG,MAAM,EAC1B,OAAO,CAAC,EAAE,eAAe,GACxB,cAAc,EAAE,CAOlB;AAED,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,GAAG,MAAM,EAC1B,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,CAWR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../src/src/annotate/comments.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../src/src/annotate/comments.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAoB3D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMpD;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,UAAU,GAClB,MAAM,CAGR;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAGnE"}
|