@irpclib/irpc 0.0.2 → 1.0.0-beta.16

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/module.js CHANGED
@@ -1,168 +1,176 @@
1
- import { batch } from "./batch.js";
2
- import { IRPCCall } from "./call.js";
1
+ import { IRPCCacher } from "./cache.js";
2
+ import { ERROR_CODE, ERROR_MESSAGE } from "./error.js";
3
+ import { IRPCTransport } from "./transport.js";
3
4
 
4
5
  //#region src/module.ts
5
6
  const DEFAULT_TIMEOUT = 2e4;
7
+ const NAME_CONSTRAINT = /^[a-zA-Z0-9_]+$/;
8
+ const VERSION_CONSTRAINT = /^[0-9]+\.[0-9]+\.[0-9]+$/;
6
9
  /**
7
- * Creates an IRPC module with the given configuration.
8
- *
9
- * This function initializes a new IRPC module with a store for tracking RPC calls,
10
- * a registry for mapping functions to their specifications, and various methods
11
- * for managing and executing remote procedure calls.
12
- *
13
- * @param config - Optional partial configuration for the IRPC module, excluding 'submit' and 'transport'
14
- * @returns An IRPC factory function with attached utility methods
10
+ * IRPCPackage represents a package containing multiple IRPC (Isomorphic-RPC) specifications
11
+ * and their corresponding stubs. It manages the configuration, transport, and execution
12
+ * of remote procedure calls.
15
13
  */
16
- function createModule(config) {
17
- const store = /* @__PURE__ */ new Map();
18
- const registry = /* @__PURE__ */ new WeakMap();
19
- const module = {
14
+ var IRPCPackage = class {
15
+ /**
16
+ * A map storing all IRPC specifications by their names
17
+ */
18
+ specs = /* @__PURE__ */ new Map();
19
+ /**
20
+ * A weak map linking stub functions to their corresponding specifications
21
+ */
22
+ stubs = /* @__PURE__ */ new WeakMap();
23
+ /**
24
+ * A map storing caches for each IRPC Entry
25
+ */
26
+ cache = /* @__PURE__ */ new WeakMap();
27
+ /**
28
+ * Configuration object for the IRPC package
29
+ */
30
+ config = {
20
31
  name: "global",
21
32
  version: "1.0.0",
22
- timeout: DEFAULT_TIMEOUT,
23
- ...config
33
+ timeout: DEFAULT_TIMEOUT
24
34
  };
25
35
  /**
26
- * Factory function that creates IRPC handlers based on specifications.
27
- * Each handler can either execute a local function or make a remote call.
36
+ * Gets the href URL for this package in the format "name/version"
28
37
  */
29
- const factory = ((spec) => {
30
- const host = { ...spec };
31
- store.set(host.name, host);
32
- const fn = ((...args) => {
33
- if (typeof host.handler === "function") return host.handler(...args);
34
- else return remoteCall(module, host, ...args);
35
- });
36
- registry.set(fn, host);
37
- return fn;
38
- });
38
+ get href() {
39
+ return [this.config.name, this.config.version].join("/");
40
+ }
39
41
  /**
40
- * Returns the namespace information of the module (name and version).
42
+ * Gets the package information (name, version, and optional description)
41
43
  */
42
- Object.defineProperty(factory, "namespace", { get: () => ({
43
- name: module.name,
44
- version: module.version
45
- }) });
44
+ get info() {
45
+ const { name, version, description } = this.config;
46
+ return {
47
+ name,
48
+ version,
49
+ description
50
+ };
51
+ }
46
52
  /**
47
- * Returns the endpoint URL for the module.
48
- * @type {(prefix?: string) => string}
53
+ * Gets the transport mechanism used for remote calls
49
54
  */
50
- factory.endpoint = ((prefix = "irpc") => {
51
- return [
52
- "/",
53
- prefix,
54
- module.name,
55
- module.version
56
- ].join("/").replace(/\/+/g, "/");
57
- });
55
+ get transport() {
56
+ return this.config.transport;
57
+ }
58
58
  /**
59
- * Associates a handler function with an IRPC specification.
60
- * @param irpc - The IRPC function to construct
61
- * @param handler - The actual implementation of the IRPC function
59
+ * Creates a new IRPCPackage instance
60
+ * @param config - Optional partial configuration for the package
61
+ * @throws Error if the package name or version doesn't match the required format
62
62
  */
63
- factory.construct = ((irpc, handler) => {
64
- if (typeof irpc !== "function") throw new Error("Invalid IRPC.");
65
- const host = registry.get(irpc);
66
- if (!host) throw new Error("IRPC can not be found.");
67
- host.handler = handler;
68
- });
63
+ constructor(config) {
64
+ this.configure(config ?? {});
65
+ }
69
66
  /**
70
- * Sets the transport mechanism for the module.
71
- * @param transport - The transport layer to use for remote calls
67
+ * Declares a new IRPC specification and creates a corresponding stub function
68
+ * @param init - The initialization object containing the IRPC specification
69
+ * @returns A stub function that can be used to call the IRPC
70
+ * @throws Error if an IRPC with the same name already exists
72
71
  */
73
- factory.use = ((transport) => {
74
- if (typeof transport?.send !== "function") throw new Error("Invalid transport.");
75
- module.transport = transport;
76
- });
72
+ declare(init) {
73
+ if (this.specs.has(init.name)) throw new Error(`IRPC ${init.name} already exists.`);
74
+ const spec = { ...init };
75
+ const caches = new IRPCCacher();
76
+ const timeout = spec.timeout ?? this.config.timeout;
77
+ const stub = (async (...args) => {
78
+ if (typeof spec.handler === "function") return spec.handler(...args);
79
+ if (!this.transport) throw new Error(ERROR_MESSAGE[ERROR_CODE.TRANSPORT_MISSING]);
80
+ if (spec.maxAge) {
81
+ const key = JSON.stringify(args);
82
+ const cache = caches.get(key);
83
+ if (cache) return cache.value;
84
+ const data = await this.transport.call(spec, args, timeout);
85
+ caches.set(key, data, spec.maxAge);
86
+ return data;
87
+ }
88
+ return await this.transport.call(spec, args, timeout);
89
+ });
90
+ this.specs.set(init.name, spec);
91
+ this.stubs.set(stub, spec);
92
+ this.cache.set(stub, caches);
93
+ return stub;
94
+ }
77
95
  /**
78
- * Retrieves an IRPC specification by name.
79
- * @param name - The name of the IRPC to retrieve
80
- * @returns The IRPC specification or undefined if not found
96
+ * Resolves and executes an IRPC call based on a request object
97
+ * @param req - The request containing the IRPC name and arguments
98
+ * @returns The result of the IRPC execution
99
+ * @throws Error if the IRPC doesn't exist or doesn't have an implementation
100
+ */
101
+ async resolve(req) {
102
+ const spec = this.specs.get(req.name);
103
+ if (!spec) return Promise.reject(/* @__PURE__ */ new Error(`IRPC ${req.name} does not exist.`));
104
+ if (typeof spec.handler !== "function") return Promise.reject(/* @__PURE__ */ new Error(`IRPC ${req.name} does not have an implementation.`));
105
+ return await spec.handler(...req.args);
106
+ }
107
+ /**
108
+ * Associates a handler function with a stub function
109
+ * @param stub - The stub function created by declare()
110
+ * @param handler - The actual implementation function
111
+ * @returns This IRPCPackage instance for chaining
112
+ * @throws Error if the stub or handler is invalid, or if no IRPC exists for the stub
81
113
  */
82
- factory.get = ((name) => {
83
- return store.get(name);
84
- });
114
+ construct(stub, handler) {
115
+ if (typeof stub !== "function") throw new Error(ERROR_MESSAGE[ERROR_CODE.STUB_INVALID]);
116
+ if (typeof handler !== "function") throw new Error(ERROR_MESSAGE[ERROR_CODE.INVALID_HANDLER]);
117
+ const spec = this.stubs.get(stub);
118
+ if (!spec?.name) throw new Error(ERROR_MESSAGE[ERROR_CODE.NOT_FOUND]);
119
+ spec.handler = handler;
120
+ return this;
121
+ }
85
122
  /**
86
- * Updates the module configuration.
87
- * @param config - Configuration properties to update
123
+ * Sets the transport mechanism for this package
124
+ * @param transport - The transport instance to use for remote calls
125
+ * @returns This IRPCPackage instance for chaining
126
+ * @throws Error if the transport is not a valid Transport instance
88
127
  */
89
- factory.configure = ((config$1) => {
90
- Object.assign(module, { ...config$1 });
91
- });
128
+ use(transport) {
129
+ if (!(transport instanceof IRPCTransport)) throw new Error(ERROR_MESSAGE[ERROR_CODE.TRANSPORT_INVALID]);
130
+ this.config.transport = transport;
131
+ return this;
132
+ }
92
133
  /**
93
- * Retrieves information about an IRPC by its request details.
94
- * @param req - Request containing the name of the IRPC to look up
134
+ * Retrieves an IRPC specification by name or request object
135
+ * @param query - Either a string name or an IRPCRequest object
95
136
  * @returns The IRPC specification or undefined if not found
96
137
  */
97
- factory.info = ((req) => {
98
- return store.get(req.name);
99
- });
138
+ get(query) {
139
+ if (typeof query === "string") return this.specs.get(query);
140
+ return this.specs.get(query.name);
141
+ }
100
142
  /**
101
- * Resolves and executes an IRPC call with the provided arguments.
102
- * @param req - Request containing the name and arguments for the IRPC call
103
- * @returns The result of executing the IRPC handler
143
+ * Updates the package configuration
144
+ * @param config - Partial configuration object with properties to update
145
+ * @returns This IRPCPackage instance for chaining
146
+ * @throws Error if the provided name or version is invalid
104
147
  */
105
- factory.resolve = ((req) => {
106
- const host = store.get(req.name);
107
- if (!host) throw new Error("IRPC can not be found.");
108
- if (!host.handler) throw new Error("IRPC handler can not be found.");
109
- return host.handler(...req.args);
110
- });
148
+ configure(config) {
149
+ if (config.name && !NAME_CONSTRAINT.test(config.name)) throw new Error(`Invalid IRPC name: ${config.name}`);
150
+ if (config.version && !VERSION_CONSTRAINT.test(config.version)) throw new Error(`Invalid IRPC version: ${config.version}`);
151
+ Object.assign(this.config, config);
152
+ return this;
153
+ }
111
154
  /**
112
- * Submits a batch of IRPC calls for execution via the transport layer.
113
- * @param calls - Array of IRPC calls to submit
155
+ * Invalidates the cache for a specific stub and arguments combination
156
+ * @param stub - The IRPC stub function whose cache needs to be invalidated
157
+ * @param args - The arguments array used as cache key
114
158
  */
115
- module.submit = ((calls) => {
116
- try {
117
- const promise = module.transport.send(calls);
118
- if (promise instanceof Promise) promise.catch((reason) => {
119
- calls.forEach((call) => {
120
- call.reject(reason);
121
- });
122
- });
123
- } catch (error) {
124
- calls.forEach((call) => {
125
- call.reject(error);
126
- });
127
- }
128
- });
129
- return factory;
130
- }
159
+ invalidate(stub, ...args) {
160
+ const caches = this.cache.get(stub);
161
+ if (!caches) return;
162
+ if (args.length) caches.delete(JSON.stringify(args));
163
+ else caches.clear();
164
+ }
165
+ };
131
166
  /**
132
- * Executes a remote procedure call through the configured transport layer.
133
- *
134
- * This function creates an IRPC call payload and sends it through the module's transport mechanism.
135
- * It handles timeouts and promise resolution/rejection based on the response.
136
- *
137
- * @param module - The IRPC module containing transport and configuration
138
- * @param spec - The IRPC specification defining the remote procedure
139
- * @param args - Arguments to pass to the remote procedure
140
- * @returns A promise that resolves with the remote call result or rejects with an error
141
- * @throws Error if no transport is configured or if the call times out
167
+ * Creates a new IRPCPackage instance with the given configuration
168
+ * @param config - Optional partial configuration for the package
169
+ * @returns A new IRPCPackage instance
142
170
  */
143
- function remoteCall(module, spec, ...args) {
144
- const payload = {
145
- name: spec.name,
146
- args
147
- };
148
- return new Promise((resolve, reject) => {
149
- if (!module.transport) {
150
- reject(/* @__PURE__ */ new Error("IRPC transport can not be found."));
151
- return;
152
- }
153
- const timeout = module.timeout ? setTimeout(() => {
154
- call.reject(/* @__PURE__ */ new Error("IRPC timeout."));
155
- }, module.timeout) : void 0;
156
- const call = new IRPCCall(payload, (value) => {
157
- resolve(value);
158
- clearTimeout(timeout);
159
- }, (reason) => {
160
- reject(reason);
161
- clearTimeout(timeout);
162
- });
163
- batch(call, module.submit);
164
- });
171
+ function createPackage(config) {
172
+ return new IRPCPackage(config);
165
173
  }
166
174
 
167
175
  //#endregion
168
- export { createModule };
176
+ export { IRPCPackage, createPackage };
@@ -0,0 +1,61 @@
1
+ import { IRPCDataSchema, IRPCError, IRPCInputs, IRPCOutput, IRPCRequest, IRPCResponse, IRPCSpec } from "./types.js";
2
+ import { IRPCPackage } from "./module.js";
3
+
4
+ //#region src/resolver.d.ts
5
+
6
+ /**
7
+ * Resolver class for handling IRPC requests
8
+ *
9
+ * This class is responsible for resolving IRPC requests by validating inputs,
10
+ * executing the requested method, and formatting the response.
11
+ */
12
+ declare class IRPCResolver {
13
+ req: IRPCRequest;
14
+ module: IRPCPackage;
15
+ /**
16
+ * Getter for the specification of the RPC method
17
+ *
18
+ * Retrieves the specification of the RPC method from the module based on the request
19
+ */
20
+ get spec(): IRPCSpec<IRPCInputs, IRPCDataSchema> | undefined;
21
+ /**
22
+ * Creates a new IRPCResolver instance
23
+ *
24
+ * @param req - The IRPC request object containing id, name and arguments
25
+ * @param module - The IRPC package module that contains the method to be executed
26
+ */
27
+ constructor(req: IRPCRequest, module: IRPCPackage);
28
+ /**
29
+ * Resolves an IRPC request
30
+ *
31
+ * This method validates the request, parses inputs according to the schema,
32
+ * and forwards the request to the appropriate handler.
33
+ *
34
+ * @returns A promise that resolves to an IRPC response with either the result or an error
35
+ */
36
+ resolve(): Promise<IRPCResponse>;
37
+ /**
38
+ * Forwards a validated request to the module's resolver
39
+ *
40
+ * @param req - The validated IRPC request object
41
+ * @param schema - Optional output schema for result validation
42
+ * @returns A promise that resolves to an IRPC response with the result or an error
43
+ */
44
+ forward({
45
+ id,
46
+ name,
47
+ args
48
+ }: IRPCRequest, schema?: IRPCOutput): Promise<{
49
+ id: string;
50
+ name: string;
51
+ result: string | number | boolean | IRPCDataSchema | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | null | undefined)[] | null | undefined;
52
+ error?: undefined;
53
+ } | {
54
+ id: string;
55
+ name: string;
56
+ error: IRPCError;
57
+ result?: undefined;
58
+ }>;
59
+ }
60
+ //#endregion
61
+ export { IRPCResolver };
@@ -0,0 +1,143 @@
1
+ import { ERROR_CODE } from "./error.js";
2
+
3
+ //#region src/resolver.ts
4
+ /**
5
+ * Resolver class for handling IRPC requests
6
+ *
7
+ * This class is responsible for resolving IRPC requests by validating inputs,
8
+ * executing the requested method, and formatting the response.
9
+ */
10
+ var IRPCResolver = class {
11
+ /**
12
+ * Getter for the specification of the RPC method
13
+ *
14
+ * Retrieves the specification of the RPC method from the module based on the request
15
+ */
16
+ get spec() {
17
+ return this.module.get(this.req);
18
+ }
19
+ /**
20
+ * Creates a new IRPCResolver instance
21
+ *
22
+ * @param req - The IRPC request object containing id, name and arguments
23
+ * @param module - The IRPC package module that contains the method to be executed
24
+ */
25
+ constructor(req, module) {
26
+ this.req = req;
27
+ this.module = module;
28
+ }
29
+ /**
30
+ * Resolves an IRPC request
31
+ *
32
+ * This method validates the request, parses inputs according to the schema,
33
+ * and forwards the request to the appropriate handler.
34
+ *
35
+ * @returns A promise that resolves to an IRPC response with either the result or an error
36
+ */
37
+ async resolve() {
38
+ const { id, name, args } = this.req;
39
+ if (!this.spec) return {
40
+ id,
41
+ name,
42
+ error: {
43
+ code: ERROR_CODE.NOT_FOUND,
44
+ message: `IRPC "${name}" does not exist.`
45
+ }
46
+ };
47
+ const { schema } = this.spec;
48
+ const inputs = parseInput(args, schema?.input);
49
+ if (!inputs.success) return {
50
+ id,
51
+ name,
52
+ error: {
53
+ code: ERROR_CODE.INVALID_INPUT,
54
+ message: inputs.error
55
+ }
56
+ };
57
+ return this.forward({
58
+ id,
59
+ name,
60
+ args: inputs.data
61
+ }, schema?.output);
62
+ }
63
+ /**
64
+ * Forwards a validated request to the module's resolver
65
+ *
66
+ * @param req - The validated IRPC request object
67
+ * @param schema - Optional output schema for result validation
68
+ * @returns A promise that resolves to an IRPC response with the result or an error
69
+ */
70
+ async forward({ id, name, args }, schema) {
71
+ try {
72
+ const output = parseOutput(await this.module.resolve({
73
+ id,
74
+ name,
75
+ args
76
+ }), schema);
77
+ if (output.success) return {
78
+ id,
79
+ name,
80
+ result: output.data
81
+ };
82
+ else return {
83
+ id,
84
+ name,
85
+ error: {
86
+ code: ERROR_CODE.INVALID_OUTPUT,
87
+ message: output.error?.message
88
+ }
89
+ };
90
+ } catch (error) {
91
+ return {
92
+ id,
93
+ name,
94
+ error: {
95
+ code: ERROR_CODE.UNKNOWN,
96
+ message: error.message
97
+ }
98
+ };
99
+ }
100
+ }
101
+ };
102
+ /**
103
+ * Parses and validates input arguments against their schemas
104
+ *
105
+ * @param args - Array of input arguments
106
+ * @param schema - Optional schema for validating the arguments
107
+ * @returns Parsed result with success status and any error messages
108
+ */
109
+ function parseInput(args, schema) {
110
+ if (schema && args.length !== schema.length) return {
111
+ data: args,
112
+ success: false,
113
+ error: "Invalid arguments"
114
+ };
115
+ const parsed = args.map((arg, i) => {
116
+ const input = schema?.[i];
117
+ return input ? input.safeParse(arg) : {
118
+ success: true,
119
+ data: arg
120
+ };
121
+ });
122
+ return {
123
+ data: parsed.map((arg) => arg.data),
124
+ error: parsed.filter((arg) => !arg.success).map((arg) => arg.error?.message).join("\n"),
125
+ success: parsed.every((arg) => arg.success)
126
+ };
127
+ }
128
+ /**
129
+ * Parses and validates output result against its schema
130
+ *
131
+ * @param result - The result to validate
132
+ * @param schema - Optional schema for validating the result
133
+ * @returns Parsed result with success status and any error messages
134
+ */
135
+ function parseOutput(result, schema) {
136
+ return schema ? schema.safeParse(result) : {
137
+ success: true,
138
+ data: result
139
+ };
140
+ }
141
+
142
+ //#endregion
143
+ export { IRPCResolver };
@@ -0,0 +1,45 @@
1
+ import { IRPCData, IRPCInputs, IRPCOutput, IRPCSpec, TransportConfig } from "./types.js";
2
+ import { IRPCCall } from "./call.js";
3
+
4
+ //#region src/transport.d.ts
5
+
6
+ /**
7
+ * IRPCTransport is responsible for managing and dispatching RPC calls.
8
+ * It handles queuing, debouncing, and timeout management for RPC requests.
9
+ */
10
+ declare class IRPCTransport {
11
+ config?: TransportConfig | undefined;
12
+ /**
13
+ * A set of pending RPC calls that are queued for execution.
14
+ */
15
+ queue: Set<IRPCCall>;
16
+ /**
17
+ * Creates a new IRPCTransport instance.
18
+ * @param config - Optional transport configuration including timeout and debounce settings.
19
+ */
20
+ constructor(config?: TransportConfig | undefined);
21
+ /**
22
+ * Initiates an RPC call with the given specification and arguments.
23
+ * @param spec - The RPC specification defining the method to call.
24
+ * @param args - An array of arguments to pass to the RPC method.
25
+ * @param timeout - Optional timeout value for the RPC call.
26
+ * @returns A promise that resolves with the RPC response data or rejects with an error.
27
+ */
28
+ call(spec: IRPCSpec<IRPCInputs, IRPCOutput>, args: IRPCData[], timeout?: number | undefined): Promise<IRPCData>;
29
+ /**
30
+ * Schedules an RPC call for execution, implementing debouncing logic.
31
+ * Queued calls will be dispatched after the configured debounce delay.
32
+ * @param call - The RPC call to schedule.
33
+ */
34
+ protected schedule(call: IRPCCall): void;
35
+ /**
36
+ * Dispatches a batch of RPC calls. This base implementation rejects all calls
37
+ * with a "not implemented" error. Subclasses should override this method to
38
+ * provide actual transport mechanism.
39
+ * @param calls - An array of RPC calls to dispatch.
40
+ * @returns A promise that resolves when all calls have been processed.
41
+ */
42
+ protected dispatch(calls: IRPCCall[]): Promise<void>;
43
+ }
44
+ //#endregion
45
+ export { IRPCTransport };
@@ -0,0 +1,74 @@
1
+ import { IRPCCall } from "./call.js";
2
+ import { ERROR_CODE, ERROR_MESSAGE } from "./error.js";
3
+
4
+ //#region src/transport.ts
5
+ /**
6
+ * IRPCTransport is responsible for managing and dispatching RPC calls.
7
+ * It handles queuing, debouncing, and timeout management for RPC requests.
8
+ */
9
+ var IRPCTransport = class {
10
+ /**
11
+ * A set of pending RPC calls that are queued for execution.
12
+ */
13
+ queue = /* @__PURE__ */ new Set();
14
+ /**
15
+ * Creates a new IRPCTransport instance.
16
+ * @param config - Optional transport configuration including timeout and debounce settings.
17
+ */
18
+ constructor(config) {
19
+ this.config = config;
20
+ }
21
+ /**
22
+ * Initiates an RPC call with the given specification and arguments.
23
+ * @param spec - The RPC specification defining the method to call.
24
+ * @param args - An array of arguments to pass to the RPC method.
25
+ * @param timeout - Optional timeout value for the RPC call.
26
+ * @returns A promise that resolves with the RPC response data or rejects with an error.
27
+ */
28
+ call(spec, args, timeout = this.config?.timeout) {
29
+ const payload = {
30
+ name: spec.name,
31
+ args
32
+ };
33
+ return new Promise((resolve, reject) => {
34
+ const timer = timeout ? setTimeout(() => {
35
+ call.reject(new Error(ERROR_MESSAGE[ERROR_CODE.TIMEOUT]));
36
+ }, timeout) : void 0;
37
+ const call = new IRPCCall(payload, (value) => {
38
+ resolve(value);
39
+ clearTimeout(timer);
40
+ }, (reason) => {
41
+ reject(reason);
42
+ clearTimeout(timer);
43
+ }, timeout);
44
+ this.schedule(call);
45
+ });
46
+ }
47
+ /**
48
+ * Schedules an RPC call for execution, implementing debouncing logic.
49
+ * Queued calls will be dispatched after the configured debounce delay.
50
+ * @param call - The RPC call to schedule.
51
+ */
52
+ schedule(call) {
53
+ if (!this.queue.size) setTimeout(() => {
54
+ this.dispatch(Array.from(this.queue));
55
+ this.queue.clear();
56
+ }, this.config?.debounce ?? 0);
57
+ this.queue.add(call);
58
+ }
59
+ /**
60
+ * Dispatches a batch of RPC calls. This base implementation rejects all calls
61
+ * with a "not implemented" error. Subclasses should override this method to
62
+ * provide actual transport mechanism.
63
+ * @param calls - An array of RPC calls to dispatch.
64
+ * @returns A promise that resolves when all calls have been processed.
65
+ */
66
+ async dispatch(calls) {
67
+ calls.forEach((call) => {
68
+ call.reject(new Error(ERROR_MESSAGE[ERROR_CODE.TRANSPORT_NOT_IMPLEMENTED]));
69
+ });
70
+ }
71
+ };
72
+
73
+ //#endregion
74
+ export { IRPCTransport };