phecda-server 8.3.0 → 8.4.0

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 (53) hide show
  1. package/dist/{chunk-LYLSA56Y.mjs → chunk-3OKDXHO7.mjs} +3 -11
  2. package/dist/{chunk-C424F7TV.js → chunk-RS6H6TEX.js} +3 -11
  3. package/dist/{core-D1YYphEn.d.mts → core-mOKtuP0F.d.mts} +1 -1
  4. package/dist/{core-BTSHIAyB.d.ts → core-qL97H3d_.d.ts} +1 -1
  5. package/dist/helper.d.mts +1 -1
  6. package/dist/helper.d.ts +1 -1
  7. package/dist/http/elysia/index.d.mts +3 -3
  8. package/dist/http/elysia/index.d.ts +3 -3
  9. package/dist/http/elysia/index.js +2 -2
  10. package/dist/http/elysia/index.mjs +1 -1
  11. package/dist/http/express/index.d.mts +3 -3
  12. package/dist/http/express/index.d.ts +3 -3
  13. package/dist/http/fastify/index.d.mts +3 -3
  14. package/dist/http/fastify/index.d.ts +3 -3
  15. package/dist/http/fastify/index.js +2 -2
  16. package/dist/http/fastify/index.mjs +1 -1
  17. package/dist/http/h3/index.d.mts +3 -3
  18. package/dist/http/h3/index.d.ts +3 -3
  19. package/dist/http/hono/index.d.mts +3 -3
  20. package/dist/http/hono/index.d.ts +3 -3
  21. package/dist/http/hyper-express/index.d.mts +3 -3
  22. package/dist/http/hyper-express/index.d.ts +3 -3
  23. package/dist/http/koa/index.d.mts +3 -3
  24. package/dist/http/koa/index.d.ts +3 -3
  25. package/dist/index.d.mts +13 -14
  26. package/dist/index.d.ts +13 -14
  27. package/dist/index.js +4 -6
  28. package/dist/index.mjs +4 -6
  29. package/dist/{meta-DNF6Fl27.d.mts → meta-EGS-4cNY.d.mts} +1 -1
  30. package/dist/{meta-DNF6Fl27.d.ts → meta-EGS-4cNY.d.ts} +1 -1
  31. package/dist/rpc/bullmq/index.d.mts +3 -3
  32. package/dist/rpc/bullmq/index.d.ts +3 -3
  33. package/dist/rpc/electron/index.d.mts +3 -3
  34. package/dist/rpc/electron/index.d.ts +3 -3
  35. package/dist/rpc/kafka/index.d.mts +3 -3
  36. package/dist/rpc/kafka/index.d.ts +3 -3
  37. package/dist/rpc/nats/index.d.mts +3 -3
  38. package/dist/rpc/nats/index.d.ts +3 -3
  39. package/dist/rpc/rabbitmq/index.d.mts +3 -3
  40. package/dist/rpc/rabbitmq/index.d.ts +3 -3
  41. package/dist/rpc/redis/index.d.mts +3 -3
  42. package/dist/rpc/redis/index.d.ts +3 -3
  43. package/dist/rpc/ws/index.d.mts +3 -3
  44. package/dist/rpc/ws/index.d.ts +3 -3
  45. package/dist/test.d.mts +4 -3
  46. package/dist/test.d.ts +4 -3
  47. package/dist/test.js +4 -2
  48. package/dist/test.mjs +4 -2
  49. package/dist/{types-DtiHAXQB.d.mts → types-BkU6kQWV.d.mts} +1 -1
  50. package/dist/{types-BOZ8yE2L.d.mts → types-CoOCYe_X.d.mts} +1 -1
  51. package/dist/{types-Cosv4nol.d.ts → types-DGUpAXle.d.ts} +1 -1
  52. package/dist/{types-YJ55P7A_.d.ts → types-NkRE3d35.d.ts} +1 -1
  53. package/package.json +1 -1
@@ -46,20 +46,13 @@ function Arg(target, k, index) {
46
46
  })(target, k, index);
47
47
  }
48
48
  __name(Arg, "Arg");
49
- function OneFile(key = "") {
49
+ function UploadFile(key = "") {
50
50
  return BaseParam({
51
51
  type: "file",
52
52
  key
53
53
  });
54
54
  }
55
- __name(OneFile, "OneFile");
56
- function ManyFiles(key = "") {
57
- return BaseParam({
58
- type: "files",
59
- key
60
- });
61
- }
62
- __name(ManyFiles, "ManyFiles");
55
+ __name(UploadFile, "UploadFile");
63
56
 
64
57
  // src/decorators/aop.ts
65
58
  import { setMeta as setMeta2 } from "phecda-core";
@@ -234,8 +227,7 @@ export {
234
227
  Query,
235
228
  Param,
236
229
  Arg,
237
- OneFile,
238
- ManyFiles,
230
+ UploadFile,
239
231
  Guard,
240
232
  Addon,
241
233
  Filter,
@@ -46,20 +46,13 @@ function Arg(target, k, index) {
46
46
  })(target, k, index);
47
47
  }
48
48
  _chunkOUQM7GZHjs.__name.call(void 0, Arg, "Arg");
49
- function OneFile(key = "") {
49
+ function UploadFile(key = "") {
50
50
  return BaseParam({
51
51
  type: "file",
52
52
  key
53
53
  });
54
54
  }
55
- _chunkOUQM7GZHjs.__name.call(void 0, OneFile, "OneFile");
56
- function ManyFiles(key = "") {
57
- return BaseParam({
58
- type: "files",
59
- key
60
- });
61
- }
62
- _chunkOUQM7GZHjs.__name.call(void 0, ManyFiles, "ManyFiles");
55
+ _chunkOUQM7GZHjs.__name.call(void 0, UploadFile, "UploadFile");
63
56
 
64
57
  // src/decorators/aop.ts
65
58
 
@@ -253,5 +246,4 @@ _chunkOUQM7GZHjs.__name.call(void 0, ApiDoc, "ApiDoc");
253
246
 
254
247
 
255
248
 
256
-
257
- exports.BaseParam = BaseParam; exports.Body = Body; exports.Head = Head; exports.Query = Query; exports.Param = Param; exports.Arg = Arg; exports.OneFile = OneFile; exports.ManyFiles = ManyFiles; exports.Guard = Guard; exports.Addon = Addon; exports.Filter = Filter; exports.Pipe = Pipe; exports.Route = Route; exports.Header = Header; exports.Get = Get; exports.Post = Post; exports.Put = Put; exports.Search = Search; exports.Patch = Patch; exports.Delete = Delete; exports.Controller = Controller; exports.Queue = Queue; exports.Rpc = Rpc; exports.Ctx = Ctx; exports.Define = Define; exports.ApiDoc = ApiDoc;
249
+ exports.BaseParam = BaseParam; exports.Body = Body; exports.Head = Head; exports.Query = Query; exports.Param = Param; exports.Arg = Arg; exports.UploadFile = UploadFile; exports.Guard = Guard; exports.Addon = Addon; exports.Filter = Filter; exports.Pipe = Pipe; exports.Route = Route; exports.Header = Header; exports.Get = Get; exports.Post = Post; exports.Put = Put; exports.Search = Search; exports.Patch = Patch; exports.Delete = Delete; exports.Controller = Controller; exports.Queue = Queue; exports.Rpc = Rpc; exports.Ctx = Ctx; exports.Define = Define; exports.ApiDoc = ApiDoc;
@@ -1,5 +1,5 @@
1
1
  import { Construct } from 'phecda-core';
2
- import { M as Meta, E as Emitter } from './meta-DNF6Fl27.mjs';
2
+ import { M as Meta, E as Emitter } from './meta-EGS-4cNY.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 { M as Meta, E as Emitter } from './meta-DNF6Fl27.js';
2
+ import { M as Meta, E as Emitter } from './meta-EGS-4cNY.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, a as ControllerMeta } from './meta-DNF6Fl27.mjs';
1
+ import { M as Meta, a as ControllerMeta } from './meta-EGS-4cNY.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, a as ControllerMeta } from './meta-DNF6Fl27.js';
1
+ import { M as Meta, a as ControllerMeta } from './meta-EGS-4cNY.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-DtiHAXQB.mjs';
4
- import { F as Factory } from '../../core-D1YYphEn.mjs';
3
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BkU6kQWV.mjs';
4
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
5
5
  import 'node:http';
6
- import '../../meta-DNF6Fl27.mjs';
6
+ import '../../meta-EGS-4cNY.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-Cosv4nol.js';
4
- import { F as Factory } from '../../core-BTSHIAyB.js';
3
+ import { H as HttpCtx, a as HttpOptions } from '../../types-DGUpAXle.js';
4
+ import { F as Factory } from '../../core-qL97H3d_.js';
5
5
  import 'node:http';
6
- import '../../meta-DNF6Fl27.js';
6
+ import '../../meta-EGS-4cNY.js';
7
7
  import 'phecda-core';
8
8
 
9
9
  interface ElysiaCtx extends HttpCtx {
@@ -1,6 +1,6 @@
1
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
2
 
3
- var _chunkC424F7TVjs = require('../../chunk-C424F7TV.js');
3
+ var _chunkRS6H6TEXjs = require('../../chunk-RS6H6TEX.js');
4
4
 
5
5
 
6
6
 
@@ -177,7 +177,7 @@ function bind(app, data, opts = {}) {
177
177
  }
178
178
  _chunkOUQM7GZHjs.__name.call(void 0, bind, "bind");
179
179
  function Elysia(opts) {
180
- return _chunkC424F7TVjs.Define.call(void 0, "elysia", opts);
180
+ return _chunkRS6H6TEXjs.Define.call(void 0, "elysia", opts);
181
181
  }
182
182
  _chunkOUQM7GZHjs.__name.call(void 0, Elysia, "Elysia");
183
183
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Define
3
- } from "../../chunk-LYLSA56Y.mjs";
3
+ } from "../../chunk-3OKDXHO7.mjs";
4
4
  import {
5
5
  BadRequestException,
6
6
  Context,
@@ -1,8 +1,8 @@
1
1
  import { Request, Response, Router, RequestHandler } from 'express';
2
- import { H as HttpCtx, a as HttpOptions } from '../../types-DtiHAXQB.mjs';
3
- import { F as Factory } from '../../core-D1YYphEn.mjs';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BkU6kQWV.mjs';
3
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
4
4
  import 'node:http';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-Cosv4nol.js';
3
- import { F as Factory } from '../../core-BTSHIAyB.js';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-DGUpAXle.js';
3
+ import { F as Factory } from '../../core-qL97H3d_.js';
4
4
  import 'node:http';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-DtiHAXQB.mjs';
3
- import { F as Factory } from '../../core-D1YYphEn.mjs';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BkU6kQWV.mjs';
3
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
4
4
  import 'node:http';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-Cosv4nol.js';
3
- import { F as Factory } from '../../core-BTSHIAyB.js';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-DGUpAXle.js';
3
+ import { F as Factory } from '../../core-qL97H3d_.js';
4
4
  import 'node:http';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.js';
6
6
  import 'phecda-core';
7
7
 
8
8
  interface FastifyCtx extends HttpCtx {
@@ -1,6 +1,6 @@
1
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
2
 
3
- var _chunkC424F7TVjs = require('../../chunk-C424F7TV.js');
3
+ var _chunkRS6H6TEXjs = require('../../chunk-RS6H6TEX.js');
4
4
 
5
5
 
6
6
 
@@ -166,7 +166,7 @@ function bind(fastify, data, opts = {}) {
166
166
  }
167
167
  _chunkOUQM7GZHjs.__name.call(void 0, bind, "bind");
168
168
  function Fastify(opts) {
169
- return _chunkC424F7TVjs.Define.call(void 0, "fastify", opts);
169
+ return _chunkRS6H6TEXjs.Define.call(void 0, "fastify", opts);
170
170
  }
171
171
  _chunkOUQM7GZHjs.__name.call(void 0, Fastify, "Fastify");
172
172
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Define
3
- } from "../../chunk-LYLSA56Y.mjs";
3
+ } from "../../chunk-3OKDXHO7.mjs";
4
4
  import {
5
5
  BadRequestException,
6
6
  Context,
@@ -1,8 +1,8 @@
1
1
  import { H3Event, Router, _RequestMiddleware } from 'h3';
2
- import { F as Factory } from '../../core-D1YYphEn.mjs';
3
- import { H as HttpCtx, a as HttpOptions } from '../../types-DtiHAXQB.mjs';
2
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
3
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BkU6kQWV.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-BTSHIAyB.js';
3
- import { H as HttpCtx, a as HttpOptions } from '../../types-Cosv4nol.js';
2
+ import { F as Factory } from '../../core-qL97H3d_.js';
3
+ import { H as HttpCtx, a as HttpOptions } from '../../types-DGUpAXle.js';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-DtiHAXQB.mjs';
3
- import { F as Factory } from '../../core-D1YYphEn.mjs';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BkU6kQWV.mjs';
3
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
4
4
  import 'node:http';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-Cosv4nol.js';
3
- import { F as Factory } from '../../core-BTSHIAyB.js';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-DGUpAXle.js';
3
+ import { F as Factory } from '../../core-qL97H3d_.js';
4
4
  import 'node:http';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-DtiHAXQB.mjs';
3
- import { F as Factory } from '../../core-D1YYphEn.mjs';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BkU6kQWV.mjs';
3
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
4
4
  import 'node:http';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-Cosv4nol.js';
3
- import { F as Factory } from '../../core-BTSHIAyB.js';
2
+ import { H as HttpCtx, a as HttpOptions } from '../../types-DGUpAXle.js';
3
+ import { F as Factory } from '../../core-qL97H3d_.js';
4
4
  import 'node:http';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-DtiHAXQB.mjs';
4
- import { F as Factory } from '../../core-D1YYphEn.mjs';
3
+ import { H as HttpCtx, a as HttpOptions } from '../../types-BkU6kQWV.mjs';
4
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
5
5
  import 'node:http';
6
- import '../../meta-DNF6Fl27.mjs';
6
+ import '../../meta-EGS-4cNY.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-Cosv4nol.js';
4
- import { F as Factory } from '../../core-BTSHIAyB.js';
3
+ import { H as HttpCtx, a as HttpOptions } from '../../types-DGUpAXle.js';
4
+ import { F as Factory } from '../../core-qL97H3d_.js';
5
5
  import 'node:http';
6
- import '../../meta-DNF6Fl27.js';
6
+ import '../../meta-EGS-4cNY.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, a as ControllerMeta, D as DefaultOptions, b as ControllerMetaData, M as Meta, E as Emitter, c as BaseError } from './meta-DNF6Fl27.mjs';
2
- export { d as BaseRequestMethod, C as CustomResponse, g as ERROR_SYMBOL, e as ExtractResponse, I as IS_DEV, h as IS_ONLY_GENERATE, j as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, f as MetaData, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-DNF6Fl27.mjs';
3
- import { G as Generator } from './core-D1YYphEn.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-D1YYphEn.mjs';
1
+ import { B as BaseCtx, b as BaseError, a as ControllerMeta, D as DefaultOptions, c as ControllerMetaData, M as Meta, E as Emitter } from './meta-EGS-4cNY.mjs';
2
+ export { d as BaseRequestMethod, C as CustomResponse, g as ERROR_SYMBOL, e as ExtractResponse, I as IS_DEV, h as IS_ONLY_GENERATE, j as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, f as MetaData, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-EGS-4cNY.mjs';
3
+ import { G as Generator } from './core-mOKtuP0F.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-mOKtuP0F.mjs';
5
5
  import { Construct, Base } from 'phecda-core';
6
6
  export * from 'phecda-core';
7
- import { H as HttpCtx } from './types-DtiHAXQB.mjs';
8
- export { C as CookieSerializeOptions, a as HttpOptions } from './types-DtiHAXQB.mjs';
9
- import { R as RpcCtx } from './types-BOZ8yE2L.mjs';
10
- export { a as RpcServerOptions } from './types-BOZ8yE2L.mjs';
7
+ import { H as HttpCtx } from './types-BkU6kQWV.mjs';
8
+ export { C as CookieSerializeOptions, a as HttpOptions } from './types-BkU6kQWV.mjs';
9
+ import { R as RpcCtx } from './types-CoOCYe_X.mjs';
10
+ export { a as RpcServerOptions } from './types-CoOCYe_X.mjs';
11
11
  export { Mixin } from 'ts-mixer';
12
12
  import 'node:http';
13
13
 
@@ -21,7 +21,7 @@ declare class Exception extends Error {
21
21
  message: string;
22
22
  description: string;
23
23
  status: number;
24
- __PS_ERROR__: boolean;
24
+ __PS_ERROR__: true;
25
25
  };
26
26
  }
27
27
 
@@ -106,7 +106,7 @@ interface PipeArg {
106
106
  }
107
107
  type GuardType<Ctx extends BaseCtx = any> = (ctx: Ctx, next: () => Promise<any>) => any;
108
108
  type PipeType<Ctx extends BaseCtx = any> = (arg: PipeArg, ctx: Ctx) => Promise<any>;
109
- type FilterType<Ctx extends BaseCtx = any, E extends Exception = any> = (err: E | Error, ctx?: Ctx) => Error | any;
109
+ type FilterType<Ctx extends BaseCtx = any, E extends Exception = any> = (err: E | Error, ctx?: Ctx) => BaseError;
110
110
  declare class Context<Ctx extends BaseCtx> {
111
111
  data: Ctx;
112
112
  method: string;
@@ -201,8 +201,7 @@ declare function Head(key: string): ParameterDecorator;
201
201
  declare function Query(key?: string): ParameterDecorator;
202
202
  declare function Param(key: string): ParameterDecorator;
203
203
  declare function Arg(target: any, k: string, index: number): void;
204
- declare function OneFile(key?: string): ParameterDecorator;
205
- declare function ManyFiles(key?: string): ParameterDecorator;
204
+ declare function UploadFile(key?: string): ParameterDecorator;
206
205
 
207
206
  declare function Guard(...guards: string[]): (target: any, property?: PropertyKey) => void;
208
207
  declare function Addon(...addons: string[]): (target: any, property?: PropertyKey) => void;
@@ -336,7 +335,7 @@ declare abstract class PAddon extends ServerBase {
336
335
  }
337
336
 
338
337
  interface PExtension<Ctx extends BaseCtx = any, E extends Exception = Exception> {
339
- guard(ctx: Ctx): Promise<boolean> | boolean;
338
+ guard(ctx: Ctx, next: () => Promise<any>): any;
340
339
  pipe(param: {
341
340
  arg: any;
342
341
  option?: any;
@@ -357,4 +356,4 @@ declare class PExtension extends ServerBase {
357
356
 
358
357
  declare const defaultFilter: FilterType;
359
358
 
360
- export { type AOP, Addon, ApiDoc, Arg, BadGatewayException, BadRequestException, BaseCtx, BaseError, BaseParam, Body, ConflictException, Context, Controller, ControllerMeta, ControllerMetaData, Ctx, DefaultOptions, Define, Delete, DocGenerator, Emitter, Exception, Filter, type FilterType, ForbiddenException, FrameworkException, Generator, Get, GraphGenerator, Guard, type GuardType, HTTPGenerator, Head, Header, HttpBase, HttpCtx, InvalidInputException, type LogLevel, type Logger, ManyFiles, Meta, NotFoundException, OneFile, type OpenAPIConfig, OpenAPIGenerator, PAddon, PExtension, PFilter, PGuard, PPipe, Param, Patch, PayloadLargeException, Pipe, type PipeArg, type PipeType, Post, Put, Query, Queue, RPCGenerator, Route, Rpc, RpcBase, RpcCtx, Search, ServerBase, ServiceUnavailableException, TimeoutException, TimerException, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, ValidateException, WorkerException, addAddon, addFilter, addGuard, addPipe, defaultFilter, defaultPipe, getLogger, log, runMiddleware, setLogger };
359
+ export { type AOP, Addon, ApiDoc, Arg, BadGatewayException, BadRequestException, BaseCtx, BaseError, BaseParam, Body, ConflictException, Context, Controller, ControllerMeta, ControllerMetaData, Ctx, DefaultOptions, Define, Delete, DocGenerator, Emitter, Exception, Filter, type FilterType, ForbiddenException, FrameworkException, Generator, Get, GraphGenerator, Guard, type GuardType, HTTPGenerator, Head, Header, HttpBase, HttpCtx, InvalidInputException, type LogLevel, type Logger, Meta, NotFoundException, type OpenAPIConfig, OpenAPIGenerator, PAddon, PExtension, PFilter, PGuard, PPipe, Param, Patch, PayloadLargeException, Pipe, type PipeArg, type PipeType, Post, Put, Query, Queue, RPCGenerator, Route, Rpc, RpcBase, RpcCtx, Search, ServerBase, ServiceUnavailableException, TimeoutException, TimerException, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, UploadFile, ValidateException, WorkerException, addAddon, addFilter, addGuard, addPipe, defaultFilter, defaultPipe, getLogger, log, runMiddleware, setLogger };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { B as BaseCtx, a as ControllerMeta, D as DefaultOptions, b as ControllerMetaData, M as Meta, E as Emitter, c as BaseError } from './meta-DNF6Fl27.js';
2
- export { d as BaseRequestMethod, C as CustomResponse, g as ERROR_SYMBOL, e as ExtractResponse, I as IS_DEV, h as IS_ONLY_GENERATE, j as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, f as MetaData, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-DNF6Fl27.js';
3
- import { G as Generator } from './core-BTSHIAyB.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-BTSHIAyB.js';
1
+ import { B as BaseCtx, b as BaseError, a as ControllerMeta, D as DefaultOptions, c as ControllerMetaData, M as Meta, E as Emitter } from './meta-EGS-4cNY.js';
2
+ export { d as BaseRequestMethod, C as CustomResponse, g as ERROR_SYMBOL, e as ExtractResponse, I as IS_DEV, h as IS_ONLY_GENERATE, j as IS_PURE, i as IS_STRICT, L as LOG_LEVEL, f as MetaData, P as PS_EXIT_CODE, S as ServiceMetaData } from './meta-EGS-4cNY.js';
3
+ import { G as Generator } from './core-qL97H3d_.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-qL97H3d_.js';
5
5
  import { Construct, Base } from 'phecda-core';
6
6
  export * from 'phecda-core';
7
- import { H as HttpCtx } from './types-Cosv4nol.js';
8
- export { C as CookieSerializeOptions, a as HttpOptions } from './types-Cosv4nol.js';
9
- import { R as RpcCtx } from './types-YJ55P7A_.js';
10
- export { a as RpcServerOptions } from './types-YJ55P7A_.js';
7
+ import { H as HttpCtx } from './types-DGUpAXle.js';
8
+ export { C as CookieSerializeOptions, a as HttpOptions } from './types-DGUpAXle.js';
9
+ import { R as RpcCtx } from './types-NkRE3d35.js';
10
+ export { a as RpcServerOptions } from './types-NkRE3d35.js';
11
11
  export { Mixin } from 'ts-mixer';
12
12
  import 'node:http';
13
13
 
@@ -21,7 +21,7 @@ declare class Exception extends Error {
21
21
  message: string;
22
22
  description: string;
23
23
  status: number;
24
- __PS_ERROR__: boolean;
24
+ __PS_ERROR__: true;
25
25
  };
26
26
  }
27
27
 
@@ -106,7 +106,7 @@ interface PipeArg {
106
106
  }
107
107
  type GuardType<Ctx extends BaseCtx = any> = (ctx: Ctx, next: () => Promise<any>) => any;
108
108
  type PipeType<Ctx extends BaseCtx = any> = (arg: PipeArg, ctx: Ctx) => Promise<any>;
109
- type FilterType<Ctx extends BaseCtx = any, E extends Exception = any> = (err: E | Error, ctx?: Ctx) => Error | any;
109
+ type FilterType<Ctx extends BaseCtx = any, E extends Exception = any> = (err: E | Error, ctx?: Ctx) => BaseError;
110
110
  declare class Context<Ctx extends BaseCtx> {
111
111
  data: Ctx;
112
112
  method: string;
@@ -201,8 +201,7 @@ declare function Head(key: string): ParameterDecorator;
201
201
  declare function Query(key?: string): ParameterDecorator;
202
202
  declare function Param(key: string): ParameterDecorator;
203
203
  declare function Arg(target: any, k: string, index: number): void;
204
- declare function OneFile(key?: string): ParameterDecorator;
205
- declare function ManyFiles(key?: string): ParameterDecorator;
204
+ declare function UploadFile(key?: string): ParameterDecorator;
206
205
 
207
206
  declare function Guard(...guards: string[]): (target: any, property?: PropertyKey) => void;
208
207
  declare function Addon(...addons: string[]): (target: any, property?: PropertyKey) => void;
@@ -336,7 +335,7 @@ declare abstract class PAddon extends ServerBase {
336
335
  }
337
336
 
338
337
  interface PExtension<Ctx extends BaseCtx = any, E extends Exception = Exception> {
339
- guard(ctx: Ctx): Promise<boolean> | boolean;
338
+ guard(ctx: Ctx, next: () => Promise<any>): any;
340
339
  pipe(param: {
341
340
  arg: any;
342
341
  option?: any;
@@ -357,4 +356,4 @@ declare class PExtension extends ServerBase {
357
356
 
358
357
  declare const defaultFilter: FilterType;
359
358
 
360
- export { type AOP, Addon, ApiDoc, Arg, BadGatewayException, BadRequestException, BaseCtx, BaseError, BaseParam, Body, ConflictException, Context, Controller, ControllerMeta, ControllerMetaData, Ctx, DefaultOptions, Define, Delete, DocGenerator, Emitter, Exception, Filter, type FilterType, ForbiddenException, FrameworkException, Generator, Get, GraphGenerator, Guard, type GuardType, HTTPGenerator, Head, Header, HttpBase, HttpCtx, InvalidInputException, type LogLevel, type Logger, ManyFiles, Meta, NotFoundException, OneFile, type OpenAPIConfig, OpenAPIGenerator, PAddon, PExtension, PFilter, PGuard, PPipe, Param, Patch, PayloadLargeException, Pipe, type PipeArg, type PipeType, Post, Put, Query, Queue, RPCGenerator, Route, Rpc, RpcBase, RpcCtx, Search, ServerBase, ServiceUnavailableException, TimeoutException, TimerException, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, ValidateException, WorkerException, addAddon, addFilter, addGuard, addPipe, defaultFilter, defaultPipe, getLogger, log, runMiddleware, setLogger };
359
+ export { type AOP, Addon, ApiDoc, Arg, BadGatewayException, BadRequestException, BaseCtx, BaseError, BaseParam, Body, ConflictException, Context, Controller, ControllerMeta, ControllerMetaData, Ctx, DefaultOptions, Define, Delete, DocGenerator, Emitter, Exception, Filter, type FilterType, ForbiddenException, FrameworkException, Generator, Get, GraphGenerator, Guard, type GuardType, HTTPGenerator, Head, Header, HttpBase, HttpCtx, InvalidInputException, type LogLevel, type Logger, Meta, NotFoundException, type OpenAPIConfig, OpenAPIGenerator, PAddon, PExtension, PFilter, PGuard, PPipe, Param, Patch, PayloadLargeException, Pipe, type PipeArg, type PipeType, Post, Put, Query, Queue, RPCGenerator, Route, Rpc, RpcBase, RpcCtx, Search, ServerBase, ServiceUnavailableException, TimeoutException, TimerException, UnauthorizedException, UndefinedException, UnsupportedMediaTypeException, UploadFile, ValidateException, WorkerException, addAddon, addFilter, addGuard, addPipe, defaultFilter, defaultPipe, getLogger, log, runMiddleware, setLogger };
package/dist/index.js CHANGED
@@ -33,8 +33,7 @@ var _chunkSRPCXPAQjs = require('./chunk-SRPCXPAQ.js');
33
33
 
34
34
 
35
35
 
36
-
37
- var _chunkC424F7TVjs = require('./chunk-C424F7TV.js');
36
+ var _chunkRS6H6TEXjs = require('./chunk-RS6H6TEX.js');
38
37
 
39
38
 
40
39
 
@@ -115,7 +114,7 @@ var HttpBase = class extends ServerBase {
115
114
 
116
115
  };
117
116
  _ts_decorate([
118
- _chunkC424F7TVjs.Ctx,
117
+ _chunkRS6H6TEXjs.Ctx,
119
118
  _ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
120
119
  ], HttpBase.prototype, "context", void 0);
121
120
  var RpcBase = class extends ServerBase {
@@ -125,7 +124,7 @@ var RpcBase = class extends ServerBase {
125
124
 
126
125
  };
127
126
  _ts_decorate([
128
- _chunkC424F7TVjs.Ctx,
127
+ _chunkRS6H6TEXjs.Ctx,
129
128
  _ts_metadata("design:type", typeof Ctx === "undefined" ? Object : Ctx)
130
129
  ], RpcBase.prototype, "context", void 0);
131
130
 
@@ -539,5 +538,4 @@ var GraphGenerator = (_class9 = class extends Generator {constructor(...args6) {
539
538
 
540
539
 
541
540
 
542
-
543
- exports.Addon = _chunkC424F7TVjs.Addon; exports.ApiDoc = _chunkC424F7TVjs.ApiDoc; exports.Arg = _chunkC424F7TVjs.Arg; exports.BadGatewayException = _chunkR73A7HS3js.BadGatewayException; exports.BadRequestException = _chunkR73A7HS3js.BadRequestException; exports.BaseParam = _chunkC424F7TVjs.BaseParam; exports.Body = _chunkC424F7TVjs.Body; exports.ConflictException = _chunkR73A7HS3js.ConflictException; exports.Context = _chunkR73A7HS3js.Context; exports.Controller = _chunkC424F7TVjs.Controller; exports.Ctx = _chunkC424F7TVjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkC424F7TVjs.Define; exports.Delete = _chunkC424F7TVjs.Delete; exports.DocGenerator = DocGenerator; exports.ERROR_SYMBOL = _chunkOUQM7GZHjs.ERROR_SYMBOL; exports.Exception = _chunkR73A7HS3js.Exception; exports.Factory = _chunkSRPCXPAQjs.Factory; exports.Filter = _chunkC424F7TVjs.Filter; exports.ForbiddenException = _chunkR73A7HS3js.ForbiddenException; exports.FrameworkException = _chunkR73A7HS3js.FrameworkException; exports.Generator = Generator; exports.Get = _chunkC424F7TVjs.Get; exports.GraphGenerator = GraphGenerator; exports.Guard = _chunkC424F7TVjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkC424F7TVjs.Head; exports.Header = _chunkC424F7TVjs.Header; exports.HttpBase = HttpBase; exports.IS_DEV = _chunkOUQM7GZHjs.IS_DEV; exports.IS_ONLY_GENERATE = _chunkOUQM7GZHjs.IS_ONLY_GENERATE; exports.IS_PURE = _chunkOUQM7GZHjs.IS_PURE; exports.IS_STRICT = _chunkOUQM7GZHjs.IS_STRICT; exports.InvalidInputException = _chunkR73A7HS3js.InvalidInputException; exports.LOG_LEVEL = _chunkOUQM7GZHjs.LOG_LEVEL; exports.ManyFiles = _chunkC424F7TVjs.ManyFiles; exports.Meta = _chunkSRPCXPAQjs.Meta; exports.Mixin = _chunkOUQM7GZHjs.Mixin; exports.NotFoundException = _chunkR73A7HS3js.NotFoundException; exports.OneFile = _chunkC424F7TVjs.OneFile; exports.OpenAPIGenerator = OpenAPIGenerator; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunkOUQM7GZHjs.PS_EXIT_CODE; exports.Param = _chunkC424F7TVjs.Param; exports.Patch = _chunkC424F7TVjs.Patch; exports.PayloadLargeException = _chunkR73A7HS3js.PayloadLargeException; exports.Pipe = _chunkC424F7TVjs.Pipe; exports.Post = _chunkC424F7TVjs.Post; exports.Put = _chunkC424F7TVjs.Put; exports.Query = _chunkC424F7TVjs.Query; exports.Queue = _chunkC424F7TVjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkC424F7TVjs.Route; exports.Rpc = _chunkC424F7TVjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkC424F7TVjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkSRPCXPAQjs.ServerPhecda; exports.ServiceUnavailableException = _chunkR73A7HS3js.ServiceUnavailableException; exports.TimeoutException = _chunkR73A7HS3js.TimeoutException; exports.TimerException = _chunkR73A7HS3js.TimerException; exports.UnauthorizedException = _chunkR73A7HS3js.UnauthorizedException; exports.UndefinedException = _chunkR73A7HS3js.UndefinedException; exports.UnsupportedMediaTypeException = _chunkR73A7HS3js.UnsupportedMediaTypeException; exports.ValidateException = _chunkR73A7HS3js.ValidateException; exports.WorkerException = _chunkR73A7HS3js.WorkerException; exports.addAddon = _chunkR73A7HS3js.addAddon; exports.addFilter = _chunkR73A7HS3js.addFilter; exports.addGuard = _chunkR73A7HS3js.addGuard; exports.addPipe = _chunkR73A7HS3js.addPipe; exports.defaultFilter = _chunkR73A7HS3js.defaultFilter; exports.defaultPipe = _chunkR73A7HS3js.defaultPipe; exports.defaultServerInject = _chunkSRPCXPAQjs.defaultServerInject; exports.emitter = _chunkSRPCXPAQjs.emitter; exports.getLogger = _chunkOUQM7GZHjs.getLogger; exports.log = _chunkOUQM7GZHjs.log; exports.phecdaNamespace = _chunkSRPCXPAQjs.phecdaNamespace; exports.runMiddleware = _chunkOUQM7GZHjs.runMiddleware; exports.setLogger = _chunkOUQM7GZHjs.setLogger; exports.useS = _chunkSRPCXPAQjs.useS;
541
+ exports.Addon = _chunkRS6H6TEXjs.Addon; exports.ApiDoc = _chunkRS6H6TEXjs.ApiDoc; exports.Arg = _chunkRS6H6TEXjs.Arg; exports.BadGatewayException = _chunkR73A7HS3js.BadGatewayException; exports.BadRequestException = _chunkR73A7HS3js.BadRequestException; exports.BaseParam = _chunkRS6H6TEXjs.BaseParam; exports.Body = _chunkRS6H6TEXjs.Body; exports.ConflictException = _chunkR73A7HS3js.ConflictException; exports.Context = _chunkR73A7HS3js.Context; exports.Controller = _chunkRS6H6TEXjs.Controller; exports.Ctx = _chunkRS6H6TEXjs.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkRS6H6TEXjs.Define; exports.Delete = _chunkRS6H6TEXjs.Delete; exports.DocGenerator = DocGenerator; exports.ERROR_SYMBOL = _chunkOUQM7GZHjs.ERROR_SYMBOL; exports.Exception = _chunkR73A7HS3js.Exception; exports.Factory = _chunkSRPCXPAQjs.Factory; exports.Filter = _chunkRS6H6TEXjs.Filter; exports.ForbiddenException = _chunkR73A7HS3js.ForbiddenException; exports.FrameworkException = _chunkR73A7HS3js.FrameworkException; exports.Generator = Generator; exports.Get = _chunkRS6H6TEXjs.Get; exports.GraphGenerator = GraphGenerator; exports.Guard = _chunkRS6H6TEXjs.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkRS6H6TEXjs.Head; exports.Header = _chunkRS6H6TEXjs.Header; exports.HttpBase = HttpBase; exports.IS_DEV = _chunkOUQM7GZHjs.IS_DEV; exports.IS_ONLY_GENERATE = _chunkOUQM7GZHjs.IS_ONLY_GENERATE; exports.IS_PURE = _chunkOUQM7GZHjs.IS_PURE; exports.IS_STRICT = _chunkOUQM7GZHjs.IS_STRICT; exports.InvalidInputException = _chunkR73A7HS3js.InvalidInputException; exports.LOG_LEVEL = _chunkOUQM7GZHjs.LOG_LEVEL; exports.Meta = _chunkSRPCXPAQjs.Meta; exports.Mixin = _chunkOUQM7GZHjs.Mixin; exports.NotFoundException = _chunkR73A7HS3js.NotFoundException; exports.OpenAPIGenerator = OpenAPIGenerator; exports.PAddon = PAddon; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PPipe = PPipe; exports.PS_EXIT_CODE = _chunkOUQM7GZHjs.PS_EXIT_CODE; exports.Param = _chunkRS6H6TEXjs.Param; exports.Patch = _chunkRS6H6TEXjs.Patch; exports.PayloadLargeException = _chunkR73A7HS3js.PayloadLargeException; exports.Pipe = _chunkRS6H6TEXjs.Pipe; exports.Post = _chunkRS6H6TEXjs.Post; exports.Put = _chunkRS6H6TEXjs.Put; exports.Query = _chunkRS6H6TEXjs.Query; exports.Queue = _chunkRS6H6TEXjs.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkRS6H6TEXjs.Route; exports.Rpc = _chunkRS6H6TEXjs.Rpc; exports.RpcBase = RpcBase; exports.Search = _chunkRS6H6TEXjs.Search; exports.ServerBase = ServerBase; exports.ServerPhecda = _chunkSRPCXPAQjs.ServerPhecda; exports.ServiceUnavailableException = _chunkR73A7HS3js.ServiceUnavailableException; exports.TimeoutException = _chunkR73A7HS3js.TimeoutException; exports.TimerException = _chunkR73A7HS3js.TimerException; exports.UnauthorizedException = _chunkR73A7HS3js.UnauthorizedException; exports.UndefinedException = _chunkR73A7HS3js.UndefinedException; exports.UnsupportedMediaTypeException = _chunkR73A7HS3js.UnsupportedMediaTypeException; exports.UploadFile = _chunkRS6H6TEXjs.UploadFile; exports.ValidateException = _chunkR73A7HS3js.ValidateException; exports.WorkerException = _chunkR73A7HS3js.WorkerException; exports.addAddon = _chunkR73A7HS3js.addAddon; exports.addFilter = _chunkR73A7HS3js.addFilter; exports.addGuard = _chunkR73A7HS3js.addGuard; exports.addPipe = _chunkR73A7HS3js.addPipe; exports.defaultFilter = _chunkR73A7HS3js.defaultFilter; exports.defaultPipe = _chunkR73A7HS3js.defaultPipe; exports.defaultServerInject = _chunkSRPCXPAQjs.defaultServerInject; exports.emitter = _chunkSRPCXPAQjs.emitter; exports.getLogger = _chunkOUQM7GZHjs.getLogger; exports.log = _chunkOUQM7GZHjs.log; exports.phecdaNamespace = _chunkSRPCXPAQjs.phecdaNamespace; exports.runMiddleware = _chunkOUQM7GZHjs.runMiddleware; exports.setLogger = _chunkOUQM7GZHjs.setLogger; exports.useS = _chunkSRPCXPAQjs.useS;
package/dist/index.mjs CHANGED
@@ -22,8 +22,6 @@ import {
22
22
  Guard,
23
23
  Head,
24
24
  Header,
25
- ManyFiles,
26
- OneFile,
27
25
  Param,
28
26
  Patch,
29
27
  Pipe,
@@ -33,8 +31,9 @@ import {
33
31
  Queue,
34
32
  Route,
35
33
  Rpc,
36
- Search
37
- } from "./chunk-LYLSA56Y.mjs";
34
+ Search,
35
+ UploadFile
36
+ } from "./chunk-3OKDXHO7.mjs";
38
37
  import {
39
38
  BadGatewayException,
40
39
  BadRequestException,
@@ -491,11 +490,9 @@ export {
491
490
  IS_STRICT,
492
491
  InvalidInputException,
493
492
  LOG_LEVEL,
494
- ManyFiles,
495
493
  Meta,
496
494
  Mixin,
497
495
  NotFoundException,
498
- OneFile,
499
496
  OpenAPIGenerator,
500
497
  PAddon,
501
498
  PExtension,
@@ -524,6 +521,7 @@ export {
524
521
  UnauthorizedException,
525
522
  UndefinedException,
526
523
  UnsupportedMediaTypeException,
524
+ UploadFile,
527
525
  ValidateException,
528
526
  WorkerException,
529
527
  addAddon,
@@ -91,4 +91,4 @@ interface ControllerMeta extends Meta {
91
91
  data: ControllerMetaData;
92
92
  }
93
93
 
94
- export { type BaseCtx as B, CustomResponse 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 ControllerMeta as a, type ControllerMetaData as b, type BaseError as c, type BaseRequestMethod as d, type ExtractResponse as e, type MetaData as f, ERROR_SYMBOL as g, IS_ONLY_GENERATE as h, IS_STRICT as i, IS_PURE as j };
94
+ export { type BaseCtx as B, CustomResponse 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 ControllerMeta as a, type BaseError as b, type ControllerMetaData as c, type BaseRequestMethod as d, type ExtractResponse as e, type MetaData as f, ERROR_SYMBOL as g, IS_ONLY_GENERATE as h, IS_STRICT as i, IS_PURE as j };
@@ -91,4 +91,4 @@ interface ControllerMeta extends Meta {
91
91
  data: ControllerMetaData;
92
92
  }
93
93
 
94
- export { type BaseCtx as B, CustomResponse 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 ControllerMeta as a, type ControllerMetaData as b, type BaseError as c, type BaseRequestMethod as d, type ExtractResponse as e, type MetaData as f, ERROR_SYMBOL as g, IS_ONLY_GENERATE as h, IS_STRICT as i, IS_PURE as j };
94
+ export { type BaseCtx as B, CustomResponse 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 ControllerMeta as a, type BaseError as b, type ControllerMetaData as c, type BaseRequestMethod as d, type ExtractResponse as e, type MetaData as f, ERROR_SYMBOL as g, IS_ONLY_GENERATE as h, IS_STRICT as i, IS_PURE as j };
@@ -1,8 +1,8 @@
1
1
  import { WorkerOptions, QueueOptions, Worker, Queue } from 'bullmq';
2
- import { F as Factory } from '../../core-D1YYphEn.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BOZ8yE2L.mjs';
2
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CoOCYe_X.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-BTSHIAyB.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-YJ55P7A_.js';
2
+ import { F as Factory } from '../../core-qL97H3d_.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-NkRE3d35.js';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-D1YYphEn.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BOZ8yE2L.mjs';
2
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CoOCYe_X.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-BTSHIAyB.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-YJ55P7A_.js';
2
+ import { F as Factory } from '../../core-qL97H3d_.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-NkRE3d35.js';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-D1YYphEn.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BOZ8yE2L.mjs';
2
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CoOCYe_X.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-BTSHIAyB.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-YJ55P7A_.js';
2
+ import { F as Factory } from '../../core-qL97H3d_.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-NkRE3d35.js';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-D1YYphEn.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BOZ8yE2L.mjs';
2
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CoOCYe_X.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-BTSHIAyB.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-YJ55P7A_.js';
2
+ import { F as Factory } from '../../core-qL97H3d_.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-NkRE3d35.js';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-D1YYphEn.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BOZ8yE2L.mjs';
2
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CoOCYe_X.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-BTSHIAyB.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-YJ55P7A_.js';
2
+ import { F as Factory } from '../../core-qL97H3d_.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-NkRE3d35.js';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-D1YYphEn.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BOZ8yE2L.mjs';
2
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CoOCYe_X.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-BTSHIAyB.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-YJ55P7A_.js';
2
+ import { F as Factory } from '../../core-qL97H3d_.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-NkRE3d35.js';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-D1YYphEn.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-BOZ8yE2L.mjs';
2
+ import { F as Factory } from '../../core-mOKtuP0F.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CoOCYe_X.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.mjs';
5
+ import '../../meta-EGS-4cNY.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-BTSHIAyB.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-YJ55P7A_.js';
2
+ import { F as Factory } from '../../core-qL97H3d_.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-NkRE3d35.js';
4
4
  import 'phecda-core';
5
- import '../../meta-DNF6Fl27.js';
5
+ import '../../meta-EGS-4cNY.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-D1YYphEn.mjs';
6
- import { C as CustomResponse } from './meta-DNF6Fl27.mjs';
5
+ import { F as Factory } from './core-mOKtuP0F.mjs';
6
+ import { C as CustomResponse } from './meta-EGS-4cNY.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;
@@ -15,8 +15,9 @@ declare function TestFactory<T extends Construct[]>(...Modules: T): Promise<{
15
15
  type SuperTestRequest<T> = {
16
16
  [K in keyof T]: T[K] extends (...args: infer R) => any ? (...args: R) => Test : never;
17
17
  };
18
- declare function TestHttp(app: Server | any, { moduleMap, meta }: Awaited<ReturnType<typeof Factory>>, isAgent?: boolean): Promise<supertest.SuperTestWithHost<Test> & Pick<supertest.Request, "type" | "query" | "set" | "key" | "use" | "on" | "accept" | "auth" | "withCredentials" | "retry" | "ok" | "redirects" | "timeout" | "buffer" | "serialize" | "parse" | "ca" | "pfx" | "cert"> & {
18
+ declare function TestHttp(app: Server | any, { moduleMap, meta }: Awaited<ReturnType<typeof Factory>>, isAgent?: boolean): Promise<{
19
19
  module: <T extends Construct>(Module: T) => SuperTestRequest<PickFunc<InstanceType<T>>>;
20
+ agent: typeof supertest.agent;
20
21
  }>;
21
22
 
22
23
  export { type PickFunc, type SuperTestRequest, TestFactory, TestHttp };
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-BTSHIAyB.js';
6
- import { C as CustomResponse } from './meta-DNF6Fl27.js';
5
+ import { F as Factory } from './core-qL97H3d_.js';
6
+ import { C as CustomResponse } from './meta-EGS-4cNY.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;
@@ -15,8 +15,9 @@ declare function TestFactory<T extends Construct[]>(...Modules: T): Promise<{
15
15
  type SuperTestRequest<T> = {
16
16
  [K in keyof T]: T[K] extends (...args: infer R) => any ? (...args: R) => Test : never;
17
17
  };
18
- declare function TestHttp(app: Server | any, { moduleMap, meta }: Awaited<ReturnType<typeof Factory>>, isAgent?: boolean): Promise<supertest.SuperTestWithHost<Test> & Pick<supertest.Request, "type" | "query" | "set" | "key" | "use" | "on" | "accept" | "auth" | "withCredentials" | "retry" | "ok" | "redirects" | "timeout" | "buffer" | "serialize" | "parse" | "ca" | "pfx" | "cert"> & {
18
+ declare function TestHttp(app: Server | any, { moduleMap, meta }: Awaited<ReturnType<typeof Factory>>, isAgent?: boolean): Promise<{
19
19
  module: <T extends Construct>(Module: T) => SuperTestRequest<PickFunc<InstanceType<T>>>;
20
+ agent: typeof supertest.agent;
20
21
  }>;
21
22
 
22
23
  export { type PickFunc, type SuperTestRequest, TestFactory, TestHttp };
package/dist/test.js CHANGED
@@ -60,8 +60,10 @@ async function TestHttp(app, { moduleMap, meta }, isAgent = true) {
60
60
  });
61
61
  }
62
62
  _chunkOUQM7GZHjs.__name.call(void 0, module, "module");
63
- Agent.module = module;
64
- return Agent;
63
+ return {
64
+ module,
65
+ agent
66
+ };
65
67
  }
66
68
  _chunkOUQM7GZHjs.__name.call(void 0, TestHttp, "TestHttp");
67
69
 
package/dist/test.mjs CHANGED
@@ -60,8 +60,10 @@ async function TestHttp(app, { moduleMap, meta }, isAgent = true) {
60
60
  });
61
61
  }
62
62
  __name(module, "module");
63
- Agent.module = module;
64
- return Agent;
63
+ return {
64
+ module,
65
+ agent
66
+ };
65
67
  }
66
68
  __name(TestHttp, "TestHttp");
67
69
  export {
@@ -1,5 +1,5 @@
1
1
  import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
2
- import { B as BaseCtx, D as DefaultOptions } from './meta-DNF6Fl27.mjs';
2
+ import { B as BaseCtx, D as DefaultOptions } from './meta-EGS-4cNY.mjs';
3
3
 
4
4
  interface HttpOptions extends DefaultOptions {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { B as BaseCtx, D as DefaultOptions } from './meta-DNF6Fl27.mjs';
1
+ import { B as BaseCtx, D as DefaultOptions } from './meta-EGS-4cNY.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 { B as BaseCtx, D as DefaultOptions } from './meta-DNF6Fl27.js';
2
+ import { B as BaseCtx, D as DefaultOptions } from './meta-EGS-4cNY.js';
3
3
 
4
4
  interface HttpOptions extends DefaultOptions {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { B as BaseCtx, D as DefaultOptions } from './meta-DNF6Fl27.js';
1
+ import { B as BaseCtx, D as DefaultOptions } from './meta-EGS-4cNY.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": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "description": "server framework that provide IOC/type-reuse/http&rpc-adaptor",
5
5
  "author": "fgsreally",
6
6
  "license": "MIT",