phecda-server 8.5.3 → 8.5.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/{core-DCERPmy5.d.mts → core-BYxcQ8kf.d.mts} +1 -1
- package/dist/{core-D7uMDEXI.d.ts → core-BiS3xJKx.d.ts} +1 -1
- package/dist/helper.d.mts +1 -1
- package/dist/helper.d.ts +1 -1
- package/dist/http/elysia/index.d.mts +3 -3
- package/dist/http/elysia/index.d.ts +3 -3
- package/dist/http/express/index.d.mts +3 -3
- package/dist/http/express/index.d.ts +3 -3
- package/dist/http/fastify/index.d.mts +3 -3
- package/dist/http/fastify/index.d.ts +3 -3
- package/dist/http/h3/index.d.mts +3 -3
- package/dist/http/h3/index.d.ts +3 -3
- package/dist/http/hono/index.d.mts +3 -3
- package/dist/http/hono/index.d.ts +3 -3
- package/dist/http/hyper-express/index.d.mts +3 -3
- package/dist/http/hyper-express/index.d.ts +3 -3
- package/dist/http/koa/index.d.mts +3 -3
- package/dist/http/koa/index.d.ts +3 -3
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/{meta-CZDDYaRV.d.mts → meta-Csp1xcSR.d.mts} +1 -1
- package/dist/{meta-CZDDYaRV.d.ts → meta-Csp1xcSR.d.ts} +1 -1
- package/dist/rpc/bullmq/index.d.mts +3 -3
- package/dist/rpc/bullmq/index.d.ts +3 -3
- package/dist/rpc/electron/index.d.mts +3 -3
- package/dist/rpc/electron/index.d.ts +3 -3
- package/dist/rpc/kafka/index.d.mts +3 -3
- package/dist/rpc/kafka/index.d.ts +3 -3
- package/dist/rpc/nats/index.d.mts +3 -3
- package/dist/rpc/nats/index.d.ts +3 -3
- package/dist/rpc/rabbitmq/index.d.mts +3 -3
- package/dist/rpc/rabbitmq/index.d.ts +3 -3
- package/dist/rpc/redis/index.d.mts +3 -3
- package/dist/rpc/redis/index.d.ts +3 -3
- package/dist/rpc/web-ext/index.d.mts +11 -1
- package/dist/rpc/web-ext/index.d.ts +11 -1
- package/dist/rpc/web-ext/index.js +71 -1
- package/dist/rpc/web-ext/index.mjs +71 -0
- package/dist/rpc/ws/index.d.mts +3 -3
- package/dist/rpc/ws/index.d.ts +3 -3
- package/dist/test.d.mts +2 -2
- package/dist/test.d.ts +2 -2
- package/dist/{types-S1PZEcrK.d.ts → types-Bs64nYvd.d.ts} +1 -1
- package/dist/{types-LPSac5sm.d.mts → types-CjVwVyJT.d.mts} +1 -1
- package/dist/{types-DG5DI_EC.d.ts → types-DExQe0qk.d.ts} +1 -1
- package/dist/{types-BbnTNTe3.d.mts → types-DSlyrmns.d.mts} +1 -1
- package/package.json +1 -1
package/dist/helper.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Meta,
|
|
1
|
+
import { M as Meta, C as ControllerMeta } from './meta-Csp1xcSR.mjs';
|
|
2
2
|
import { Construct } from 'phecda-core';
|
|
3
3
|
|
|
4
4
|
declare function HMR(cb: (oldModels: Construct[], newModels: Construct[]) => any): void;
|
package/dist/helper.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Meta,
|
|
1
|
+
import { M as Meta, C as ControllerMeta } from './meta-Csp1xcSR.js';
|
|
2
2
|
import { Construct } from 'phecda-core';
|
|
3
3
|
|
|
4
4
|
declare function HMR(cb: (oldModels: Construct[], newModels: Construct[]) => any): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Elysia as Elysia$1, Context } from 'elysia';
|
|
2
2
|
import { AnyLocalHook } from 'elysia/dist/types';
|
|
3
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
4
|
-
import { F as Factory } from '../../core-
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
|
|
4
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
7
7
|
import 'phecda-core';
|
|
8
8
|
|
|
9
9
|
interface ElysiaCtx extends HttpCtx {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Elysia as Elysia$1, Context } from 'elysia';
|
|
2
2
|
import { AnyLocalHook } from 'elysia/dist/types';
|
|
3
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
4
|
-
import { F as Factory } from '../../core-
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
|
|
4
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-Csp1xcSR.js';
|
|
7
7
|
import 'phecda-core';
|
|
8
8
|
|
|
9
9
|
interface ElysiaCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RequestHandler, Request, Response, Router } from 'express';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface ExpressCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RequestHandler, Request, Response, Router } from 'express';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
|
|
3
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface ExpressCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FastifyPluginCallback, RouteShorthandOptions, FastifyRequest, FastifyReply, FastifyInstance, FastifyRegisterOptions, FastifyPluginOptions } from 'fastify';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface FastifyCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FastifyPluginCallback, RouteShorthandOptions, FastifyRequest, FastifyReply, FastifyInstance, FastifyRegisterOptions, FastifyPluginOptions } from 'fastify';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
|
|
3
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface FastifyCtx extends HttpCtx {
|
package/dist/http/h3/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _RequestMiddleware, H3Event, Router } from 'h3';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
import 'node:http';
|
|
7
7
|
|
|
8
8
|
interface H3Ctx extends HttpCtx {
|
package/dist/http/h3/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _RequestMiddleware, H3Event, Router } from 'h3';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
import 'node:http';
|
|
7
7
|
|
|
8
8
|
interface H3Ctx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MiddlewareHandler, Context, Hono } from 'hono';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HonoCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MiddlewareHandler, Context, Hono } from 'hono';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
|
|
3
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HonoCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MiddlewareHandler, Request, Response, Router } from 'hyper-express';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HyperExpressCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MiddlewareHandler, Request, Response, Router } from 'hyper-express';
|
|
2
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
3
|
-
import { F as Factory } from '../../core-
|
|
2
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
|
|
3
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HyperExpressCtx extends HttpCtx {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Router, { RouterParamContext } from '@koa/router';
|
|
2
2
|
import { DefaultContext, DefaultState } from 'koa';
|
|
3
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
4
|
-
import { F as Factory } from '../../core-
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CjVwVyJT.mjs';
|
|
4
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
7
7
|
import 'phecda-core';
|
|
8
8
|
|
|
9
9
|
interface KoaCtx extends HttpCtx {
|
package/dist/http/koa/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Router, { RouterParamContext } from '@koa/router';
|
|
2
2
|
import { DefaultContext, DefaultState } from 'koa';
|
|
3
|
-
import { H as HttpCtx, a as HttpOptions } from '../../types-
|
|
4
|
-
import { F as Factory } from '../../core-
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-Bs64nYvd.js';
|
|
4
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-Csp1xcSR.js';
|
|
7
7
|
import 'phecda-core';
|
|
8
8
|
|
|
9
9
|
interface KoaCtx extends HttpCtx {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { B as BaseCtx,
|
|
2
|
-
export {
|
|
3
|
-
import { G as Generator } from './core-
|
|
4
|
-
export { F as Factory, O as Options, S as ServerPhecda, d as defaultServerInject, e as emitter, p as phecdaNamespace, u as useS } from './core-
|
|
1
|
+
import { B as BaseCtx, a as BaseError, C as ControllerMeta, D as DefaultOptions, b as ControllerMetaData, M as Meta, E as Emitter } from './meta-Csp1xcSR.mjs';
|
|
2
|
+
export { c as BaseRequestMethod, d as CustomResponse, e as ERROR_SYMBOL, f as ExtractResponse, I as IS_DEV, g as IS_ONLY_GENERATE, h as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, j as MetaData, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-Csp1xcSR.mjs';
|
|
3
|
+
import { G as Generator } from './core-BYxcQ8kf.mjs';
|
|
4
|
+
export { F as Factory, O as Options, S as ServerPhecda, d as defaultServerInject, e as emitter, p as phecdaNamespace, u as useS } from './core-BYxcQ8kf.mjs';
|
|
5
5
|
import { Construct, Base } from 'phecda-core';
|
|
6
6
|
export * from 'phecda-core';
|
|
7
|
-
import { H as HttpCtx } from './types-
|
|
8
|
-
export { C as CookieSerializeOptions, a as HttpOptions } from './types-
|
|
9
|
-
import { R as RpcCtx } from './types-
|
|
10
|
-
export { a as RpcServerOptions } from './types-
|
|
7
|
+
import { H as HttpCtx } from './types-CjVwVyJT.mjs';
|
|
8
|
+
export { C as CookieSerializeOptions, a as HttpOptions } from './types-CjVwVyJT.mjs';
|
|
9
|
+
import { R as RpcCtx } from './types-DSlyrmns.mjs';
|
|
10
|
+
export { a as RpcServerOptions } from './types-DSlyrmns.mjs';
|
|
11
11
|
export { Mixin } from 'ts-mixer';
|
|
12
12
|
import 'node:http';
|
|
13
13
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { B as BaseCtx,
|
|
2
|
-
export {
|
|
3
|
-
import { G as Generator } from './core-
|
|
4
|
-
export { F as Factory, O as Options, S as ServerPhecda, d as defaultServerInject, e as emitter, p as phecdaNamespace, u as useS } from './core-
|
|
1
|
+
import { B as BaseCtx, a as BaseError, C as ControllerMeta, D as DefaultOptions, b as ControllerMetaData, M as Meta, E as Emitter } from './meta-Csp1xcSR.js';
|
|
2
|
+
export { c as BaseRequestMethod, d as CustomResponse, e as ERROR_SYMBOL, f as ExtractResponse, I as IS_DEV, g as IS_ONLY_GENERATE, h as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, j as MetaData, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-Csp1xcSR.js';
|
|
3
|
+
import { G as Generator } from './core-BiS3xJKx.js';
|
|
4
|
+
export { F as Factory, O as Options, S as ServerPhecda, d as defaultServerInject, e as emitter, p as phecdaNamespace, u as useS } from './core-BiS3xJKx.js';
|
|
5
5
|
import { Construct, Base } from 'phecda-core';
|
|
6
6
|
export * from 'phecda-core';
|
|
7
|
-
import { H as HttpCtx } from './types-
|
|
8
|
-
export { C as CookieSerializeOptions, a as HttpOptions } from './types-
|
|
9
|
-
import { R as RpcCtx } from './types-
|
|
10
|
-
export { a as RpcServerOptions } from './types-
|
|
7
|
+
import { H as HttpCtx } from './types-Bs64nYvd.js';
|
|
8
|
+
export { C as CookieSerializeOptions, a as HttpOptions } from './types-Bs64nYvd.js';
|
|
9
|
+
import { R as RpcCtx } from './types-DExQe0qk.js';
|
|
10
|
+
export { a as RpcServerOptions } from './types-DExQe0qk.js';
|
|
11
11
|
export { Mixin } from 'ts-mixer';
|
|
12
12
|
import 'node:http';
|
|
13
13
|
|
|
@@ -91,4 +91,4 @@ interface ControllerMeta extends Meta {
|
|
|
91
91
|
data: ControllerMetaData;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
export { type BaseCtx as B,
|
|
94
|
+
export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, Meta as M, PS_EXIT_CODE as P, type ServiceMetaData as S, type BaseError as a, type ControllerMetaData as b, type BaseRequestMethod as c, CustomResponse as d, ERROR_SYMBOL as e, type ExtractResponse as f, IS_ONLY_GENERATE as g, IS_PURE as h, IS_STRICT as i, type MetaData as j };
|
|
@@ -91,4 +91,4 @@ interface ControllerMeta extends Meta {
|
|
|
91
91
|
data: ControllerMetaData;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
export { type BaseCtx as B,
|
|
94
|
+
export { type BaseCtx as B, type ControllerMeta as C, type DefaultOptions as D, type Emitter as E, IS_DEV as I, LOG_LEVEL as L, Meta as M, PS_EXIT_CODE as P, type ServiceMetaData as S, type BaseError as a, type ControllerMetaData as b, type BaseRequestMethod as c, CustomResponse as d, ERROR_SYMBOL as e, type ExtractResponse as f, IS_ONLY_GENERATE as g, IS_PURE as h, IS_STRICT as i, type MetaData as j };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
|
|
7
7
|
interface BullmqCtx extends RpcCtx {
|
|
8
8
|
type: 'bullmq';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
|
|
7
7
|
interface BullmqCtx extends RpcCtx {
|
|
8
8
|
type: 'bullmq';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Electron from 'electron';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
|
|
7
7
|
interface ElectronCtx extends RpcCtx {
|
|
8
8
|
type: 'electron';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Electron from 'electron';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
|
|
7
7
|
interface ElectronCtx extends RpcCtx {
|
|
8
8
|
type: 'electron';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Consumer, Producer } from 'kafkajs';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
|
|
7
7
|
interface KafkaCtx extends RpcCtx {
|
|
8
8
|
type: 'kafka';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Consumer, Producer } from 'kafkajs';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
|
|
7
7
|
interface KafkaCtx extends RpcCtx {
|
|
8
8
|
type: 'kafka';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NatsConnection } from 'nats';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
|
|
7
7
|
interface NatsCtx extends RpcCtx {
|
|
8
8
|
type: 'nats';
|
package/dist/rpc/nats/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NatsConnection } from 'nats';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
|
|
7
7
|
interface NatsCtx extends RpcCtx {
|
|
8
8
|
type: 'nats';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import amqplib from 'amqplib';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
|
|
7
7
|
interface RabbitmqCtx extends RpcCtx {
|
|
8
8
|
type: 'rabbitmq';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import amqplib from 'amqplib';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
|
|
7
7
|
interface RabbitmqCtx extends RpcCtx {
|
|
8
8
|
type: 'rabbitmq';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Redis from 'ioredis';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
|
|
7
7
|
interface RedisCtx extends RpcCtx {
|
|
8
8
|
type: 'redis';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Redis from 'ioredis';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
|
|
7
7
|
interface RedisCtx extends RpcCtx {
|
|
8
8
|
type: 'redis';
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
2
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
|
|
3
|
+
import 'phecda-core';
|
|
4
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
1
5
|
|
|
2
|
-
|
|
6
|
+
interface WebExtCtx extends RpcCtx {
|
|
7
|
+
type: 'browser-extension';
|
|
8
|
+
sender: chrome.runtime.MessageSender;
|
|
9
|
+
}
|
|
10
|
+
declare function bind({ moduleMap, meta }: Awaited<ReturnType<typeof Factory>>, opts?: RpcServerOptions): void;
|
|
11
|
+
|
|
12
|
+
export { type WebExtCtx, bind };
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
2
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
|
|
3
|
+
import 'phecda-core';
|
|
4
|
+
import '../../meta-Csp1xcSR.js';
|
|
1
5
|
|
|
2
|
-
|
|
6
|
+
interface WebExtCtx extends RpcCtx {
|
|
7
|
+
type: 'browser-extension';
|
|
8
|
+
sender: chrome.runtime.MessageSender;
|
|
9
|
+
}
|
|
10
|
+
declare function bind({ moduleMap, meta }: Awaited<ReturnType<typeof Factory>>, opts?: RpcServerOptions): void;
|
|
11
|
+
|
|
12
|
+
export { type WebExtCtx, bind };
|
|
@@ -1 +1,71 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunk76UDKZOJjs = require('../../chunk-76UDKZOJ.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkLLF55NZPjs = require('../../chunk-LLF55NZP.js');
|
|
9
|
+
|
|
10
|
+
// src/rpc/web-ext/bind.ts
|
|
11
|
+
var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
|
12
|
+
var debug = _debug2.default.call(void 0, "phecda-server/electron");
|
|
13
|
+
function bind({ moduleMap, meta }, opts = {}) {
|
|
14
|
+
const { globalGuards, globalFilter, globalPipe, globalAddons = [] } = opts;
|
|
15
|
+
const metaMap = _chunk76UDKZOJjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
|
|
16
|
+
const { controller, rpc, method, tag } = meta2.data;
|
|
17
|
+
if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
|
|
18
|
+
debug(`register method "${method}" in module "${tag}"`);
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
_chunk76UDKZOJjs.detectAopDep.call(void 0, meta, {
|
|
23
|
+
guards: globalGuards,
|
|
24
|
+
addons: globalAddons
|
|
25
|
+
}, "rpc");
|
|
26
|
+
chrome.runtime.onMessage.addListener(callback);
|
|
27
|
+
async function callback(data, sender, sendResponse) {
|
|
28
|
+
const { method, id, tag, _ps, args } = data || {};
|
|
29
|
+
debug(`invoke method "${method}" in module "${tag}"`);
|
|
30
|
+
if (_ps !== 1) return;
|
|
31
|
+
const meta2 = metaMap.get(tag)[method];
|
|
32
|
+
const { data: { rpc: { isEvent } = {} } } = meta2;
|
|
33
|
+
const aop = _chunk76UDKZOJjs.Context.getAop(meta2, {
|
|
34
|
+
globalFilter,
|
|
35
|
+
globalGuards,
|
|
36
|
+
globalPipe
|
|
37
|
+
});
|
|
38
|
+
const context = new (0, _chunk76UDKZOJjs.Context)({
|
|
39
|
+
type: "browser-extension",
|
|
40
|
+
category: "rpc",
|
|
41
|
+
moduleMap,
|
|
42
|
+
meta: meta2,
|
|
43
|
+
tag,
|
|
44
|
+
method,
|
|
45
|
+
args,
|
|
46
|
+
id,
|
|
47
|
+
isEvent,
|
|
48
|
+
queue: tag,
|
|
49
|
+
sender
|
|
50
|
+
});
|
|
51
|
+
return await context.run(aop, (returnData) => {
|
|
52
|
+
if (!isEvent) sendResponse({
|
|
53
|
+
data: returnData,
|
|
54
|
+
id
|
|
55
|
+
});
|
|
56
|
+
}, (err) => {
|
|
57
|
+
if (!isEvent) {
|
|
58
|
+
sendResponse({
|
|
59
|
+
data: err,
|
|
60
|
+
error: true,
|
|
61
|
+
id
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
_chunkLLF55NZPjs.__name.call(void 0, callback, "callback");
|
|
67
|
+
}
|
|
68
|
+
_chunkLLF55NZPjs.__name.call(void 0, bind, "bind");
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
exports.bind = bind;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Context,
|
|
3
|
+
createControllerMetaMap,
|
|
4
|
+
detectAopDep
|
|
5
|
+
} from "../../chunk-WST6E6MQ.mjs";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "../../chunk-URKOYTBU.mjs";
|
|
9
|
+
|
|
10
|
+
// src/rpc/web-ext/bind.ts
|
|
11
|
+
import Debug from "debug";
|
|
12
|
+
var debug = Debug("phecda-server/electron");
|
|
13
|
+
function bind({ moduleMap, meta }, opts = {}) {
|
|
14
|
+
const { globalGuards, globalFilter, globalPipe, globalAddons = [] } = opts;
|
|
15
|
+
const metaMap = createControllerMetaMap(meta, (meta2) => {
|
|
16
|
+
const { controller, rpc, method, tag } = meta2.data;
|
|
17
|
+
if (controller === "rpc" && rpc?.queue !== void 0) {
|
|
18
|
+
debug(`register method "${method}" in module "${tag}"`);
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
detectAopDep(meta, {
|
|
23
|
+
guards: globalGuards,
|
|
24
|
+
addons: globalAddons
|
|
25
|
+
}, "rpc");
|
|
26
|
+
chrome.runtime.onMessage.addListener(callback);
|
|
27
|
+
async function callback(data, sender, sendResponse) {
|
|
28
|
+
const { method, id, tag, _ps, args } = data || {};
|
|
29
|
+
debug(`invoke method "${method}" in module "${tag}"`);
|
|
30
|
+
if (_ps !== 1) return;
|
|
31
|
+
const meta2 = metaMap.get(tag)[method];
|
|
32
|
+
const { data: { rpc: { isEvent } = {} } } = meta2;
|
|
33
|
+
const aop = Context.getAop(meta2, {
|
|
34
|
+
globalFilter,
|
|
35
|
+
globalGuards,
|
|
36
|
+
globalPipe
|
|
37
|
+
});
|
|
38
|
+
const context = new Context({
|
|
39
|
+
type: "browser-extension",
|
|
40
|
+
category: "rpc",
|
|
41
|
+
moduleMap,
|
|
42
|
+
meta: meta2,
|
|
43
|
+
tag,
|
|
44
|
+
method,
|
|
45
|
+
args,
|
|
46
|
+
id,
|
|
47
|
+
isEvent,
|
|
48
|
+
queue: tag,
|
|
49
|
+
sender
|
|
50
|
+
});
|
|
51
|
+
return await context.run(aop, (returnData) => {
|
|
52
|
+
if (!isEvent) sendResponse({
|
|
53
|
+
data: returnData,
|
|
54
|
+
id
|
|
55
|
+
});
|
|
56
|
+
}, (err) => {
|
|
57
|
+
if (!isEvent) {
|
|
58
|
+
sendResponse({
|
|
59
|
+
data: err,
|
|
60
|
+
error: true,
|
|
61
|
+
id
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
__name(callback, "callback");
|
|
67
|
+
}
|
|
68
|
+
__name(bind, "bind");
|
|
69
|
+
export {
|
|
70
|
+
bind
|
|
71
|
+
};
|
package/dist/rpc/ws/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import WS from 'ws';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BYxcQ8kf.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.mjs';
|
|
6
6
|
|
|
7
7
|
interface WsCtx extends RpcCtx {
|
|
8
8
|
type: 'ws';
|
package/dist/rpc/ws/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import WS from 'ws';
|
|
2
|
-
import { F as Factory } from '../../core-
|
|
3
|
-
import { R as RpcCtx, a as RpcServerOptions } from '../../types-
|
|
2
|
+
import { F as Factory } from '../../core-BiS3xJKx.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-Csp1xcSR.js';
|
|
6
6
|
|
|
7
7
|
interface WsCtx extends RpcCtx {
|
|
8
8
|
type: 'ws';
|
package/dist/test.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ 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-BYxcQ8kf.mjs';
|
|
6
|
+
import { d as CustomResponse } from './meta-Csp1xcSR.mjs';
|
|
7
7
|
|
|
8
8
|
type PickFuncKeys<Type> = {
|
|
9
9
|
[Key in keyof Type]: Type[Key] extends (...args: any) => any ? (ReturnType<Type[Key]> extends CustomResponse<any> ? never : Key) : never;
|
package/dist/test.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ 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-BiS3xJKx.js';
|
|
6
|
+
import { d as CustomResponse } from './meta-Csp1xcSR.js';
|
|
7
7
|
|
|
8
8
|
type PickFuncKeys<Type> = {
|
|
9
9
|
[Key in keyof Type]: Type[Key] extends (...args: any) => any ? (ReturnType<Type[Key]> extends CustomResponse<any> ? never : Key) : never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { B as BaseCtx, D as DefaultOptions } from './meta-
|
|
2
|
+
import { B as BaseCtx, D as DefaultOptions } from './meta-Csp1xcSR.js';
|
|
3
3
|
|
|
4
4
|
interface HttpOptions extends DefaultOptions {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { B as BaseCtx, D as DefaultOptions } from './meta-
|
|
2
|
+
import { B as BaseCtx, D as DefaultOptions } from './meta-Csp1xcSR.mjs';
|
|
3
3
|
|
|
4
4
|
interface HttpOptions extends DefaultOptions {
|
|
5
5
|
/**
|