typia 5.0.0-dev.20230810 → 5.0.0-dev.20230814
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/lib/factories/MetadataCollection.js +1 -0
- package/lib/factories/MetadataCollection.js.map +1 -1
- package/lib/factories/MetadataFactory.js +27 -0
- package/lib/factories/MetadataFactory.js.map +1 -1
- package/lib/factories/ProtobufFactory.d.ts +0 -2
- package/lib/factories/ProtobufFactory.js +55 -111
- package/lib/factories/ProtobufFactory.js.map +1 -1
- package/lib/factories/StatementFactory.d.ts +1 -0
- package/lib/factories/StatementFactory.js +5 -0
- package/lib/factories/StatementFactory.js.map +1 -1
- package/lib/factories/internal/metadata/explore_metadata.js +3 -7
- package/lib/factories/internal/metadata/explore_metadata.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_intersection.js +1 -0
- package/lib/factories/internal/metadata/iterate_metadata_intersection.js.map +1 -1
- package/lib/functional/$strlen.d.ts +1 -0
- package/lib/functional/$strlen.js +13 -0
- package/lib/functional/$strlen.js.map +1 -0
- package/lib/functional/Namespace.js +19 -3
- package/lib/functional/Namespace.js.map +1 -1
- package/lib/json.js +4 -4
- package/lib/json.js.map +1 -1
- package/lib/misc.js +8 -8
- package/lib/misc.js.map +1 -1
- package/lib/programmers/CheckerProgrammer.js +0 -5
- package/lib/programmers/CheckerProgrammer.js.map +1 -1
- package/lib/programmers/FeatureProgrammer.d.ts +3 -3
- package/lib/programmers/FeatureProgrammer.js.map +1 -1
- package/lib/programmers/helpers/ProtobufUtil.d.ts +5 -0
- package/lib/programmers/helpers/ProtobufUtil.js +82 -0
- package/lib/programmers/helpers/ProtobufUtil.js.map +1 -0
- package/lib/programmers/helpers/ProtobufWire.d.ts +25 -0
- package/lib/{schemas/protobuf/IProtocolMap.js → programmers/helpers/ProtobufWire.js} +1 -1
- package/lib/programmers/helpers/ProtobufWire.js.map +1 -0
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js +253 -5
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufMessageProgrammer.js +23 -37
- package/lib/programmers/protobuf/ProtobufMessageProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufSizeProgrammer.d.ts +5 -0
- package/lib/programmers/protobuf/ProtobufSizeProgrammer.js +409 -0
- package/lib/programmers/protobuf/ProtobufSizeProgrammer.js.map +1 -0
- package/lib/protobuf.js +9 -1
- package/lib/protobuf.js.map +1 -1
- package/lib/schemas/metadata/Metadata.js +11 -0
- package/lib/schemas/metadata/Metadata.js.map +1 -1
- package/lib/transformers/CallExpressionTransformer.js +26 -22
- package/lib/transformers/CallExpressionTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufAssertDecodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufAssertDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufAssertEncodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufAssertEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufDecodeTransformer.js +1 -3
- package/lib/transformers/features/protobuf/CreateProtobufDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufEncodeTransformer.js +1 -3
- package/lib/transformers/features/protobuf/CreateProtobufEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufIsDecodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufIsDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufIsEncodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufIsEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufSizeTransformer.d.ts +3 -0
- package/lib/transformers/features/protobuf/CreateProtobufSizeTransformer.js +10 -0
- package/lib/transformers/features/protobuf/CreateProtobufSizeTransformer.js.map +1 -0
- package/lib/transformers/features/protobuf/CreateProtobufValidateDecodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufValidateDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufValidateEncodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/CreateProtobufValidateEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufAssertDecodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/ProtobufAssertDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufAssertEncodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/ProtobufAssertEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufDecodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/ProtobufDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufEncodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/ProtobufEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufIsDecodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/ProtobufIsDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufIsEncodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/ProtobufIsEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufMessageTransformer.d.ts +1 -1
- package/lib/transformers/features/protobuf/ProtobufMessageTransformer.js +7 -7
- package/lib/transformers/features/protobuf/ProtobufMessageTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufSizeTransformer.d.ts +3 -0
- package/lib/transformers/features/protobuf/ProtobufSizeTransformer.js +10 -0
- package/lib/transformers/features/protobuf/ProtobufSizeTransformer.js.map +1 -0
- package/lib/transformers/features/protobuf/ProtobufValidateDecodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/ProtobufValidateDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufValidateEncodeTransformer.js +1 -1
- package/lib/transformers/features/protobuf/ProtobufValidateEncodeTransformer.js.map +1 -1
- package/package.json +2 -1
- package/src/factories/MetadataCollection.ts +5 -0
- package/src/factories/MetadataFactory.ts +4 -0
- package/src/factories/ProtobufFactory.ts +106 -90
- package/src/factories/StatementFactory.ts +16 -0
- package/src/factories/internal/metadata/explore_metadata.ts +4 -6
- package/src/factories/internal/metadata/iterate_metadata_intersection.ts +1 -0
- package/src/functional/$strlen.ts +7 -0
- package/src/functional/Namespace.ts +32 -17
- package/src/json.ts +4 -4
- package/src/misc.ts +8 -8
- package/src/programmers/CheckerProgrammer.ts +0 -9
- package/src/programmers/FeatureProgrammer.ts +5 -3
- package/src/programmers/helpers/ProtobufUtil.ts +24 -0
- package/src/programmers/helpers/ProtobufWire.ts +28 -0
- package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +446 -5
- package/src/programmers/protobuf/ProtobufMessageProgrammer.ts +12 -8
- package/src/programmers/protobuf/ProtobufSizeProgrammer.ts +716 -0
- package/src/protobuf.ts +29 -0
- package/src/schemas/metadata/Metadata.ts +26 -0
- package/src/transformers/CallExpressionTransformer.ts +32 -28
- package/src/transformers/features/protobuf/CreateProtobufAssertDecodeTransformer.ts +3 -1
- package/src/transformers/features/protobuf/CreateProtobufAssertEncodeTransformer.ts +3 -1
- package/src/transformers/features/protobuf/CreateProtobufDecodeTransformer.ts +3 -4
- package/src/transformers/features/protobuf/CreateProtobufEncodeTransformer.ts +3 -4
- package/src/transformers/features/protobuf/CreateProtobufIsDecodeTransformer.ts +3 -1
- package/src/transformers/features/protobuf/CreateProtobufIsEncodeTransformer.ts +3 -1
- package/src/transformers/features/protobuf/CreateProtobufSizeTransformer.ts +9 -0
- package/src/transformers/features/protobuf/CreateProtobufValidateDecodeTransformer.ts +3 -1
- package/src/transformers/features/protobuf/CreateProtobufValidateEncodeTransformer.ts +3 -1
- package/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts +1 -1
- package/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts +1 -1
- package/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts +1 -1
- package/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts +1 -1
- package/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts +1 -1
- package/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts +1 -1
- package/src/transformers/features/protobuf/ProtobufMessageTransformer.ts +3 -3
- package/src/transformers/features/protobuf/ProtobufSizeTransformer.ts +9 -0
- package/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts +3 -1
- package/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts +3 -1
- package/lib/factories/internal/protocols/ProtocolMetadataUtil.d.ts +0 -16
- package/lib/factories/internal/protocols/ProtocolMetadataUtil.js +0 -173
- package/lib/factories/internal/protocols/ProtocolMetadataUtil.js.map +0 -1
- package/lib/factories/internal/protocols/emplace_protocol_object.d.ts +0 -3
- package/lib/factories/internal/protocols/emplace_protocol_object.js +0 -47
- package/lib/factories/internal/protocols/emplace_protocol_object.js.map +0 -1
- package/lib/factories/internal/protocols/emplace_protocol_property.d.ts +0 -4
- package/lib/factories/internal/protocols/emplace_protocol_property.js +0 -20
- package/lib/factories/internal/protocols/emplace_protocol_property.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_atomic.d.ts +0 -3
- package/lib/factories/internal/protocols/iterate_protocol_atomic.js +0 -69
- package/lib/factories/internal/protocols/iterate_protocol_atomic.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_constant.d.ts +0 -2
- package/lib/factories/internal/protocols/iterate_protocol_constant.js +0 -30
- package/lib/factories/internal/protocols/iterate_protocol_constant.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_main.d.ts +0 -3
- package/lib/factories/internal/protocols/iterate_protocol_main.js +0 -17
- package/lib/factories/internal/protocols/iterate_protocol_main.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_map.d.ts +0 -4
- package/lib/factories/internal/protocols/iterate_protocol_map.js +0 -75
- package/lib/factories/internal/protocols/iterate_protocol_map.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_metadata.d.ts +0 -5
- package/lib/factories/internal/protocols/iterate_protocol_metadata.js +0 -190
- package/lib/factories/internal/protocols/iterate_protocol_metadata.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_native.d.ts +0 -2
- package/lib/factories/internal/protocols/iterate_protocol_native.js +0 -33
- package/lib/factories/internal/protocols/iterate_protocol_native.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_never.d.ts +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_never.js +0 -6
- package/lib/factories/internal/protocols/iterate_protocol_never.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_object.d.ts +0 -4
- package/lib/factories/internal/protocols/iterate_protocol_object.js +0 -157
- package/lib/factories/internal/protocols/iterate_protocol_object.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_repeated.d.ts +0 -5
- package/lib/factories/internal/protocols/iterate_protocol_repeated.js +0 -25
- package/lib/factories/internal/protocols/iterate_protocol_repeated.js.map +0 -1
- package/lib/factories/internal/protocols/iterate_protocol_tuple.d.ts +0 -3
- package/lib/factories/internal/protocols/iterate_protocol_tuple.js +0 -46
- package/lib/factories/internal/protocols/iterate_protocol_tuple.js.map +0 -1
- package/lib/schemas/protobuf/IProtocolMap.d.ts +0 -5
- package/lib/schemas/protobuf/IProtocolMap.js.map +0 -1
- package/lib/schemas/protobuf/IProtocolMessage.d.ts +0 -5
- package/lib/schemas/protobuf/IProtocolMessage.js +0 -3
- package/lib/schemas/protobuf/IProtocolMessage.js.map +0 -1
- package/lib/schemas/protobuf/IProtocolProperty.d.ts +0 -12
- package/lib/schemas/protobuf/IProtocolProperty.js +0 -3
- package/lib/schemas/protobuf/IProtocolProperty.js.map +0 -1
- package/src/factories/internal/protocols/ProtocolMetadataUtil.ts +0 -180
- package/src/factories/internal/protocols/emplace_protocol_object.ts +0 -25
- package/src/factories/internal/protocols/emplace_protocol_property.ts +0 -12
- package/src/factories/internal/protocols/iterate_protocol_atomic.ts +0 -34
- package/src/factories/internal/protocols/iterate_protocol_constant.ts +0 -27
- package/src/factories/internal/protocols/iterate_protocol_main.ts +0 -19
- package/src/factories/internal/protocols/iterate_protocol_map.ts +0 -58
- package/src/factories/internal/protocols/iterate_protocol_metadata.ts +0 -96
- package/src/factories/internal/protocols/iterate_protocol_native.ts +0 -34
- package/src/factories/internal/protocols/iterate_protocol_never.ts +0 -1
- package/src/factories/internal/protocols/iterate_protocol_object.ts +0 -110
- package/src/factories/internal/protocols/iterate_protocol_repeated.ts +0 -34
- package/src/factories/internal/protocols/iterate_protocol_tuple.ts +0 -29
- package/src/schemas/protobuf/IProtocolMap.ts +0 -5
- package/src/schemas/protobuf/IProtocolMessage.ts +0 -6
- package/src/schemas/protobuf/IProtocolProperty.ts +0 -13
package/src/protobuf.ts
CHANGED
|
@@ -71,6 +71,18 @@ export function validateDecode(): never {
|
|
|
71
71
|
/* -----------------------------------------------------------
|
|
72
72
|
ENCODE
|
|
73
73
|
----------------------------------------------------------- */
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export function size<T>(input: T): number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
export function size(): never {
|
|
83
|
+
halt("size");
|
|
84
|
+
}
|
|
85
|
+
|
|
74
86
|
export function encode<T>(input: T): Uint16Array;
|
|
75
87
|
|
|
76
88
|
/**
|
|
@@ -156,6 +168,23 @@ export function createValidateDecode<T>(): (
|
|
|
156
168
|
halt("createValidateDecode");
|
|
157
169
|
}
|
|
158
170
|
|
|
171
|
+
/**
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
export function createSize(): never;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
export function createSize<T>(): (input: T) => number;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
export function createSize<T>(): (input: T) => number {
|
|
185
|
+
halt("createEncode");
|
|
186
|
+
}
|
|
187
|
+
|
|
159
188
|
export function createEncode(): never;
|
|
160
189
|
export function createEncode<T>(): (input: T) => Uint8Array;
|
|
161
190
|
|
|
@@ -40,6 +40,7 @@ export class Metadata {
|
|
|
40
40
|
/** @internal */ private name_?: string;
|
|
41
41
|
/** @internal */ private parent_resolved_: boolean = false;
|
|
42
42
|
/** @internal */ public union_index?: number;
|
|
43
|
+
/** @internal */ public fixed_?: number | null;
|
|
43
44
|
|
|
44
45
|
/* -----------------------------------------------------------
|
|
45
46
|
CONSTRUCTORS
|
|
@@ -288,6 +289,24 @@ export class Metadata {
|
|
|
288
289
|
);
|
|
289
290
|
}
|
|
290
291
|
|
|
292
|
+
/**
|
|
293
|
+
* @internal
|
|
294
|
+
*/
|
|
295
|
+
public binarySize(): number {
|
|
296
|
+
return (
|
|
297
|
+
new Set([
|
|
298
|
+
...this.atomics,
|
|
299
|
+
...this.constants.map((c) => c.type),
|
|
300
|
+
...(this.templates.length ? ["string"] : []),
|
|
301
|
+
]).size +
|
|
302
|
+
this.arrays.length +
|
|
303
|
+
this.tuples.length +
|
|
304
|
+
this.natives.length +
|
|
305
|
+
this.objects.length +
|
|
306
|
+
this.maps.length
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
291
310
|
public bucket(): number {
|
|
292
311
|
return (
|
|
293
312
|
(this.any ? 1 : 0) +
|
|
@@ -325,6 +344,13 @@ export class Metadata {
|
|
|
325
344
|
return emended > 1;
|
|
326
345
|
}
|
|
327
346
|
|
|
347
|
+
/**
|
|
348
|
+
* @internal
|
|
349
|
+
*/
|
|
350
|
+
public isBinaryUnion(): boolean {
|
|
351
|
+
return this.binarySize() > 1;
|
|
352
|
+
}
|
|
353
|
+
|
|
328
354
|
/**
|
|
329
355
|
* @internal
|
|
330
356
|
*/
|
|
@@ -49,6 +49,7 @@ import { CreateProtobufDecodeTransformer } from "./features/protobuf/CreateProto
|
|
|
49
49
|
import { CreateProtobufEncodeTransformer } from "./features/protobuf/CreateProtobufEncodeTransformer";
|
|
50
50
|
import { CreateProtobufIsDecodeTransformer } from "./features/protobuf/CreateProtobufIsDecodeTransformer";
|
|
51
51
|
import { CreateProtobufIsEncodeTransformer } from "./features/protobuf/CreateProtobufIsEncodeTransformer";
|
|
52
|
+
import { CreateProtobufSizeTransformer } from "./features/protobuf/CreateProtobufSizeTransformer";
|
|
52
53
|
import { CreateProtobufValidateDecodeTransformer } from "./features/protobuf/CreateProtobufValidateDecodeTransformer";
|
|
53
54
|
import { CreateProtobufValidateEncodeTransformer } from "./features/protobuf/CreateProtobufValidateEncodeTransformer";
|
|
54
55
|
import { ProtobufAssertDecodeTransformer } from "./features/protobuf/ProtobufAssertDecodeTransformer";
|
|
@@ -57,7 +58,8 @@ import { ProtobufDecodeTransformer } from "./features/protobuf/ProtobufDecodeTra
|
|
|
57
58
|
import { ProtobufEncodeTransformer } from "./features/protobuf/ProtobufEncodeTransformer";
|
|
58
59
|
import { ProtobufIsDecodeTransformer } from "./features/protobuf/ProtobufIsDecodeTransformer";
|
|
59
60
|
import { ProtobufIsEncodeTransformer } from "./features/protobuf/ProtobufIsEncodeTransformer";
|
|
60
|
-
import {
|
|
61
|
+
import { ProtobufMessageTransformer } from "./features/protobuf/ProtobufMessageTransformer";
|
|
62
|
+
import { ProtobufSizeTransformer } from "./features/protobuf/ProtobufSizeTransformer";
|
|
61
63
|
import { ProtobufValidateDecodeTransformer } from "./features/protobuf/ProtobufValidateDecodeTransformer";
|
|
62
64
|
import { ProtobufValidateEncodeTransformer } from "./features/protobuf/ProtobufValidateEncodeTransformer";
|
|
63
65
|
|
|
@@ -155,11 +157,38 @@ const FUNCTORS: Record<string, Record<string, () => Task>> = {
|
|
|
155
157
|
createValidateEquals: () => CreateValidateTransformer.transform(true),
|
|
156
158
|
createRandom: () => CreateRandomTransformer.transform,
|
|
157
159
|
},
|
|
160
|
+
json: {
|
|
161
|
+
// SCHEMA
|
|
162
|
+
application: () => (P) => () => JsonApplicationTransformer.transform(P),
|
|
163
|
+
|
|
164
|
+
// PARSER
|
|
165
|
+
isParse: () => JsonIsParseTransformer.transform,
|
|
166
|
+
assertParse: () => JsonAssertParseTransformer.transform,
|
|
167
|
+
validateParse: () => JsonValidateParseTransformer.transform,
|
|
168
|
+
|
|
169
|
+
// STRINGIFY
|
|
170
|
+
stringify: () => JsonStringifyTransformer.transform,
|
|
171
|
+
assertStringify: () => JsonAssertStringifyTransformer.transform,
|
|
172
|
+
isStringify: () => JsonIsStringifyTransformer.transform,
|
|
173
|
+
validateStringify: () => JsonValidateStringifyTransformer.transform,
|
|
174
|
+
|
|
175
|
+
// FACTORIES
|
|
176
|
+
createIsParse: () => JsonCreateIsParseTransformer.transform,
|
|
177
|
+
createAssertParse: () => JsonCreateAssertParseTransformer.transform,
|
|
178
|
+
createValidateParse: () => JsonCreateValidateParseTransformer.transform,
|
|
179
|
+
createStringify: () => JsonCreateStringifyTransformer.transform,
|
|
180
|
+
createAssertStringify: () =>
|
|
181
|
+
JsonCreateAssertStringifyTransformer.transform,
|
|
182
|
+
createIsStringify: () => JsonCreateIsStringifyTransformer.transform,
|
|
183
|
+
createValidateStringify: () =>
|
|
184
|
+
JsonCreateValidateStringifyTransformer.transform,
|
|
185
|
+
},
|
|
158
186
|
protobuf: {
|
|
159
187
|
// SCHEMA
|
|
160
|
-
message: () =>
|
|
188
|
+
message: () => ProtobufMessageTransformer.transform,
|
|
161
189
|
|
|
162
190
|
// ENCODE
|
|
191
|
+
size: () => ProtobufSizeTransformer.transform,
|
|
163
192
|
encode: () => ProtobufEncodeTransformer.transform,
|
|
164
193
|
assertEncode: () => ProtobufAssertEncodeTransformer.transform,
|
|
165
194
|
isEncode: () => ProtobufIsEncodeTransformer.transform,
|
|
@@ -172,6 +201,7 @@ const FUNCTORS: Record<string, Record<string, () => Task>> = {
|
|
|
172
201
|
validateDecode: () => ProtobufValidateDecodeTransformer.transform,
|
|
173
202
|
|
|
174
203
|
// FACTORIES
|
|
204
|
+
createSize: () => CreateProtobufSizeTransformer.transform,
|
|
175
205
|
createEncode: () => CreateProtobufEncodeTransformer.transform,
|
|
176
206
|
createAssertEncode: () =>
|
|
177
207
|
CreateProtobufAssertEncodeTransformer.transform,
|
|
@@ -185,32 +215,6 @@ const FUNCTORS: Record<string, Record<string, () => Task>> = {
|
|
|
185
215
|
createValidateDecode: () =>
|
|
186
216
|
CreateProtobufValidateDecodeTransformer.transform,
|
|
187
217
|
},
|
|
188
|
-
json: {
|
|
189
|
-
// SCHEMA
|
|
190
|
-
application: () => (P) => () => JsonApplicationTransformer.transform(P),
|
|
191
|
-
|
|
192
|
-
// PARSER
|
|
193
|
-
isParse: () => JsonIsParseTransformer.transform,
|
|
194
|
-
assertParse: () => JsonAssertParseTransformer.transform,
|
|
195
|
-
validateParse: () => JsonValidateParseTransformer.transform,
|
|
196
|
-
|
|
197
|
-
// STRINGIFY
|
|
198
|
-
stringify: () => JsonStringifyTransformer.transform,
|
|
199
|
-
assertStringify: () => JsonAssertStringifyTransformer.transform,
|
|
200
|
-
isStringify: () => JsonIsStringifyTransformer.transform,
|
|
201
|
-
validateStringify: () => JsonValidateStringifyTransformer.transform,
|
|
202
|
-
|
|
203
|
-
// FACTORIES
|
|
204
|
-
createIsParse: () => JsonCreateIsParseTransformer.transform,
|
|
205
|
-
createAssertParse: () => JsonCreateAssertParseTransformer.transform,
|
|
206
|
-
createValidateParse: () => JsonCreateValidateParseTransformer.transform,
|
|
207
|
-
createStringify: () => JsonCreateStringifyTransformer.transform,
|
|
208
|
-
createAssertStringify: () =>
|
|
209
|
-
JsonCreateAssertStringifyTransformer.transform,
|
|
210
|
-
createIsStringify: () => JsonCreateIsStringifyTransformer.transform,
|
|
211
|
-
createValidateStringify: () =>
|
|
212
|
-
JsonCreateValidateStringifyTransformer.transform,
|
|
213
|
-
},
|
|
214
218
|
misc: {
|
|
215
219
|
literals: () => (project) => () =>
|
|
216
220
|
MiscLiteralsTransformer.transform(project),
|
|
@@ -3,7 +3,9 @@ import { ProtobufAssertDecodeProgrammer } from "../../../programmers/protobuf/Pr
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace CreateProtobufAssertDecodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"protobuf.createAssertDecode",
|
|
8
|
+
)(
|
|
7
9
|
(project) => (modulo) =>
|
|
8
10
|
ProtobufAssertDecodeProgrammer.write(project)(modulo),
|
|
9
11
|
);
|
|
@@ -3,7 +3,9 @@ import { ProtobufAssertEncodeProgrammer } from "../../../programmers/protobuf/Pr
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace CreateProtobufAssertEncodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"protobuf.createAssertEncode",
|
|
8
|
+
)(
|
|
7
9
|
(project) => (modulo) =>
|
|
8
10
|
ProtobufAssertEncodeProgrammer.write(project)(modulo),
|
|
9
11
|
);
|
|
@@ -3,8 +3,7 @@ import { ProtobufDecodeProgrammer } from "../../../programmers/protobuf/Protobuf
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace CreateProtobufDecodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
);
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"protobuf.createDecode",
|
|
8
|
+
)((project) => (modulo) => ProtobufDecodeProgrammer.write(project)(modulo));
|
|
10
9
|
}
|
|
@@ -3,8 +3,7 @@ import { ProtobufEncodeProgrammer } from "../../../programmers/protobuf/Protobuf
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace CreateProtobufEncodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
);
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"protobuf.createEncode",
|
|
8
|
+
)((project) => (modulo) => ProtobufEncodeProgrammer.write(project)(modulo));
|
|
10
9
|
}
|
|
@@ -3,7 +3,9 @@ import { ProtobufIsDecodeProgrammer } from "../../../programmers/protobuf/Protob
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace CreateProtobufIsDecodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"protobuf.createIsDecode",
|
|
8
|
+
)(
|
|
7
9
|
(project) => (modulo) =>
|
|
8
10
|
ProtobufIsDecodeProgrammer.write(project)(modulo),
|
|
9
11
|
);
|
|
@@ -3,7 +3,9 @@ import { ProtobufIsEncodeProgrammer } from "../../../programmers/protobuf/Protob
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace CreateProtobufIsEncodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"protobuf.createIsEncode",
|
|
8
|
+
)(
|
|
7
9
|
(project) => (modulo) =>
|
|
8
10
|
ProtobufIsEncodeProgrammer.write(project)(modulo),
|
|
9
11
|
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProtobufSizeProgrammer } from "../../../programmers/protobuf/ProtobufSizeProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace CreateProtobufSizeTransformer {
|
|
6
|
+
export const transform = GenericTransformer.factory("protobuf.createSize")(
|
|
7
|
+
(project) => (modulo) => ProtobufSizeProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -3,7 +3,9 @@ import { ProtobufValidateDecodeProgrammer } from "../../../programmers/protobuf/
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace CreateProtobufValidateDecodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"protobuf.createValidateDecode",
|
|
8
|
+
)(
|
|
7
9
|
(project) => (modulo) =>
|
|
8
10
|
ProtobufValidateDecodeProgrammer.write(project)(modulo),
|
|
9
11
|
);
|
|
@@ -3,7 +3,9 @@ import { ProtobufValidateEncodeProgrammer } from "../../../programmers/protobuf/
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace CreateProtobufValidateEncodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"protobuf.createValidateEncode",
|
|
8
|
+
)(
|
|
7
9
|
(project) => (modulo) =>
|
|
8
10
|
ProtobufValidateEncodeProgrammer.write(project)(modulo),
|
|
9
11
|
);
|
|
@@ -3,7 +3,7 @@ import { ProtobufAssertDecodeProgrammer } from "../../../programmers/protobuf/Pr
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace ProtobufAssertDecodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("assertDecode")(
|
|
6
|
+
export const transform = GenericTransformer.scalar("protobuf.assertDecode")(
|
|
7
7
|
(project) => (modulo) =>
|
|
8
8
|
ProtobufAssertDecodeProgrammer.write(project)(modulo),
|
|
9
9
|
);
|
|
@@ -3,7 +3,7 @@ import { ProtobufAssertEncodeProgrammer } from "../../../programmers/protobuf/Pr
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace ProtobufAssertEncodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("assertEncode")(
|
|
6
|
+
export const transform = GenericTransformer.scalar("protobuf.assertEncode")(
|
|
7
7
|
(project) => (modulo) =>
|
|
8
8
|
ProtobufAssertEncodeProgrammer.write(project)(modulo),
|
|
9
9
|
);
|
|
@@ -3,7 +3,7 @@ import { ProtobufDecodeProgrammer } from "../../../programmers/protobuf/Protobuf
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace ProtobufDecodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("
|
|
6
|
+
export const transform = GenericTransformer.scalar("protobuf.decode")(
|
|
7
7
|
(project) => (modulo) =>
|
|
8
8
|
ProtobufDecodeProgrammer.write(project)(modulo),
|
|
9
9
|
);
|
|
@@ -3,7 +3,7 @@ import { ProtobufEncodeProgrammer } from "../../../programmers/protobuf/Protobuf
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace ProtobufEncodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("
|
|
6
|
+
export const transform = GenericTransformer.scalar("protobuf.encode")(
|
|
7
7
|
(project) => (modulo) =>
|
|
8
8
|
ProtobufEncodeProgrammer.write(project)(modulo),
|
|
9
9
|
);
|
|
@@ -3,7 +3,7 @@ import { ProtobufIsDecodeProgrammer } from "../../../programmers/protobuf/Protob
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace ProtobufIsDecodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("isDecode")(
|
|
6
|
+
export const transform = GenericTransformer.scalar("protobuf.isDecode")(
|
|
7
7
|
(project) => (modulo) =>
|
|
8
8
|
ProtobufIsDecodeProgrammer.write(project)(modulo),
|
|
9
9
|
);
|
|
@@ -3,7 +3,7 @@ import { ProtobufIsEncodeProgrammer } from "../../../programmers/protobuf/Protob
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace ProtobufIsEncodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("isEncode")(
|
|
6
|
+
export const transform = GenericTransformer.scalar("protobuf.isEncode")(
|
|
7
7
|
(project) => (modulo) =>
|
|
8
8
|
ProtobufIsEncodeProgrammer.write(project)(modulo),
|
|
9
9
|
);
|
|
@@ -4,7 +4,7 @@ import { ProtobufMessageProgrammer } from "../../../programmers/protobuf/Protobu
|
|
|
4
4
|
|
|
5
5
|
import { IProject } from "../../IProject";
|
|
6
6
|
|
|
7
|
-
export namespace
|
|
7
|
+
export namespace ProtobufMessageTransformer {
|
|
8
8
|
export const transform =
|
|
9
9
|
(project: IProject) =>
|
|
10
10
|
(_modulo: ts.LeftHandSideExpression) =>
|
|
@@ -26,6 +26,6 @@ export namespace MessageTransformer {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const enum ErrorMessages {
|
|
29
|
-
NOT_SPECIFIED = "Error on typia.message(): generic argument is not specified.",
|
|
30
|
-
GENERIC_ARGUMENT = "Error on typia.message(): non-specified generic argument.",
|
|
29
|
+
NOT_SPECIFIED = "Error on typia.protobuf.message(): generic argument is not specified.",
|
|
30
|
+
GENERIC_ARGUMENT = "Error on typia.protobuf.message(): non-specified generic argument.",
|
|
31
31
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProtobufSizeProgrammer } from "../../../programmers/protobuf/ProtobufSizeProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace ProtobufSizeTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("protobuf.size")(
|
|
7
|
+
(project) => (modulo) => ProtobufSizeProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -3,7 +3,9 @@ import { ProtobufValidateDecodeProgrammer } from "../../../programmers/protobuf/
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace ProtobufValidateDecodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar(
|
|
6
|
+
export const transform = GenericTransformer.scalar(
|
|
7
|
+
"protobuf.validateDecode",
|
|
8
|
+
)(
|
|
7
9
|
(project) => (modulo) =>
|
|
8
10
|
ProtobufValidateDecodeProgrammer.write(project)(modulo),
|
|
9
11
|
);
|
|
@@ -3,7 +3,9 @@ import { ProtobufValidateEncodeProgrammer } from "../../../programmers/protobuf/
|
|
|
3
3
|
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
4
|
|
|
5
5
|
export namespace ProtobufValidateEncodeTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar(
|
|
6
|
+
export const transform = GenericTransformer.scalar(
|
|
7
|
+
"protobuf.validateEncode",
|
|
8
|
+
)(
|
|
7
9
|
(project) => (modulo) =>
|
|
8
10
|
ProtobufValidateEncodeProgrammer.write(project)(modulo),
|
|
9
11
|
);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IMetadataTag } from "../../../schemas/metadata/IMetadataTag";
|
|
2
|
-
import { Metadata } from "../../../schemas/metadata/Metadata";
|
|
3
|
-
import { MetadataObject } from "../../../schemas/metadata/MetadataObject";
|
|
4
|
-
import { MetadataProperty } from "../../../schemas/metadata/MetadataProperty";
|
|
5
|
-
import { Atomic } from "../../../typings/Atomic";
|
|
6
|
-
export declare namespace ProtocolMetadataUtil {
|
|
7
|
-
function size(meta: Metadata): number;
|
|
8
|
-
function standalone(meta: Metadata): boolean;
|
|
9
|
-
function regular(obj: MetadataObject): boolean;
|
|
10
|
-
function object(name: string, index: number): MetadataObject;
|
|
11
|
-
function property(key: string, value: Metadata, tags: IMetadataTag[]): MetadataProperty;
|
|
12
|
-
function array(meta: Metadata): Metadata;
|
|
13
|
-
function atomic(type: Atomic.Literal): Metadata;
|
|
14
|
-
function reference(obj: MetadataObject): Metadata;
|
|
15
|
-
function map(elem: Metadata.Entry): Metadata;
|
|
16
|
-
}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProtocolMetadataUtil = void 0;
|
|
4
|
-
var Metadata_1 = require("../../../schemas/metadata/Metadata");
|
|
5
|
-
var MetadataArray_1 = require("../../../schemas/metadata/MetadataArray");
|
|
6
|
-
var MetadataObject_1 = require("../../../schemas/metadata/MetadataObject");
|
|
7
|
-
var MetadataProperty_1 = require("../../../schemas/metadata/MetadataProperty");
|
|
8
|
-
var ProtocolMetadataUtil;
|
|
9
|
-
(function (ProtocolMetadataUtil) {
|
|
10
|
-
function size(meta) {
|
|
11
|
-
return (meta.atomics.length +
|
|
12
|
-
meta.constants.filter(function (c) {
|
|
13
|
-
return meta.atomics.find(function (type) { return c.type === type; }) === undefined;
|
|
14
|
-
}).length +
|
|
15
|
-
(meta.templates.length !== 0 &&
|
|
16
|
-
meta.atomics.find(function (type) { return type === "string"; }) === undefined &&
|
|
17
|
-
meta.constants.find(function (c) { return c.type === "string"; }) === undefined
|
|
18
|
-
? 1
|
|
19
|
-
: 0) +
|
|
20
|
-
meta.tuples.length +
|
|
21
|
-
meta.arrays.length +
|
|
22
|
-
meta.sets.length +
|
|
23
|
-
meta.maps.length +
|
|
24
|
-
meta.objects.length +
|
|
25
|
-
meta.natives.filter(function (n) { return n === "Date"; }).length +
|
|
26
|
-
(meta.natives.filter(function (n) { return n !== "Date"; }).length ? 1 : 0));
|
|
27
|
-
}
|
|
28
|
-
ProtocolMetadataUtil.size = size;
|
|
29
|
-
function standalone(meta) {
|
|
30
|
-
return (size(meta) === 1 &&
|
|
31
|
-
meta.required === true &&
|
|
32
|
-
meta.nullable === false &&
|
|
33
|
-
meta.tuples.length === 0 &&
|
|
34
|
-
meta.arrays.length === 0 &&
|
|
35
|
-
meta.sets.length === 0 &&
|
|
36
|
-
meta.maps.length === 0 &&
|
|
37
|
-
meta.objects.every(function (obj) {
|
|
38
|
-
return obj.properties.every(function (p) { return p.key.isSoleLiteral(); });
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
ProtocolMetadataUtil.standalone = standalone;
|
|
42
|
-
function regular(obj) {
|
|
43
|
-
return obj.properties.every(function (p) { return p.key.isSoleLiteral(); });
|
|
44
|
-
}
|
|
45
|
-
ProtocolMetadataUtil.regular = regular;
|
|
46
|
-
function object(name, index) {
|
|
47
|
-
return MetadataObject_1.MetadataObject.create({
|
|
48
|
-
name: name,
|
|
49
|
-
index: index,
|
|
50
|
-
properties: [],
|
|
51
|
-
description: undefined,
|
|
52
|
-
jsDocTags: [],
|
|
53
|
-
validated: false,
|
|
54
|
-
recursive: false,
|
|
55
|
-
nullables: [false],
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
ProtocolMetadataUtil.object = object;
|
|
59
|
-
function property(key, value, tags) {
|
|
60
|
-
return MetadataProperty_1.MetadataProperty.create({
|
|
61
|
-
key: (function () {
|
|
62
|
-
var meta = Metadata_1.Metadata.initialize();
|
|
63
|
-
meta.constants.push({
|
|
64
|
-
type: "string",
|
|
65
|
-
values: [key],
|
|
66
|
-
});
|
|
67
|
-
return meta;
|
|
68
|
-
})(),
|
|
69
|
-
value: value,
|
|
70
|
-
description: null,
|
|
71
|
-
tags: tags,
|
|
72
|
-
jsDocTags: [],
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
ProtocolMetadataUtil.property = property;
|
|
76
|
-
function array(meta) {
|
|
77
|
-
return Metadata_1.Metadata.create({
|
|
78
|
-
any: false,
|
|
79
|
-
required: true,
|
|
80
|
-
optional: false,
|
|
81
|
-
nullable: false,
|
|
82
|
-
functional: false,
|
|
83
|
-
resolved: null,
|
|
84
|
-
aliases: [],
|
|
85
|
-
atomics: [],
|
|
86
|
-
constants: [],
|
|
87
|
-
templates: [],
|
|
88
|
-
rest: null,
|
|
89
|
-
arrays: [
|
|
90
|
-
MetadataArray_1.MetadataArray.create({
|
|
91
|
-
name: meta.getName(),
|
|
92
|
-
value: meta,
|
|
93
|
-
nullables: [false],
|
|
94
|
-
recursive: false,
|
|
95
|
-
index: null,
|
|
96
|
-
}),
|
|
97
|
-
],
|
|
98
|
-
tuples: [],
|
|
99
|
-
objects: [],
|
|
100
|
-
natives: [],
|
|
101
|
-
sets: [],
|
|
102
|
-
maps: [],
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
ProtocolMetadataUtil.array = array;
|
|
106
|
-
function atomic(type) {
|
|
107
|
-
return Metadata_1.Metadata.create({
|
|
108
|
-
any: false,
|
|
109
|
-
required: true,
|
|
110
|
-
optional: false,
|
|
111
|
-
nullable: false,
|
|
112
|
-
functional: false,
|
|
113
|
-
resolved: null,
|
|
114
|
-
aliases: [],
|
|
115
|
-
atomics: [type],
|
|
116
|
-
constants: [],
|
|
117
|
-
templates: [],
|
|
118
|
-
rest: null,
|
|
119
|
-
arrays: [],
|
|
120
|
-
tuples: [],
|
|
121
|
-
objects: [],
|
|
122
|
-
natives: [],
|
|
123
|
-
sets: [],
|
|
124
|
-
maps: [],
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
ProtocolMetadataUtil.atomic = atomic;
|
|
128
|
-
function reference(obj) {
|
|
129
|
-
return Metadata_1.Metadata.create({
|
|
130
|
-
any: false,
|
|
131
|
-
required: true,
|
|
132
|
-
optional: false,
|
|
133
|
-
nullable: false,
|
|
134
|
-
functional: false,
|
|
135
|
-
resolved: null,
|
|
136
|
-
aliases: [],
|
|
137
|
-
atomics: [],
|
|
138
|
-
constants: [],
|
|
139
|
-
templates: [],
|
|
140
|
-
rest: null,
|
|
141
|
-
arrays: [],
|
|
142
|
-
tuples: [],
|
|
143
|
-
objects: [obj],
|
|
144
|
-
natives: [],
|
|
145
|
-
sets: [],
|
|
146
|
-
maps: [],
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
ProtocolMetadataUtil.reference = reference;
|
|
150
|
-
function map(elem) {
|
|
151
|
-
return Metadata_1.Metadata.create({
|
|
152
|
-
any: false,
|
|
153
|
-
required: true,
|
|
154
|
-
optional: false,
|
|
155
|
-
nullable: false,
|
|
156
|
-
functional: false,
|
|
157
|
-
resolved: null,
|
|
158
|
-
aliases: [],
|
|
159
|
-
atomics: [],
|
|
160
|
-
constants: [],
|
|
161
|
-
templates: [],
|
|
162
|
-
rest: null,
|
|
163
|
-
arrays: [],
|
|
164
|
-
tuples: [],
|
|
165
|
-
objects: [],
|
|
166
|
-
natives: [],
|
|
167
|
-
sets: [],
|
|
168
|
-
maps: [elem],
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
ProtocolMetadataUtil.map = map;
|
|
172
|
-
})(ProtocolMetadataUtil || (exports.ProtocolMetadataUtil = ProtocolMetadataUtil = {}));
|
|
173
|
-
//# sourceMappingURL=ProtocolMetadataUtil.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProtocolMetadataUtil.js","sourceRoot":"","sources":["../../../../src/factories/internal/protocols/ProtocolMetadataUtil.ts"],"names":[],"mappings":";;;AACA,+DAA8D;AAC9D,yEAAwE;AACxE,2EAA0E;AAC1E,+EAA8E;AAI9E,IAAiB,oBAAoB,CA2KpC;AA3KD,WAAiB,oBAAoB;IACjC,SAAgB,IAAI,CAAC,IAAc;QAC/B,OAAO,CACH,IAAI,CAAC,OAAO,CAAC,MAAM;YACnB,IAAI,CAAC,SAAS,CAAC,MAAM,CACjB,UAAC,CAAC;gBACE,OAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,CAAC,CAAC,IAAI,KAAK,IAAI,EAAf,CAAe,CAAC,KAAK,SAAS;YAA1D,CAA0D,CACjE,CAAC,MAAM;YACR,CAA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from "../../../schemas/metadata/MetadataObject";
|
|
2
|
-
import { IProtocolMessage } from "../../../schemas/protobuf/IProtocolMessage";
|
|
3
|
-
export declare const emplace_protocol_object: (dict: Map<string, IProtocolMessage>) => (object: MetadataObject) => IProtocolMessage | undefined;
|