@2702rebels/wpidata 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.md +5 -0
- package/dist/abstractions.cjs +0 -0
- package/dist/abstractions.d.cts +246 -0
- package/dist/abstractions.d.cts.map +1 -0
- package/dist/abstractions.d.mts +246 -0
- package/dist/abstractions.d.mts.map +1 -0
- package/dist/abstractions.mjs +1 -0
- package/dist/formats/json.cjs +32 -0
- package/dist/formats/json.d.cts +14 -0
- package/dist/formats/json.d.cts.map +1 -0
- package/dist/formats/json.d.mts +14 -0
- package/dist/formats/json.d.mts.map +1 -0
- package/dist/formats/json.mjs +33 -0
- package/dist/formats/json.mjs.map +1 -0
- package/dist/formats/msgpack.cjs +30 -0
- package/dist/formats/msgpack.d.cts +14 -0
- package/dist/formats/msgpack.d.cts.map +1 -0
- package/dist/formats/msgpack.d.mts +14 -0
- package/dist/formats/msgpack.d.mts.map +1 -0
- package/dist/formats/msgpack.mjs +31 -0
- package/dist/formats/msgpack.mjs.map +1 -0
- package/dist/formats/protobuf.cjs +130 -0
- package/dist/formats/protobuf.d.cts +68 -0
- package/dist/formats/protobuf.d.cts.map +1 -0
- package/dist/formats/protobuf.d.mts +68 -0
- package/dist/formats/protobuf.d.mts.map +1 -0
- package/dist/formats/protobuf.mjs +128 -0
- package/dist/formats/protobuf.mjs.map +1 -0
- package/dist/formats/struct.cjs +593 -0
- package/dist/formats/struct.d.cts +134 -0
- package/dist/formats/struct.d.cts.map +1 -0
- package/dist/formats/struct.d.mts +134 -0
- package/dist/formats/struct.d.mts.map +1 -0
- package/dist/formats/struct.mjs +591 -0
- package/dist/formats/struct.mjs.map +1 -0
- package/dist/sink.cjs +360 -0
- package/dist/sink.d.cts +93 -0
- package/dist/sink.d.cts.map +1 -0
- package/dist/sink.d.mts +93 -0
- package/dist/sink.d.mts.map +1 -0
- package/dist/sink.mjs +361 -0
- package/dist/sink.mjs.map +1 -0
- package/dist/types/protobuf.cjs +0 -0
- package/dist/types/protobuf.d.cts +302 -0
- package/dist/types/protobuf.d.cts.map +1 -0
- package/dist/types/protobuf.d.mts +302 -0
- package/dist/types/protobuf.d.mts.map +1 -0
- package/dist/types/protobuf.mjs +1 -0
- package/dist/types/sendable.cjs +0 -0
- package/dist/types/sendable.d.cts +225 -0
- package/dist/types/sendable.d.cts.map +1 -0
- package/dist/types/sendable.d.mts +225 -0
- package/dist/types/sendable.d.mts.map +1 -0
- package/dist/types/sendable.mjs +1 -0
- package/dist/types/struct.cjs +0 -0
- package/dist/types/struct.d.cts +304 -0
- package/dist/types/struct.d.cts.map +1 -0
- package/dist/types/struct.d.mts +304 -0
- package/dist/types/struct.d.mts.map +1 -0
- package/dist/types/struct.mjs +1 -0
- package/dist/utils.cjs +140 -0
- package/dist/utils.d.cts +40 -0
- package/dist/utils.d.cts.map +1 -0
- package/dist/utils.d.mts +40 -0
- package/dist/utils.d.mts.map +1 -0
- package/dist/utils.mjs +135 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +51 -0
- package/src/abstractions.ts +308 -0
- package/src/formats/json.ts +53 -0
- package/src/formats/msgpack.ts +42 -0
- package/src/formats/protobuf.ts +213 -0
- package/src/formats/struct.test.ts +814 -0
- package/src/formats/struct.ts +992 -0
- package/src/sink.ts +611 -0
- package/src/types/protobuf.ts +334 -0
- package/src/types/sendable.ts +244 -0
- package/src/types/struct.ts +333 -0
- package/src/utils.ts +241 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const require_utils = require('../utils.cjs');
|
|
2
|
+
let _msgpack_msgpack = require("@msgpack/msgpack");
|
|
3
|
+
|
|
4
|
+
//#region src/formats/msgpack.ts
|
|
5
|
+
/** Implements {@link DataTransformer} interface for the `msgpack` serialization protocol. */
|
|
6
|
+
var MsgpackDataTransformer = class {
|
|
7
|
+
inspect(source, name, type, metadata) {
|
|
8
|
+
if (type === "msgpack") return {
|
|
9
|
+
source,
|
|
10
|
+
id: name,
|
|
11
|
+
dataType: "json",
|
|
12
|
+
publishedDataType: type,
|
|
13
|
+
transformer: this,
|
|
14
|
+
metadata
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
schema() {}
|
|
18
|
+
deserialize(value) {
|
|
19
|
+
return (0, _msgpack_msgpack.decode)(require_utils.toUint8Array(value));
|
|
20
|
+
}
|
|
21
|
+
serialize(value) {
|
|
22
|
+
return (0, _msgpack_msgpack.encode)(value);
|
|
23
|
+
}
|
|
24
|
+
canTransform() {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
exports.MsgpackDataTransformer = MsgpackDataTransformer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataChannel, DataTransformer, DataTypeImpl } from "../abstractions.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/formats/msgpack.d.ts
|
|
4
|
+
/** Implements {@link DataTransformer} interface for the `msgpack` serialization protocol. */
|
|
5
|
+
declare class MsgpackDataTransformer implements DataTransformer {
|
|
6
|
+
inspect(source: string, name: string, type: string, metadata?: string | Record<string, unknown>): DataChannel | string | undefined;
|
|
7
|
+
schema(): void;
|
|
8
|
+
deserialize(value: unknown): DataTypeImpl | undefined;
|
|
9
|
+
serialize(value: unknown): Uint8Array;
|
|
10
|
+
canTransform(): boolean;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { MsgpackDataTransformer };
|
|
14
|
+
//# sourceMappingURL=msgpack.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msgpack.d.cts","names":[],"sources":["../../src/formats/msgpack.ts"],"sourcesContent":[],"mappings":";;;;cAOa,sBAAA,YAAkC;EAAlC,OAAA,CAAA,MAAA,EAAA,MAAA,EAAA,IAAuB,EAAA,MAAA,EAAA,IAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,MAAA,GAKZ,MALY,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,EAM/B,WAN+B,GAAA,MAAA,GAAA,SAAA;EAKZ,MAAA,CAAA,CAAA,EAAA,IAAA;EACnB,WAAA,CAAA,KAAA,EAAA,OAAA,CAAA,EAiBiC,YAjBjC,GAAA,SAAA;EAiBiC,SAAA,CAAA,KAAA,EAAA,OAAA,CAAA,EAIF,UAJE;EAIF,YAAA,CAAA,CAAA,EAAA,OAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataChannel, DataTransformer, DataTypeImpl } from "../abstractions.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/formats/msgpack.d.ts
|
|
4
|
+
/** Implements {@link DataTransformer} interface for the `msgpack` serialization protocol. */
|
|
5
|
+
declare class MsgpackDataTransformer implements DataTransformer {
|
|
6
|
+
inspect(source: string, name: string, type: string, metadata?: string | Record<string, unknown>): DataChannel | string | undefined;
|
|
7
|
+
schema(): void;
|
|
8
|
+
deserialize(value: unknown): DataTypeImpl | undefined;
|
|
9
|
+
serialize(value: unknown): Uint8Array;
|
|
10
|
+
canTransform(): boolean;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { MsgpackDataTransformer };
|
|
14
|
+
//# sourceMappingURL=msgpack.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msgpack.d.mts","names":[],"sources":["../../src/formats/msgpack.ts"],"sourcesContent":[],"mappings":";;;;cAOa,sBAAA,YAAkC;EAAlC,OAAA,CAAA,MAAA,EAAA,MAAA,EAAA,IAAuB,EAAA,MAAA,EAAA,IAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,MAAA,GAKZ,MALY,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,EAM/B,WAN+B,GAAA,MAAA,GAAA,SAAA;EAKZ,MAAA,CAAA,CAAA,EAAA,IAAA;EACnB,WAAA,CAAA,KAAA,EAAA,OAAA,CAAA,EAiBiC,YAjBjC,GAAA,SAAA;EAiBiC,SAAA,CAAA,KAAA,EAAA,OAAA,CAAA,EAIF,UAJE;EAIF,YAAA,CAAA,CAAA,EAAA,OAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { toUint8Array } from "../utils.mjs";
|
|
2
|
+
import { decode, encode } from "@msgpack/msgpack";
|
|
3
|
+
|
|
4
|
+
//#region src/formats/msgpack.ts
|
|
5
|
+
/** Implements {@link DataTransformer} interface for the `msgpack` serialization protocol. */
|
|
6
|
+
var MsgpackDataTransformer = class {
|
|
7
|
+
inspect(source, name, type, metadata) {
|
|
8
|
+
if (type === "msgpack") return {
|
|
9
|
+
source,
|
|
10
|
+
id: name,
|
|
11
|
+
dataType: "json",
|
|
12
|
+
publishedDataType: type,
|
|
13
|
+
transformer: this,
|
|
14
|
+
metadata
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
schema() {}
|
|
18
|
+
deserialize(value) {
|
|
19
|
+
return decode(toUint8Array(value));
|
|
20
|
+
}
|
|
21
|
+
serialize(value) {
|
|
22
|
+
return encode(value);
|
|
23
|
+
}
|
|
24
|
+
canTransform() {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { MsgpackDataTransformer };
|
|
31
|
+
//# sourceMappingURL=msgpack.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msgpack.mjs","names":[],"sources":["../../src/formats/msgpack.ts"],"sourcesContent":["import { decode, encode } from \"@msgpack/msgpack\";\n\nimport { toUint8Array } from \"../utils\";\n\nimport type { DataChannel, DataTransformer, DataTypeImpl } from \"../abstractions\";\n\n/** Implements {@link DataTransformer} interface for the `msgpack` serialization protocol. */\nexport class MsgpackDataTransformer implements DataTransformer {\n public inspect(\n source: string,\n name: string,\n type: string,\n metadata?: string | Record<string, unknown>\n ): DataChannel | string | undefined {\n if (type === \"msgpack\") {\n return {\n source,\n id: name,\n dataType: \"json\",\n publishedDataType: type,\n transformer: this,\n metadata,\n };\n }\n\n return undefined;\n }\n\n public schema() {}\n\n public deserialize(value: unknown): DataTypeImpl | undefined {\n return decode(toUint8Array(value)) as DataTypeImpl;\n }\n\n public serialize(value: unknown): Uint8Array {\n return encode(value);\n }\n\n public canTransform(): boolean {\n return true;\n }\n}\n"],"mappings":";;;;;AAOA,IAAa,yBAAb,MAA+D;CAC7D,AAAO,QACL,QACA,MACA,MACA,UACkC;AAClC,MAAI,SAAS,UACX,QAAO;GACL;GACA,IAAI;GACJ,UAAU;GACV,mBAAmB;GACnB,aAAa;GACb;GACD;;CAML,AAAO,SAAS;CAEhB,AAAO,YAAY,OAA0C;AAC3D,SAAO,OAAO,aAAa,MAAM,CAAC;;CAGpC,AAAO,UAAU,OAA4B;AAC3C,SAAO,OAAO,MAAM;;CAGtB,AAAO,eAAwB;AAC7B,SAAO"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
const require_utils = require('../utils.cjs');
|
|
2
|
+
let protobufjs = require("protobufjs");
|
|
3
|
+
let protobufjs_ext_descriptor = require("protobufjs/ext/descriptor");
|
|
4
|
+
|
|
5
|
+
//#region src/formats/protobuf.ts
|
|
6
|
+
const error = (message) => {
|
|
7
|
+
return new Error(message);
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Unpacks protobuf serialized data into JSON object.
|
|
11
|
+
*
|
|
12
|
+
* @param name protobuf descriptor name
|
|
13
|
+
* @param data serialized binary data
|
|
14
|
+
* @param repository repository of available descriptors
|
|
15
|
+
*/
|
|
16
|
+
function unpack(name, data, repository) {
|
|
17
|
+
return repository.root.lookupType(name).decode(data);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Packs JSON object into serialized protobuf data.
|
|
21
|
+
*
|
|
22
|
+
* @param name protobuf descriptor name
|
|
23
|
+
* @param value JSON object to pack
|
|
24
|
+
* @param repository repository of available descriptors
|
|
25
|
+
* @returns ArrayBuffer containing serialized data
|
|
26
|
+
*/
|
|
27
|
+
function pack(name, value, repository) {
|
|
28
|
+
return repository.root.lookupType(name).encode(value).finish();
|
|
29
|
+
}
|
|
30
|
+
/** Repository of protobuf descriptors. */
|
|
31
|
+
var ProtobufRepository = class {
|
|
32
|
+
/**
|
|
33
|
+
* Root namespace.
|
|
34
|
+
*/
|
|
35
|
+
root = new protobufjs.Root();
|
|
36
|
+
/**
|
|
37
|
+
* Determines whether type can be transformed, indicating that
|
|
38
|
+
* the parsed type descriptor is present.
|
|
39
|
+
*
|
|
40
|
+
* @param name protobuf descriptor name
|
|
41
|
+
*/
|
|
42
|
+
canTransform(name) {
|
|
43
|
+
try {
|
|
44
|
+
return this.root.lookupType(name) != null;
|
|
45
|
+
} catch {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Unpacks protobuf serialized data into JSON object.
|
|
51
|
+
*
|
|
52
|
+
* @param name protobuf descriptor name
|
|
53
|
+
* @param data serialized binary data
|
|
54
|
+
*/
|
|
55
|
+
unpack(name, data) {
|
|
56
|
+
return unpack(name, data, this);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Packs JSON object into serialized protobuf data.
|
|
60
|
+
*
|
|
61
|
+
* @param name protobuf descriptor name
|
|
62
|
+
* @param value JSON object to pack
|
|
63
|
+
*/
|
|
64
|
+
pack(name, value) {
|
|
65
|
+
return pack(name, value, this);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Parses protobuf file descriptor and adds it to the repository.
|
|
69
|
+
*
|
|
70
|
+
* @param data descriptor binary data
|
|
71
|
+
*/
|
|
72
|
+
add(data) {
|
|
73
|
+
const fd = protobufjs_ext_descriptor.FileDescriptorProto.decode(data);
|
|
74
|
+
if (fd.name == null) throw error(`Failed to parse protobuf file descriptor: missing name`);
|
|
75
|
+
if (this.root.files.includes(fd.name)) return;
|
|
76
|
+
const filePackage = fd.package ? this.root.define(fd.package) : this.root;
|
|
77
|
+
if (fd.name) {
|
|
78
|
+
filePackage.filename = fd.name;
|
|
79
|
+
this.root.files.push(fd.name);
|
|
80
|
+
}
|
|
81
|
+
if (fd.messageType) for (const messageType of fd.messageType) filePackage.add(protobufjs.Type.fromDescriptor(messageType, fd.syntax));
|
|
82
|
+
if (fd.enumType) for (const enumType of fd.enumType) filePackage.add(protobufjs.Enum.fromDescriptor(enumType));
|
|
83
|
+
if (fd.extension) for (const extension of fd.extension) filePackage.add(protobufjs.Field.fromDescriptor(extension));
|
|
84
|
+
if (fd.service) for (const service of fd.service) filePackage.add(protobufjs.Service.fromDescriptor(service));
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
/** Implements {@link DataTransformer} interface for the `protobuf` serialization protocol. */
|
|
88
|
+
var ProtobufDataTransformer = class {
|
|
89
|
+
repo = new ProtobufRepository();
|
|
90
|
+
inspect(source, name, type, metadata) {
|
|
91
|
+
if (name.startsWith("/.schema/proto:")) {
|
|
92
|
+
if (type !== "proto:FileDescriptorProto") throw new Error(`Unexpected type '${type}' for protobuf schema entry`);
|
|
93
|
+
return name.substring(15);
|
|
94
|
+
}
|
|
95
|
+
if (type.startsWith("proto:")) return {
|
|
96
|
+
source,
|
|
97
|
+
id: name,
|
|
98
|
+
dataType: "json",
|
|
99
|
+
publishedDataType: type,
|
|
100
|
+
transformer: this,
|
|
101
|
+
structuredType: {
|
|
102
|
+
name: type.slice(6),
|
|
103
|
+
format: "protobuf"
|
|
104
|
+
},
|
|
105
|
+
metadata
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
schema(typeName, value) {
|
|
109
|
+
this.repo.add(require_utils.toUint8Array(value));
|
|
110
|
+
}
|
|
111
|
+
deserialize(value, type) {
|
|
112
|
+
if (type == null) throw new Error(`Transformation requires type to be specified. This situation should not be possible if the transformer is wired correctly.`);
|
|
113
|
+
if (this.repo.canTransform(type.name)) return this.repo.unpack(type.name, require_utils.toUint8Array(value));
|
|
114
|
+
}
|
|
115
|
+
serialize(value, type) {
|
|
116
|
+
if (type == null) throw new Error(`Transformation requires type to be specified. This situation should not be possible if the transformer is wired correctly.`);
|
|
117
|
+
if (value == null || typeof value !== "object") throw new Error("Only JSON objects can be serialized");
|
|
118
|
+
if (this.repo.canTransform(type.name)) return this.repo.pack(type.name, value);
|
|
119
|
+
throw new Error(`Protobuf serialization is not supported for '${type.name}'`);
|
|
120
|
+
}
|
|
121
|
+
canTransform(type) {
|
|
122
|
+
return this.repo.canTransform(type);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
exports.ProtobufDataTransformer = ProtobufDataTransformer;
|
|
128
|
+
exports.ProtobufRepository = ProtobufRepository;
|
|
129
|
+
exports.pack = pack;
|
|
130
|
+
exports.unpack = unpack;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { DataChannel, DataTransformer, DataTypeImpl, StructuredTypeDescriptor } from "../abstractions.cjs";
|
|
2
|
+
import { Root } from "protobufjs";
|
|
3
|
+
|
|
4
|
+
//#region src/formats/protobuf.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Unpacks protobuf serialized data into JSON object.
|
|
8
|
+
*
|
|
9
|
+
* @param name protobuf descriptor name
|
|
10
|
+
* @param data serialized binary data
|
|
11
|
+
* @param repository repository of available descriptors
|
|
12
|
+
*/
|
|
13
|
+
declare function unpack(name: string, data: Uint8Array<ArrayBufferLike>, repository: ProtobufRepository): Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Packs JSON object into serialized protobuf data.
|
|
16
|
+
*
|
|
17
|
+
* @param name protobuf descriptor name
|
|
18
|
+
* @param value JSON object to pack
|
|
19
|
+
* @param repository repository of available descriptors
|
|
20
|
+
* @returns ArrayBuffer containing serialized data
|
|
21
|
+
*/
|
|
22
|
+
declare function pack(name: string, value: Record<string, unknown>, repository: ProtobufRepository): Uint8Array;
|
|
23
|
+
/** Repository of protobuf descriptors. */
|
|
24
|
+
declare class ProtobufRepository {
|
|
25
|
+
/**
|
|
26
|
+
* Root namespace.
|
|
27
|
+
*/
|
|
28
|
+
root: Root;
|
|
29
|
+
/**
|
|
30
|
+
* Determines whether type can be transformed, indicating that
|
|
31
|
+
* the parsed type descriptor is present.
|
|
32
|
+
*
|
|
33
|
+
* @param name protobuf descriptor name
|
|
34
|
+
*/
|
|
35
|
+
canTransform(name: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Unpacks protobuf serialized data into JSON object.
|
|
38
|
+
*
|
|
39
|
+
* @param name protobuf descriptor name
|
|
40
|
+
* @param data serialized binary data
|
|
41
|
+
*/
|
|
42
|
+
unpack(name: string, data: Uint8Array<ArrayBufferLike>): Record<string, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Packs JSON object into serialized protobuf data.
|
|
45
|
+
*
|
|
46
|
+
* @param name protobuf descriptor name
|
|
47
|
+
* @param value JSON object to pack
|
|
48
|
+
*/
|
|
49
|
+
pack(name: string, value: Record<string, unknown>): Uint8Array<ArrayBufferLike>;
|
|
50
|
+
/**
|
|
51
|
+
* Parses protobuf file descriptor and adds it to the repository.
|
|
52
|
+
*
|
|
53
|
+
* @param data descriptor binary data
|
|
54
|
+
*/
|
|
55
|
+
add(data: Uint8Array<ArrayBufferLike>): void;
|
|
56
|
+
}
|
|
57
|
+
/** Implements {@link DataTransformer} interface for the `protobuf` serialization protocol. */
|
|
58
|
+
declare class ProtobufDataTransformer implements DataTransformer {
|
|
59
|
+
private readonly repo;
|
|
60
|
+
inspect(source: string, name: string, type: string, metadata?: string | Record<string, unknown>): DataChannel | string | undefined;
|
|
61
|
+
schema(typeName: string, value: unknown): void;
|
|
62
|
+
deserialize(value: unknown, type?: StructuredTypeDescriptor): DataTypeImpl | undefined;
|
|
63
|
+
serialize(value: unknown, type?: StructuredTypeDescriptor): Uint8Array;
|
|
64
|
+
canTransform(type: string): boolean;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { ProtobufDataTransformer, ProtobufRepository, pack, unpack };
|
|
68
|
+
//# sourceMappingURL=protobuf.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protobuf.d.cts","names":[],"sources":["../../src/formats/protobuf.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqBA;;;;;AAIS,iBAJO,MAAA,CAIP,IAAA,EAAA,MAAA,EAAA,IAAA,EAFD,UAEC,CAFU,eAEV,CAAA,EAAA,UAAA,EADK,kBACL,CAAA,EAAN,MAAM,CAAA,MAAA,EAAA,OAAA,CAAA;AAYT;;;;;AAMA;;;AA0BoC,iBAhCpB,IAAA,CAgCoB,IAAA,EAAA,MAAA,EAAA,KAAA,EAhCM,MAgCN,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,UAAA,EAhC2C,kBAgC3C,CAAA,EAhCgE,UAgChE;;AAUD,cApCtB,kBAAA,CAoCsB;EAAuB;;;EASvC,IAAA,EAzCN,IAyCM;EAAU;AAkD7B;;;;;EAqD0C,YAAA,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAA2B;;;;;;6BA1HjC,WAAW,mBAAgB;;;;;;;4BAU5B,0BAAuB,WAAA;;;;;;YASvC,WAAW;;;cAkDjB,uBAAA,YAAmC;;0EAOxB,0BACnB;;qCA+BuC,2BAA2B;mCAc7B,2BAA2B"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { DataChannel, DataTransformer, DataTypeImpl, StructuredTypeDescriptor } from "../abstractions.mjs";
|
|
2
|
+
import { Root } from "protobufjs";
|
|
3
|
+
|
|
4
|
+
//#region src/formats/protobuf.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Unpacks protobuf serialized data into JSON object.
|
|
8
|
+
*
|
|
9
|
+
* @param name protobuf descriptor name
|
|
10
|
+
* @param data serialized binary data
|
|
11
|
+
* @param repository repository of available descriptors
|
|
12
|
+
*/
|
|
13
|
+
declare function unpack(name: string, data: Uint8Array<ArrayBufferLike>, repository: ProtobufRepository): Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Packs JSON object into serialized protobuf data.
|
|
16
|
+
*
|
|
17
|
+
* @param name protobuf descriptor name
|
|
18
|
+
* @param value JSON object to pack
|
|
19
|
+
* @param repository repository of available descriptors
|
|
20
|
+
* @returns ArrayBuffer containing serialized data
|
|
21
|
+
*/
|
|
22
|
+
declare function pack(name: string, value: Record<string, unknown>, repository: ProtobufRepository): Uint8Array;
|
|
23
|
+
/** Repository of protobuf descriptors. */
|
|
24
|
+
declare class ProtobufRepository {
|
|
25
|
+
/**
|
|
26
|
+
* Root namespace.
|
|
27
|
+
*/
|
|
28
|
+
root: Root;
|
|
29
|
+
/**
|
|
30
|
+
* Determines whether type can be transformed, indicating that
|
|
31
|
+
* the parsed type descriptor is present.
|
|
32
|
+
*
|
|
33
|
+
* @param name protobuf descriptor name
|
|
34
|
+
*/
|
|
35
|
+
canTransform(name: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Unpacks protobuf serialized data into JSON object.
|
|
38
|
+
*
|
|
39
|
+
* @param name protobuf descriptor name
|
|
40
|
+
* @param data serialized binary data
|
|
41
|
+
*/
|
|
42
|
+
unpack(name: string, data: Uint8Array<ArrayBufferLike>): Record<string, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Packs JSON object into serialized protobuf data.
|
|
45
|
+
*
|
|
46
|
+
* @param name protobuf descriptor name
|
|
47
|
+
* @param value JSON object to pack
|
|
48
|
+
*/
|
|
49
|
+
pack(name: string, value: Record<string, unknown>): Uint8Array<ArrayBufferLike>;
|
|
50
|
+
/**
|
|
51
|
+
* Parses protobuf file descriptor and adds it to the repository.
|
|
52
|
+
*
|
|
53
|
+
* @param data descriptor binary data
|
|
54
|
+
*/
|
|
55
|
+
add(data: Uint8Array<ArrayBufferLike>): void;
|
|
56
|
+
}
|
|
57
|
+
/** Implements {@link DataTransformer} interface for the `protobuf` serialization protocol. */
|
|
58
|
+
declare class ProtobufDataTransformer implements DataTransformer {
|
|
59
|
+
private readonly repo;
|
|
60
|
+
inspect(source: string, name: string, type: string, metadata?: string | Record<string, unknown>): DataChannel | string | undefined;
|
|
61
|
+
schema(typeName: string, value: unknown): void;
|
|
62
|
+
deserialize(value: unknown, type?: StructuredTypeDescriptor): DataTypeImpl | undefined;
|
|
63
|
+
serialize(value: unknown, type?: StructuredTypeDescriptor): Uint8Array;
|
|
64
|
+
canTransform(type: string): boolean;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { ProtobufDataTransformer, ProtobufRepository, pack, unpack };
|
|
68
|
+
//# sourceMappingURL=protobuf.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protobuf.d.mts","names":[],"sources":["../../src/formats/protobuf.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqBA;;;;;AAIS,iBAJO,MAAA,CAIP,IAAA,EAAA,MAAA,EAAA,IAAA,EAFD,UAEC,CAFU,eAEV,CAAA,EAAA,UAAA,EADK,kBACL,CAAA,EAAN,MAAM,CAAA,MAAA,EAAA,OAAA,CAAA;AAYT;;;;;AAMA;;;AA0BoC,iBAhCpB,IAAA,CAgCoB,IAAA,EAAA,MAAA,EAAA,KAAA,EAhCM,MAgCN,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,UAAA,EAhC2C,kBAgC3C,CAAA,EAhCgE,UAgChE;;AAUD,cApCtB,kBAAA,CAoCsB;EAAuB;;;EASvC,IAAA,EAzCN,IAyCM;EAAU;AAkD7B;;;;;EAqD0C,YAAA,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAA2B;;;;;;6BA1HjC,WAAW,mBAAgB;;;;;;;4BAU5B,0BAAuB,WAAA;;;;;;YASvC,WAAW;;;cAkDjB,uBAAA,YAAmC;;0EAOxB,0BACnB;;qCA+BuC,2BAA2B;mCAc7B,2BAA2B"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { toUint8Array } from "../utils.mjs";
|
|
2
|
+
import { Enum, Field, Root, Service, Type } from "protobufjs";
|
|
3
|
+
import { FileDescriptorProto } from "protobufjs/ext/descriptor";
|
|
4
|
+
|
|
5
|
+
//#region src/formats/protobuf.ts
|
|
6
|
+
const error = (message) => {
|
|
7
|
+
return new Error(message);
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Unpacks protobuf serialized data into JSON object.
|
|
11
|
+
*
|
|
12
|
+
* @param name protobuf descriptor name
|
|
13
|
+
* @param data serialized binary data
|
|
14
|
+
* @param repository repository of available descriptors
|
|
15
|
+
*/
|
|
16
|
+
function unpack(name, data, repository) {
|
|
17
|
+
return repository.root.lookupType(name).decode(data);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Packs JSON object into serialized protobuf data.
|
|
21
|
+
*
|
|
22
|
+
* @param name protobuf descriptor name
|
|
23
|
+
* @param value JSON object to pack
|
|
24
|
+
* @param repository repository of available descriptors
|
|
25
|
+
* @returns ArrayBuffer containing serialized data
|
|
26
|
+
*/
|
|
27
|
+
function pack(name, value, repository) {
|
|
28
|
+
return repository.root.lookupType(name).encode(value).finish();
|
|
29
|
+
}
|
|
30
|
+
/** Repository of protobuf descriptors. */
|
|
31
|
+
var ProtobufRepository = class {
|
|
32
|
+
/**
|
|
33
|
+
* Root namespace.
|
|
34
|
+
*/
|
|
35
|
+
root = new Root();
|
|
36
|
+
/**
|
|
37
|
+
* Determines whether type can be transformed, indicating that
|
|
38
|
+
* the parsed type descriptor is present.
|
|
39
|
+
*
|
|
40
|
+
* @param name protobuf descriptor name
|
|
41
|
+
*/
|
|
42
|
+
canTransform(name) {
|
|
43
|
+
try {
|
|
44
|
+
return this.root.lookupType(name) != null;
|
|
45
|
+
} catch {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Unpacks protobuf serialized data into JSON object.
|
|
51
|
+
*
|
|
52
|
+
* @param name protobuf descriptor name
|
|
53
|
+
* @param data serialized binary data
|
|
54
|
+
*/
|
|
55
|
+
unpack(name, data) {
|
|
56
|
+
return unpack(name, data, this);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Packs JSON object into serialized protobuf data.
|
|
60
|
+
*
|
|
61
|
+
* @param name protobuf descriptor name
|
|
62
|
+
* @param value JSON object to pack
|
|
63
|
+
*/
|
|
64
|
+
pack(name, value) {
|
|
65
|
+
return pack(name, value, this);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Parses protobuf file descriptor and adds it to the repository.
|
|
69
|
+
*
|
|
70
|
+
* @param data descriptor binary data
|
|
71
|
+
*/
|
|
72
|
+
add(data) {
|
|
73
|
+
const fd = FileDescriptorProto.decode(data);
|
|
74
|
+
if (fd.name == null) throw error(`Failed to parse protobuf file descriptor: missing name`);
|
|
75
|
+
if (this.root.files.includes(fd.name)) return;
|
|
76
|
+
const filePackage = fd.package ? this.root.define(fd.package) : this.root;
|
|
77
|
+
if (fd.name) {
|
|
78
|
+
filePackage.filename = fd.name;
|
|
79
|
+
this.root.files.push(fd.name);
|
|
80
|
+
}
|
|
81
|
+
if (fd.messageType) for (const messageType of fd.messageType) filePackage.add(Type.fromDescriptor(messageType, fd.syntax));
|
|
82
|
+
if (fd.enumType) for (const enumType of fd.enumType) filePackage.add(Enum.fromDescriptor(enumType));
|
|
83
|
+
if (fd.extension) for (const extension of fd.extension) filePackage.add(Field.fromDescriptor(extension));
|
|
84
|
+
if (fd.service) for (const service of fd.service) filePackage.add(Service.fromDescriptor(service));
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
/** Implements {@link DataTransformer} interface for the `protobuf` serialization protocol. */
|
|
88
|
+
var ProtobufDataTransformer = class {
|
|
89
|
+
repo = new ProtobufRepository();
|
|
90
|
+
inspect(source, name, type, metadata) {
|
|
91
|
+
if (name.startsWith("/.schema/proto:")) {
|
|
92
|
+
if (type !== "proto:FileDescriptorProto") throw new Error(`Unexpected type '${type}' for protobuf schema entry`);
|
|
93
|
+
return name.substring(15);
|
|
94
|
+
}
|
|
95
|
+
if (type.startsWith("proto:")) return {
|
|
96
|
+
source,
|
|
97
|
+
id: name,
|
|
98
|
+
dataType: "json",
|
|
99
|
+
publishedDataType: type,
|
|
100
|
+
transformer: this,
|
|
101
|
+
structuredType: {
|
|
102
|
+
name: type.slice(6),
|
|
103
|
+
format: "protobuf"
|
|
104
|
+
},
|
|
105
|
+
metadata
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
schema(typeName, value) {
|
|
109
|
+
this.repo.add(toUint8Array(value));
|
|
110
|
+
}
|
|
111
|
+
deserialize(value, type) {
|
|
112
|
+
if (type == null) throw new Error(`Transformation requires type to be specified. This situation should not be possible if the transformer is wired correctly.`);
|
|
113
|
+
if (this.repo.canTransform(type.name)) return this.repo.unpack(type.name, toUint8Array(value));
|
|
114
|
+
}
|
|
115
|
+
serialize(value, type) {
|
|
116
|
+
if (type == null) throw new Error(`Transformation requires type to be specified. This situation should not be possible if the transformer is wired correctly.`);
|
|
117
|
+
if (value == null || typeof value !== "object") throw new Error("Only JSON objects can be serialized");
|
|
118
|
+
if (this.repo.canTransform(type.name)) return this.repo.pack(type.name, value);
|
|
119
|
+
throw new Error(`Protobuf serialization is not supported for '${type.name}'`);
|
|
120
|
+
}
|
|
121
|
+
canTransform(type) {
|
|
122
|
+
return this.repo.canTransform(type);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
export { ProtobufDataTransformer, ProtobufRepository, pack, unpack };
|
|
128
|
+
//# sourceMappingURL=protobuf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protobuf.mjs","names":[],"sources":["../../src/formats/protobuf.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n\nimport { Enum, Field, Root, Service, Type } from \"protobufjs\";\nimport { FileDescriptorProto } from \"protobufjs/ext/descriptor\";\n\nimport { toUint8Array } from \"../utils\";\n\nimport type { IFileDescriptorProto } from \"protobufjs/ext/descriptor\";\nimport type { DataChannel, DataTransformer, DataTypeImpl, StructuredTypeDescriptor } from \"../abstractions\";\n\nconst error = (message: string) => {\n return new Error(message);\n};\n\n/**\n * Unpacks protobuf serialized data into JSON object.\n *\n * @param name protobuf descriptor name\n * @param data serialized binary data\n * @param repository repository of available descriptors\n */\nexport function unpack(\n name: string,\n data: Uint8Array<ArrayBufferLike>,\n repository: ProtobufRepository\n): Record<string, unknown> {\n const type = repository.root.lookupType(name); // throws on error\n return type.decode(data) as unknown as Record<string, unknown>;\n}\n/**\n * Packs JSON object into serialized protobuf data.\n *\n * @param name protobuf descriptor name\n * @param value JSON object to pack\n * @param repository repository of available descriptors\n * @returns ArrayBuffer containing serialized data\n */\nexport function pack(name: string, value: Record<string, unknown>, repository: ProtobufRepository): Uint8Array {\n const type = repository.root.lookupType(name); // throws on error\n return type.encode(value).finish();\n}\n\n/** Repository of protobuf descriptors. */\nexport class ProtobufRepository {\n /**\n * Root namespace.\n */\n public root = new Root();\n\n /**\n * Determines whether type can be transformed, indicating that\n * the parsed type descriptor is present.\n *\n * @param name protobuf descriptor name\n */\n public canTransform(name: string) {\n try {\n return this.root.lookupType(name) != null;\n } catch {\n return false;\n }\n }\n\n /**\n * Unpacks protobuf serialized data into JSON object.\n *\n * @param name protobuf descriptor name\n * @param data serialized binary data\n */\n public unpack(name: string, data: Uint8Array<ArrayBufferLike>) {\n return unpack(name, data, this);\n }\n\n /**\n * Packs JSON object into serialized protobuf data.\n *\n * @param name protobuf descriptor name\n * @param value JSON object to pack\n */\n public pack(name: string, value: Record<string, unknown>) {\n return pack(name, value, this);\n }\n\n /**\n * Parses protobuf file descriptor and adds it to the repository.\n *\n * @param data descriptor binary data\n */\n public add(data: Uint8Array<ArrayBufferLike>): void {\n const fd = FileDescriptorProto.decode(data) as IFileDescriptorProto;\n if (fd.name == null) {\n throw error(`Failed to parse protobuf file descriptor: missing name`);\n }\n\n // ignore duplicates\n if (this.root.files.includes(fd.name)) {\n return;\n // throw error(`Failed to parse protobuf file descriptor: duplicate '${fd.name}' filename`);\n }\n\n const filePackage = fd.package ? this.root.define(fd.package) : this.root;\n\n if (fd.name) {\n filePackage.filename = fd.name;\n this.root.files.push(fd.name);\n }\n\n if (fd.messageType) {\n for (const messageType of fd.messageType) {\n // @ts-expect-error\n filePackage.add(Type.fromDescriptor(messageType, fd.syntax));\n }\n }\n\n if (fd.enumType) {\n for (const enumType of fd.enumType) {\n // @ts-expect-error\n filePackage.add(Enum.fromDescriptor(enumType));\n }\n }\n\n if (fd.extension) {\n for (const extension of fd.extension) {\n // @ts-expect-error\n filePackage.add(Field.fromDescriptor(extension));\n }\n }\n\n if (fd.service) {\n for (const service of fd.service) {\n // @ts-expect-error\n filePackage.add(Service.fromDescriptor(service));\n }\n }\n }\n}\n\n/** Implements {@link DataTransformer} interface for the `protobuf` serialization protocol. */\nexport class ProtobufDataTransformer implements DataTransformer {\n private readonly repo = new ProtobufRepository();\n\n public inspect(\n source: string,\n name: string,\n type: string,\n metadata?: string | Record<string, unknown>\n ): DataChannel | string | undefined {\n if (name.startsWith(\"/.schema/proto:\")) {\n if (type !== \"proto:FileDescriptorProto\") {\n throw new Error(`Unexpected type '${type}' for protobuf schema entry`);\n }\n\n return name.substring(15);\n }\n\n if (type.startsWith(\"proto:\")) {\n return {\n source,\n id: name,\n dataType: \"json\",\n publishedDataType: type,\n transformer: this,\n structuredType: {\n name: type.slice(6),\n format: \"protobuf\",\n },\n metadata,\n };\n }\n\n return undefined;\n }\n\n public schema(typeName: string, value: unknown) {\n this.repo.add(toUint8Array(value));\n }\n\n public deserialize(value: unknown, type?: StructuredTypeDescriptor): DataTypeImpl | undefined {\n if (type == null) {\n throw new Error(\n `Transformation requires type to be specified. This situation should not be possible if the transformer is wired correctly.`\n );\n }\n\n if (this.repo.canTransform(type.name)) {\n return this.repo.unpack(type.name, toUint8Array(value));\n }\n\n return undefined;\n }\n\n public serialize(value: unknown, type?: StructuredTypeDescriptor): Uint8Array {\n if (type == null) {\n throw new Error(\n `Transformation requires type to be specified. This situation should not be possible if the transformer is wired correctly.`\n );\n }\n\n if (value == null || typeof value !== \"object\") {\n throw new Error(\"Only JSON objects can be serialized\");\n }\n\n if (this.repo.canTransform(type.name)) {\n return this.repo.pack(type.name, value as Record<string, unknown>);\n }\n\n throw new Error(`Protobuf serialization is not supported for '${type.name}'`);\n }\n\n public canTransform(type: string): boolean {\n return this.repo.canTransform(type);\n }\n}\n"],"mappings":"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"}
|