phecda-server 5.2.3 → 5.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-YAVIRFUE.mjs → chunk-LGP5AT6W.mjs} +2 -2
- package/dist/{chunk-J5SL4QLN.js → chunk-UJAI73O6.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/server/elysia/index.d.ts +1 -1
- package/dist/server/express/index.d.ts +1 -1
- package/dist/server/fastify/index.d.ts +1 -1
- package/dist/server/h3/index.d.ts +1 -1
- package/dist/server/hono/index.d.ts +1 -1
- package/dist/server/hyper-express/index.d.ts +1 -1
- package/dist/server/koa/index.d.ts +1 -1
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/{types-68f2ec2a.d.ts → types-0a76c4bc.d.ts} +9 -0
- package/package.json +1 -1
|
@@ -92,8 +92,8 @@ async function Factory(models, opts = {}) {
|
|
|
92
92
|
throw new Error(`exist Circular-Dependency or Multiple modules with the same name/tag [tag] ${String(tag)}--[module] ${Model}`);
|
|
93
93
|
if (constructorMap.get(tag) !== Model && !constructorSet.has(Model)) {
|
|
94
94
|
constructorSet.add(Model);
|
|
95
|
-
if (
|
|
96
|
-
log(`Module taged ${String(tag)} has been
|
|
95
|
+
if (instance instanceof Model)
|
|
96
|
+
log(`Module taged ${String(tag)} has been overridden`);
|
|
97
97
|
else
|
|
98
98
|
log(`Synonym module: Module taged "${String(tag)}" has been loaded before, so phecda-server won't load Module "${Model.name}"`, "warn");
|
|
99
99
|
}
|
|
@@ -92,8 +92,8 @@ async function Factory(models, opts = {}) {
|
|
|
92
92
|
throw new Error(`exist Circular-Dependency or Multiple modules with the same name/tag [tag] ${String(tag)}--[module] ${Model}`);
|
|
93
93
|
if (constructorMap.get(tag) !== Model && !constructorSet.has(Model)) {
|
|
94
94
|
constructorSet.add(Model);
|
|
95
|
-
if (
|
|
96
|
-
_chunkFNJWO324js.log.call(void 0, `Module taged ${String(tag)} has been
|
|
95
|
+
if (instance instanceof Model)
|
|
96
|
+
_chunkFNJWO324js.log.call(void 0, `Module taged ${String(tag)} has been overridden`);
|
|
97
97
|
else
|
|
98
98
|
_chunkFNJWO324js.log.call(void 0, `Synonym module: Module taged "${String(tag)}" has been loaded before, so phecda-server won't load Module "${Model.name}"`, "warn");
|
|
99
99
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { G as Generator } from './core-7f6d2be6.js';
|
|
|
4
4
|
export { F as Factory, e as emitter } from './core-7f6d2be6.js';
|
|
5
5
|
import { Construct, AbConstruct } from 'phecda-core';
|
|
6
6
|
export * from 'phecda-core';
|
|
7
|
-
export { a as HttpContext, H as HttpOptions } from './types-
|
|
7
|
+
export { a as HttpContext, H as HttpOptions } from './types-0a76c4bc.js';
|
|
8
8
|
export { a as RpcClientOptions, b as RpcContext, R as RpcServerOptions } from './types-f3b79218.js';
|
|
9
9
|
import 'node:http';
|
|
10
10
|
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkUJAI73O6js = require('./chunk-UJAI73O6.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -407,4 +407,4 @@ _chunkFNJWO324js.__name.call(void 0, HTTPGenerator, "HTTPGenerator");
|
|
|
407
407
|
|
|
408
408
|
|
|
409
409
|
|
|
410
|
-
exports.Arg = _chunkAWY6FTH4js.Arg; exports.BadGatewayException = _chunkH6NYBVBVjs.BadGatewayException; exports.BadRequestException = _chunkH6NYBVBVjs.BadRequestException; exports.BaseParam = _chunkAWY6FTH4js.BaseParam; exports.Body = _chunkAWY6FTH4js.Body; exports.ConflictException = _chunkH6NYBVBVjs.ConflictException; exports.Context = _chunkH6NYBVBVjs.Context; exports.Controller = _chunkAWY6FTH4js.Controller; exports.Ctx = _chunkAWY6FTH4js.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkAWY6FTH4js.Define; exports.Delete = _chunkAWY6FTH4js.Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkFNJWO324js.ERROR_SYMBOL; exports.Event = _chunkAWY6FTH4js.Event; exports.Exception = _chunkH6NYBVBVjs.Exception; exports.Factory =
|
|
410
|
+
exports.Arg = _chunkAWY6FTH4js.Arg; exports.BadGatewayException = _chunkH6NYBVBVjs.BadGatewayException; exports.BadRequestException = _chunkH6NYBVBVjs.BadRequestException; exports.BaseParam = _chunkAWY6FTH4js.BaseParam; exports.Body = _chunkAWY6FTH4js.Body; exports.ConflictException = _chunkH6NYBVBVjs.ConflictException; exports.Context = _chunkH6NYBVBVjs.Context; exports.Controller = _chunkAWY6FTH4js.Controller; exports.Ctx = _chunkAWY6FTH4js.Ctx; exports.CustomResponse = CustomResponse; exports.Define = _chunkAWY6FTH4js.Define; exports.Delete = _chunkAWY6FTH4js.Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkFNJWO324js.ERROR_SYMBOL; exports.Event = _chunkAWY6FTH4js.Event; exports.Exception = _chunkH6NYBVBVjs.Exception; exports.Factory = _chunkUJAI73O6js.Factory; exports.Filter = _chunkAWY6FTH4js.Filter; exports.ForbiddenException = _chunkH6NYBVBVjs.ForbiddenException; exports.FrameworkException = _chunkH6NYBVBVjs.FrameworkException; exports.Generator = Generator; exports.Get = _chunkAWY6FTH4js.Get; exports.Guard = _chunkAWY6FTH4js.Guard; exports.HTTPGenerator = HTTPGenerator; exports.Head = _chunkAWY6FTH4js.Head; exports.Header = _chunkAWY6FTH4js.Header; exports.IS_HMR = _chunkFNJWO324js.IS_HMR; exports.IS_ONLY_GENERATE = _chunkFNJWO324js.IS_ONLY_GENERATE; exports.IS_STRICT = _chunkFNJWO324js.IS_STRICT; exports.Injectable = _chunkAWY6FTH4js.Injectable; exports.Interceptor = _chunkAWY6FTH4js.Interceptor; exports.InvalidInputException = _chunkH6NYBVBVjs.InvalidInputException; exports.LOG_LEVEL = _chunkFNJWO324js.LOG_LEVEL; exports.Meta = _chunkUJAI73O6js.Meta; exports.Mix = _chunkFNJWO324js.Mix; exports.NotFoundException = _chunkH6NYBVBVjs.NotFoundException; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PPlugin = PPlugin; exports.PS_EXIT_CODE = _chunkFNJWO324js.PS_EXIT_CODE; exports.Param = _chunkAWY6FTH4js.Param; exports.Patch = _chunkAWY6FTH4js.Patch; exports.PayloadLargeException = _chunkH6NYBVBVjs.PayloadLargeException; exports.Pipe = _chunkAWY6FTH4js.Pipe; exports.Plugin = _chunkAWY6FTH4js.Plugin; exports.Post = _chunkAWY6FTH4js.Post; exports.Put = _chunkAWY6FTH4js.Put; exports.Query = _chunkAWY6FTH4js.Query; exports.Queue = _chunkAWY6FTH4js.Queue; exports.RPCGenerator = RPCGenerator; exports.Route = _chunkAWY6FTH4js.Route; exports.Rpc = _chunkAWY6FTH4js.Rpc; exports.ServiceUnavailableException = _chunkH6NYBVBVjs.ServiceUnavailableException; exports.TimeoutException = _chunkH6NYBVBVjs.TimeoutException; exports.TimerException = _chunkH6NYBVBVjs.TimerException; exports.UNMOUNT_SYMBOL = _chunkFNJWO324js.UNMOUNT_SYMBOL; exports.UnauthorizedException = _chunkH6NYBVBVjs.UnauthorizedException; exports.UndefinedException = _chunkH6NYBVBVjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkH6NYBVBVjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkH6NYBVBVjs.ValidateException; exports.WorkerException = _chunkH6NYBVBVjs.WorkerException; exports.addFilter = _chunkH6NYBVBVjs.addFilter; exports.addGuard = _chunkH6NYBVBVjs.addGuard; exports.addInterceptor = _chunkH6NYBVBVjs.addInterceptor; exports.addPipe = _chunkH6NYBVBVjs.addPipe; exports.addPlugin = _chunkH6NYBVBVjs.addPlugin; exports.defaultPipe = _chunkH6NYBVBVjs.defaultPipe; exports.emitter = _chunkUJAI73O6js.emitter; exports.log = _chunkFNJWO324js.log; exports.setLogger = _chunkFNJWO324js.setLogger;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Elysia as Elysia$1, Context, LocalHook, InputSchema, RouteSchema, SingletonBase } from 'elysia';
|
|
2
2
|
import { BaseMacro } from 'elysia/dist/types';
|
|
3
|
-
import { a as HttpContext, H as HttpOptions } from '../../types-
|
|
3
|
+
import { a as HttpContext, H as HttpOptions } from '../../types-0a76c4bc.js';
|
|
4
4
|
import { F as Factory } from '../../core-7f6d2be6.js';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import '../../types-81be0ba3.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Request, Response, Router, RequestHandler } from 'express';
|
|
2
|
-
import { a as HttpContext, H as HttpOptions } from '../../types-
|
|
2
|
+
import { a as HttpContext, H as HttpOptions } from '../../types-0a76c4bc.js';
|
|
3
3
|
import { F as Factory } from '../../core-7f6d2be6.js';
|
|
4
4
|
import 'node:http';
|
|
5
5
|
import '../../types-81be0ba3.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FastifyRequest, FastifyReply, FastifyInstance, FastifyPluginCallback, FastifyRegisterOptions, FastifyPluginOptions, RouteShorthandOptions } from 'fastify';
|
|
2
|
-
import { a as HttpContext, H as HttpOptions } from '../../types-
|
|
2
|
+
import { a as HttpContext, H as HttpOptions } from '../../types-0a76c4bc.js';
|
|
3
3
|
import { F as Factory } from '../../core-7f6d2be6.js';
|
|
4
4
|
import 'node:http';
|
|
5
5
|
import '../../types-81be0ba3.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H3Event, Router, _RequestMiddleware } from 'h3';
|
|
2
2
|
import { F as Factory } from '../../core-7f6d2be6.js';
|
|
3
|
-
import { a as HttpContext, H as HttpOptions } from '../../types-
|
|
3
|
+
import { a as HttpContext, H as HttpOptions } from '../../types-0a76c4bc.js';
|
|
4
4
|
import 'phecda-core';
|
|
5
5
|
import '../../types-81be0ba3.js';
|
|
6
6
|
import 'node:http';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Hono, MiddlewareHandler } from 'hono';
|
|
2
|
-
import { a as HttpContext, H as HttpOptions } from '../../types-
|
|
2
|
+
import { a as HttpContext, H as HttpOptions } from '../../types-0a76c4bc.js';
|
|
3
3
|
import { F as Factory } from '../../core-7f6d2be6.js';
|
|
4
4
|
import 'node:http';
|
|
5
5
|
import '../../types-81be0ba3.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Request, Response, Router, MiddlewareHandler } from 'hyper-express';
|
|
2
|
-
import { a as HttpContext, H as HttpOptions } from '../../types-
|
|
2
|
+
import { a as HttpContext, H as HttpOptions } from '../../types-0a76c4bc.js';
|
|
3
3
|
import { F as Factory } from '../../core-7f6d2be6.js';
|
|
4
4
|
import 'node:http';
|
|
5
5
|
import '../../types-81be0ba3.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Router, { RouterParamContext } from '@koa/router';
|
|
2
2
|
import { DefaultContext, DefaultState } from 'koa';
|
|
3
|
-
import { a as HttpContext, H as HttpOptions } from '../../types-
|
|
3
|
+
import { a as HttpContext, H as HttpOptions } from '../../types-0a76c4bc.js';
|
|
4
4
|
import { F as Factory } from '../../core-7f6d2be6.js';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import '../../types-81be0ba3.js';
|
package/dist/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
3
|
+
var _chunkUJAI73O6js = require('./chunk-UJAI73O6.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkFNJWO324js = require('./chunk-FNJWO324.js');
|
|
@@ -8,7 +8,7 @@ var _chunkFNJWO324js = require('./chunk-FNJWO324.js');
|
|
|
8
8
|
// src/test.ts
|
|
9
9
|
var _phecdacore = require('phecda-core');
|
|
10
10
|
async function TestFactory(...Modules) {
|
|
11
|
-
const { moduleMap, constructorMap } = await
|
|
11
|
+
const { moduleMap, constructorMap } = await _chunkUJAI73O6js.Factory.call(void 0, Modules);
|
|
12
12
|
return {
|
|
13
13
|
get(Module) {
|
|
14
14
|
const tag = _phecdacore.getTag.call(void 0, Module);
|
package/dist/test.mjs
CHANGED
|
@@ -2,8 +2,17 @@ import { IncomingHttpHeaders } from 'node:http';
|
|
|
2
2
|
import { D as DefaultOptions, B as BaseContext } from './types-81be0ba3.js';
|
|
3
3
|
|
|
4
4
|
interface HttpOptions extends DefaultOptions {
|
|
5
|
+
/**
|
|
6
|
+
* 专用路由的值,默认为/__PHECDA_SERVER__,处理phecda-client发出的合并请求
|
|
7
|
+
*/
|
|
5
8
|
parallelRoute?: string | false;
|
|
9
|
+
/**
|
|
10
|
+
* 专用路由的插件(work for merge request),
|
|
11
|
+
*/
|
|
6
12
|
parallelPlugins?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* only work for http server
|
|
15
|
+
*/
|
|
7
16
|
globalPlugins?: string[];
|
|
8
17
|
}
|
|
9
18
|
interface HttpContext extends BaseContext {
|