phecda-server 7.0.0-alpha.13 → 7.0.0-alpha.15

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.
Files changed (47) hide show
  1. package/bin/cli.mjs +3 -0
  2. package/dist/{core-jUg1HvYT.d.mts → core-DiFYc0bC.d.mts} +1 -1
  3. package/dist/{core-CDzIy2g0.d.ts → core-KvmgTDU0.d.ts} +1 -1
  4. package/dist/helper.d.mts +1 -1
  5. package/dist/helper.d.ts +1 -1
  6. package/dist/http/elysia/index.d.mts +4 -4
  7. package/dist/http/elysia/index.d.ts +4 -4
  8. package/dist/http/express/index.d.mts +3 -3
  9. package/dist/http/express/index.d.ts +3 -3
  10. package/dist/http/fastify/index.d.mts +3 -3
  11. package/dist/http/fastify/index.d.ts +3 -3
  12. package/dist/http/h3/index.d.mts +3 -3
  13. package/dist/http/h3/index.d.ts +3 -3
  14. package/dist/http/hono/index.d.mts +3 -3
  15. package/dist/http/hono/index.d.ts +3 -3
  16. package/dist/http/hyper-express/index.d.mts +3 -3
  17. package/dist/http/hyper-express/index.d.ts +3 -3
  18. package/dist/http/koa/index.d.mts +3 -3
  19. package/dist/http/koa/index.d.ts +3 -3
  20. package/dist/index.d.mts +8 -8
  21. package/dist/index.d.ts +8 -8
  22. package/dist/index.js +2 -3
  23. package/dist/index.mjs +10 -11
  24. package/dist/{meta-xvg6V7pH.d.mts → meta-DlHaMicF.d.mts} +1 -2
  25. package/dist/{meta-xvg6V7pH.d.ts → meta-DlHaMicF.d.ts} +1 -2
  26. package/dist/rpc/bullmq/index.d.mts +3 -3
  27. package/dist/rpc/bullmq/index.d.ts +3 -3
  28. package/dist/rpc/electron/index.d.mts +3 -3
  29. package/dist/rpc/electron/index.d.ts +3 -3
  30. package/dist/rpc/kafka/index.d.mts +3 -3
  31. package/dist/rpc/kafka/index.d.ts +3 -3
  32. package/dist/rpc/nats/index.d.mts +3 -3
  33. package/dist/rpc/nats/index.d.ts +3 -3
  34. package/dist/rpc/rabbitmq/index.d.mts +3 -3
  35. package/dist/rpc/rabbitmq/index.d.ts +3 -3
  36. package/dist/rpc/redis/index.d.mts +3 -3
  37. package/dist/rpc/redis/index.d.ts +3 -3
  38. package/dist/rpc/ws/index.d.mts +3 -3
  39. package/dist/rpc/ws/index.d.ts +3 -3
  40. package/dist/test.d.mts +2 -2
  41. package/dist/test.d.ts +2 -2
  42. package/dist/{types-6qaaUIKZ.d.mts → types-8r301ZfZ.d.mts} +1 -1
  43. package/dist/{types-B-1OL-3P.d.ts → types-Bz3JN2S1.d.ts} +1 -1
  44. package/dist/{types-Ctd6pLNE.d.mts → types-CVSbC6nz.d.mts} +1 -1
  45. package/dist/{types-BtXOT5rI.d.ts → types-DJuqpiI8.d.ts} +1 -1
  46. package/package.json +1 -1
  47. package/register/loader.mjs +9 -7
package/bin/cli.mjs CHANGED
@@ -109,6 +109,9 @@ cli
109
109
  emitDecoratorMetadata: true,
110
110
  module: 'esnext',
111
111
  lib: ['esnext', 'DOM'],
112
+ paths: {
113
+
114
+ },
112
115
  strictPropertyInitialization: false,
113
116
  moduleResolution: 'bundler',
114
117
  strict: true,
@@ -1,5 +1,5 @@
1
1
  import { Construct } from 'phecda-core';
2
- import { b as MetaData, M as Meta, E as Emitter } from './meta-xvg6V7pH.mjs';
2
+ import { b as MetaData, M as Meta, E as Emitter } from './meta-DlHaMicF.mjs';
3
3
 
4
4
  declare abstract class Generator {
5
5
  private _path;
@@ -1,5 +1,5 @@
1
1
  import { Construct } from 'phecda-core';
2
- import { b as MetaData, M as Meta, E as Emitter } from './meta-xvg6V7pH.js';
2
+ import { b as MetaData, M as Meta, E as Emitter } from './meta-DlHaMicF.js';
3
3
 
4
4
  declare abstract class Generator {
5
5
  private _path;
package/dist/helper.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as Meta, C as ControllerMeta } from './meta-xvg6V7pH.mjs';
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-xvg6V7pH.js';
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-Ctd6pLNE.mjs';
4
- import { F as Factory } from '../../core-jUg1HvYT.mjs';
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-xvg6V7pH.mjs';
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-B-1OL-3P.js';
4
- import { F as Factory } from '../../core-CDzIy2g0.js';
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-xvg6V7pH.js';
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-Ctd6pLNE.mjs';
3
- import { F as Factory } from '../../core-jUg1HvYT.mjs';
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-xvg6V7pH.mjs';
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-B-1OL-3P.js';
3
- import { F as Factory } from '../../core-CDzIy2g0.js';
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-xvg6V7pH.js';
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-Ctd6pLNE.mjs';
3
- import { F as Factory } from '../../core-jUg1HvYT.mjs';
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-xvg6V7pH.mjs';
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-B-1OL-3P.js';
3
- import { F as Factory } from '../../core-CDzIy2g0.js';
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-xvg6V7pH.js';
5
+ import '../../meta-DlHaMicF.js';
6
6
  import 'phecda-core';
7
7
 
8
8
  interface FastifyCtx extends HttpCtx {
@@ -1,8 +1,8 @@
1
1
  import { H3Event, Router, _RequestMiddleware } from 'h3';
2
- import { F as Factory } from '../../core-jUg1HvYT.mjs';
3
- import { H as HttpCtx, a as HttpOptions } from '../../types-Ctd6pLNE.mjs';
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-xvg6V7pH.mjs';
5
+ import '../../meta-DlHaMicF.mjs';
6
6
  import 'node:http';
7
7
 
8
8
  interface H3Ctx extends HttpCtx {
@@ -1,8 +1,8 @@
1
1
  import { H3Event, Router, _RequestMiddleware } from 'h3';
2
- import { F as Factory } from '../../core-CDzIy2g0.js';
3
- import { H as HttpCtx, a as HttpOptions } from '../../types-B-1OL-3P.js';
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-xvg6V7pH.js';
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-Ctd6pLNE.mjs';
3
- import { F as Factory } from '../../core-jUg1HvYT.mjs';
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-xvg6V7pH.mjs';
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-B-1OL-3P.js';
3
- import { F as Factory } from '../../core-CDzIy2g0.js';
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-xvg6V7pH.js';
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-Ctd6pLNE.mjs';
3
- import { F as Factory } from '../../core-jUg1HvYT.mjs';
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-xvg6V7pH.mjs';
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-B-1OL-3P.js';
3
- import { F as Factory } from '../../core-CDzIy2g0.js';
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-xvg6V7pH.js';
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-Ctd6pLNE.mjs';
4
- import { F as Factory } from '../../core-jUg1HvYT.mjs';
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-xvg6V7pH.mjs';
6
+ import '../../meta-DlHaMicF.mjs';
7
7
  import 'phecda-core';
8
8
 
9
9
  interface KoaCtx 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-B-1OL-3P.js';
4
- import { F as Factory } from '../../core-CDzIy2g0.js';
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-xvg6V7pH.js';
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-xvg6V7pH.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-xvg6V7pH.mjs';
3
- import { G as Generator } from './core-jUg1HvYT.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-jUg1HvYT.mjs';
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-Ctd6pLNE.mjs';
8
- export { C as CookieSerializeOptions, a as HttpOptions } from './types-Ctd6pLNE.mjs';
9
- import { R as RpcCtx } from './types-6qaaUIKZ.mjs';
10
- export { a as RpcServerOptions } from './types-6qaaUIKZ.mjs';
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-xvg6V7pH.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-xvg6V7pH.js';
3
- import { G as Generator } from './core-CDzIy2g0.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-CDzIy2g0.js';
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-B-1OL-3P.js';
8
- export { C as CookieSerializeOptions, a as HttpOptions } from './types-B-1OL-3P.js';
9
- import { R as RpcCtx } from './types-BtXOT5rI.js';
10
- export { a as RpcServerOptions } from './types-BtXOT5rI.js';
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
@@ -6,7 +6,6 @@
6
6
 
7
7
 
8
8
 
9
- var _chunk6OQ2SB5Wjs = require('./chunk-6OQ2SB5W.js');
10
9
 
11
10
 
12
11
 
@@ -23,6 +22,7 @@ var _chunk6OQ2SB5Wjs = require('./chunk-6OQ2SB5W.js');
23
22
 
24
23
 
25
24
 
25
+ var _chunkKCPBITYZjs = require('./chunk-KCPBITYZ.js');
26
26
 
27
27
 
28
28
 
@@ -31,7 +31,7 @@ var _chunk6OQ2SB5Wjs = require('./chunk-6OQ2SB5W.js');
31
31
 
32
32
 
33
33
 
34
- var _chunkKCPBITYZjs = require('./chunk-KCPBITYZ.js');
34
+ var _chunk6OQ2SB5Wjs = require('./chunk-6OQ2SB5W.js');
35
35
 
36
36
 
37
37
 
@@ -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
@@ -1,12 +1,3 @@
1
- import {
2
- Factory,
3
- Meta,
4
- ServerPhecda,
5
- defaultServerInject,
6
- emitter,
7
- phecdaNamespace,
8
- useS
9
- } from "./chunk-YCES6ABN.mjs";
10
1
  import {
11
2
  Addon,
12
3
  Arg,
@@ -32,6 +23,15 @@ import {
32
23
  Rpc,
33
24
  Search
34
25
  } from "./chunk-MUI6MTUO.mjs";
26
+ import {
27
+ Factory,
28
+ Meta,
29
+ ServerPhecda,
30
+ defaultServerInject,
31
+ emitter,
32
+ phecdaNamespace,
33
+ useS
34
+ } from "./chunk-YCES6ABN.mjs";
35
35
  import {
36
36
  BadGatewayException,
37
37
  BadRequestException,
@@ -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
- [ResponseSymbol];
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
- [ResponseSymbol]: Value;
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
- [ResponseSymbol]: Value;
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-jUg1HvYT.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-6qaaUIKZ.mjs';
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-xvg6V7pH.mjs';
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-CDzIy2g0.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BtXOT5rI.js';
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-xvg6V7pH.js';
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-jUg1HvYT.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-6qaaUIKZ.mjs';
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-xvg6V7pH.mjs';
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-CDzIy2g0.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BtXOT5rI.js';
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-xvg6V7pH.js';
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-jUg1HvYT.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-6qaaUIKZ.mjs';
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-xvg6V7pH.mjs';
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-CDzIy2g0.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BtXOT5rI.js';
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-xvg6V7pH.js';
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-jUg1HvYT.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-6qaaUIKZ.mjs';
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-xvg6V7pH.mjs';
5
+ import '../../meta-DlHaMicF.mjs';
6
6
 
7
7
  interface NatsCtx extends RpcCtx {
8
8
  type: 'nats';
@@ -1,8 +1,8 @@
1
1
  import { NatsConnection } from 'nats';
2
- import { F as Factory } from '../../core-CDzIy2g0.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BtXOT5rI.js';
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-xvg6V7pH.js';
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-jUg1HvYT.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-6qaaUIKZ.mjs';
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-xvg6V7pH.mjs';
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-CDzIy2g0.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BtXOT5rI.js';
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-xvg6V7pH.js';
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-jUg1HvYT.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-6qaaUIKZ.mjs';
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-xvg6V7pH.mjs';
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-CDzIy2g0.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BtXOT5rI.js';
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-xvg6V7pH.js';
5
+ import '../../meta-DlHaMicF.js';
6
6
 
7
7
  interface RedisCtx extends RpcCtx {
8
8
  type: 'redis';
@@ -1,8 +1,8 @@
1
1
  import WS from 'ws';
2
- import { F as Factory } from '../../core-jUg1HvYT.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-6qaaUIKZ.mjs';
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-xvg6V7pH.mjs';
5
+ import '../../meta-DlHaMicF.mjs';
6
6
 
7
7
  interface WsCtx extends RpcCtx {
8
8
  type: 'ws';
@@ -1,8 +1,8 @@
1
1
  import WS from 'ws';
2
- import { F as Factory } from '../../core-CDzIy2g0.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BtXOT5rI.js';
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-xvg6V7pH.js';
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-jUg1HvYT.mjs';
6
- import { e as CustomResponse } from './meta-xvg6V7pH.mjs';
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-CDzIy2g0.js';
6
- import { e as CustomResponse } from './meta-xvg6V7pH.js';
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,4 +1,4 @@
1
- import { D as DefaultOptions, B as BaseCtx } from './meta-xvg6V7pH.mjs';
1
+ import { B as BaseCtx, D as DefaultOptions } from './meta-DlHaMicF.mjs';
2
2
 
3
3
  interface RpcServerOptions extends DefaultOptions {
4
4
  defaultQueue?: string;
@@ -1,5 +1,5 @@
1
1
  import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
2
- import { D as DefaultOptions, B as BaseCtx } from './meta-xvg6V7pH.js';
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 { D as DefaultOptions, B as BaseCtx } from './meta-xvg6V7pH.mjs';
2
+ import { B as BaseCtx, D as DefaultOptions } from './meta-DlHaMicF.mjs';
3
3
 
4
4
  interface HttpOptions extends DefaultOptions {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { D as DefaultOptions, B as BaseCtx } from './meta-xvg6V7pH.js';
1
+ import { B as BaseCtx, D as DefaultOptions } from './meta-DlHaMicF.js';
2
2
 
3
3
  interface RpcServerOptions extends DefaultOptions {
4
4
  defaultQueue?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-server",
3
- "version": "7.0.0-alpha.13",
3
+ "version": "7.0.0-alpha.15",
4
4
  "description": "server framework that provide IOC/type-reuse/http&rpc-adaptor",
5
5
  "author": "fgsreally",
6
6
  "license": "MIT",
@@ -51,6 +51,7 @@ if (!tsRet.error) {
51
51
  if (!error)
52
52
  tsconfig = options
53
53
  }
54
+
54
55
  const moduleResolutionCache = ts.createModuleResolutionCache(
55
56
  ts.sys.getCurrentDirectory(),
56
57
  x => x,
@@ -152,16 +153,15 @@ export const resolve = async (specifier, context, nextResolve) => {
152
153
  shortCircuit: true,
153
154
  }
154
155
  }
155
- // if (isAbsolute(specifier))
156
- // specifier = pathToFileURL(specifier).href
157
156
 
158
157
  // entrypoint
159
158
  if (!context.parentURL)
160
159
  return nextResolve(specifier)
161
160
 
162
- // import/require from external library
163
- if (context.parentURL.includes('/node_modules/'))
164
- return nextResolve(specifier)
161
+ // @todo skip resolve to improve performance
162
+ // if (context.parentURL.includes('/node_modules/') && specifier.includes('/node_modules/'))
163
+ // return nextResolve(specifier)
164
+
165
165
  const { resolvedModule } = ts.resolveModuleName(
166
166
  specifier,
167
167
  fileURLToPath(context.parentURL),
@@ -206,8 +206,10 @@ export const resolve = async (specifier, context, nextResolve) => {
206
206
  const resolveRet = await nextResolve(specifier)
207
207
 
208
208
  // ts resolve fail in some cases
209
- if (resolveRet.url && isAbsolute(resolveRet.url))
210
- resolveRet.url = pathToFileURL(resolveRet.url).href
209
+ if (resolveRet.url && isAbsolute(resolveRet.url)) {
210
+ const [path, query] = resolveRet.url.split('?')
211
+ resolveRet.url = pathToFileURL(path).href + (query ? `?${query}` : '')
212
+ }
211
213
 
212
214
  return resolveRet
213
215
  }