phecda-server 7.0.0-alpha.11 → 7.0.0-alpha.12
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/{chunk-G7JFKM2M.js → chunk-IJFIY6QN.js} +1 -9
- package/dist/{chunk-Z7NAAE4M.mjs → chunk-VX4BZEL7.mjs} +0 -8
- package/dist/{core-CUTbX_IS.d.ts → core-CDzIy2g0.d.ts} +1 -1
- package/dist/{core-DIfgUKIU.d.mts → core-jUg1HvYT.d.mts} +1 -1
- package/dist/helper.d.mts +2 -4
- package/dist/helper.d.ts +2 -4
- package/dist/helper.js +2 -4
- package/dist/helper.mjs +1 -3
- package/dist/http/elysia/index.d.mts +3 -3
- package/dist/http/elysia/index.d.ts +3 -3
- package/dist/http/elysia/index.js +18 -17
- package/dist/http/elysia/index.mjs +2 -1
- package/dist/http/express/index.d.mts +3 -3
- package/dist/http/express/index.d.ts +3 -3
- package/dist/http/express/index.js +17 -16
- package/dist/http/express/index.mjs +2 -1
- package/dist/http/fastify/index.d.mts +3 -3
- package/dist/http/fastify/index.d.ts +3 -3
- package/dist/http/fastify/index.js +17 -16
- package/dist/http/fastify/index.mjs +2 -1
- package/dist/http/h3/index.d.mts +3 -3
- package/dist/http/h3/index.d.ts +3 -3
- package/dist/http/h3/index.js +18 -17
- package/dist/http/h3/index.mjs +2 -1
- package/dist/http/hono/index.d.mts +3 -3
- package/dist/http/hono/index.d.ts +3 -3
- package/dist/http/hono/index.js +15 -14
- package/dist/http/hono/index.mjs +2 -1
- package/dist/http/hyper-express/index.d.mts +3 -3
- package/dist/http/hyper-express/index.d.ts +3 -3
- package/dist/http/hyper-express/index.js +16 -15
- package/dist/http/hyper-express/index.mjs +2 -1
- package/dist/http/koa/index.d.mts +3 -3
- package/dist/http/koa/index.d.ts +3 -3
- package/dist/http/koa/index.js +17 -16
- package/dist/http/koa/index.mjs +2 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +19 -19
- package/dist/index.mjs +1 -1
- package/dist/{meta-CR-D39hQ.d.mts → meta-xvg6V7pH.d.mts} +2 -19
- package/dist/{meta-CR-D39hQ.d.ts → meta-xvg6V7pH.d.ts} +2 -19
- package/dist/rpc/bullmq/index.d.mts +4 -6
- package/dist/rpc/bullmq/index.d.ts +4 -6
- package/dist/rpc/bullmq/index.js +7 -75
- package/dist/rpc/bullmq/index.mjs +3 -71
- package/dist/rpc/kafka/index.d.mts +4 -9
- package/dist/rpc/kafka/index.d.ts +4 -9
- package/dist/rpc/kafka/index.js +7 -86
- package/dist/rpc/kafka/index.mjs +3 -82
- package/dist/rpc/nats/index.d.mts +4 -6
- package/dist/rpc/nats/index.d.ts +4 -6
- package/dist/rpc/nats/index.js +7 -67
- package/dist/rpc/nats/index.mjs +2 -62
- package/dist/rpc/rabbitmq/index.d.mts +4 -6
- package/dist/rpc/rabbitmq/index.d.ts +4 -6
- package/dist/rpc/rabbitmq/index.js +7 -73
- package/dist/rpc/rabbitmq/index.mjs +3 -69
- package/dist/rpc/redis/index.d.mts +4 -9
- package/dist/rpc/redis/index.d.ts +4 -9
- package/dist/rpc/redis/index.js +7 -74
- package/dist/rpc/redis/index.mjs +3 -70
- package/dist/test.d.mts +7 -3
- package/dist/test.d.ts +7 -3
- package/dist/types-6qaaUIKZ.d.mts +14 -0
- package/dist/{types-BF1TDbFV.d.ts → types-B-1OL-3P.d.ts} +1 -1
- package/dist/types-BtXOT5rI.d.ts +14 -0
- package/dist/{types-DYviSl5B.d.mts → types-Ctd6pLNE.d.mts} +1 -1
- package/package.json +1 -1
- package/register/loader.mjs +0 -9
- package/dist/types-DYRu0vic.d.ts +0 -19
- package/dist/types-DqH1qA-q.d.mts +0 -19
package/dist/rpc/redis/index.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var _chunkG7JFKM2Mjs = require('../../chunk-G7JFKM2M.js');
|
|
5
|
+
var _chunkIJFIY6QNjs = require('../../chunk-IJFIY6QN.js');
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
|
|
@@ -14,19 +13,19 @@ var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
|
|
14
13
|
var debug = _debug2.default.call(void 0, "phecda-server/redis");
|
|
15
14
|
function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
|
|
16
15
|
const { globalGuards, globalFilter, globalPipe, globalAddons = [], defaultQueue } = opts;
|
|
17
|
-
const metaMap =
|
|
16
|
+
const metaMap = _chunkIJFIY6QNjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
18
17
|
const { controller, rpc, func, tag } = meta2.data;
|
|
19
18
|
if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
|
|
20
19
|
debug(`register method "${func}" in module "${tag}"`);
|
|
21
20
|
return true;
|
|
22
21
|
}
|
|
23
22
|
});
|
|
24
|
-
|
|
23
|
+
_chunkIJFIY6QNjs.detectAopDep.call(void 0, meta, {
|
|
25
24
|
guards: globalGuards,
|
|
26
25
|
addons: globalAddons
|
|
27
26
|
}, "rpc");
|
|
28
27
|
const existQueue = /* @__PURE__ */ new Set();
|
|
29
|
-
|
|
28
|
+
_chunkIJFIY6QNjs.Context.applyAddons(globalAddons, {
|
|
30
29
|
pub,
|
|
31
30
|
sub
|
|
32
31
|
}, "redis");
|
|
@@ -55,12 +54,12 @@ function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
|
|
|
55
54
|
if (_ps !== 1) return;
|
|
56
55
|
const meta2 = metaMap.get(tag)[func];
|
|
57
56
|
const { data: { rpc: { isEvent } = {} } } = meta2;
|
|
58
|
-
const aop =
|
|
57
|
+
const aop = _chunkIJFIY6QNjs.Context.getAop(meta2, {
|
|
59
58
|
globalFilter,
|
|
60
59
|
globalGuards,
|
|
61
60
|
globalPipe
|
|
62
61
|
});
|
|
63
|
-
const context = new (0,
|
|
62
|
+
const context = new (0, _chunkIJFIY6QNjs.Context)({
|
|
64
63
|
type: "redis",
|
|
65
64
|
category: "rpc",
|
|
66
65
|
moduleMap,
|
|
@@ -99,71 +98,5 @@ function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
|
|
|
99
98
|
}
|
|
100
99
|
_chunk4LLLQOMFjs.__name.call(void 0, bind, "bind");
|
|
101
100
|
|
|
102
|
-
// src/rpc/redis/client.ts
|
|
103
|
-
var _events = require('events'); var _events2 = _interopRequireDefault(_events);
|
|
104
|
-
async function createClient({ pub, sub }, controllers, opts) {
|
|
105
|
-
const ret = {};
|
|
106
|
-
let eventId = 1;
|
|
107
|
-
let eventCount = 0;
|
|
108
|
-
const emitter = new (0, _events2.default)();
|
|
109
|
-
const clientQueue = _chunkG7JFKM2Mjs.genClientQueue.call(void 0, _optionalChain([opts, 'optionalAccess', _2 => _2.key]));
|
|
110
|
-
await sub.subscribe(clientQueue);
|
|
111
|
-
for (const i in controllers) {
|
|
112
|
-
ret[i] = new Proxy(new controllers[i](), {
|
|
113
|
-
get(target, p) {
|
|
114
|
-
if (typeof target[p] !== "function") throw new Error(`"${p}" in "${i}" is not an exposed rpc `);
|
|
115
|
-
let { tag, queue, isEvent } = target[p]();
|
|
116
|
-
return async (...args) => {
|
|
117
|
-
if (!queue) queue = tag;
|
|
118
|
-
const id = `${eventId++}`;
|
|
119
|
-
pub.publish(queue, JSON.stringify({
|
|
120
|
-
_ps: 1,
|
|
121
|
-
args,
|
|
122
|
-
id,
|
|
123
|
-
queue: clientQueue,
|
|
124
|
-
tag,
|
|
125
|
-
func: p
|
|
126
|
-
}));
|
|
127
|
-
if (isEvent) return null;
|
|
128
|
-
return new Promise((resolve, reject) => {
|
|
129
|
-
if (_optionalChain([opts, 'optionalAccess', _3 => _3.max]) && eventCount >= opts.max) reject({
|
|
130
|
-
type: "exceeded"
|
|
131
|
-
});
|
|
132
|
-
let isEnd = false;
|
|
133
|
-
const timer = setTimeout(() => {
|
|
134
|
-
if (!isEnd) {
|
|
135
|
-
eventCount--;
|
|
136
|
-
emitter.off(id, listener);
|
|
137
|
-
reject({
|
|
138
|
-
type: "timeout"
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
}, _optionalChain([opts, 'optionalAccess', _4 => _4.timeout]) || 5e3);
|
|
142
|
-
function listener(data, error) {
|
|
143
|
-
eventCount--;
|
|
144
|
-
isEnd = true;
|
|
145
|
-
clearTimeout(timer);
|
|
146
|
-
if (error) reject(data);
|
|
147
|
-
else resolve(data);
|
|
148
|
-
}
|
|
149
|
-
_chunk4LLLQOMFjs.__name.call(void 0, listener, "listener");
|
|
150
|
-
eventCount++;
|
|
151
|
-
emitter.once(id, listener);
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
sub.on("message", async (channel, msg) => {
|
|
158
|
-
if (channel === clientQueue && msg) {
|
|
159
|
-
const { data, id, error } = JSON.parse(msg);
|
|
160
|
-
emitter.emit(id, data, error);
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
return ret;
|
|
164
|
-
}
|
|
165
|
-
_chunk4LLLQOMFjs.__name.call(void 0, createClient, "createClient");
|
|
166
|
-
|
|
167
|
-
|
|
168
101
|
|
|
169
|
-
exports.bind = bind;
|
|
102
|
+
exports.bind = bind;
|
package/dist/rpc/redis/index.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Context,
|
|
3
3
|
createControllerMetaMap,
|
|
4
|
-
detectAopDep
|
|
5
|
-
|
|
6
|
-
} from "../../chunk-Z7NAAE4M.mjs";
|
|
4
|
+
detectAopDep
|
|
5
|
+
} from "../../chunk-VX4BZEL7.mjs";
|
|
7
6
|
import {
|
|
8
7
|
HMR,
|
|
9
8
|
__name
|
|
@@ -98,72 +97,6 @@ function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
|
|
|
98
97
|
});
|
|
99
98
|
}
|
|
100
99
|
__name(bind, "bind");
|
|
101
|
-
|
|
102
|
-
// src/rpc/redis/client.ts
|
|
103
|
-
import EventEmitter from "events";
|
|
104
|
-
async function createClient({ pub, sub }, controllers, opts) {
|
|
105
|
-
const ret = {};
|
|
106
|
-
let eventId = 1;
|
|
107
|
-
let eventCount = 0;
|
|
108
|
-
const emitter = new EventEmitter();
|
|
109
|
-
const clientQueue = genClientQueue(opts?.key);
|
|
110
|
-
await sub.subscribe(clientQueue);
|
|
111
|
-
for (const i in controllers) {
|
|
112
|
-
ret[i] = new Proxy(new controllers[i](), {
|
|
113
|
-
get(target, p) {
|
|
114
|
-
if (typeof target[p] !== "function") throw new Error(`"${p}" in "${i}" is not an exposed rpc `);
|
|
115
|
-
let { tag, queue, isEvent } = target[p]();
|
|
116
|
-
return async (...args) => {
|
|
117
|
-
if (!queue) queue = tag;
|
|
118
|
-
const id = `${eventId++}`;
|
|
119
|
-
pub.publish(queue, JSON.stringify({
|
|
120
|
-
_ps: 1,
|
|
121
|
-
args,
|
|
122
|
-
id,
|
|
123
|
-
queue: clientQueue,
|
|
124
|
-
tag,
|
|
125
|
-
func: p
|
|
126
|
-
}));
|
|
127
|
-
if (isEvent) return null;
|
|
128
|
-
return new Promise((resolve, reject) => {
|
|
129
|
-
if (opts?.max && eventCount >= opts.max) reject({
|
|
130
|
-
type: "exceeded"
|
|
131
|
-
});
|
|
132
|
-
let isEnd = false;
|
|
133
|
-
const timer = setTimeout(() => {
|
|
134
|
-
if (!isEnd) {
|
|
135
|
-
eventCount--;
|
|
136
|
-
emitter.off(id, listener);
|
|
137
|
-
reject({
|
|
138
|
-
type: "timeout"
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
}, opts?.timeout || 5e3);
|
|
142
|
-
function listener(data, error) {
|
|
143
|
-
eventCount--;
|
|
144
|
-
isEnd = true;
|
|
145
|
-
clearTimeout(timer);
|
|
146
|
-
if (error) reject(data);
|
|
147
|
-
else resolve(data);
|
|
148
|
-
}
|
|
149
|
-
__name(listener, "listener");
|
|
150
|
-
eventCount++;
|
|
151
|
-
emitter.once(id, listener);
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
sub.on("message", async (channel, msg) => {
|
|
158
|
-
if (channel === clientQueue && msg) {
|
|
159
|
-
const { data, id, error } = JSON.parse(msg);
|
|
160
|
-
emitter.emit(id, data, error);
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
return ret;
|
|
164
|
-
}
|
|
165
|
-
__name(createClient, "createClient");
|
|
166
100
|
export {
|
|
167
|
-
bind
|
|
168
|
-
createClient
|
|
101
|
+
bind
|
|
169
102
|
};
|
package/dist/test.d.mts
CHANGED
|
@@ -2,9 +2,13 @@ import * as supertest from 'supertest';
|
|
|
2
2
|
import { Test } from 'supertest';
|
|
3
3
|
import { Server } from 'node:http';
|
|
4
4
|
import { Construct } from 'phecda-core';
|
|
5
|
-
import { F as Factory } from './core-
|
|
6
|
-
import {
|
|
5
|
+
import { F as Factory } from './core-jUg1HvYT.mjs';
|
|
6
|
+
import { e as CustomResponse } from './meta-xvg6V7pH.mjs';
|
|
7
7
|
|
|
8
|
+
type PickFuncKeys<Type> = {
|
|
9
|
+
[Key in keyof Type]: Type[Key] extends (...args: any) => any ? (ReturnType<Type[Key]> extends CustomResponse<any> ? never : Key) : never;
|
|
10
|
+
}[keyof Type];
|
|
11
|
+
type PickFunc<Instance> = Pick<Instance, PickFuncKeys<Instance>>;
|
|
8
12
|
declare function TestFactory<T extends Construct[]>(...Modules: T): Promise<{
|
|
9
13
|
get<C extends T[number]>(Model: C): InstanceType<C>;
|
|
10
14
|
}>;
|
|
@@ -15,4 +19,4 @@ declare function TestHttp(app: Server | any, { moduleMap, meta }: Awaited<Return
|
|
|
15
19
|
module: <T extends Construct>(Module: T) => SuperTestRequest<PickFunc<InstanceType<T>>>;
|
|
16
20
|
}>;
|
|
17
21
|
|
|
18
|
-
export { type SuperTestRequest, TestFactory, TestHttp };
|
|
22
|
+
export { type PickFunc, type SuperTestRequest, TestFactory, TestHttp };
|
package/dist/test.d.ts
CHANGED
|
@@ -2,9 +2,13 @@ import * as supertest from 'supertest';
|
|
|
2
2
|
import { Test } from 'supertest';
|
|
3
3
|
import { Server } from 'node:http';
|
|
4
4
|
import { Construct } from 'phecda-core';
|
|
5
|
-
import { F as Factory } from './core-
|
|
6
|
-
import {
|
|
5
|
+
import { F as Factory } from './core-CDzIy2g0.js';
|
|
6
|
+
import { e as CustomResponse } from './meta-xvg6V7pH.js';
|
|
7
7
|
|
|
8
|
+
type PickFuncKeys<Type> = {
|
|
9
|
+
[Key in keyof Type]: Type[Key] extends (...args: any) => any ? (ReturnType<Type[Key]> extends CustomResponse<any> ? never : Key) : never;
|
|
10
|
+
}[keyof Type];
|
|
11
|
+
type PickFunc<Instance> = Pick<Instance, PickFuncKeys<Instance>>;
|
|
8
12
|
declare function TestFactory<T extends Construct[]>(...Modules: T): Promise<{
|
|
9
13
|
get<C extends T[number]>(Model: C): InstanceType<C>;
|
|
10
14
|
}>;
|
|
@@ -15,4 +19,4 @@ declare function TestHttp(app: Server | any, { moduleMap, meta }: Awaited<Return
|
|
|
15
19
|
module: <T extends Construct>(Module: T) => SuperTestRequest<PickFunc<InstanceType<T>>>;
|
|
16
20
|
}>;
|
|
17
21
|
|
|
18
|
-
export { type SuperTestRequest, TestFactory, TestHttp };
|
|
22
|
+
export { type PickFunc, type SuperTestRequest, TestFactory, TestHttp };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { D as DefaultOptions, B as BaseCtx } from './meta-xvg6V7pH.mjs';
|
|
2
|
+
|
|
3
|
+
interface RpcServerOptions extends DefaultOptions {
|
|
4
|
+
defaultQueue?: string;
|
|
5
|
+
}
|
|
6
|
+
interface RpcCtx extends BaseCtx {
|
|
7
|
+
args: any[];
|
|
8
|
+
id: string;
|
|
9
|
+
queue: string;
|
|
10
|
+
isEvent?: boolean;
|
|
11
|
+
category: 'rpc';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type { RpcCtx as R, RpcServerOptions as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { D as DefaultOptions, B as BaseCtx } from './meta-
|
|
2
|
+
import { D as DefaultOptions, B as BaseCtx } from './meta-xvg6V7pH.js';
|
|
3
3
|
|
|
4
4
|
interface HttpOptions extends DefaultOptions {
|
|
5
5
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { D as DefaultOptions, B as BaseCtx } from './meta-xvg6V7pH.js';
|
|
2
|
+
|
|
3
|
+
interface RpcServerOptions extends DefaultOptions {
|
|
4
|
+
defaultQueue?: string;
|
|
5
|
+
}
|
|
6
|
+
interface RpcCtx extends BaseCtx {
|
|
7
|
+
args: any[];
|
|
8
|
+
id: string;
|
|
9
|
+
queue: string;
|
|
10
|
+
isEvent?: boolean;
|
|
11
|
+
category: 'rpc';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type { RpcCtx as R, RpcServerOptions as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { D as DefaultOptions, B as BaseCtx } from './meta-
|
|
2
|
+
import { D as DefaultOptions, B as BaseCtx } from './meta-xvg6V7pH.mjs';
|
|
3
3
|
|
|
4
4
|
interface HttpOptions extends DefaultOptions {
|
|
5
5
|
/**
|
package/package.json
CHANGED
package/register/loader.mjs
CHANGED
|
@@ -180,7 +180,6 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
180
180
|
// }
|
|
181
181
|
// }
|
|
182
182
|
|
|
183
|
-
|
|
184
183
|
// hmr import
|
|
185
184
|
if (
|
|
186
185
|
context.parentURL.includes('/node_modules/phecda-server')
|
|
@@ -236,7 +235,6 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
236
235
|
}
|
|
237
236
|
}
|
|
238
237
|
|
|
239
|
-
|
|
240
238
|
const resolveRet = await nextResolve(specifier)
|
|
241
239
|
|
|
242
240
|
// ts resolve fail in some cases
|
|
@@ -248,9 +246,6 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
248
246
|
// @todo the first params may be url or path, need to distinguish
|
|
249
247
|
|
|
250
248
|
export const load = async (url, context, nextLoad) => {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
249
|
if (config.virtualFile[url]) {
|
|
255
250
|
return {
|
|
256
251
|
format: 'module',
|
|
@@ -265,8 +260,6 @@ export const load = async (url, context, nextLoad) => {
|
|
|
265
260
|
delete context.importAttributes.ps
|
|
266
261
|
}
|
|
267
262
|
|
|
268
|
-
|
|
269
|
-
|
|
270
263
|
url = url.split('?')[0]
|
|
271
264
|
if (
|
|
272
265
|
!url.includes('/node_modules/')
|
|
@@ -324,8 +317,6 @@ export const load = async (url, context, nextLoad) => {
|
|
|
324
317
|
const compiled = (await compile(code, url)).replace(/_ts_metadata\(\"design:paramtypes\"\,/g, '_ts_metadata("design:paramtypes",()=>')// handle cycle
|
|
325
318
|
|
|
326
319
|
if (unimportRet) {
|
|
327
|
-
|
|
328
|
-
|
|
329
320
|
const { injectImports } = unimportRet
|
|
330
321
|
|
|
331
322
|
return {
|
package/dist/types-DYRu0vic.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { D as DefaultOptions, B as BaseCtx } from './meta-CR-D39hQ.js';
|
|
2
|
-
|
|
3
|
-
interface RpcServerOptions extends DefaultOptions {
|
|
4
|
-
defaultQueue?: string;
|
|
5
|
-
}
|
|
6
|
-
interface RpcClientOptions {
|
|
7
|
-
key?: string;
|
|
8
|
-
timeout?: number;
|
|
9
|
-
max?: number;
|
|
10
|
-
}
|
|
11
|
-
interface RpcCtx extends BaseCtx {
|
|
12
|
-
args: any[];
|
|
13
|
-
id: string;
|
|
14
|
-
queue: string;
|
|
15
|
-
isEvent?: boolean;
|
|
16
|
-
category: 'rpc';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type { RpcCtx as R, RpcServerOptions as a, RpcClientOptions as b };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { D as DefaultOptions, B as BaseCtx } from './meta-CR-D39hQ.mjs';
|
|
2
|
-
|
|
3
|
-
interface RpcServerOptions extends DefaultOptions {
|
|
4
|
-
defaultQueue?: string;
|
|
5
|
-
}
|
|
6
|
-
interface RpcClientOptions {
|
|
7
|
-
key?: string;
|
|
8
|
-
timeout?: number;
|
|
9
|
-
max?: number;
|
|
10
|
-
}
|
|
11
|
-
interface RpcCtx extends BaseCtx {
|
|
12
|
-
args: any[];
|
|
13
|
-
id: string;
|
|
14
|
-
queue: string;
|
|
15
|
-
isEvent?: boolean;
|
|
16
|
-
category: 'rpc';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type { RpcCtx as R, RpcServerOptions as a, RpcClientOptions as b };
|