phecda-server 7.0.0-alpha.7 → 7.0.0-alpha.8

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 (79) hide show
  1. package/bin/cli.mjs +10 -1
  2. package/dist/{chunk-MENRZSGW.js → chunk-7EMAZGYO.js} +86 -56
  3. package/dist/{chunk-JPSXNDXP.mjs → chunk-7NWDKK7D.mjs} +1 -1
  4. package/dist/{chunk-RGSKKTHD.mjs → chunk-B45BN7LY.mjs} +4 -4
  5. package/dist/{chunk-VYMSCWXC.js → chunk-BBNJVYVX.js} +24 -24
  6. package/dist/{chunk-XSMUJ77A.js → chunk-QJIAXSLZ.js} +19 -19
  7. package/dist/{chunk-IRXNF6ZE.mjs → chunk-SGMQZRP6.mjs} +39 -9
  8. package/dist/{chunk-M5HGFUCV.js → chunk-VSGYTGHY.js} +2 -2
  9. package/dist/{chunk-C5BVKEGW.mjs → chunk-YKP4ODZA.mjs} +2 -2
  10. package/dist/{core-CzElxZoF.d.ts → core-BGEsBtTG.d.ts} +1 -1
  11. package/dist/{core-DU7gQKSk.d.mts → core-BcKywWLd.d.mts} +1 -1
  12. package/dist/helper.d.mts +3 -2
  13. package/dist/helper.d.ts +3 -2
  14. package/dist/helper.js +5 -3
  15. package/dist/helper.mjs +4 -2
  16. package/dist/http/elysia/index.d.mts +4 -4
  17. package/dist/http/elysia/index.d.ts +4 -4
  18. package/dist/http/elysia/index.js +42 -41
  19. package/dist/http/elysia/index.mjs +6 -5
  20. package/dist/http/express/index.d.mts +4 -4
  21. package/dist/http/express/index.d.ts +4 -4
  22. package/dist/http/express/index.js +39 -38
  23. package/dist/http/express/index.mjs +5 -4
  24. package/dist/http/fastify/index.d.mts +4 -4
  25. package/dist/http/fastify/index.d.ts +4 -4
  26. package/dist/http/fastify/index.js +40 -39
  27. package/dist/http/fastify/index.mjs +6 -5
  28. package/dist/http/h3/index.d.mts +4 -4
  29. package/dist/http/h3/index.d.ts +4 -4
  30. package/dist/http/h3/index.js +40 -39
  31. package/dist/http/h3/index.mjs +6 -5
  32. package/dist/http/hono/index.d.mts +4 -4
  33. package/dist/http/hono/index.d.ts +4 -4
  34. package/dist/http/hono/index.js +35 -35
  35. package/dist/http/hono/index.mjs +2 -2
  36. package/dist/http/hyper-express/index.d.mts +4 -4
  37. package/dist/http/hyper-express/index.d.ts +4 -4
  38. package/dist/http/hyper-express/index.js +37 -36
  39. package/dist/http/hyper-express/index.mjs +5 -4
  40. package/dist/http/koa/index.d.mts +4 -4
  41. package/dist/http/koa/index.d.ts +4 -4
  42. package/dist/http/koa/index.js +39 -38
  43. package/dist/http/koa/index.mjs +5 -4
  44. package/dist/index.d.mts +35 -33
  45. package/dist/index.d.ts +35 -33
  46. package/dist/index.js +43 -42
  47. package/dist/index.mjs +15 -14
  48. package/dist/{meta-BTnLXuCa.d.ts → meta-B_HW7cWh.d.mts} +3 -3
  49. package/dist/{meta-BTnLXuCa.d.mts → meta-B_HW7cWh.d.ts} +3 -3
  50. package/dist/rpc/bullmq/index.d.mts +4 -4
  51. package/dist/rpc/bullmq/index.d.ts +4 -4
  52. package/dist/rpc/bullmq/index.js +14 -14
  53. package/dist/rpc/bullmq/index.mjs +2 -2
  54. package/dist/rpc/kafka/index.d.mts +4 -4
  55. package/dist/rpc/kafka/index.d.ts +4 -4
  56. package/dist/rpc/kafka/index.js +14 -14
  57. package/dist/rpc/kafka/index.mjs +2 -2
  58. package/dist/rpc/nats/index.d.mts +4 -4
  59. package/dist/rpc/nats/index.d.ts +4 -4
  60. package/dist/rpc/nats/index.js +13 -13
  61. package/dist/rpc/nats/index.mjs +2 -2
  62. package/dist/rpc/rabbitmq/index.d.mts +4 -4
  63. package/dist/rpc/rabbitmq/index.d.ts +4 -4
  64. package/dist/rpc/rabbitmq/index.js +15 -15
  65. package/dist/rpc/rabbitmq/index.mjs +2 -2
  66. package/dist/rpc/redis/index.d.mts +4 -4
  67. package/dist/rpc/redis/index.d.ts +4 -4
  68. package/dist/rpc/redis/index.js +13 -13
  69. package/dist/rpc/redis/index.mjs +2 -2
  70. package/dist/test.d.mts +2 -2
  71. package/dist/test.d.ts +2 -2
  72. package/dist/test.js +6 -6
  73. package/dist/test.mjs +2 -2
  74. package/dist/{types--E-OCZhC.d.ts → types-C2SQ9U9V.d.mts} +3 -3
  75. package/dist/{types-CbfaGkPA.d.ts → types-CYF0vha6.d.ts} +3 -3
  76. package/dist/{types-BYqBeqrs.d.mts → types-DEQb_e59.d.mts} +3 -3
  77. package/dist/{types-BxlzVoRv.d.mts → types-PFPIQWVF.d.ts} +3 -3
  78. package/package.json +3 -2
  79. package/register/loader.mjs +2 -2
@@ -1,5 +1,5 @@
1
1
  import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
2
- import { D as DefaultOptions, B as BaseContext } from './meta-BTnLXuCa.js';
2
+ import { B as BaseCtx, D as DefaultOptions } from './meta-B_HW7cWh.mjs';
3
3
 
4
4
  interface HttpOptions extends DefaultOptions {
5
5
  /**
@@ -15,7 +15,7 @@ interface HttpOptions extends DefaultOptions {
15
15
  */
16
16
  dynamic?: boolean;
17
17
  }
18
- interface HttpContext extends BaseContext {
18
+ interface HttpCtx extends BaseCtx {
19
19
  parallel?: true;
20
20
  index?: number;
21
21
  query: Record<string, any>;
@@ -45,4 +45,4 @@ interface CookieSerializeOptions {
45
45
  partitioned?: boolean;
46
46
  }
47
47
 
48
- export type { CookieSerializeOptions as C, HttpContext as H, HttpOptions as a };
48
+ export type { CookieSerializeOptions as C, HttpCtx as H, HttpOptions as a };
@@ -1,4 +1,4 @@
1
- import { D as DefaultOptions, B as BaseContext } from './meta-BTnLXuCa.js';
1
+ import { B as BaseCtx, D as DefaultOptions } from './meta-B_HW7cWh.js';
2
2
 
3
3
  interface RpcServerOptions extends DefaultOptions {
4
4
  defaultQueue?: string;
@@ -8,7 +8,7 @@ interface RpcClientOptions {
8
8
  timeout?: number;
9
9
  max?: number;
10
10
  }
11
- interface RpcContext extends BaseContext {
11
+ interface RpcCtx extends BaseCtx {
12
12
  args: any[];
13
13
  id: string;
14
14
  queue: string;
@@ -16,4 +16,4 @@ interface RpcContext extends BaseContext {
16
16
  category: 'rpc';
17
17
  }
18
18
 
19
- export type { RpcContext as R, RpcServerOptions as a, RpcClientOptions as b };
19
+ export type { RpcCtx as R, RpcServerOptions as a, RpcClientOptions as b };
@@ -1,4 +1,4 @@
1
- import { D as DefaultOptions, B as BaseContext } from './meta-BTnLXuCa.mjs';
1
+ import { B as BaseCtx, D as DefaultOptions } from './meta-B_HW7cWh.mjs';
2
2
 
3
3
  interface RpcServerOptions extends DefaultOptions {
4
4
  defaultQueue?: string;
@@ -8,7 +8,7 @@ interface RpcClientOptions {
8
8
  timeout?: number;
9
9
  max?: number;
10
10
  }
11
- interface RpcContext extends BaseContext {
11
+ interface RpcCtx extends BaseCtx {
12
12
  args: any[];
13
13
  id: string;
14
14
  queue: string;
@@ -16,4 +16,4 @@ interface RpcContext extends BaseContext {
16
16
  category: 'rpc';
17
17
  }
18
18
 
19
- export type { RpcContext as R, RpcServerOptions as a, RpcClientOptions as b };
19
+ export type { RpcCtx as R, RpcServerOptions as a, RpcClientOptions as b };
@@ -1,5 +1,5 @@
1
1
  import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
2
- import { D as DefaultOptions, B as BaseContext } from './meta-BTnLXuCa.mjs';
2
+ import { B as BaseCtx, D as DefaultOptions } from './meta-B_HW7cWh.js';
3
3
 
4
4
  interface HttpOptions extends DefaultOptions {
5
5
  /**
@@ -15,7 +15,7 @@ interface HttpOptions extends DefaultOptions {
15
15
  */
16
16
  dynamic?: boolean;
17
17
  }
18
- interface HttpContext extends BaseContext {
18
+ interface HttpCtx extends BaseCtx {
19
19
  parallel?: true;
20
20
  index?: number;
21
21
  query: Record<string, any>;
@@ -45,4 +45,4 @@ interface CookieSerializeOptions {
45
45
  partitioned?: boolean;
46
46
  }
47
47
 
48
- export type { CookieSerializeOptions as C, HttpContext as H, HttpOptions as a };
48
+ export type { CookieSerializeOptions as C, HttpCtx as H, HttpOptions as a };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-server",
3
- "version": "7.0.0-alpha.7",
3
+ "version": "7.0.0-alpha.8",
4
4
  "description": "server framework that provide IOC/type-reuse/http&rpc-adaptor",
5
5
  "author": "fgsreally",
6
6
  "license": "MIT",
@@ -129,7 +129,8 @@
129
129
  }
130
130
  },
131
131
  "bin": {
132
- "phecda": "bin/cli.mjs"
132
+ "phecda": "bin/cli.mjs",
133
+ "phecda-server": "bin/cli.mjs"
133
134
  },
134
135
  "files": [
135
136
  "dist",
@@ -12,7 +12,7 @@ import { createRequire } from 'module'
12
12
  import { existsSync } from 'fs'
13
13
  import ts from 'typescript'
14
14
  import chokidar from 'chokidar'
15
- import { log } from '../dist/index.mjs'
15
+ import { IS_DEV, log } from '../dist/index.mjs'
16
16
  import { compile, genUnImportRet, handleClassTypes, slash } from './utils.mjs'
17
17
 
18
18
  let port
@@ -279,7 +279,7 @@ export const load = async (url, context, nextLoad) => {
279
279
  // }),
280
280
  // )
281
281
 
282
- if (!process.env.PS_HMR_BAN) {
282
+ if (IS_DEV && !process.env.PS_HMR_BAN) {
283
283
  chokidar.watch(fileURLToPath(url), { persistent: true }).on(
284
284
  'change',
285
285
  debounce(() => {