@nmtjs/protocol 0.16.0-beta.2 → 0.16.0-beta.4
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/client/protocol.d.ts +2 -1
- package/dist/client/protocol.js +6 -1
- package/dist/client/protocol.js.map +1 -1
- package/dist/server/protocol.d.ts +2 -1
- package/dist/server/protocol.js +6 -1
- package/dist/server/protocol.js.map +1 -1
- package/dist/server/versions/v1.d.ts +27 -27
- package/package.json +9 -9
- package/src/client/protocol.ts +6 -1
- package/src/server/protocol.ts +6 -1
|
@@ -114,8 +114,9 @@ export declare class ProtocolError extends Error implements BaseProtocolError {
|
|
|
114
114
|
get message(): string;
|
|
115
115
|
toString(): string;
|
|
116
116
|
toJSON(): {
|
|
117
|
-
|
|
117
|
+
name: string;
|
|
118
118
|
message: string;
|
|
119
119
|
data: any;
|
|
120
|
+
code: string;
|
|
120
121
|
};
|
|
121
122
|
}
|
package/dist/client/protocol.js
CHANGED
|
@@ -19,7 +19,12 @@ export class ProtocolError extends Error {
|
|
|
19
19
|
return `${this.code} ${this.message}`;
|
|
20
20
|
}
|
|
21
21
|
toJSON() {
|
|
22
|
-
return {
|
|
22
|
+
return {
|
|
23
|
+
name: this.code,
|
|
24
|
+
message: this.message,
|
|
25
|
+
data: this.data,
|
|
26
|
+
code: this.code,
|
|
27
|
+
};
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
//# sourceMappingURL=protocol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/client/protocol.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAuD5C,MAAM,OAAgB,wBAAwB;IAgBlC,MAAM,CAAC,GAAG,MAAyC,EAAE;QAC7D,OAAO,MAAM,CAAC,GAAG,MAAM,CAAC,CAAA;IAAA,CACzB;CACF;AAED,MAAM,OAAO,aAAc,SAAQ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IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAA;IAAA,CACF;CACF"}
|
|
@@ -8,9 +8,10 @@ export declare class ProtocolError extends Error implements BaseProtocolError {
|
|
|
8
8
|
get message(): string;
|
|
9
9
|
toString(): string;
|
|
10
10
|
toJSON(): {
|
|
11
|
-
|
|
11
|
+
name: string;
|
|
12
12
|
message: string;
|
|
13
13
|
data: any;
|
|
14
|
+
code: string;
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
export declare abstract class ProtocolVersionInterface {
|
package/dist/server/protocol.js
CHANGED
|
@@ -14,7 +14,12 @@ export class ProtocolError extends Error {
|
|
|
14
14
|
return `${this.code} ${this.message}`;
|
|
15
15
|
}
|
|
16
16
|
toJSON() {
|
|
17
|
-
return {
|
|
17
|
+
return {
|
|
18
|
+
name: this.code,
|
|
19
|
+
message: this.message,
|
|
20
|
+
data: this.data,
|
|
21
|
+
code: this.code,
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
export class ProtocolVersionInterface {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/server/protocol.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAE5C,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,IAAI,CAAQ;IACZ,IAAI,CAAM;IAEV,YAAY,IAAY,EAAE,OAAgB,EAAE,IAAU,EAAE;QACtD,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAAA,CACjB;IAED,IAAI,OAAO,GAAG;QACZ,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,EAAE,CAAA;IAAA,CACvC;IAED,QAAQ,GAAG;QACT,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,CAAA;IAAA,CACtC;IAED,MAAM,GAAG;QACP,OAAO,
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/server/protocol.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAE5C,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,IAAI,CAAQ;IACZ,IAAI,CAAM;IAEV,YAAY,IAAY,EAAE,OAAgB,EAAE,IAAU,EAAE;QACtD,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAAA,CACjB;IAED,IAAI,OAAO,GAAG;QACZ,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,EAAE,CAAA;IAAA,CACvC;IAED,QAAQ,GAAG;QACT,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,CAAA;IAAA,CACtC;IAED,MAAM,GAAG;QACP,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAA;IAAA,CACF;CACF;AAED,MAAM,OAAgB,wBAAwB;IAgBlC,MAAM,CACd,GAAG,MAAyC,EAC3B;QACjB,OAAO,MAAM,CAAC,GAAG,MAAM,CAAC,CAAA;IAAA,CACzB;CACF"}
|
|
@@ -5,87 +5,87 @@ import { ProtocolVersionInterface } from '../protocol.ts';
|
|
|
5
5
|
export declare class ProtocolVersion1 extends ProtocolVersionInterface {
|
|
6
6
|
version: ProtocolVersion;
|
|
7
7
|
decodeMessage(context: MessageContext, buffer: Buffer): {
|
|
8
|
-
callId?: undefined;
|
|
9
|
-
nonce?: undefined;
|
|
10
|
-
size?: undefined;
|
|
11
|
-
chunk?: undefined;
|
|
12
|
-
streamId?: undefined;
|
|
13
|
-
reason?: undefined;
|
|
14
8
|
type: ClientMessageType.Rpc;
|
|
15
9
|
rpc: {
|
|
16
10
|
callId: number;
|
|
17
11
|
procedure: string;
|
|
18
12
|
payload: unknown;
|
|
19
13
|
};
|
|
20
|
-
|
|
14
|
+
callId?: undefined;
|
|
21
15
|
nonce?: undefined;
|
|
22
16
|
size?: undefined;
|
|
23
|
-
|
|
17
|
+
reason?: undefined;
|
|
24
18
|
streamId?: undefined;
|
|
19
|
+
chunk?: undefined;
|
|
20
|
+
} | {
|
|
25
21
|
rpc?: undefined;
|
|
26
22
|
type: ClientMessageType.RpcAbort;
|
|
27
23
|
callId: number;
|
|
28
24
|
reason: string | undefined;
|
|
29
|
-
|
|
30
|
-
callId?: undefined;
|
|
25
|
+
nonce?: undefined;
|
|
31
26
|
size?: undefined;
|
|
32
|
-
chunk?: undefined;
|
|
33
27
|
streamId?: undefined;
|
|
34
|
-
|
|
28
|
+
chunk?: undefined;
|
|
29
|
+
} | {
|
|
35
30
|
rpc?: undefined;
|
|
31
|
+
callId?: undefined;
|
|
36
32
|
type: ClientMessageType.Ping;
|
|
37
33
|
nonce: number;
|
|
38
|
-
} | {
|
|
39
|
-
callId?: undefined;
|
|
40
34
|
size?: undefined;
|
|
41
|
-
chunk?: undefined;
|
|
42
|
-
streamId?: undefined;
|
|
43
35
|
reason?: undefined;
|
|
36
|
+
streamId?: undefined;
|
|
37
|
+
chunk?: undefined;
|
|
38
|
+
} | {
|
|
44
39
|
rpc?: undefined;
|
|
40
|
+
callId?: undefined;
|
|
45
41
|
type: ClientMessageType.Pong;
|
|
46
42
|
nonce: number;
|
|
47
|
-
} | {
|
|
48
|
-
callId?: undefined;
|
|
49
|
-
nonce?: undefined;
|
|
50
43
|
size?: undefined;
|
|
44
|
+
reason?: undefined;
|
|
45
|
+
streamId?: undefined;
|
|
51
46
|
chunk?: undefined;
|
|
47
|
+
} | {
|
|
52
48
|
rpc?: undefined;
|
|
49
|
+
callId?: undefined;
|
|
50
|
+
nonce?: undefined;
|
|
53
51
|
type: ClientMessageType.ServerStreamAbort;
|
|
54
52
|
streamId: number;
|
|
55
53
|
reason: string | undefined;
|
|
54
|
+
size?: undefined;
|
|
55
|
+
chunk?: undefined;
|
|
56
56
|
} | {
|
|
57
|
+
rpc?: undefined;
|
|
57
58
|
callId?: undefined;
|
|
58
59
|
nonce?: undefined;
|
|
59
|
-
chunk?: undefined;
|
|
60
|
-
reason?: undefined;
|
|
61
|
-
rpc?: undefined;
|
|
62
60
|
type: ClientMessageType.ServerStreamPull;
|
|
63
61
|
streamId: number;
|
|
64
62
|
size: number;
|
|
63
|
+
reason?: undefined;
|
|
64
|
+
chunk?: undefined;
|
|
65
65
|
} | {
|
|
66
|
+
rpc?: undefined;
|
|
66
67
|
callId?: undefined;
|
|
67
68
|
nonce?: undefined;
|
|
68
69
|
size?: undefined;
|
|
69
|
-
chunk?: undefined;
|
|
70
|
-
rpc?: undefined;
|
|
71
70
|
type: ClientMessageType.ClientStreamAbort;
|
|
72
71
|
streamId: number;
|
|
73
72
|
reason: string | undefined;
|
|
73
|
+
chunk?: undefined;
|
|
74
74
|
} | {
|
|
75
|
+
rpc?: undefined;
|
|
75
76
|
callId?: undefined;
|
|
76
77
|
nonce?: undefined;
|
|
77
78
|
size?: undefined;
|
|
78
|
-
chunk?: undefined;
|
|
79
79
|
reason?: undefined;
|
|
80
|
-
rpc?: undefined;
|
|
81
80
|
type: ClientMessageType.ClientStreamEnd;
|
|
82
81
|
streamId: number;
|
|
82
|
+
chunk?: undefined;
|
|
83
83
|
} | {
|
|
84
|
+
rpc?: undefined;
|
|
84
85
|
callId?: undefined;
|
|
85
86
|
nonce?: undefined;
|
|
86
87
|
size?: undefined;
|
|
87
88
|
reason?: undefined;
|
|
88
|
-
rpc?: undefined;
|
|
89
89
|
type: ClientMessageType.ClientStreamPush;
|
|
90
90
|
streamId: number;
|
|
91
91
|
chunk: Buffer<ArrayBufferLike>;
|
package/package.json
CHANGED
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"hookable": "6.1.0",
|
|
24
|
-
"@nmtjs/common": "0.16.0-beta.
|
|
25
|
-
"@nmtjs/
|
|
26
|
-
"@nmtjs/
|
|
24
|
+
"@nmtjs/common": "0.16.0-beta.4",
|
|
25
|
+
"@nmtjs/contract": "0.16.0-beta.4",
|
|
26
|
+
"@nmtjs/type": "0.16.0-beta.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@nmtjs/core": "0.16.0-beta.
|
|
29
|
+
"@nmtjs/core": "0.16.0-beta.4"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@nmtjs/
|
|
33
|
-
"@nmtjs/
|
|
34
|
-
"@nmtjs/
|
|
35
|
-
"@nmtjs/
|
|
32
|
+
"@nmtjs/contract": "0.16.0-beta.4",
|
|
33
|
+
"@nmtjs/core": "0.16.0-beta.4",
|
|
34
|
+
"@nmtjs/type": "0.16.0-beta.4",
|
|
35
|
+
"@nmtjs/common": "0.16.0-beta.4"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"dist",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"LICENSE.md",
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
|
-
"version": "0.16.0-beta.
|
|
43
|
+
"version": "0.16.0-beta.4",
|
|
44
44
|
"scripts": {
|
|
45
45
|
"clean-build": "rm -rf ./dist"
|
|
46
46
|
}
|
package/src/client/protocol.ts
CHANGED
|
@@ -105,6 +105,11 @@ export class ProtocolError extends Error implements BaseProtocolError {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
toJSON() {
|
|
108
|
-
return {
|
|
108
|
+
return {
|
|
109
|
+
name: this.code,
|
|
110
|
+
message: this.message,
|
|
111
|
+
data: this.data,
|
|
112
|
+
code: this.code,
|
|
113
|
+
}
|
|
109
114
|
}
|
|
110
115
|
}
|
package/src/server/protocol.ts
CHANGED
|
@@ -26,7 +26,12 @@ export class ProtocolError extends Error implements BaseProtocolError {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
toJSON() {
|
|
29
|
-
return {
|
|
29
|
+
return {
|
|
30
|
+
name: this.code,
|
|
31
|
+
message: this.message,
|
|
32
|
+
data: this.data,
|
|
33
|
+
code: this.code,
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
37
|
|