@php-skir/skir-client 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +40 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/serializer_tester.d.ts +18 -0
- package/dist/cjs/serializer_tester.d.ts.map +1 -0
- package/dist/cjs/serializer_tester.js +124 -0
- package/dist/cjs/serializer_tester.js.map +1 -0
- package/dist/cjs/skir-client.d.ts +1051 -0
- package/dist/cjs/skir-client.d.ts.map +1 -0
- package/dist/cjs/skir-client.js +2673 -0
- package/dist/cjs/skir-client.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/serializer_tester.d.ts +18 -0
- package/dist/esm/serializer_tester.d.ts.map +1 -0
- package/dist/esm/serializer_tester.js +119 -0
- package/dist/esm/serializer_tester.js.map +1 -0
- package/dist/esm/skir-client.d.ts +1051 -0
- package/dist/esm/skir-client.d.ts.map +1 -0
- package/dist/esm/skir-client.js +2655 -0
- package/dist/esm/skir-client.js.map +1 -0
- package/package.json +66 -0
- package/src/serializer_tester.ts +185 -0
- package/src/skir-client.ts +4141 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Tyler Fibonacci
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/@php-skir/skir-client)
|
|
2
|
+
[](https://github.com/php-skir/typescript-client/actions)
|
|
3
|
+
|
|
4
|
+
# Skir TypeScript Client
|
|
5
|
+
|
|
6
|
+
Library imported from TypeScript code generated from skir files.
|
|
7
|
+
|
|
8
|
+
Install with:
|
|
9
|
+
```shell
|
|
10
|
+
npm i @php-skir/skir-client
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## CBOR transport
|
|
14
|
+
|
|
15
|
+
The default SkirRPC transport stays compatible with upstream Skir. To exchange
|
|
16
|
+
CBOR request and response bodies, opt in on both the client and service:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
const client = new ServiceClient("https://example.com/rpc", undefined, {
|
|
20
|
+
transportCodec: "cbor",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const service = new Service({ transportCodec: "cbor" });
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
CBOR transport sends a `{ method, request }` envelope as `application/cbor` and
|
|
27
|
+
encodes the response value as `application/cbor`.
|
|
28
|
+
|
|
29
|
+
When installing a CBOR-enabled service on Express, pass Express's `raw`
|
|
30
|
+
middleware as the sixth argument:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
installServiceOnExpressApp(app, "/rpc", service, text, json, raw);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
See:
|
|
37
|
+
|
|
38
|
+
* [skir](https://github.com/gepheum/skir): home of the skir compiler
|
|
39
|
+
* [skir-typescript-gen](https://github.com/gepheum/skir-typescript-gen): skir to TypeScript code generator
|
|
40
|
+
* [skir-typescript-example](https://github.com/gepheum/skir-typescript-example): example showing how to use skir's TypeScript code generator in a project
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Json, type MutableForm, type Serializer } from "./skir-client.js";
|
|
2
|
+
export declare class SerializerTester<T> {
|
|
3
|
+
readonly serializer: Serializer<T>;
|
|
4
|
+
constructor(serializer: Serializer<T>);
|
|
5
|
+
reserializeAndAssert(input: T | MutableForm<T>, expected: {
|
|
6
|
+
denseJson: Json;
|
|
7
|
+
/** Defaults to `denseJson`. */
|
|
8
|
+
readableJson?: Json;
|
|
9
|
+
bytesAsBase16: string;
|
|
10
|
+
/** Defaults to `denseJson`. */
|
|
11
|
+
denseJsonFromReserialized?: Json;
|
|
12
|
+
lossy?: true;
|
|
13
|
+
}, description?: string): void;
|
|
14
|
+
deserializeZeroAndAssert(isDefaultFn: (input: T) => boolean): void;
|
|
15
|
+
reserializeTypeAdapterAndAssertNoLoss(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare function toBase16(buffer: ArrayBuffer): string;
|
|
18
|
+
//# sourceMappingURL=serializer_tester.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer_tester.d.ts","sourceRoot":"","sources":["../../src/serializer_tester.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,IAAI,EAET,KAAK,WAAW,EAChB,KAAK,UAAU,EAEhB,MAAM,kBAAkB,CAAC;AAE1B,qBAAa,gBAAgB,CAAC,CAAC;IACjB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;gBAAzB,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;IAE9C,oBAAoB,CAClB,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EACzB,QAAQ,EAAE;QACR,SAAS,EAAE,IAAI,CAAC;QAChB,+BAA+B;QAC/B,YAAY,CAAC,EAAE,IAAI,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;QACtB,+BAA+B;QAC/B,yBAAyB,CAAC,EAAE,IAAI,CAAC;QACjC,KAAK,CAAC,EAAE,IAAI,CAAC;KACd,EACD,WAAW,CAAC,EAAE,MAAM,GACnB,IAAI;IA8HP,wBAAwB,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI;IAelE,qCAAqC,IAAI,IAAI;CAQ9C;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAOpD"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SerializerTester = void 0;
|
|
4
|
+
exports.toBase16 = toBase16;
|
|
5
|
+
const buckwheat_1 = require("buckwheat");
|
|
6
|
+
const mocha_1 = require("mocha");
|
|
7
|
+
const skir_client_js_1 = require("./skir-client.js");
|
|
8
|
+
class SerializerTester {
|
|
9
|
+
constructor(serializer) {
|
|
10
|
+
this.serializer = serializer;
|
|
11
|
+
}
|
|
12
|
+
reserializeAndAssert(input, expected, description) {
|
|
13
|
+
const { serializer } = this;
|
|
14
|
+
(0, mocha_1.describe)(description !== null && description !== void 0 ? description : `reserialize ${input}`, () => {
|
|
15
|
+
var _a;
|
|
16
|
+
// Test JSON serialization.
|
|
17
|
+
const jsonFlavors = ["dense", "readable"];
|
|
18
|
+
for (const flavor of jsonFlavors) {
|
|
19
|
+
const expectedJson = flavor === "dense"
|
|
20
|
+
? expected.denseJson
|
|
21
|
+
: (_a = expected.readableJson) !== null && _a !== void 0 ? _a : expected.denseJson;
|
|
22
|
+
(0, mocha_1.describe)(`${flavor} JSON`, () => {
|
|
23
|
+
const actualJson = serializer.toJson(input, flavor);
|
|
24
|
+
(0, mocha_1.it)("#toJson()", () => {
|
|
25
|
+
(0, buckwheat_1.expect)(actualJson).toMatch(expectedJson);
|
|
26
|
+
});
|
|
27
|
+
(0, mocha_1.it)("#toJsonCode()", () => {
|
|
28
|
+
const actualJsonCode = serializer.toJsonCode(input, flavor);
|
|
29
|
+
const expectedJsonCode = JSON.stringify(expectedJson, undefined, flavor === "dense" ? "" : " ");
|
|
30
|
+
(0, buckwheat_1.expect)(actualJsonCode).toBe(expectedJsonCode);
|
|
31
|
+
});
|
|
32
|
+
(0, mocha_1.it)("#toJson() -> #fromJson() -> #toJson()", () => {
|
|
33
|
+
serializer.fromJson(actualJson);
|
|
34
|
+
const reserialized = serializer.fromJson(actualJson, "keep-unrecognized-values");
|
|
35
|
+
(0, buckwheat_1.expect)(serializer.toJson(reserialized, flavor)).toMatch(expectedJson);
|
|
36
|
+
});
|
|
37
|
+
(0, mocha_1.it)("#toJsonCode() -> #fromJsonCode() -> #toJson()", () => {
|
|
38
|
+
const reserialized = serializer.fromJsonCode(serializer.toJsonCode(input, flavor), "keep-unrecognized-values");
|
|
39
|
+
(0, buckwheat_1.expect)(serializer.toJson(reserialized, flavor)).toMatch(expectedJson);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// Test binary serialization.
|
|
44
|
+
const actualBytes = serializer.toBytes(input).toBuffer();
|
|
45
|
+
(0, mocha_1.it)("#toBytes()", () => {
|
|
46
|
+
const actualBase16 = toBase16(actualBytes);
|
|
47
|
+
(0, buckwheat_1.expect)(actualBase16).toBe(expected.bytesAsBase16);
|
|
48
|
+
});
|
|
49
|
+
serializer.fromBytes(actualBytes);
|
|
50
|
+
const reserialized = serializer.fromBytes(actualBytes, "keep-unrecognized-values");
|
|
51
|
+
(0, mocha_1.it)("#toBytes() -> #fromBytes() -> #toBytes()", () => {
|
|
52
|
+
const actualBase16 = toBase16(serializer.toBytes(reserialized).toBuffer());
|
|
53
|
+
(0, buckwheat_1.expect)(actualBase16).toBe(expected.bytesAsBase16);
|
|
54
|
+
});
|
|
55
|
+
(0, mocha_1.it)("#toBytes() -> #fromBytes() -> #toJson()", () => {
|
|
56
|
+
var _a;
|
|
57
|
+
const actualDenseJson = serializer.toJson(reserialized, "dense");
|
|
58
|
+
const expectedDenseJson = (_a = expected.denseJsonFromReserialized) !== null && _a !== void 0 ? _a : expected.denseJson;
|
|
59
|
+
(0, buckwheat_1.expect)(actualDenseJson).toMatch(expectedDenseJson);
|
|
60
|
+
});
|
|
61
|
+
// Test the #transform method of TypeDescriptor.
|
|
62
|
+
if (!expected.lossy) {
|
|
63
|
+
const transformAndAssert = (reparse, sourceFormat, targetFormat) => {
|
|
64
|
+
let typeDescriptor = serializer.typeDescriptor;
|
|
65
|
+
if (reparse) {
|
|
66
|
+
typeDescriptor = (0, skir_client_js_1.parseTypeDescriptorFromJson)(typeDescriptor.asJson());
|
|
67
|
+
}
|
|
68
|
+
const serialize = (format) => format === "bytes"
|
|
69
|
+
? serializer.toBytes(input).toBuffer()
|
|
70
|
+
: serializer.toJson(input, format);
|
|
71
|
+
const source = serialize(sourceFormat);
|
|
72
|
+
const target = serialize(targetFormat);
|
|
73
|
+
const transformed = typeDescriptor.transform(source, targetFormat);
|
|
74
|
+
const arrayBufferToBase16 = (a) => a instanceof ArrayBuffer ? toBase16(a) : a;
|
|
75
|
+
const parsedPrefix = reparse ? "parseTypeDescriptor then " : "";
|
|
76
|
+
(0, mocha_1.it)(`${parsedPrefix}transform ${sourceFormat} -> ${targetFormat}`, () => {
|
|
77
|
+
(0, buckwheat_1.expect)(arrayBufferToBase16(transformed)).toMatch(arrayBufferToBase16(target));
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const formats = ["dense", "readable", "bytes"];
|
|
81
|
+
for (const reparse of [false, true]) {
|
|
82
|
+
for (const source of formats) {
|
|
83
|
+
for (const target of formats) {
|
|
84
|
+
transformAndAssert(reparse, source, target);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
serializer.fromJson(serializer.toJson(input));
|
|
90
|
+
return serializer.fromJson(serializer.toJson(input), "keep-unrecognized-values");
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
deserializeZeroAndAssert(isDefaultFn) {
|
|
94
|
+
const { serializer } = this;
|
|
95
|
+
(0, mocha_1.describe)("deserialize zero", () => {
|
|
96
|
+
(0, mocha_1.it)("from JSON", () => {
|
|
97
|
+
(0, buckwheat_1.expect)(isDefaultFn(serializer.fromJson(0))).toBe(true);
|
|
98
|
+
});
|
|
99
|
+
(0, mocha_1.it)("from bytes", () => {
|
|
100
|
+
const bytes = new ArrayBuffer(5);
|
|
101
|
+
new TextEncoder().encodeInto("skir", new Uint8Array(bytes, 0, 4));
|
|
102
|
+
(0, buckwheat_1.expect)(isDefaultFn(serializer.fromBytes(bytes))).toBe(true);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
reserializeTypeAdapterAndAssertNoLoss() {
|
|
107
|
+
(0, mocha_1.it)("reserialize type adapter", () => {
|
|
108
|
+
const json = this.serializer.typeDescriptor.asJson();
|
|
109
|
+
const reserialized = (0, skir_client_js_1.parseTypeDescriptorFromJson)(json);
|
|
110
|
+
(0, buckwheat_1.expect)(reserialized.asJson()).toMatch(json);
|
|
111
|
+
(0, buckwheat_1.expect)(json).toMatch(reserialized.asJson());
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.SerializerTester = SerializerTester;
|
|
116
|
+
function toBase16(buffer) {
|
|
117
|
+
const prefix = new TextDecoder().decode(new Uint8Array(buffer).slice(0, 4));
|
|
118
|
+
(0, buckwheat_1.expect)(prefix).toBe("skir");
|
|
119
|
+
return [...new Uint8Array(buffer)]
|
|
120
|
+
.slice(4)
|
|
121
|
+
.map((x) => x.toString(16).padStart(2, "0"))
|
|
122
|
+
.join("");
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=serializer_tester.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer_tester.js","sourceRoot":"","sources":["../../src/serializer_tester.ts"],"names":[],"mappings":";;;AAiLA,4BAOC;AAxLD,yCAAmC;AACnC,iCAAqC;AACrC,qDAO0B;AAE1B,MAAa,gBAAgB;IAC3B,YAAqB,UAAyB;QAAzB,eAAU,GAAV,UAAU,CAAe;IAAG,CAAC;IAElD,oBAAoB,CAClB,KAAyB,EACzB,QAQC,EACD,WAAoB;QAEpB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE5B,IAAA,gBAAQ,EAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,eAAe,KAAK,EAAE,EAAE,GAAG,EAAE;;YACnD,2BAA2B;YAC3B,MAAM,WAAW,GAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YACxD,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;gBACjC,MAAM,YAAY,GAChB,MAAM,KAAK,OAAO;oBAChB,CAAC,CAAC,QAAQ,CAAC,SAAS;oBACpB,CAAC,CAAC,MAAA,QAAQ,CAAC,YAAY,mCAAI,QAAQ,CAAC,SAAS,CAAC;gBAElD,IAAA,gBAAQ,EAAC,GAAG,MAAM,OAAO,EAAE,GAAG,EAAE;oBAC9B,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;oBAEpD,IAAA,UAAE,EAAC,WAAW,EAAE,GAAG,EAAE;wBACnB,IAAA,kBAAM,EAAC,UAAU,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;oBAC3C,CAAC,CAAC,CAAC;oBAEH,IAAA,UAAE,EAAC,eAAe,EAAE,GAAG,EAAE;wBACvB,MAAM,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAA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