phecda-server 7.0.0-alpha.14 → 7.0.0-alpha.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/{core-jUg1HvYT.d.mts → core-DiFYc0bC.d.mts} +1 -1
- package/dist/{core-CDzIy2g0.d.ts → core-KvmgTDU0.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 +4 -4
- package/dist/http/elysia/index.d.ts +4 -4
- 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/index.js +0 -1
- package/dist/index.mjs +1 -2
- package/dist/{meta-xvg6V7pH.d.mts → meta-DlHaMicF.d.mts} +1 -2
- package/dist/{meta-xvg6V7pH.d.ts → meta-DlHaMicF.d.ts} +1 -2
- 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/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-6qaaUIKZ.d.mts → types-8r301ZfZ.d.mts} +1 -1
- package/dist/{types-B-1OL-3P.d.ts → types-Bz3JN2S1.d.ts} +1 -1
- package/dist/{types-Ctd6pLNE.d.mts → types-CVSbC6nz.d.mts} +1 -1
- package/dist/{types-BtXOT5rI.d.ts → types-DJuqpiI8.d.ts} +1 -1
- package/package.json +2 -2
- package/register/loader.mjs +7 -7
package/dist/helper.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Meta, C as ControllerMeta } from './meta-
|
|
1
|
+
import { M as Meta, C as ControllerMeta } from './meta-DlHaMicF.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, C as ControllerMeta } from './meta-
|
|
1
|
+
import { M as Meta, C as ControllerMeta } from './meta-DlHaMicF.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, LocalHook, InputSchema, RouteSchema, SingletonBase } from 'elysia';
|
|
2
2
|
import { BaseMacro } 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-CVSbC6nz.mjs';
|
|
4
|
+
import { F as Factory } from '../../core-DiFYc0bC.mjs';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-DlHaMicF.mjs';
|
|
7
7
|
import 'phecda-core';
|
|
8
8
|
|
|
9
9
|
interface ElysiaCtx extends HttpCtx {
|
|
@@ -13,6 +13,6 @@ interface ElysiaCtx extends HttpCtx {
|
|
|
13
13
|
}
|
|
14
14
|
type Addon = (app: Elysia$1<any>) => void;
|
|
15
15
|
declare function bind(app: Elysia$1<any>, data: Awaited<ReturnType<typeof Factory>>, opts?: HttpOptions): void;
|
|
16
|
-
declare function Elysia(opts: LocalHook<InputSchema, RouteSchema, SingletonBase, Record<string, Error>, BaseMacro>): any;
|
|
16
|
+
declare function Elysia(opts: LocalHook<InputSchema, RouteSchema, SingletonBase, Record<string, Error>, BaseMacro, any>): any;
|
|
17
17
|
|
|
18
18
|
export { type Addon, Elysia, type ElysiaCtx, bind };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Elysia as Elysia$1, Context, LocalHook, InputSchema, RouteSchema, SingletonBase } from 'elysia';
|
|
2
2
|
import { BaseMacro } 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-Bz3JN2S1.js';
|
|
4
|
+
import { F as Factory } from '../../core-KvmgTDU0.js';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-DlHaMicF.js';
|
|
7
7
|
import 'phecda-core';
|
|
8
8
|
|
|
9
9
|
interface ElysiaCtx extends HttpCtx {
|
|
@@ -13,6 +13,6 @@ interface ElysiaCtx extends HttpCtx {
|
|
|
13
13
|
}
|
|
14
14
|
type Addon = (app: Elysia$1<any>) => void;
|
|
15
15
|
declare function bind(app: Elysia$1<any>, data: Awaited<ReturnType<typeof Factory>>, opts?: HttpOptions): void;
|
|
16
|
-
declare function Elysia(opts: LocalHook<InputSchema, RouteSchema, SingletonBase, Record<string, Error>, BaseMacro>): any;
|
|
16
|
+
declare function Elysia(opts: LocalHook<InputSchema, RouteSchema, SingletonBase, Record<string, Error>, BaseMacro, any>): any;
|
|
17
17
|
|
|
18
18
|
export { type Addon, Elysia, type ElysiaCtx, bind };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Request, Response, Router, RequestHandler } 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-CVSbC6nz.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-DiFYc0bC.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface ExpressCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Request, Response, Router, RequestHandler } 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-Bz3JN2S1.js';
|
|
3
|
+
import { F as Factory } from '../../core-KvmgTDU0.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface ExpressCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FastifyRequest, FastifyReply, FastifyInstance, FastifyPluginCallback, FastifyRegisterOptions, FastifyPluginOptions, RouteShorthandOptions } 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-CVSbC6nz.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-DiFYc0bC.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface FastifyCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FastifyRequest, FastifyReply, FastifyInstance, FastifyPluginCallback, FastifyRegisterOptions, FastifyPluginOptions, RouteShorthandOptions } 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-Bz3JN2S1.js';
|
|
3
|
+
import { F as Factory } from '../../core-KvmgTDU0.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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 { H3Event, Router, _RequestMiddleware } 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-DiFYc0bC.mjs';
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-CVSbC6nz.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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 { H3Event, Router, _RequestMiddleware } 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-KvmgTDU0.js';
|
|
3
|
+
import { H as HttpCtx, a as HttpOptions } from '../../types-Bz3JN2S1.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.js';
|
|
6
6
|
import 'node:http';
|
|
7
7
|
|
|
8
8
|
interface H3Ctx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Context, Hono, MiddlewareHandler } 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-CVSbC6nz.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-DiFYc0bC.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HonoCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Context, Hono, MiddlewareHandler } 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-Bz3JN2S1.js';
|
|
3
|
+
import { F as Factory } from '../../core-KvmgTDU0.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.js';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HonoCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Request, Response, Router, MiddlewareHandler } 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-CVSbC6nz.mjs';
|
|
3
|
+
import { F as Factory } from '../../core-DiFYc0bC.mjs';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.mjs';
|
|
6
6
|
import 'phecda-core';
|
|
7
7
|
|
|
8
8
|
interface HyperExpressCtx extends HttpCtx {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Request, Response, Router, MiddlewareHandler } 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-Bz3JN2S1.js';
|
|
3
|
+
import { F as Factory } from '../../core-KvmgTDU0.js';
|
|
4
4
|
import 'node:http';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-CVSbC6nz.mjs';
|
|
4
|
+
import { F as Factory } from '../../core-DiFYc0bC.mjs';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-DlHaMicF.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-Bz3JN2S1.js';
|
|
4
|
+
import { F as Factory } from '../../core-KvmgTDU0.js';
|
|
5
5
|
import 'node:http';
|
|
6
|
-
import '../../meta-
|
|
6
|
+
import '../../meta-DlHaMicF.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, C as ControllerMeta, D as DefaultOptions, a as ControllerMetaData, b as MetaData, E as Emitter, c as BaseError } from './meta-
|
|
2
|
-
export { d as BaseRequestType, e as CustomResponse, g as ERROR_SYMBOL, f as ExtractResponse, I as IS_DEV, h as IS_ONLY_GENERATE, j as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, M as Meta, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-
|
|
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, C as ControllerMeta, D as DefaultOptions, a as ControllerMetaData, b as MetaData, E as Emitter, c as BaseError } from './meta-DlHaMicF.mjs';
|
|
2
|
+
export { d as BaseRequestType, e as CustomResponse, g as ERROR_SYMBOL, f as ExtractResponse, I as IS_DEV, h as IS_ONLY_GENERATE, j as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, M as Meta, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-DlHaMicF.mjs';
|
|
3
|
+
import { G as Generator } from './core-DiFYc0bC.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-DiFYc0bC.mjs';
|
|
5
5
|
import { 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-CVSbC6nz.mjs';
|
|
8
|
+
export { C as CookieSerializeOptions, a as HttpOptions } from './types-CVSbC6nz.mjs';
|
|
9
|
+
import { R as RpcCtx } from './types-8r301ZfZ.mjs';
|
|
10
|
+
export { a as RpcServerOptions } from './types-8r301ZfZ.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, C as ControllerMeta, D as DefaultOptions, a as ControllerMetaData, b as MetaData, E as Emitter, c as BaseError } from './meta-
|
|
2
|
-
export { d as BaseRequestType, e as CustomResponse, g as ERROR_SYMBOL, f as ExtractResponse, I as IS_DEV, h as IS_ONLY_GENERATE, j as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, M as Meta, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-
|
|
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, C as ControllerMeta, D as DefaultOptions, a as ControllerMetaData, b as MetaData, E as Emitter, c as BaseError } from './meta-DlHaMicF.js';
|
|
2
|
+
export { d as BaseRequestType, e as CustomResponse, g as ERROR_SYMBOL, f as ExtractResponse, I as IS_DEV, h as IS_ONLY_GENERATE, j as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, M as Meta, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-DlHaMicF.js';
|
|
3
|
+
import { G as Generator } from './core-KvmgTDU0.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-KvmgTDU0.js';
|
|
5
5
|
import { 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-Bz3JN2S1.js';
|
|
8
|
+
export { C as CookieSerializeOptions, a as HttpOptions } from './types-Bz3JN2S1.js';
|
|
9
|
+
import { R as RpcCtx } from './types-DJuqpiI8.js';
|
|
10
|
+
export { a as RpcServerOptions } from './types-DJuqpiI8.js';
|
|
11
11
|
export { Mixin } from 'ts-mixer';
|
|
12
12
|
import 'node:http';
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,6 @@ var _chunkIJFIY6QNjs = require('./chunk-IJFIY6QN.js');
|
|
|
75
75
|
var _chunk4LLLQOMFjs = require('./chunk-4LLLQOMF.js');
|
|
76
76
|
|
|
77
77
|
// src/types.ts
|
|
78
|
-
var ResponseSymbol = Symbol("response");
|
|
79
78
|
var CustomResponse = class {
|
|
80
79
|
static {
|
|
81
80
|
_chunk4LLLQOMFjs.__name.call(void 0, this, "CustomResponse");
|
package/dist/index.mjs
CHANGED
|
@@ -75,12 +75,11 @@ import {
|
|
|
75
75
|
} from "./chunk-NQ55PA2X.mjs";
|
|
76
76
|
|
|
77
77
|
// src/types.ts
|
|
78
|
-
var ResponseSymbol = Symbol("response");
|
|
79
78
|
var CustomResponse = class {
|
|
80
79
|
static {
|
|
81
80
|
__name(this, "CustomResponse");
|
|
82
81
|
}
|
|
83
|
-
|
|
82
|
+
_ps_response;
|
|
84
83
|
};
|
|
85
84
|
|
|
86
85
|
// src/modules/base.ts
|
|
@@ -40,9 +40,8 @@ interface BaseError {
|
|
|
40
40
|
description: string;
|
|
41
41
|
}
|
|
42
42
|
type BaseRequestType = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
|
|
43
|
-
declare const ResponseSymbol: unique symbol;
|
|
44
43
|
declare class CustomResponse<Value> {
|
|
45
|
-
|
|
44
|
+
_ps_response: Value;
|
|
46
45
|
}
|
|
47
46
|
type ExtractResponse<Class extends CustomResponse<any>> = Class extends CustomResponse<infer Value> ? Value : never;
|
|
48
47
|
|
|
@@ -40,9 +40,8 @@ interface BaseError {
|
|
|
40
40
|
description: string;
|
|
41
41
|
}
|
|
42
42
|
type BaseRequestType = 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options';
|
|
43
|
-
declare const ResponseSymbol: unique symbol;
|
|
44
43
|
declare class CustomResponse<Value> {
|
|
45
|
-
|
|
44
|
+
_ps_response: Value;
|
|
46
45
|
}
|
|
47
46
|
type ExtractResponse<Class extends CustomResponse<any>> = Class extends CustomResponse<infer Value> ? Value : never;
|
|
48
47
|
|
|
@@ -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-DiFYc0bC.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-8r301ZfZ.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-KvmgTDU0.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DJuqpiI8.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-DiFYc0bC.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-8r301ZfZ.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-KvmgTDU0.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DJuqpiI8.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-DiFYc0bC.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-8r301ZfZ.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-KvmgTDU0.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DJuqpiI8.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-DiFYc0bC.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-8r301ZfZ.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-KvmgTDU0.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DJuqpiI8.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-DiFYc0bC.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-8r301ZfZ.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-KvmgTDU0.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DJuqpiI8.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-DiFYc0bC.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-8r301ZfZ.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-KvmgTDU0.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DJuqpiI8.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.js';
|
|
6
6
|
|
|
7
7
|
interface RedisCtx extends RpcCtx {
|
|
8
8
|
type: 'redis';
|
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-DiFYc0bC.mjs';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-8r301ZfZ.mjs';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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-KvmgTDU0.js';
|
|
3
|
+
import { R as RpcCtx, a as RpcServerOptions } from '../../types-DJuqpiI8.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
|
-
import '../../meta-
|
|
5
|
+
import '../../meta-DlHaMicF.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 { e as CustomResponse } from './meta-
|
|
5
|
+
import { F as Factory } from './core-DiFYc0bC.mjs';
|
|
6
|
+
import { e as CustomResponse } from './meta-DlHaMicF.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 { e as CustomResponse } from './meta-
|
|
5
|
+
import { F as Factory } from './core-KvmgTDU0.js';
|
|
6
|
+
import { e as CustomResponse } from './meta-DlHaMicF.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 {
|
|
2
|
+
import { B as BaseCtx, D as DefaultOptions } from './meta-DlHaMicF.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 {
|
|
2
|
+
import { B as BaseCtx, D as DefaultOptions } from './meta-DlHaMicF.mjs';
|
|
3
3
|
|
|
4
4
|
interface HttpOptions extends DefaultOptions {
|
|
5
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phecda-server",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.16",
|
|
4
4
|
"description": "server framework that provide IOC/type-reuse/http&rpc-adaptor",
|
|
5
5
|
"author": "fgsreally",
|
|
6
6
|
"license": "MIT",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"picocolors": "^1.0.0",
|
|
157
157
|
"reflect-metadata": "^0.1.13",
|
|
158
158
|
"ts-mixer": "^6.0.4",
|
|
159
|
-
"phecda-core": "4.1.0-alpha.
|
|
159
|
+
"phecda-core": "4.1.0-alpha.1"
|
|
160
160
|
},
|
|
161
161
|
"devDependencies": {
|
|
162
162
|
"@koa/router": "^12.0.1",
|
package/register/loader.mjs
CHANGED
|
@@ -153,16 +153,14 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
153
153
|
shortCircuit: true,
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
// if (isAbsolute(specifier))
|
|
157
|
-
// specifier = pathToFileURL(specifier).href
|
|
158
156
|
|
|
159
157
|
// entrypoint
|
|
160
158
|
if (!context.parentURL)
|
|
161
159
|
return nextResolve(specifier)
|
|
162
160
|
|
|
163
|
-
//
|
|
164
|
-
if (context.parentURL.includes('/node_modules/') &&
|
|
165
|
-
|
|
161
|
+
// @todo skip resolve to improve performance
|
|
162
|
+
// if (context.parentURL.includes('/node_modules/') && specifier.includes('/node_modules/'))
|
|
163
|
+
// return nextResolve(specifier)
|
|
166
164
|
|
|
167
165
|
const { resolvedModule } = ts.resolveModuleName(
|
|
168
166
|
specifier,
|
|
@@ -208,8 +206,10 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
208
206
|
const resolveRet = await nextResolve(specifier)
|
|
209
207
|
|
|
210
208
|
// ts resolve fail in some cases
|
|
211
|
-
if (resolveRet.url && isAbsolute(resolveRet.url))
|
|
212
|
-
|
|
209
|
+
if (resolveRet.url && isAbsolute(resolveRet.url)) {
|
|
210
|
+
const [path, query] = resolveRet.url.split('?')
|
|
211
|
+
resolveRet.url = pathToFileURL(path).href + (query ? `?${query}` : '')
|
|
212
|
+
}
|
|
213
213
|
|
|
214
214
|
return resolveRet
|
|
215
215
|
}
|