phecda-server 8.6.0 → 8.7.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 (92) hide show
  1. package/bin/cli.mjs +1 -9
  2. package/dist/{chunk-XOWAQGBO.js → chunk-CCK6KDM3.js} +59 -65
  3. package/dist/{chunk-LLF55NZP.js → chunk-IBVPZSZJ.js} +6 -6
  4. package/dist/{chunk-URKOYTBU.mjs → chunk-ITDH2YDL.mjs} +6 -6
  5. package/dist/{chunk-5ZZAOOKE.js → chunk-KVWT2QTL.js} +26 -26
  6. package/dist/{chunk-LQFHZGVJ.mjs → chunk-LNL3MVTR.mjs} +2 -8
  7. package/dist/{chunk-ZHNYWZRL.mjs → chunk-T5F6Q2CZ.mjs} +1 -1
  8. package/dist/{chunk-MUUKKO67.mjs → chunk-UK3RDUEP.mjs} +1 -1
  9. package/dist/{chunk-SKGOTR4T.js → chunk-UP64TNWR.js} +20 -20
  10. package/dist/{core-BiS3xJKx.d.ts → core-Bd2ynlyb.d.ts} +1 -1
  11. package/dist/{core-BYxcQ8kf.d.mts → core-nqk9d66O.d.mts} +1 -1
  12. package/dist/helper.d.mts +1 -1
  13. package/dist/helper.d.ts +1 -1
  14. package/dist/helper.js +3 -3
  15. package/dist/helper.mjs +2 -2
  16. package/dist/http/elysia/index.d.mts +3 -3
  17. package/dist/http/elysia/index.d.ts +3 -3
  18. package/dist/http/elysia/index.js +40 -40
  19. package/dist/http/elysia/index.mjs +3 -3
  20. package/dist/http/express/index.d.mts +3 -3
  21. package/dist/http/express/index.d.ts +3 -3
  22. package/dist/http/express/index.js +37 -37
  23. package/dist/http/express/index.mjs +2 -2
  24. package/dist/http/fastify/index.d.mts +3 -3
  25. package/dist/http/fastify/index.d.ts +3 -3
  26. package/dist/http/fastify/index.js +38 -38
  27. package/dist/http/fastify/index.mjs +3 -3
  28. package/dist/http/h3/index.d.mts +3 -3
  29. package/dist/http/h3/index.d.ts +3 -3
  30. package/dist/http/h3/index.js +38 -38
  31. package/dist/http/h3/index.mjs +2 -2
  32. package/dist/http/hono/index.d.mts +3 -3
  33. package/dist/http/hono/index.d.ts +3 -3
  34. package/dist/http/hono/index.js +34 -34
  35. package/dist/http/hono/index.mjs +2 -2
  36. package/dist/http/hyper-express/index.d.mts +3 -3
  37. package/dist/http/hyper-express/index.d.ts +3 -3
  38. package/dist/http/hyper-express/index.js +35 -35
  39. package/dist/http/hyper-express/index.mjs +2 -2
  40. package/dist/http/koa/index.d.mts +3 -3
  41. package/dist/http/koa/index.d.ts +3 -3
  42. package/dist/http/koa/index.js +37 -37
  43. package/dist/http/koa/index.mjs +2 -2
  44. package/dist/index.d.mts +8 -8
  45. package/dist/index.d.ts +8 -8
  46. package/dist/index.js +54 -54
  47. package/dist/index.mjs +14 -14
  48. package/dist/{meta-Csp1xcSR.d.mts → meta-ZbvaS7xK.d.mts} +2 -2
  49. package/dist/{meta-Csp1xcSR.d.ts → meta-ZbvaS7xK.d.ts} +2 -2
  50. package/dist/rpc/bullmq/index.d.mts +3 -3
  51. package/dist/rpc/bullmq/index.d.ts +3 -3
  52. package/dist/rpc/bullmq/index.js +11 -11
  53. package/dist/rpc/bullmq/index.mjs +2 -2
  54. package/dist/rpc/electron/index.d.mts +3 -3
  55. package/dist/rpc/electron/index.d.ts +3 -3
  56. package/dist/rpc/electron/index.js +8 -8
  57. package/dist/rpc/electron/index.mjs +2 -2
  58. package/dist/rpc/kafka/index.d.mts +3 -3
  59. package/dist/rpc/kafka/index.d.ts +3 -3
  60. package/dist/rpc/kafka/index.js +10 -10
  61. package/dist/rpc/kafka/index.mjs +2 -2
  62. package/dist/rpc/nats/index.d.mts +3 -3
  63. package/dist/rpc/nats/index.d.ts +3 -3
  64. package/dist/rpc/nats/index.js +11 -11
  65. package/dist/rpc/nats/index.mjs +2 -2
  66. package/dist/rpc/rabbitmq/index.d.mts +3 -3
  67. package/dist/rpc/rabbitmq/index.d.ts +3 -3
  68. package/dist/rpc/rabbitmq/index.js +12 -12
  69. package/dist/rpc/rabbitmq/index.mjs +2 -2
  70. package/dist/rpc/redis/index.d.mts +3 -3
  71. package/dist/rpc/redis/index.d.ts +3 -3
  72. package/dist/rpc/redis/index.js +10 -10
  73. package/dist/rpc/redis/index.mjs +2 -2
  74. package/dist/rpc/web-ext/index.d.mts +3 -3
  75. package/dist/rpc/web-ext/index.d.ts +3 -3
  76. package/dist/rpc/web-ext/index.js +8 -8
  77. package/dist/rpc/web-ext/index.mjs +2 -2
  78. package/dist/rpc/ws/index.d.mts +3 -3
  79. package/dist/rpc/ws/index.d.ts +3 -3
  80. package/dist/rpc/ws/index.js +7 -7
  81. package/dist/rpc/ws/index.mjs +2 -2
  82. package/dist/test.d.mts +2 -2
  83. package/dist/test.d.ts +2 -2
  84. package/dist/test.js +6 -6
  85. package/dist/test.mjs +2 -2
  86. package/dist/{types-Bs64nYvd.d.ts → types-B4zY7i87.d.ts} +1 -1
  87. package/dist/{types-CjVwVyJT.d.mts → types-BfcBZVua.d.mts} +1 -1
  88. package/dist/{types-DExQe0qk.d.ts → types-CHWgzilt.d.ts} +1 -1
  89. package/dist/{types-DSlyrmns.d.mts → types-f_hV_rCD.d.mts} +1 -1
  90. package/package.json +1 -1
  91. package/register/index.mjs +2 -0
  92. package/register/loader.mjs +3 -3
@@ -2,11 +2,11 @@ import {
2
2
  Context,
3
3
  createControllerMetaMap,
4
4
  detectAopDep
5
- } from "../../chunk-LQFHZGVJ.mjs";
5
+ } from "../../chunk-LNL3MVTR.mjs";
6
6
  import {
7
7
  HMR,
8
8
  __name
9
- } from "../../chunk-URKOYTBU.mjs";
9
+ } from "../../chunk-ITDH2YDL.mjs";
10
10
 
11
11
  // src/rpc/rabbitmq/bind.ts
12
12
  import Debug from "debug";
@@ -1,8 +1,8 @@
1
1
  import Redis from 'ioredis';
2
- import { F as Factory } from '../../core-BYxcQ8kf.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
2
+ import { F as Factory } from '../../core-nqk9d66O.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-f_hV_rCD.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-Csp1xcSR.mjs';
5
+ import '../../meta-ZbvaS7xK.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-BiS3xJKx.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
2
+ import { F as Factory } from '../../core-Bd2ynlyb.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CHWgzilt.js';
4
4
  import 'phecda-core';
5
- import '../../meta-Csp1xcSR.js';
5
+ import '../../meta-ZbvaS7xK.js';
6
6
 
7
7
  interface RedisCtx extends RpcCtx {
8
8
  type: 'redis';
@@ -2,30 +2,30 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkXOWAQGBOjs = require('../../chunk-XOWAQGBO.js');
5
+ var _chunkCCK6KDM3js = require('../../chunk-CCK6KDM3.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkLLF55NZPjs = require('../../chunk-LLF55NZP.js');
9
+ var _chunkIBVPZSZJjs = require('../../chunk-IBVPZSZJ.js');
10
10
 
11
11
  // src/rpc/redis/bind.ts
12
12
  var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
13
13
  var debug = _debug2.default.call(void 0, "phecda-server/redis");
14
14
  function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
15
15
  const { globalGuards, globalFilter, globalPipe, globalAddons = [], defaultQueue } = opts;
16
- const metaMap = _chunkXOWAQGBOjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
16
+ const metaMap = _chunkCCK6KDM3js.createControllerMetaMap.call(void 0, meta, (meta2) => {
17
17
  const { controller, rpc, method, tag } = meta2.data;
18
18
  if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
19
19
  debug(`register method "${method}" in module "${tag}"`);
20
20
  return true;
21
21
  }
22
22
  });
23
- _chunkXOWAQGBOjs.detectAopDep.call(void 0, meta, {
23
+ _chunkCCK6KDM3js.detectAopDep.call(void 0, meta, {
24
24
  guards: globalGuards,
25
25
  addons: globalAddons
26
26
  }, "rpc");
27
27
  const existQueue = /* @__PURE__ */ new Set();
28
- _chunkXOWAQGBOjs.Context.applyAddons(globalAddons, {
28
+ _chunkCCK6KDM3js.Context.applyAddons(globalAddons, {
29
29
  pub,
30
30
  sub
31
31
  }, "redis");
@@ -44,7 +44,7 @@ function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
44
44
  }
45
45
  }
46
46
  }
47
- _chunkLLF55NZPjs.__name.call(void 0, subscribeQueues, "subscribeQueues");
47
+ _chunkIBVPZSZJjs.__name.call(void 0, subscribeQueues, "subscribeQueues");
48
48
  sub.on("message", async (channel, msg) => {
49
49
  if (!existQueue.has(channel)) return;
50
50
  if (msg) {
@@ -54,12 +54,12 @@ function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
54
54
  if (_ps !== 1) return;
55
55
  const meta2 = metaMap.get(tag)[method];
56
56
  const { data: { rpc: { isEvent } = {} } } = meta2;
57
- const aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
57
+ const aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
58
58
  globalFilter,
59
59
  globalGuards,
60
60
  globalPipe
61
61
  });
62
- const context = new (0, _chunkXOWAQGBOjs.Context)({
62
+ const context = new (0, _chunkCCK6KDM3js.Context)({
63
63
  type: "redis",
64
64
  category: "rpc",
65
65
  moduleMap,
@@ -91,12 +91,12 @@ function bind({ sub, pub }, { moduleMap, meta }, opts = {}) {
91
91
  }
92
92
  });
93
93
  subscribeQueues();
94
- _chunkLLF55NZPjs.HMR.call(void 0, async () => {
94
+ _chunkIBVPZSZJjs.HMR.call(void 0, async () => {
95
95
  for (const queue of existQueue) await sub.unsubscribe(queue);
96
96
  subscribeQueues();
97
97
  });
98
98
  }
99
- _chunkLLF55NZPjs.__name.call(void 0, bind, "bind");
99
+ _chunkIBVPZSZJjs.__name.call(void 0, bind, "bind");
100
100
 
101
101
 
102
102
  exports.bind = bind;
@@ -2,11 +2,11 @@ import {
2
2
  Context,
3
3
  createControllerMetaMap,
4
4
  detectAopDep
5
- } from "../../chunk-LQFHZGVJ.mjs";
5
+ } from "../../chunk-LNL3MVTR.mjs";
6
6
  import {
7
7
  HMR,
8
8
  __name
9
- } from "../../chunk-URKOYTBU.mjs";
9
+ } from "../../chunk-ITDH2YDL.mjs";
10
10
 
11
11
  // src/rpc/redis/bind.ts
12
12
  import Debug from "debug";
@@ -1,7 +1,7 @@
1
- import { F as Factory } from '../../core-BYxcQ8kf.mjs';
2
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
1
+ import { F as Factory } from '../../core-nqk9d66O.mjs';
2
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-f_hV_rCD.mjs';
3
3
  import 'phecda-core';
4
- import '../../meta-Csp1xcSR.mjs';
4
+ import '../../meta-ZbvaS7xK.mjs';
5
5
 
6
6
  interface WebExtCtx extends RpcCtx {
7
7
  type: 'browser-extension';
@@ -1,7 +1,7 @@
1
- import { F as Factory } from '../../core-BiS3xJKx.js';
2
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
1
+ import { F as Factory } from '../../core-Bd2ynlyb.js';
2
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CHWgzilt.js';
3
3
  import 'phecda-core';
4
- import '../../meta-Csp1xcSR.js';
4
+ import '../../meta-ZbvaS7xK.js';
5
5
 
6
6
  interface WebExtCtx extends RpcCtx {
7
7
  type: 'browser-extension';
@@ -2,24 +2,24 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkXOWAQGBOjs = require('../../chunk-XOWAQGBO.js');
5
+ var _chunkCCK6KDM3js = require('../../chunk-CCK6KDM3.js');
6
6
 
7
7
 
8
- var _chunkLLF55NZPjs = require('../../chunk-LLF55NZP.js');
8
+ var _chunkIBVPZSZJjs = require('../../chunk-IBVPZSZJ.js');
9
9
 
10
10
  // src/rpc/web-ext/bind.ts
11
11
  var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
12
12
  var debug = _debug2.default.call(void 0, "phecda-server/electron");
13
13
  function bind({ moduleMap, meta }, opts = {}) {
14
14
  const { globalGuards, globalFilter, globalPipe, globalAddons = [] } = opts;
15
- const metaMap = _chunkXOWAQGBOjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
15
+ const metaMap = _chunkCCK6KDM3js.createControllerMetaMap.call(void 0, meta, (meta2) => {
16
16
  const { controller, rpc, method, tag } = meta2.data;
17
17
  if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
18
18
  debug(`register method "${method}" in module "${tag}"`);
19
19
  return true;
20
20
  }
21
21
  });
22
- _chunkXOWAQGBOjs.detectAopDep.call(void 0, meta, {
22
+ _chunkCCK6KDM3js.detectAopDep.call(void 0, meta, {
23
23
  guards: globalGuards,
24
24
  addons: globalAddons
25
25
  }, "rpc");
@@ -30,12 +30,12 @@ function bind({ moduleMap, meta }, opts = {}) {
30
30
  if (_ps !== 1) return;
31
31
  const meta2 = metaMap.get(tag)[method];
32
32
  const { data: { rpc: { isEvent } = {} } } = meta2;
33
- const aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
33
+ const aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
34
34
  globalFilter,
35
35
  globalGuards,
36
36
  globalPipe
37
37
  });
38
- const context = new (0, _chunkXOWAQGBOjs.Context)({
38
+ const context = new (0, _chunkCCK6KDM3js.Context)({
39
39
  type: "browser-extension",
40
40
  category: "rpc",
41
41
  moduleMap,
@@ -63,9 +63,9 @@ function bind({ moduleMap, meta }, opts = {}) {
63
63
  }
64
64
  });
65
65
  }
66
- _chunkLLF55NZPjs.__name.call(void 0, callback, "callback");
66
+ _chunkIBVPZSZJjs.__name.call(void 0, callback, "callback");
67
67
  }
68
- _chunkLLF55NZPjs.__name.call(void 0, bind, "bind");
68
+ _chunkIBVPZSZJjs.__name.call(void 0, bind, "bind");
69
69
 
70
70
 
71
71
  exports.bind = bind;
@@ -2,10 +2,10 @@ import {
2
2
  Context,
3
3
  createControllerMetaMap,
4
4
  detectAopDep
5
- } from "../../chunk-LQFHZGVJ.mjs";
5
+ } from "../../chunk-LNL3MVTR.mjs";
6
6
  import {
7
7
  __name
8
- } from "../../chunk-URKOYTBU.mjs";
8
+ } from "../../chunk-ITDH2YDL.mjs";
9
9
 
10
10
  // src/rpc/web-ext/bind.ts
11
11
  import Debug from "debug";
@@ -1,8 +1,8 @@
1
1
  import WS from 'ws';
2
- import { F as Factory } from '../../core-BYxcQ8kf.mjs';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-DSlyrmns.mjs';
2
+ import { F as Factory } from '../../core-nqk9d66O.mjs';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-f_hV_rCD.mjs';
4
4
  import 'phecda-core';
5
- import '../../meta-Csp1xcSR.mjs';
5
+ import '../../meta-ZbvaS7xK.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-BiS3xJKx.js';
3
- import { R as RpcCtx, a as RpcServerOptions } from '../../types-DExQe0qk.js';
2
+ import { F as Factory } from '../../core-Bd2ynlyb.js';
3
+ import { R as RpcCtx, a as RpcServerOptions } from '../../types-CHWgzilt.js';
4
4
  import 'phecda-core';
5
- import '../../meta-Csp1xcSR.js';
5
+ import '../../meta-ZbvaS7xK.js';
6
6
 
7
7
  interface WsCtx extends RpcCtx {
8
8
  type: 'ws';
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkXOWAQGBOjs = require('../../chunk-XOWAQGBO.js');
5
+ var _chunkCCK6KDM3js = require('../../chunk-CCK6KDM3.js');
6
6
 
7
7
 
8
- var _chunkLLF55NZPjs = require('../../chunk-LLF55NZP.js');
8
+ var _chunkIBVPZSZJjs = require('../../chunk-IBVPZSZJ.js');
9
9
 
10
10
  // src/rpc/ws/bind.ts
11
11
  var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
@@ -13,14 +13,14 @@ var debug = _debug2.default.call(void 0, "phecda-server/ws");
13
13
  function bind(wss, data, opts = {}) {
14
14
  const { globalGuards, globalAddons, globalFilter, globalPipe } = opts;
15
15
  const { moduleMap, meta } = data;
16
- const metaMap = _chunkXOWAQGBOjs.createControllerMetaMap.call(void 0, meta, (meta2) => {
16
+ const metaMap = _chunkCCK6KDM3js.createControllerMetaMap.call(void 0, meta, (meta2) => {
17
17
  const { controller, rpc, method, tag } = meta2.data;
18
18
  if (controller === "rpc" && _optionalChain([rpc, 'optionalAccess', _ => _.queue]) !== void 0) {
19
19
  debug(`register method "${method}" in module "${tag}"`);
20
20
  return true;
21
21
  }
22
22
  });
23
- _chunkXOWAQGBOjs.detectAopDep.call(void 0, meta, {
23
+ _chunkCCK6KDM3js.detectAopDep.call(void 0, meta, {
24
24
  guards: globalGuards,
25
25
  addons: globalAddons
26
26
  }, "rpc");
@@ -32,12 +32,12 @@ function bind(wss, data, opts = {}) {
32
32
  if (_ps !== 1) return;
33
33
  const meta2 = metaMap.get(tag)[method];
34
34
  const { data: { rpc: { isEvent } = {} } } = meta2;
35
- const aop = _chunkXOWAQGBOjs.Context.getAop(meta2, {
35
+ const aop = _chunkCCK6KDM3js.Context.getAop(meta2, {
36
36
  globalFilter,
37
37
  globalGuards,
38
38
  globalPipe
39
39
  });
40
- const context = new (0, _chunkXOWAQGBOjs.Context)({
40
+ const context = new (0, _chunkCCK6KDM3js.Context)({
41
41
  type: "ws",
42
42
  category: "rpc",
43
43
  meta: meta2,
@@ -67,7 +67,7 @@ function bind(wss, data, opts = {}) {
67
67
  });
68
68
  });
69
69
  }
70
- _chunkLLF55NZPjs.__name.call(void 0, bind, "bind");
70
+ _chunkIBVPZSZJjs.__name.call(void 0, bind, "bind");
71
71
 
72
72
 
73
73
  exports.bind = bind;
@@ -2,10 +2,10 @@ import {
2
2
  Context,
3
3
  createControllerMetaMap,
4
4
  detectAopDep
5
- } from "../../chunk-LQFHZGVJ.mjs";
5
+ } from "../../chunk-LNL3MVTR.mjs";
6
6
  import {
7
7
  __name
8
- } from "../../chunk-URKOYTBU.mjs";
8
+ } from "../../chunk-ITDH2YDL.mjs";
9
9
 
10
10
  // src/rpc/ws/bind.ts
11
11
  import Debug from "debug";
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-BYxcQ8kf.mjs';
6
- import { d as CustomResponse } from './meta-Csp1xcSR.mjs';
5
+ import { F as Factory } from './core-nqk9d66O.mjs';
6
+ import { d as CustomResponse } from './meta-ZbvaS7xK.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-BiS3xJKx.js';
6
- import { d as CustomResponse } from './meta-Csp1xcSR.js';
5
+ import { F as Factory } from './core-Bd2ynlyb.js';
6
+ import { d as CustomResponse } from './meta-ZbvaS7xK.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;
package/dist/test.js CHANGED
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
2
2
 
3
- var _chunkSKGOTR4Tjs = require('./chunk-SKGOTR4T.js');
3
+ var _chunkUP64TNWRjs = require('./chunk-UP64TNWR.js');
4
4
 
5
5
 
6
- var _chunkLLF55NZPjs = require('./chunk-LLF55NZP.js');
6
+ var _chunkIBVPZSZJjs = require('./chunk-IBVPZSZJ.js');
7
7
 
8
8
  // src/test.ts
9
9
  var _phecdacore = require('phecda-core');
10
10
  async function TestFactory(...Modules) {
11
- const { moduleMap, modelMap } = await _chunkSKGOTR4Tjs.Factory.call(void 0, Modules);
11
+ const { moduleMap, modelMap } = await _chunkUP64TNWRjs.Factory.call(void 0, Modules);
12
12
  return {
13
13
  get(Model) {
14
14
  const tag = _phecdacore.getTag.call(void 0, Model);
@@ -19,7 +19,7 @@ async function TestFactory(...Modules) {
19
19
  }
20
20
  };
21
21
  }
22
- _chunkLLF55NZPjs.__name.call(void 0, TestFactory, "TestFactory");
22
+ _chunkIBVPZSZJjs.__name.call(void 0, TestFactory, "TestFactory");
23
23
  async function TestHttp(app, { moduleMap, meta }, isAgent = true) {
24
24
  const { default: request, agent } = await Promise.resolve().then(() => _interopRequireWildcard(require("supertest")));
25
25
  const Agent = agent(app);
@@ -59,13 +59,13 @@ async function TestHttp(app, { moduleMap, meta }, isAgent = true) {
59
59
  }
60
60
  });
61
61
  }
62
- _chunkLLF55NZPjs.__name.call(void 0, module, "module");
62
+ _chunkIBVPZSZJjs.__name.call(void 0, module, "module");
63
63
  return {
64
64
  module,
65
65
  agent
66
66
  };
67
67
  }
68
- _chunkLLF55NZPjs.__name.call(void 0, TestHttp, "TestHttp");
68
+ _chunkIBVPZSZJjs.__name.call(void 0, TestHttp, "TestHttp");
69
69
 
70
70
 
71
71
 
package/dist/test.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Factory
3
- } from "./chunk-ZHNYWZRL.mjs";
3
+ } from "./chunk-T5F6Q2CZ.mjs";
4
4
  import {
5
5
  __name
6
- } from "./chunk-URKOYTBU.mjs";
6
+ } from "./chunk-ITDH2YDL.mjs";
7
7
 
8
8
  // src/test.ts
9
9
  import { getTag } from "phecda-core";
@@ -1,5 +1,5 @@
1
1
  import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
2
- import { B as BaseCtx, D as DefaultOptions } from './meta-Csp1xcSR.js';
2
+ import { B as BaseCtx, D as DefaultOptions } from './meta-ZbvaS7xK.js';
3
3
 
4
4
  interface HttpOptions extends DefaultOptions {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
2
- import { B as BaseCtx, D as DefaultOptions } from './meta-Csp1xcSR.mjs';
2
+ import { B as BaseCtx, D as DefaultOptions } from './meta-ZbvaS7xK.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-Csp1xcSR.js';
1
+ import { B as BaseCtx, D as DefaultOptions } from './meta-ZbvaS7xK.js';
2
2
 
3
3
  interface RpcServerOptions extends DefaultOptions {
4
4
  defaultQueue?: string;
@@ -1,4 +1,4 @@
1
- import { B as BaseCtx, D as DefaultOptions } from './meta-Csp1xcSR.mjs';
1
+ import { B as BaseCtx, D as DefaultOptions } from './meta-ZbvaS7xK.mjs';
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.6.0",
3
+ "version": "8.7.0",
4
4
  "description": "server framework that provide IOC/type-reuse/http&rpc-adaptor",
5
5
  "author": "fgsreally",
6
6
  "license": "MIT",
@@ -5,6 +5,8 @@ import { RELAUNCH, RELOAD } from '../dist/helper.mjs'
5
5
  import inspector from 'inspector'
6
6
  const { port1, port2 } = new MessageChannel()
7
7
 
8
+
9
+
8
10
  register('./loader.mjs', {
9
11
  parentURL: import.meta.url,
10
12
  data: { port: port2 },
@@ -18,7 +18,7 @@ const require = createRequire(
18
18
  const debug = Debug('phecda-server/loader')
19
19
 
20
20
  const isLowVersion = parseFloat(process.version.slice(1)) < 18.19
21
- const IS_DEV = process.env.NODE_ENV === 'development'
21
+ const IS_WATCH_MODE = !process.env.PS_BAN_WATCH
22
22
  let port
23
23
  let config
24
24
  const workdir = process.cwd()
@@ -89,7 +89,7 @@ export async function initialize(data) {
89
89
  if (typeof loader.resolve === 'function')
90
90
  customResolve = loader.resolve
91
91
  }
92
- if (IS_DEV) {
92
+ if (IS_WATCH_MODE) {
93
93
  chokidar.watch(configPath, { persistent: true }).on('change', () => {
94
94
  port.postMessage(
95
95
  JSON.stringify({
@@ -236,7 +236,7 @@ export const load = async (url, context, nextLoad) => {
236
236
  ) {
237
237
  watchFiles.add(url)
238
238
 
239
- if (IS_DEV && mode !== 'not-hmr') {
239
+ if (IS_WATCH_MODE && mode !== 'not-hmr') {
240
240
  if (isModuleFileUrl(url)) {
241
241
  port.postMessage(
242
242
  JSON.stringify({