@dxos/codec-protobuf 2.33.5-dev.4dcc5349 → 2.33.5-dev.cca7f139
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/dist/src/codec.d.ts +2 -0
- package/dist/src/codec.d.ts.map +1 -1
- package/dist/src/codec.js +5 -3
- package/dist/src/codec.js.map +1 -1
- package/dist/src/mapping.d.ts +0 -4
- package/dist/src/mapping.d.ts.map +1 -1
- package/dist/src/mapping.js +1 -50
- package/dist/src/mapping.js.map +1 -1
- package/dist/src/precompiled-mapping/codegen.d.ts +59 -0
- package/dist/src/precompiled-mapping/codegen.d.ts.map +1 -0
- package/dist/src/precompiled-mapping/codegen.js +90 -0
- package/dist/src/precompiled-mapping/codegen.js.map +1 -0
- package/dist/src/precompiled-mapping/create-message-mapper.d.ts +5 -0
- package/dist/src/precompiled-mapping/create-message-mapper.d.ts.map +1 -0
- package/dist/src/precompiled-mapping/create-message-mapper.js +89 -0
- package/dist/src/precompiled-mapping/create-message-mapper.js.map +1 -0
- package/dist/src/schema.d.ts +1 -0
- package/dist/src/schema.d.ts.map +1 -1
- package/dist/src/schema.js +9 -2
- package/dist/src/schema.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/codec.ts +11 -4
- package/src/mapping.ts +0 -44
- package/src/precompiled-mapping/codegen.ts +95 -0
- package/src/precompiled-mapping/create-message-mapper.ts +63 -0
- package/src/schema.ts +7 -2
package/dist/src/codec.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare class ProtoCodec<T = any> implements Codec<T> {
|
|
|
7
7
|
private readonly _type;
|
|
8
8
|
private readonly _mapping;
|
|
9
9
|
private readonly _schema;
|
|
10
|
+
private readonly _encodeMapper;
|
|
11
|
+
private readonly _decodeMapper;
|
|
10
12
|
constructor(_type: protobufjs.Type, _mapping: BidirectionalMapingDescriptors, _schema: Schema<any>);
|
|
11
13
|
/**
|
|
12
14
|
* Underlying protobuf.js type descriptor.
|
package/dist/src/codec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/codec.ts"],"names":[],"mappings":"AAIA,OAAO,UAAU,EAAE,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/codec.ts"],"names":[],"mappings":"AAIA,OAAO,UAAU,EAAE,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,yBAAyB,EAAE,kBAMvC,CAAC;AAEF,qBAAa,UAAU,CAAC,CAAC,GAAG,GAAG,CAAE,YAAW,KAAK,CAAC,CAAC,CAAC;IAKhD,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN1B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAGpB,KAAK,EAAE,UAAU,CAAC,IAAI,EACtB,QAAQ,EAAE,8BAA8B,EACxC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC;IAMvC;;OAEG;IACH,IAAI,SAAS,IAAK,UAAU,CAAC,IAAI,CAEhC;IAED,IAAI,oBAAoB,IAAK,8BAA8B,CAE1D;IAED;;OAEG;IACH,IAAI,MAAM,IAAK,MAAM,CAAC,GAAG,CAAC,CAEzB;IAED,MAAM,CAAE,KAAK,EAAE,CAAC,GAAG,UAAU;IAK7B,MAAM,CAAE,IAAI,EAAE,UAAU,GAAG,CAAC;IAK5B;;OAEG;IACH,OAAO,CAAE,MAAM,EAAE,GAAG;CAGrB"}
|
package/dist/src/codec.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
//
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ProtoCodec = exports.OBJECT_CONVERSION_OPTIONS = void 0;
|
|
7
|
-
const
|
|
7
|
+
const create_message_mapper_1 = require("./precompiled-mapping/create-message-mapper");
|
|
8
8
|
exports.OBJECT_CONVERSION_OPTIONS = {
|
|
9
9
|
// Represent long integers as strings.
|
|
10
10
|
longs: String,
|
|
@@ -16,6 +16,8 @@ class ProtoCodec {
|
|
|
16
16
|
this._type = _type;
|
|
17
17
|
this._mapping = _mapping;
|
|
18
18
|
this._schema = _schema;
|
|
19
|
+
this._encodeMapper = (0, create_message_mapper_1.createMessageMapper)(this._type, this._mapping.encode);
|
|
20
|
+
this._decodeMapper = (0, create_message_mapper_1.createMessageMapper)(this._type, this._mapping.decode);
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Underlying protobuf.js type descriptor.
|
|
@@ -33,12 +35,12 @@ class ProtoCodec {
|
|
|
33
35
|
return this._schema;
|
|
34
36
|
}
|
|
35
37
|
encode(value) {
|
|
36
|
-
const sub =
|
|
38
|
+
const sub = this._encodeMapper(value, [this._schema]);
|
|
37
39
|
return this._type.encode(sub).finish();
|
|
38
40
|
}
|
|
39
41
|
decode(data) {
|
|
40
42
|
const obj = this._type.toObject(this._type.decode(data), exports.OBJECT_CONVERSION_OPTIONS);
|
|
41
|
-
return
|
|
43
|
+
return this._decodeMapper(obj, [this._schema]);
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* Dynamically add new definitions to this codec. Mutates the underlying schema.
|
package/dist/src/codec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/codec.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;
|
|
1
|
+
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/codec.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAMF,uFAA0F;AAG7E,QAAA,yBAAyB,GAAuB;IAC3D,sCAAsC;IACtC,KAAK,EAAE,MAAM;IAEb,6DAA6D;IAC7D,MAAM,EAAE,IAAI;CACb,CAAC;AAEF,MAAa,UAAU;IAIrB,YACmB,KAAsB,EACtB,QAAwC,EACxC,OAAoB;QAFpB,UAAK,GAAL,KAAK,CAAiB;QACtB,aAAQ,GAAR,QAAQ,CAAgC;QACxC,YAAO,GAAP,OAAO,CAAa;QAErC,IAAI,CAAC,aAAa,GAAG,IAAA,2CAAmB,EAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC3E,IAAI,CAAC,aAAa,GAAG,IAAA,2CAAmB,EAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,oBAAoB;QACtB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,MAAM,CAAE,KAAQ;QACd,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACzC,CAAC;IAED,MAAM,CAAE,IAAgB;QACtB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,iCAAyB,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,OAAO,CAAE,MAAW;QAClB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AA/CD,gCA+CC"}
|
package/dist/src/mapping.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import protobufjs from 'protobufjs';
|
|
2
1
|
import { Substitutions } from './common';
|
|
3
2
|
export declare type MapingDescriptors = Partial<Record<string, (value: any, ...extraArgs: any) => any>>;
|
|
4
3
|
export interface BidirectionalMapingDescriptors {
|
|
@@ -6,7 +5,4 @@ export interface BidirectionalMapingDescriptors {
|
|
|
6
5
|
decode: MapingDescriptors;
|
|
7
6
|
}
|
|
8
7
|
export declare function createMappingDescriptors(substitutions: Substitutions): BidirectionalMapingDescriptors;
|
|
9
|
-
export declare function mapMessage(type: protobufjs.Type, substitutions: MapingDescriptors, obj: any, extraArgs: any[]): any;
|
|
10
|
-
export declare function mapField(field: protobufjs.Field, substitutions: MapingDescriptors, value: any, extraArgs: any[]): any;
|
|
11
|
-
export declare function mapScalarField(field: protobufjs.Field, substitutions: MapingDescriptors, value: any, extraArgs: any[]): any;
|
|
12
8
|
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../src/mapping.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../src/mapping.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,oBAAY,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,GAAG,CAAC,CAAC,CAAA;AAE/F,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED,wBAAgB,wBAAwB,CAAE,aAAa,EAAE,aAAa,GAAG,8BAA8B,CAWtG"}
|
package/dist/src/mapping.js
CHANGED
|
@@ -2,13 +2,8 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Copyright 2020 DXOS.org
|
|
4
4
|
//
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
10
|
-
const assert_1 = __importDefault(require("assert"));
|
|
11
|
-
const protobufjs_1 = __importDefault(require("protobufjs"));
|
|
6
|
+
exports.createMappingDescriptors = void 0;
|
|
12
7
|
function createMappingDescriptors(substitutions) {
|
|
13
8
|
const encode = {};
|
|
14
9
|
const decode = {};
|
|
@@ -22,48 +17,4 @@ function createMappingDescriptors(substitutions) {
|
|
|
22
17
|
};
|
|
23
18
|
}
|
|
24
19
|
exports.createMappingDescriptors = createMappingDescriptors;
|
|
25
|
-
function mapMessage(type, substitutions, obj, extraArgs) {
|
|
26
|
-
const res = {};
|
|
27
|
-
for (const field of type.fieldsArray) {
|
|
28
|
-
if (!(field.name in obj)) {
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
res[field.name] = mapField(field, substitutions, obj[field.name], extraArgs);
|
|
32
|
-
}
|
|
33
|
-
return res;
|
|
34
|
-
}
|
|
35
|
-
exports.mapMessage = mapMessage;
|
|
36
|
-
function mapField(field, substitutions, value, extraArgs) {
|
|
37
|
-
if (!field.required && (value === null || value === undefined)) {
|
|
38
|
-
return value;
|
|
39
|
-
}
|
|
40
|
-
else if (field.repeated) {
|
|
41
|
-
return value.map((value) => mapScalarField(field, substitutions, value, extraArgs));
|
|
42
|
-
}
|
|
43
|
-
else if (field.map) {
|
|
44
|
-
(0, assert_1.default)(field instanceof protobufjs_1.default.MapField);
|
|
45
|
-
return Object.fromEntries(Object.entries(value)
|
|
46
|
-
.map(([key, value]) => [key, mapScalarField(field, substitutions, value, extraArgs)]));
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return mapScalarField(field, substitutions, value, extraArgs);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.mapField = mapField;
|
|
53
|
-
function mapScalarField(field, substitutions, value, extraArgs) {
|
|
54
|
-
if (!field.resolved) {
|
|
55
|
-
field.resolve();
|
|
56
|
-
}
|
|
57
|
-
const substitution = field.resolvedType && substitutions[field.resolvedType.fullName.slice(1)];
|
|
58
|
-
if (substitution) {
|
|
59
|
-
return substitution(value, ...extraArgs); // TODO(unknown): Handle recursive substitutions.
|
|
60
|
-
}
|
|
61
|
-
else if (field.resolvedType && field.resolvedType instanceof protobufjs_1.default.Type) {
|
|
62
|
-
return mapMessage(field.resolvedType, substitutions, value, extraArgs);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return value;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.mapScalarField = mapScalarField;
|
|
69
20
|
//# sourceMappingURL=mapping.js.map
|
package/dist/src/mapping.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../src/mapping.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../src/mapping.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAWF,SAAgB,wBAAwB,CAAE,aAA4B;IACpE,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;QAC7C,MAAM,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;KAC3C;IACD,OAAO;QACL,MAAM;QACN,MAAM;KACP,CAAC;AACJ,CAAC;AAXD,4DAWC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare const Ref: unique symbol;
|
|
2
|
+
interface Ref {
|
|
3
|
+
[Ref]: true;
|
|
4
|
+
value: any;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Pass a JS value by reference rather then parsing it as code.
|
|
8
|
+
*
|
|
9
|
+
* Usage example:
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const double = x => x * 2;;
|
|
13
|
+
* codegen('add', ['a', 'b'], c => {
|
|
14
|
+
* c`const c = a + b;`;
|
|
15
|
+
* c`return ${ref(double)}(c)`;
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* would generate a function:
|
|
20
|
+
*
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const double = x => x * 2;;
|
|
23
|
+
* function add(a, b) {
|
|
24
|
+
* const c = a + b;
|
|
25
|
+
* return double(c);
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function ref(value: any): Ref;
|
|
30
|
+
/**
|
|
31
|
+
* DSL for runtime code generation.
|
|
32
|
+
*
|
|
33
|
+
* Example:
|
|
34
|
+
*
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const multiplier = 5;
|
|
37
|
+
* codegen('add', ['a', 'b'], c => {
|
|
38
|
+
* c`const c = a + b;`;
|
|
39
|
+
* c`return c * ${multiplier};`;
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* would generate a function:
|
|
44
|
+
*
|
|
45
|
+
* ```typescript
|
|
46
|
+
* function add(a, b) {
|
|
47
|
+
* const c = a + b;
|
|
48
|
+
* return c * 5;
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param name Function name. Will appear in stack traces.
|
|
53
|
+
* @param args Names of function arguments.
|
|
54
|
+
* @param gen Closure that builds the function source.
|
|
55
|
+
* @param ctx Optional record with context variables that will appear in function's scope.
|
|
56
|
+
*/
|
|
57
|
+
export declare function codegen(name: string, args: string[], gen: (c: (parts: TemplateStringsArray, ...args: any[]) => void) => void, ctx?: Record<string, any>): (...args: any[]) => any;
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=codegen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../../src/precompiled-mapping/codegen.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,GAAG,eAAgB,CAAC;AAE1B,UAAU,GAAG;IACX,CAAC,GAAG,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,EAAE,GAAG,CAAA;CACX;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,GAAG,CAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAKpC;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,OAAO,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,KAAK,IAAI,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAsBtL"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.codegen = exports.ref = void 0;
|
|
7
|
+
const Ref = Symbol('Ref');
|
|
8
|
+
/**
|
|
9
|
+
* Pass a JS value by reference rather then parsing it as code.
|
|
10
|
+
*
|
|
11
|
+
* Usage example:
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const double = x => x * 2;;
|
|
15
|
+
* codegen('add', ['a', 'b'], c => {
|
|
16
|
+
* c`const c = a + b;`;
|
|
17
|
+
* c`return ${ref(double)}(c)`;
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* would generate a function:
|
|
22
|
+
*
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const double = x => x * 2;;
|
|
25
|
+
* function add(a, b) {
|
|
26
|
+
* const c = a + b;
|
|
27
|
+
* return double(c);
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
function ref(value) {
|
|
32
|
+
return {
|
|
33
|
+
[Ref]: true,
|
|
34
|
+
value
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
exports.ref = ref;
|
|
38
|
+
function isRef(value) {
|
|
39
|
+
return value[Ref] === true;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* DSL for runtime code generation.
|
|
43
|
+
*
|
|
44
|
+
* Example:
|
|
45
|
+
*
|
|
46
|
+
* ```typescript
|
|
47
|
+
* const multiplier = 5;
|
|
48
|
+
* codegen('add', ['a', 'b'], c => {
|
|
49
|
+
* c`const c = a + b;`;
|
|
50
|
+
* c`return c * ${multiplier};`;
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* would generate a function:
|
|
55
|
+
*
|
|
56
|
+
* ```typescript
|
|
57
|
+
* function add(a, b) {
|
|
58
|
+
* const c = a + b;
|
|
59
|
+
* return c * 5;
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param name Function name. Will appear in stack traces.
|
|
64
|
+
* @param args Names of function arguments.
|
|
65
|
+
* @param gen Closure that builds the function source.
|
|
66
|
+
* @param ctx Optional record with context variables that will appear in function's scope.
|
|
67
|
+
*/
|
|
68
|
+
function codegen(name, args, gen, ctx = {}) {
|
|
69
|
+
const newCtx = { ...ctx };
|
|
70
|
+
let nextAnnon = 1;
|
|
71
|
+
let buf = '';
|
|
72
|
+
gen((parts, ...args) => {
|
|
73
|
+
const preprocessArg = (arg) => {
|
|
74
|
+
if (isRef(arg)) {
|
|
75
|
+
const name = `anon${nextAnnon++}`;
|
|
76
|
+
newCtx[name] = arg.value;
|
|
77
|
+
return name;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return arg;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
buf += parts.map((s, i) => s + (i < args.length ? preprocessArg(args[i]) : '')).join('') + '\n';
|
|
84
|
+
});
|
|
85
|
+
const code = `return function ${name}(${args.join(', ')}) {\n${buf}\n}`;
|
|
86
|
+
// eslint-disable-next-line no-new-func
|
|
87
|
+
return Function(...Object.keys(newCtx), code)(...Object.values(newCtx));
|
|
88
|
+
}
|
|
89
|
+
exports.codegen = codegen;
|
|
90
|
+
//# sourceMappingURL=codegen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.js","sourceRoot":"","sources":["../../../src/precompiled-mapping/codegen.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAO1B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAgB,GAAG,CAAE,KAAU;IAC7B,OAAO;QACL,CAAC,GAAG,CAAC,EAAE,IAAI;QACX,KAAK;KACN,CAAC;AACJ,CAAC;AALD,kBAKC;AAED,SAAS,KAAK,CAAE,KAAU;IACxB,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,OAAO,CAAE,IAAY,EAAE,IAAc,EAAE,GAAuE,EAAE,MAA2B,EAAE;IAC3J,MAAM,MAAM,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;IAC1B,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE;QACrB,MAAM,aAAa,GAAG,CAAC,GAAQ,EAAE,EAAE;YACjC,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE;gBACd,MAAM,IAAI,GAAG,OAAO,SAAS,EAAE,EAAE,CAAC;gBAClC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC;gBACzB,OAAO,IAAI,CAAC;aACb;iBAAM;gBACL,OAAO,GAAG,CAAC;aACZ;QACH,CAAC,CAAC;QACF,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAClG,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,mBAAmB,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAExE,uCAAuC;IACvC,OAAO,QAAQ,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,CAAC;AAtBD,0BAsBC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as pb from 'protobufjs';
|
|
2
|
+
import { MapingDescriptors } from '../mapping';
|
|
3
|
+
export declare type Mapper = (obj: any, extraArgs: any[]) => any;
|
|
4
|
+
export declare function createMessageMapper(type: pb.Type, substitutions: MapingDescriptors): Mapper;
|
|
5
|
+
//# sourceMappingURL=create-message-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-message-mapper.d.ts","sourceRoot":"","sources":["../../../src/precompiled-mapping/create-message-mapper.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,oBAAY,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAEzD,wBAAgB,mBAAmB,CAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,iBAAiB,GAAG,MAAM,CAE5F"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2022 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
8
|
+
}) : (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
o[k2] = m[k];
|
|
11
|
+
}));
|
|
12
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
+
}) : function(o, v) {
|
|
15
|
+
o["default"] = v;
|
|
16
|
+
});
|
|
17
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
+
if (mod && mod.__esModule) return mod;
|
|
19
|
+
var result = {};
|
|
20
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
__setModuleDefault(result, mod);
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.createMessageMapper = void 0;
|
|
29
|
+
const assert_1 = __importDefault(require("assert"));
|
|
30
|
+
const pb = __importStar(require("protobufjs"));
|
|
31
|
+
const codegen_1 = require("./codegen");
|
|
32
|
+
function createMessageMapper(type, substitutions) {
|
|
33
|
+
return createMessageMapperCached(type, substitutions, {}).map;
|
|
34
|
+
}
|
|
35
|
+
exports.createMessageMapper = createMessageMapper;
|
|
36
|
+
function createMessageMapperCached(type, substitutions, cache) {
|
|
37
|
+
if (!cache[type.fullName]) {
|
|
38
|
+
// Indirection to allow for recursive message types.
|
|
39
|
+
cache[type.fullName] = {};
|
|
40
|
+
cache[type.fullName].map = (0, codegen_1.codegen)(`${type.name}$map`, ['obj', 'extraArgs'], c => {
|
|
41
|
+
c `const res = {};`;
|
|
42
|
+
for (const field of type.fieldsArray) {
|
|
43
|
+
c `if(obj.${field.name} !== undefined && obj.${field.name} !== null) {`;
|
|
44
|
+
{
|
|
45
|
+
const genMapScalar = (value) => {
|
|
46
|
+
field.resolve();
|
|
47
|
+
const substitution = field.resolvedType && substitutions[field.resolvedType.fullName.slice(1)];
|
|
48
|
+
if (substitution) {
|
|
49
|
+
c `${(0, codegen_1.ref)(substitution)}(${value}, ...extraArgs)`;
|
|
50
|
+
}
|
|
51
|
+
else if (field.resolvedType && field.resolvedType instanceof pb.Type) {
|
|
52
|
+
const mapper = createMessageMapperCached(field.resolvedType, substitutions, cache);
|
|
53
|
+
c `${(0, codegen_1.ref)(mapper)}.map(${value}, extraArgs)`;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
c `${value}`;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
// TODO(dmaretskyi): Support maps.
|
|
60
|
+
if (field.repeated) {
|
|
61
|
+
c `res.${field.name} = obj.${field.name}.map(item => `;
|
|
62
|
+
genMapScalar('item');
|
|
63
|
+
c `);`;
|
|
64
|
+
}
|
|
65
|
+
else if (field.map) {
|
|
66
|
+
(0, assert_1.default)(field instanceof pb.MapField);
|
|
67
|
+
c `res.${field.name} = {};`;
|
|
68
|
+
c `for(const key of Object.keys(obj.${field.name})) {`;
|
|
69
|
+
{
|
|
70
|
+
c `res.${field.name}[key] = `;
|
|
71
|
+
genMapScalar(`obj.${field.name}[key]`);
|
|
72
|
+
c `;`;
|
|
73
|
+
}
|
|
74
|
+
c `}`;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
c `res.${field.name} = `;
|
|
78
|
+
genMapScalar(`obj.${field.name}`);
|
|
79
|
+
c `;`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
c `}`;
|
|
83
|
+
}
|
|
84
|
+
c `return res;`;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return cache[type.fullName];
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=create-message-mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-message-mapper.js","sourceRoot":"","sources":["../../../src/precompiled-mapping/create-message-mapper.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,oDAA4B;AAC5B,+CAAiC;AAGjC,uCAAyC;AAIzC,SAAgB,mBAAmB,CAAE,IAAa,EAAE,aAAgC;IAClF,OAAO,yBAAyB,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC;AAChE,CAAC;AAFD,kDAEC;AAED,SAAS,yBAAyB,CAAE,IAAa,EAAE,aAAgC,EAAE,KAAsC;IACzH,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QACzB,oDAAoD;QACpD,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAS,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAA,iBAAO,EAAC,GAAG,IAAI,CAAC,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE;YAC/E,CAAC,CAAA,iBAAiB,CAAC;YACnB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,WAAW,EAAE;gBACpC,CAAC,CAAA,UAAU,KAAK,CAAC,IAAI,yBAAyB,KAAK,CAAC,IAAI,cAAc,CAAC;gBAAC;oBACtE,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE;wBACrC,KAAK,CAAC,OAAO,EAAE,CAAC;wBAChB,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC/F,IAAI,YAAY,EAAE;4BAChB,CAAC,CAAA,GAAG,IAAA,aAAG,EAAC,YAAY,CAAC,IAAI,KAAK,iBAAiB,CAAC;yBACjD;6BAAM,IAAI,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY,YAAY,EAAE,CAAC,IAAI,EAAE;4BACtE,MAAM,MAAM,GAAG,yBAAyB,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;4BACnF,CAAC,CAAA,GAAG,IAAA,aAAG,EAAC,MAAM,CAAC,QAAQ,KAAK,cAAc,CAAC;yBAC5C;6BAAM;4BACL,CAAC,CAAA,GAAG,KAAK,EAAE,CAAC;yBACb;oBACH,CAAC,CAAC;oBAEF,kCAAkC;oBAClC,IAAI,KAAK,CAAC,QAAQ,EAAE;wBAClB,CAAC,CAAA,OAAO,KAAK,CAAC,IAAI,UAAU,KAAK,CAAC,IAAI,eAAe,CAAC;wBACtD,YAAY,CAAC,MAAM,CAAC,CAAC;wBACrB,CAAC,CAAA,IAAI,CAAC;qBACP;yBAAM,IAAI,KAAK,CAAC,GAAG,EAAE;wBACpB,IAAA,gBAAM,EAAC,KAAK,YAAY,EAAE,CAAC,QAAQ,CAAC,CAAC;wBACrC,CAAC,CAAA,OAAO,KAAK,CAAC,IAAI,QAAQ,CAAC;wBAC3B,CAAC,CAAA,oCAAoC,KAAK,CAAC,IAAI,MAAM,CAAC;wBAAC;4BACrD,CAAC,CAAA,OAAO,KAAK,CAAC,IAAI,UAAU,CAAC;4BAC7B,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC;4BACvC,CAAC,CAAA,GAAG,CAAC;yBACN;wBAAC,CAAC,CAAA,GAAG,CAAC;qBACR;yBAAM;wBACL,CAAC,CAAA,OAAO,KAAK,CAAC,IAAI,KAAK,CAAC;wBACxB,YAAY,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;wBAClC,CAAC,CAAA,GAAG,CAAC;qBACN;iBACF;gBAAC,CAAC,CAAA,GAAG,CAAC;aACR;YACD,CAAC,CAAA,aAAa,CAAC;QACjB,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist/src/schema.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare class Schema<T, S = {}> {
|
|
|
6
6
|
private _typesRoot;
|
|
7
7
|
static fromJson<T extends Record<string, any>, S extends Record<string, any> = {}>(schema: any, substitutions?: Substitutions): Schema<T, S>;
|
|
8
8
|
private readonly _mapping;
|
|
9
|
+
private readonly _codecCache;
|
|
9
10
|
constructor(_typesRoot: protobufjs.Root, substitutions: Substitutions);
|
|
10
11
|
getCodecForType<K extends keyof T & string>(typeName: K): ProtoCodec<T[K]>;
|
|
11
12
|
tryGetCodecForType(typeName: string): ProtoCodec;
|
package/dist/src/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAKA,OAAO,UAAoB,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,qBAAa,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAKA,OAAO,UAAoB,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,qBAAa,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE;IAWzB,OAAO,CAAC,UAAU;IAVpB,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EAAG,MAAM,EAAE,GAAG,EAAE,aAAa,GAAE,aAAkB,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IAKjJ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAE1D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiC;gBAGnD,UAAU,EAAE,UAAU,CAAC,IAAI,EACnC,aAAa,EAAE,aAAa;IAK9B,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAG,QAAQ,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAU3E,kBAAkB,CAAE,QAAQ,EAAE,MAAM,GAAG,UAAU;IASjD,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAG,IAAI,EAAE,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAQzE;;OAEG;IACH,OAAO,CAAE,MAAM,EAAE,GAAG;CAMrB"}
|
package/dist/src/schema.js
CHANGED
|
@@ -34,6 +34,7 @@ const service_1 = require("./service");
|
|
|
34
34
|
class Schema {
|
|
35
35
|
constructor(_typesRoot, substitutions) {
|
|
36
36
|
this._typesRoot = _typesRoot;
|
|
37
|
+
this._codecCache = {};
|
|
37
38
|
this._mapping = (0, mapping_1.createMappingDescriptors)(substitutions);
|
|
38
39
|
}
|
|
39
40
|
static fromJson(schema, substitutions = {}) {
|
|
@@ -41,18 +42,24 @@ class Schema {
|
|
|
41
42
|
return new Schema(root, substitutions);
|
|
42
43
|
}
|
|
43
44
|
getCodecForType(typeName) {
|
|
45
|
+
var _a;
|
|
46
|
+
var _b, _c;
|
|
44
47
|
if (typeof typeName !== 'string') {
|
|
45
48
|
throw new TypeError('Expected `typeName` argument to be a string');
|
|
46
49
|
}
|
|
47
50
|
const type = this._typesRoot.lookupType(typeName);
|
|
48
|
-
|
|
51
|
+
(_a = (_b = this._codecCache)[_c = type.fullName]) !== null && _a !== void 0 ? _a : (_b[_c] = new codec_1.ProtoCodec(type, this._mapping, this));
|
|
52
|
+
return this._codecCache[type.fullName];
|
|
49
53
|
}
|
|
50
54
|
tryGetCodecForType(typeName) {
|
|
55
|
+
var _a;
|
|
56
|
+
var _b, _c;
|
|
51
57
|
if (typeof typeName !== 'string') {
|
|
52
58
|
throw new TypeError('Expected `typeName` argument to be a string');
|
|
53
59
|
}
|
|
54
60
|
const type = this._typesRoot.lookupType(typeName);
|
|
55
|
-
|
|
61
|
+
(_a = (_b = this._codecCache)[_c = type.fullName]) !== null && _a !== void 0 ? _a : (_b[_c] = new codec_1.ProtoCodec(type, this._mapping, this));
|
|
62
|
+
return this._codecCache[type.fullName];
|
|
56
63
|
}
|
|
57
64
|
getService(name) {
|
|
58
65
|
if (typeof name !== 'string') {
|
package/dist/src/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,gEAAiC;AACjC,yDAA8C;AAE9C,mCAAqC;AAErC,uCAAqF;AACrF,uCAA8C;AAE9C,MAAa,MAAM;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,gEAAiC;AACjC,yDAA8C;AAE9C,mCAAqC;AAErC,uCAAqF;AACrF,uCAA8C;AAE9C,MAAa,MAAM;IAUjB,YACU,UAA2B,EACnC,aAA4B;QADpB,eAAU,GAAV,UAAU,CAAiB;QAHpB,gBAAW,GAA+B,EAAE,CAAA;QAM3D,IAAI,CAAC,QAAQ,GAAG,IAAA,kCAAwB,EAAC,aAAa,CAAC,CAAC;IAC1D,CAAC;IAdD,MAAM,CAAC,QAAQ,CAAqE,MAAW,EAAE,gBAA+B,EAAE;QAChI,MAAM,IAAI,GAAG,oBAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC9C,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACzC,CAAC;IAaD,eAAe,CAA8B,QAAW;;;QACtD,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAChC,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;SACpE;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAClD,YAAA,IAAI,CAAC,WAAW,OAAC,IAAI,CAAC,QAAQ,8CAAM,IAAI,kBAAU,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAC;QAC9E,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEzC,CAAC;IAED,kBAAkB,CAAE,QAAgB;;;QAClC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAChC,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;SACpE;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAClD,YAAA,IAAI,CAAC,WAAW,OAAC,IAAI,CAAC,QAAQ,8CAAM,IAAI,kBAAU,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAC;QAC9E,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,UAAU,CAA8B,IAAO;QAC7C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAC;SAChE;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACpD,OAAO,IAAI,2BAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,OAAO,CAAE,MAAW;QAClB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;SAC1D;QACD,IAAI,CAAC,UAAU,GAAG,iBAAI,CAAC,QAAQ,CAAC,IAAA,sBAAK,EAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC;CACF;AArDD,wBAqDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es5.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/interface.ts","../src/buffer-patch.ts","../../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+assert@1.5.6/node_modules/@types/assert/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/common.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/array.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/collection.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/date.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/function.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/lang.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/math.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/number.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/object.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/seq.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/string.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash.merge@4.6.6/node_modules/@types/lodash.merge/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+ms@0.7.31/node_modules/@types/ms/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+debug@4.1.7/node_modules/@types/debug/index.d.ts","../src/stream.ts","../src/service.ts","../src/schema.ts","../src/common.ts","../src/mapping.ts","../src/codec.ts","../src/substitutions/any.ts","../src/substitutions/timestamp.ts","../src/substitutions/index.ts","../src/index.ts","../src/stream.test.ts","../test/codec.test.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/diffLines.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/printDiffs.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+jest@26.0.24/node_modules/@types/jest/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert/strict.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/async_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/buffer.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/child_process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/cluster.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/console.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/constants.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/crypto.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dgram.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/diagnostics_channel.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/domain.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http2.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/https.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/inspector.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/module.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/net.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/os.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/path.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/perf_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/punycode.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/querystring.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/readline.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/repl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/consumers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/web.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/string_decoder.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tls.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/trace_events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tty.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/url.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/v8.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/vm.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/wasi.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/worker_threads.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/zlib.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.global.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"a7dc1e65746fd3c5a1a614c6d4885aa855c6695f5c479fb1337d822ff9126f30","390943640d3f96650780f09b94cf04f5190468636246fe87514464d833008b85","1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da","d6c62c91eebdb76cde2ad0dfa3cf90134aad879c463ad7d8642e326e0bb57968","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d70c026dd2eeaa974f430ea229230a1897fdb897dc74659deebe2afd4feeb08f","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","ca59fe42b81228a317812e95a2e72ccc8c7f1911b5f0c2a032adf41a0161ec5d","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"a25713e4a4769ba11d2a1bc317250334968b0a892d3342d285a0e238c537af09","6a9c5127096b35264eb7cd21b2417bfc1d42cceca9ba4ce2bb0c3410b7816042","78828b06c0d3b586954015e9ebde5480b009e166c71244763bda328ec0920f41","715700031df76af9346132031195d9f5cea0fe9f2df294803d412b14c0f3c18a","1c6a7ca884c5e76a5d505464c3a5a90c6fe9edf814d6d935c862e168a6f497bb","d47db7cb1e686be3f2250b3c8543f136d1c2050e23f38eec58b41ea36c6ed9b4","50a03e1dfd866e66df0f2df297980cbe01c0a1ab1e493f738239aa692c4e4281","3b08506cfebbf8f592e61fdeb340c49adb8f0ffe408eb1d4330274642b25e35c","248cba0df9c9eaca69affb8bd9677e6978133bb10319ccc3a10a101b8508db65","5e7ba893c0a6c95073f04a68277fa6bef10c55b627987c2c960cbd372c7de4d8","4fd918dcbecb5f01d79f627dd135b9bcea7bb38845b05f87b95217a653038e12","8358d99f5f3a081e35897572d87d36152d119008906363ed851512d4adb3450c","befa12d7d76804d20992f94304fa7bf9c5b1d52c1dc81cff32fc55fa5598f043","b22bd2b9883af60e2c18cc3220f3274b3037ac0b786cc74b746bca2bcee2747e","2b3a38aef0306688160014f1fc5e084bec92af2a78e1fb3792381d921362def0","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true},"0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","c665d5c50c2573aefd98f0ffb12c5583e333ed94294ce6f144a4163a8c84f09b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"8a215750db3e2073511e07c9e293c8c40d6109e5c7368845e060bcc12adbae6f","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd"],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[128],[63,128],[81,83,128],[61,128],[49,51,52,53,54,55,56,57,58,59,60,61,128],[49,50,52,53,54,55,56,57,58,59,60,61,128],[50,51,52,53,54,55,56,57,58,59,60,61,128],[49,50,51,53,54,55,56,57,58,59,60,61,128],[49,50,51,52,54,55,56,57,58,59,60,61,128],[49,50,51,52,53,55,56,57,58,59,60,61,128],[49,50,51,52,53,54,56,57,58,59,60,61,128],[49,50,51,52,53,54,55,57,58,59,60,61,128],[49,50,51,52,53,54,55,56,58,59,60,61,128],[49,50,51,52,53,54,55,56,57,59,60,61,128],[49,50,51,52,53,54,55,56,57,58,60,61,128],[49,50,51,52,53,54,55,56,57,58,59,61,128],[49,50,51,52,53,54,55,56,57,58,59,60,128],[85,128],[88,128],[89,94,128],[90,100,101,108,117,127,128],[90,91,100,108,128],[92,128],[93,94,101,109,128],[94,117,124,128],[95,97,100,108,128],[96,128],[97,98,128],[99,100,128],[100,128],[100,101,102,117,127,128],[100,101,102,117,128],[103,108,117,127,128],[100,101,103,104,108,117,124,127,128],[103,105,117,124,127,128],[85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],[100,106,128],[107,127,128],[97,100,108,117,128],[109,128],[110,128],[88,111,128],[112,126,128,132],[113,128],[114,128],[100,115,128],[115,116,128,130],[100,117,118,119,128],[117,119,128],[117,118,128],[120,128],[121,128],[100,122,123,128],[122,123,128],[94,108,124,128],[125,128],[108,126,128],[89,103,114,127,128],[94,128],[117,128,129],[128,130],[128,131],[89,94,100,102,111,117,127,128,130,132],[117,128,133],[77,78,128],[77,78,79,80,128],[82,128],[45,128],[45,47,67,69,128],[67,128],[45,46,65,66,67,68,70,73,128],[47,68,85,128],[47,62,66,68,69,70,128],[47,65,67,85,128],[65,128],[64,85,128],[71,72,128],[47,67,74,110,128]],"referencedMap":[[48,1],[64,2],[84,3],[62,4],[50,5],[51,6],[49,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[58,14],[59,15],[60,16],[61,17],[63,1],[85,18],[86,18],[88,19],[89,20],[90,21],[91,22],[92,23],[93,24],[94,25],[95,26],[96,27],[97,28],[98,28],[99,29],[100,30],[101,31],[102,32],[87,1],[134,1],[103,33],[104,34],[105,35],[135,36],[106,37],[107,38],[108,39],[109,40],[110,41],[111,42],[112,43],[113,44],[114,45],[115,46],[116,47],[117,48],[119,49],[118,50],[120,51],[121,52],[122,53],[123,54],[124,55],[125,56],[126,57],[127,58],[128,59],[129,60],[130,61],[131,62],[132,63],[133,64],[77,1],[79,65],[81,66],[80,65],[78,1],[83,67],[82,1],[47,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[31,1],[32,1],[33,1],[34,1],[7,1],[39,1],[35,1],[36,1],[37,1],[38,1],[8,1],[43,1],[40,1],[41,1],[42,1],[1,1],[9,1],[44,1],[46,68],[70,69],[68,70],[74,71],[45,1],[69,72],[67,73],[66,74],[75,75],[65,76],[71,70],[73,77],[72,1],[76,78]],"exportedModulesMap":[[48,1],[64,2],[84,3],[62,4],[50,5],[51,6],[49,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[58,14],[59,15],[60,16],[61,17],[63,1],[85,18],[86,18],[88,19],[89,20],[90,21],[91,22],[92,23],[93,24],[94,25],[95,26],[96,27],[97,28],[98,28],[99,29],[100,30],[101,31],[102,32],[87,1],[134,1],[103,33],[104,34],[105,35],[135,36],[106,37],[107,38],[108,39],[109,40],[110,41],[111,42],[112,43],[113,44],[114,45],[115,46],[116,47],[117,48],[119,49],[118,50],[120,51],[121,52],[122,53],[123,54],[124,55],[125,56],[126,57],[127,58],[128,59],[129,60],[130,61],[131,62],[132,63],[133,64],[77,1],[79,65],[81,66],[80,65],[78,1],[83,67],[82,1],[47,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[31,1],[32,1],[33,1],[34,1],[7,1],[39,1],[35,1],[36,1],[37,1],[38,1],[8,1],[43,1],[40,1],[41,1],[42,1],[1,1],[9,1],[44,1],[46,68],[70,69],[68,70],[74,71],[45,1],[69,72],[67,73],[66,74],[75,75],[65,76],[71,70],[73,77],[72,1],[76,78]],"semanticDiagnosticsPerFile":[48,64,84,62,50,51,49,52,53,54,55,56,57,58,59,60,61,63,85,86,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,87,134,103,104,105,135,106,107,108,109,110,111,112,113,114,115,116,117,119,118,120,121,122,123,124,125,126,127,128,129,130,131,132,133,77,79,81,80,78,83,82,47,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,39,35,36,37,38,8,43,40,41,42,1,9,44,46,70,68,74,45,69,67,66,75,65,71,73,72,76]},"version":"4.5.3"}
|
|
1
|
+
{"program":{"fileNames":["../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es5.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../common/temp/node_modules/.pnpm/typescript@4.5.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/interface.ts","../src/buffer-patch.ts","../../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/common.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/array.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/collection.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/date.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/function.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/lang.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/math.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/number.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/object.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/seq.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/string.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/common/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+lodash.merge@4.6.6/node_modules/@types/lodash.merge/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+assert@1.5.6/node_modules/@types/assert/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+ms@0.7.31/node_modules/@types/ms/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+debug@4.1.7/node_modules/@types/debug/index.d.ts","../src/stream.ts","../src/service.ts","../src/schema.ts","../src/common.ts","../src/mapping.ts","../src/precompiled-mapping/codegen.ts","../src/precompiled-mapping/create-message-mapper.ts","../src/codec.ts","../src/substitutions/any.ts","../src/substitutions/timestamp.ts","../src/substitutions/index.ts","../src/index.ts","../src/stream.test.ts","../test/codec.test.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/diffLines.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/printDiffs.d.ts","../../../../common/temp/node_modules/.pnpm/jest-diff@26.6.2/node_modules/jest-diff/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/types.d.ts","../../../../common/temp/node_modules/.pnpm/pretty-format@26.6.2/node_modules/pretty-format/build/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+jest@26.0.24/node_modules/@types/jest/index.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/assert/strict.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/async_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/buffer.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/child_process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/cluster.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/console.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/constants.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/crypto.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dgram.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/diagnostics_channel.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/dns/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/domain.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/fs/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/http2.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/https.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/inspector.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/module.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/net.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/os.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/path.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/perf_hooks.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/process.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/punycode.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/querystring.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/readline.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/repl.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/consumers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/stream/web.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/string_decoder.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/timers/promises.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tls.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/trace_events.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/tty.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/url.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/util.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/v8.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/vm.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/wasi.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/worker_threads.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/zlib.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/globals.global.d.ts","../../../../common/temp/node_modules/.pnpm/@types+node@16.11.27/node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"a7dc1e65746fd3c5a1a614c6d4885aa855c6695f5c479fb1337d822ff9126f30","390943640d3f96650780f09b94cf04f5190468636246fe87514464d833008b85","1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d70c026dd2eeaa974f430ea229230a1897fdb897dc74659deebe2afd4feeb08f","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","ca59fe42b81228a317812e95a2e72ccc8c7f1911b5f0c2a032adf41a0161ec5d","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"a25713e4a4769ba11d2a1bc317250334968b0a892d3342d285a0e238c537af09","d6c62c91eebdb76cde2ad0dfa3cf90134aad879c463ad7d8642e326e0bb57968","6a9c5127096b35264eb7cd21b2417bfc1d42cceca9ba4ce2bb0c3410b7816042","78828b06c0d3b586954015e9ebde5480b009e166c71244763bda328ec0920f41","715700031df76af9346132031195d9f5cea0fe9f2df294803d412b14c0f3c18a",{"version":"1c6a7ca884c5e76a5d505464c3a5a90c6fe9edf814d6d935c862e168a6f497bb","signature":"ecfa78158bec6f58615b87a718c92cd59c205b9266a7738b7d30135527695c97"},{"version":"1ef17a24d34e36d9d74622157a916a74baf667c8fdeac3092803cf70aa291958","signature":"a2845122366557080db14d36d3a07fbd301115153dc806058e4978f6bec9ea9c"},{"version":"50a03e1dfd866e66df0f2df297980cbe01c0a1ab1e493f738239aa692c4e4281","signature":"ffa1daa8e566a775a6584619559fcbb57b793d11bf6139ff5ba89dc2bf428b76"},{"version":"c88835ce7f3e35ece82a7be1772bfb1d048cf9b6741ea80e885708794c9d0589","signature":"5c15b59beb0c75c09e53fe1fc6b00499e7aa116be424057d60986bb688d3ee27"},{"version":"32d12c9b3bea75f28af3b36652f685273c3dc8eb92febed1900eaa565762ddd3","signature":"b1c91125af618f2a4044bf685b55fb08dc354e4e32b5dac429d40ef08b5747b2"},{"version":"956981e4c0cca27a238ac6ecbb59eb19b52358030ba8df35865e803fa02a02e2","signature":"3f3f4ec5a7a57de1ae0f7fbc37b2f4ec3650fa33de2f4be2733e1391c45181c0"},{"version":"cb2f258d54f387be2fa3b4bb71f53fc7c325ef94c204a6bc8763fbfa0150c86c","signature":"3cedafe4bfa0561a589c6358c1ae7bd2b3f90948aa6eb509ff68755f66261345"},{"version":"5e7ba893c0a6c95073f04a68277fa6bef10c55b627987c2c960cbd372c7de4d8","signature":"ede98a433335cb3a2a1776f62721deedbe0f40fdd3beefef78b310efc239c6d6"},"4fd918dcbecb5f01d79f627dd135b9bcea7bb38845b05f87b95217a653038e12","8358d99f5f3a081e35897572d87d36152d119008906363ed851512d4adb3450c",{"version":"befa12d7d76804d20992f94304fa7bf9c5b1d52c1dc81cff32fc55fa5598f043","signature":"8ba5227a3966ac7067d640e8ef45051723f7428fb214593d6bd82e09e3d54492"},"b22bd2b9883af60e2c18cc3220f3274b3037ac0b786cc74b746bca2bcee2747e",{"version":"2b3a38aef0306688160014f1fc5e084bec92af2a78e1fb3792381d921362def0","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true},"0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","c665d5c50c2573aefd98f0ffb12c5583e333ed94294ce6f144a4163a8c84f09b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"8a215750db3e2073511e07c9e293c8c40d6109e5c7368845e060bcc12adbae6f","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd"],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[130],[63,130],[83,85,130],[60,130],[48,50,51,52,53,54,55,56,57,58,59,60,130],[48,49,51,52,53,54,55,56,57,58,59,60,130],[49,50,51,52,53,54,55,56,57,58,59,60,130],[48,49,50,52,53,54,55,56,57,58,59,60,130],[48,49,50,51,53,54,55,56,57,58,59,60,130],[48,49,50,51,52,54,55,56,57,58,59,60,130],[48,49,50,51,52,53,55,56,57,58,59,60,130],[48,49,50,51,52,53,54,56,57,58,59,60,130],[48,49,50,51,52,53,54,55,57,58,59,60,130],[48,49,50,51,52,53,54,55,56,58,59,60,130],[48,49,50,51,52,53,54,55,56,57,59,60,130],[48,49,50,51,52,53,54,55,56,57,58,60,130],[48,49,50,51,52,53,54,55,56,57,58,59,130],[87,130],[90,130],[91,96,130],[92,102,103,110,119,129,130],[92,93,102,110,130],[94,130],[95,96,103,111,130],[96,119,126,130],[97,99,102,110,130],[98,130],[99,100,130],[101,102,130],[102,130],[102,103,104,119,129,130],[102,103,104,119,130],[105,110,119,129,130],[102,103,105,106,110,119,126,129,130],[105,107,119,126,129,130],[87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136],[102,108,130],[109,129,130],[99,102,110,119,130],[111,130],[112,130],[90,113,130],[114,128,130,134],[115,130],[116,130],[102,117,130],[117,118,130,132],[102,119,120,121,130],[119,121,130],[119,120,130],[122,130],[123,130],[102,124,125,130],[124,125,130],[96,110,126,130],[127,130],[110,128,130],[91,105,116,129,130],[96,130],[119,130,131],[130,132],[130,133],[91,96,102,104,113,119,129,130,132,134],[119,130,135],[79,80,130],[79,80,81,82,130],[84,130],[45,130],[45,47,67,69,71,130],[67,130],[45,46,65,66,67,68,72,75,130],[68,130],[47,69,70,87,130],[47,61,66,68,69,72,130],[47,65,67,87,130],[65,130],[64,87,130],[73,74,130],[47,67,76,112,130],[45,47,67,69],[67],[45,46,65,66,67,68,72,75],[68],[47,69],[47,66,68,72],[47,65,67]],"referencedMap":[[62,1],[64,2],[86,3],[61,4],[49,5],[50,6],[48,7],[51,8],[52,9],[53,10],[54,11],[55,12],[56,13],[57,14],[58,15],[59,16],[60,17],[63,1],[87,18],[88,18],[90,19],[91,20],[92,21],[93,22],[94,23],[95,24],[96,25],[97,26],[98,27],[99,28],[100,28],[101,29],[102,30],[103,31],[104,32],[89,1],[136,1],[105,33],[106,34],[107,35],[137,36],[108,37],[109,38],[110,39],[111,40],[112,41],[113,42],[114,43],[115,44],[116,45],[117,46],[118,47],[119,48],[121,49],[120,50],[122,51],[123,52],[124,53],[125,54],[126,55],[127,56],[128,57],[129,58],[130,59],[131,60],[132,61],[133,62],[134,63],[135,64],[79,1],[81,65],[83,66],[82,65],[80,1],[85,67],[84,1],[47,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[31,1],[32,1],[33,1],[34,1],[7,1],[39,1],[35,1],[36,1],[37,1],[38,1],[8,1],[43,1],[40,1],[41,1],[42,1],[1,1],[9,1],[44,1],[46,68],[72,69],[68,70],[76,71],[45,1],[69,72],[70,1],[71,73],[67,74],[66,75],[77,76],[65,77],[73,70],[75,78],[74,1],[78,79]],"exportedModulesMap":[[62,1],[64,2],[86,3],[61,4],[49,5],[50,6],[48,7],[51,8],[52,9],[53,10],[54,11],[55,12],[56,13],[57,14],[58,15],[59,16],[60,17],[63,1],[87,18],[88,18],[90,19],[91,20],[92,21],[93,22],[94,23],[95,24],[96,25],[97,26],[98,27],[99,28],[100,28],[101,29],[102,30],[103,31],[104,32],[89,1],[136,1],[105,33],[106,34],[107,35],[137,36],[108,37],[109,38],[110,39],[111,40],[112,41],[113,42],[114,43],[115,44],[116,45],[117,46],[118,47],[119,48],[121,49],[120,50],[122,51],[123,52],[124,53],[125,54],[126,55],[127,56],[128,57],[129,58],[130,59],[131,60],[132,61],[133,62],[134,63],[135,64],[79,1],[81,65],[83,66],[82,65],[80,1],[85,67],[84,1],[47,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[31,1],[32,1],[33,1],[34,1],[7,1],[39,1],[35,1],[36,1],[37,1],[38,1],[8,1],[43,1],[40,1],[41,1],[42,1],[1,1],[9,1],[44,1],[46,68],[72,80],[68,81],[76,82],[45,1],[69,83],[71,84],[67,85],[66,86],[77,76],[65,77],[73,81],[75,78],[74,1]],"semanticDiagnosticsPerFile":[62,64,86,61,49,50,48,51,52,53,54,55,56,57,58,59,60,63,87,88,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,89,136,105,106,107,137,108,109,110,111,112,113,114,115,116,117,118,119,121,120,122,123,124,125,126,127,128,129,130,131,132,133,134,135,79,81,83,82,80,85,84,47,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,39,35,36,37,38,8,43,40,41,42,1,9,44,46,72,68,76,45,69,70,71,67,66,77,65,73,75,74,78]},"version":"4.5.3"}
|
package/package.json
CHANGED
package/src/codec.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import protobufjs, { IConversionOptions } from 'protobufjs';
|
|
6
6
|
|
|
7
7
|
import { Codec } from './interface';
|
|
8
|
-
import { BidirectionalMapingDescriptors
|
|
8
|
+
import { BidirectionalMapingDescriptors } from './mapping';
|
|
9
|
+
import { createMessageMapper, Mapper } from './precompiled-mapping/create-message-mapper';
|
|
9
10
|
import type { Schema } from './schema';
|
|
10
11
|
|
|
11
12
|
export const OBJECT_CONVERSION_OPTIONS: IConversionOptions = {
|
|
@@ -17,11 +18,17 @@ export const OBJECT_CONVERSION_OPTIONS: IConversionOptions = {
|
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export class ProtoCodec<T = any> implements Codec<T> {
|
|
21
|
+
private readonly _encodeMapper: Mapper;
|
|
22
|
+
private readonly _decodeMapper: Mapper;
|
|
23
|
+
|
|
20
24
|
constructor (
|
|
21
25
|
private readonly _type: protobufjs.Type,
|
|
22
26
|
private readonly _mapping: BidirectionalMapingDescriptors,
|
|
23
27
|
private readonly _schema: Schema<any>
|
|
24
|
-
) {
|
|
28
|
+
) {
|
|
29
|
+
this._encodeMapper = createMessageMapper(this._type, this._mapping.encode);
|
|
30
|
+
this._decodeMapper = createMessageMapper(this._type, this._mapping.decode);
|
|
31
|
+
}
|
|
25
32
|
|
|
26
33
|
/**
|
|
27
34
|
* Underlying protobuf.js type descriptor.
|
|
@@ -42,13 +49,13 @@ export class ProtoCodec<T = any> implements Codec<T> {
|
|
|
42
49
|
}
|
|
43
50
|
|
|
44
51
|
encode (value: T): Uint8Array {
|
|
45
|
-
const sub =
|
|
52
|
+
const sub = this._encodeMapper(value, [this._schema]);
|
|
46
53
|
return this._type.encode(sub).finish();
|
|
47
54
|
}
|
|
48
55
|
|
|
49
56
|
decode (data: Uint8Array): T {
|
|
50
57
|
const obj = this._type.toObject(this._type.decode(data), OBJECT_CONVERSION_OPTIONS);
|
|
51
|
-
return
|
|
58
|
+
return this._decodeMapper(obj, [this._schema]);
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
/**
|
package/src/mapping.ts
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import assert from 'assert';
|
|
6
|
-
import protobufjs from 'protobufjs';
|
|
7
|
-
|
|
8
5
|
import { Substitutions } from './common';
|
|
9
6
|
|
|
10
7
|
export type MapingDescriptors = Partial<Record<string, (value: any, ...extraArgs: any) => any>>
|
|
@@ -26,44 +23,3 @@ export function createMappingDescriptors (substitutions: Substitutions): Bidirec
|
|
|
26
23
|
decode
|
|
27
24
|
};
|
|
28
25
|
}
|
|
29
|
-
|
|
30
|
-
export function mapMessage (type: protobufjs.Type, substitutions: MapingDescriptors, obj: any, extraArgs: any[]) {
|
|
31
|
-
const res: any = {};
|
|
32
|
-
for (const field of type.fieldsArray) {
|
|
33
|
-
if (!(field.name in obj)) {
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
res[field.name] = mapField(field, substitutions, obj[field.name], extraArgs);
|
|
37
|
-
}
|
|
38
|
-
return res;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function mapField (field: protobufjs.Field, substitutions: MapingDescriptors, value: any, extraArgs: any[]) {
|
|
42
|
-
if (!field.required && (value === null || value === undefined)) {
|
|
43
|
-
return value;
|
|
44
|
-
} else if (field.repeated) {
|
|
45
|
-
return value.map((value: any) => mapScalarField(field, substitutions, value, extraArgs));
|
|
46
|
-
} else if (field.map) {
|
|
47
|
-
assert(field instanceof protobufjs.MapField);
|
|
48
|
-
return Object.fromEntries(
|
|
49
|
-
Object.entries(value)
|
|
50
|
-
.map(([key, value]) => [key, mapScalarField(field, substitutions, value, extraArgs)])
|
|
51
|
-
);
|
|
52
|
-
} else {
|
|
53
|
-
return mapScalarField(field, substitutions, value, extraArgs);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function mapScalarField (field: protobufjs.Field, substitutions: MapingDescriptors, value: any, extraArgs: any[]) {
|
|
58
|
-
if (!field.resolved) {
|
|
59
|
-
field.resolve();
|
|
60
|
-
}
|
|
61
|
-
const substitution = field.resolvedType && substitutions[field.resolvedType.fullName.slice(1)];
|
|
62
|
-
if (substitution) {
|
|
63
|
-
return substitution(value, ...extraArgs); // TODO(unknown): Handle recursive substitutions.
|
|
64
|
-
} else if (field.resolvedType && field.resolvedType instanceof protobufjs.Type) {
|
|
65
|
-
return mapMessage(field.resolvedType, substitutions, value, extraArgs);
|
|
66
|
-
} else {
|
|
67
|
-
return value;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
const Ref = Symbol('Ref');
|
|
6
|
+
|
|
7
|
+
interface Ref {
|
|
8
|
+
[Ref]: true
|
|
9
|
+
value: any
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Pass a JS value by reference rather then parsing it as code.
|
|
14
|
+
*
|
|
15
|
+
* Usage example:
|
|
16
|
+
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const double = x => x * 2;;
|
|
19
|
+
* codegen('add', ['a', 'b'], c => {
|
|
20
|
+
* c`const c = a + b;`;
|
|
21
|
+
* c`return ${ref(double)}(c)`;
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* would generate a function:
|
|
26
|
+
*
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const double = x => x * 2;;
|
|
29
|
+
* function add(a, b) {
|
|
30
|
+
* const c = a + b;
|
|
31
|
+
* return double(c);
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export function ref (value: any): Ref {
|
|
36
|
+
return {
|
|
37
|
+
[Ref]: true,
|
|
38
|
+
value
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function isRef (value: any): value is Ref {
|
|
43
|
+
return value[Ref] === true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* DSL for runtime code generation.
|
|
48
|
+
*
|
|
49
|
+
* Example:
|
|
50
|
+
*
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const multiplier = 5;
|
|
53
|
+
* codegen('add', ['a', 'b'], c => {
|
|
54
|
+
* c`const c = a + b;`;
|
|
55
|
+
* c`return c * ${multiplier};`;
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* would generate a function:
|
|
60
|
+
*
|
|
61
|
+
* ```typescript
|
|
62
|
+
* function add(a, b) {
|
|
63
|
+
* const c = a + b;
|
|
64
|
+
* return c * 5;
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param name Function name. Will appear in stack traces.
|
|
69
|
+
* @param args Names of function arguments.
|
|
70
|
+
* @param gen Closure that builds the function source.
|
|
71
|
+
* @param ctx Optional record with context variables that will appear in function's scope.
|
|
72
|
+
*/
|
|
73
|
+
export function codegen (name: string, args: string[], gen: (c: (parts: TemplateStringsArray, ...args: any[]) => void) => void, ctx: Record<string, any> = {}): (...args: any[]) => any {
|
|
74
|
+
const newCtx = { ...ctx };
|
|
75
|
+
let nextAnnon = 1;
|
|
76
|
+
|
|
77
|
+
let buf = '';
|
|
78
|
+
gen((parts, ...args) => {
|
|
79
|
+
const preprocessArg = (arg: any) => {
|
|
80
|
+
if (isRef(arg)) {
|
|
81
|
+
const name = `anon${nextAnnon++}`;
|
|
82
|
+
newCtx[name] = arg.value;
|
|
83
|
+
return name;
|
|
84
|
+
} else {
|
|
85
|
+
return arg;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
buf += parts.map((s, i) => s + (i < args.length ? preprocessArg(args[i]) : '')).join('') + '\n';
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const code = `return function ${name}(${args.join(', ')}) {\n${buf}\n}`;
|
|
92
|
+
|
|
93
|
+
// eslint-disable-next-line no-new-func
|
|
94
|
+
return Function(...Object.keys(newCtx), code)(...Object.values(newCtx));
|
|
95
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import assert from 'assert';
|
|
6
|
+
import * as pb from 'protobufjs';
|
|
7
|
+
|
|
8
|
+
import { MapingDescriptors } from '../mapping';
|
|
9
|
+
import { codegen, ref } from './codegen';
|
|
10
|
+
|
|
11
|
+
export type Mapper = (obj: any, extraArgs: any[]) => any;
|
|
12
|
+
|
|
13
|
+
export function createMessageMapper (type: pb.Type, substitutions: MapingDescriptors): Mapper {
|
|
14
|
+
return createMessageMapperCached(type, substitutions, {}).map;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function createMessageMapperCached (type: pb.Type, substitutions: MapingDescriptors, cache: Record<string, { map: Mapper }>) {
|
|
18
|
+
if (!cache[type.fullName]) {
|
|
19
|
+
// Indirection to allow for recursive message types.
|
|
20
|
+
cache[type.fullName] = {} as any;
|
|
21
|
+
cache[type.fullName].map = codegen(`${type.name}$map`, ['obj', 'extraArgs'], c => {
|
|
22
|
+
c`const res = {};`;
|
|
23
|
+
for (const field of type.fieldsArray) {
|
|
24
|
+
c`if(obj.${field.name} !== undefined && obj.${field.name} !== null) {`; {
|
|
25
|
+
const genMapScalar = (value: string) => {
|
|
26
|
+
field.resolve();
|
|
27
|
+
const substitution = field.resolvedType && substitutions[field.resolvedType.fullName.slice(1)];
|
|
28
|
+
if (substitution) {
|
|
29
|
+
c`${ref(substitution)}(${value}, ...extraArgs)`;
|
|
30
|
+
} else if (field.resolvedType && field.resolvedType instanceof pb.Type) {
|
|
31
|
+
const mapper = createMessageMapperCached(field.resolvedType, substitutions, cache);
|
|
32
|
+
c`${ref(mapper)}.map(${value}, extraArgs)`;
|
|
33
|
+
} else {
|
|
34
|
+
c`${value}`;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// TODO(dmaretskyi): Support maps.
|
|
39
|
+
if (field.repeated) {
|
|
40
|
+
c`res.${field.name} = obj.${field.name}.map(item => `;
|
|
41
|
+
genMapScalar('item');
|
|
42
|
+
c`);`;
|
|
43
|
+
} else if (field.map) {
|
|
44
|
+
assert(field instanceof pb.MapField);
|
|
45
|
+
c`res.${field.name} = {};`;
|
|
46
|
+
c`for(const key of Object.keys(obj.${field.name})) {`; {
|
|
47
|
+
c`res.${field.name}[key] = `;
|
|
48
|
+
genMapScalar(`obj.${field.name}[key]`);
|
|
49
|
+
c`;`;
|
|
50
|
+
} c`}`;
|
|
51
|
+
} else {
|
|
52
|
+
c`res.${field.name} = `;
|
|
53
|
+
genMapScalar(`obj.${field.name}`);
|
|
54
|
+
c`;`;
|
|
55
|
+
}
|
|
56
|
+
} c`}`;
|
|
57
|
+
}
|
|
58
|
+
c`return res;`;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return cache[type.fullName];
|
|
63
|
+
}
|
package/src/schema.ts
CHANGED
|
@@ -18,6 +18,8 @@ export class Schema<T, S = {}> {
|
|
|
18
18
|
|
|
19
19
|
private readonly _mapping: BidirectionalMapingDescriptors;
|
|
20
20
|
|
|
21
|
+
private readonly _codecCache: Record<string, ProtoCodec> = {}
|
|
22
|
+
|
|
21
23
|
constructor (
|
|
22
24
|
private _typesRoot: protobufjs.Root,
|
|
23
25
|
substitutions: Substitutions
|
|
@@ -30,7 +32,9 @@ export class Schema<T, S = {}> {
|
|
|
30
32
|
throw new TypeError('Expected `typeName` argument to be a string');
|
|
31
33
|
}
|
|
32
34
|
const type = this._typesRoot.lookupType(typeName);
|
|
33
|
-
|
|
35
|
+
this._codecCache[type.fullName] ??= new ProtoCodec(type, this._mapping, this);
|
|
36
|
+
return this._codecCache[type.fullName];
|
|
37
|
+
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
tryGetCodecForType (typeName: string): ProtoCodec {
|
|
@@ -38,7 +42,8 @@ export class Schema<T, S = {}> {
|
|
|
38
42
|
throw new TypeError('Expected `typeName` argument to be a string');
|
|
39
43
|
}
|
|
40
44
|
const type = this._typesRoot.lookupType(typeName);
|
|
41
|
-
|
|
45
|
+
this._codecCache[type.fullName] ??= new ProtoCodec(type, this._mapping, this);
|
|
46
|
+
return this._codecCache[type.fullName];
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
getService<K extends keyof S & string> (name: K): ServiceDescriptor<S[K]> {
|