phecda-server 5.0.0-beta.23 → 5.0.0-beta.24
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.
|
@@ -116,8 +116,8 @@ async function Factory(models, opts = {}) {
|
|
|
116
116
|
const dependenceGraph = /* @__PURE__ */ new Map();
|
|
117
117
|
const isolateSet = /* @__PURE__ */ new Set();
|
|
118
118
|
const { http, rpc } = opts;
|
|
119
|
-
if (!_phecdacore.
|
|
120
|
-
_phecdacore.
|
|
119
|
+
if (!_phecdacore.getInject.call(void 0, "watcher")) {
|
|
120
|
+
_phecdacore.setInject.call(void 0, "watcher", ({ eventName, instance, key, options }) => {
|
|
121
121
|
const fn = typeof instance[key] === "function" ? instance[key].bind(instance) : (v) => instance[key] = v;
|
|
122
122
|
if (_optionalChain([options, 'optionalAccess', _2 => _2.once]))
|
|
123
123
|
emitter.once(eventName, fn);
|
|
@@ -100,7 +100,7 @@ __name(generateHTTPCode, "generateHTTPCode");
|
|
|
100
100
|
import "reflect-metadata";
|
|
101
101
|
import fs from "fs";
|
|
102
102
|
import EventEmitter from "node:events";
|
|
103
|
-
import { Empty, SHARE_KEY, get, getExposeKey,
|
|
103
|
+
import { Empty, SHARE_KEY, get, getExposeKey, getInject, getState, getTag, invokeHandler, isPhecda, setInject } from "phecda-core";
|
|
104
104
|
import Debug from "debug";
|
|
105
105
|
function Injectable() {
|
|
106
106
|
return (target) => Empty(target);
|
|
@@ -116,8 +116,8 @@ async function Factory(models, opts = {}) {
|
|
|
116
116
|
const dependenceGraph = /* @__PURE__ */ new Map();
|
|
117
117
|
const isolateSet = /* @__PURE__ */ new Set();
|
|
118
118
|
const { http, rpc } = opts;
|
|
119
|
-
if (!
|
|
120
|
-
|
|
119
|
+
if (!getInject("watcher")) {
|
|
120
|
+
setInject("watcher", ({ eventName, instance, key, options }) => {
|
|
121
121
|
const fn = typeof instance[key] === "function" ? instance[key].bind(instance) : (v) => instance[key] = v;
|
|
122
122
|
if (options?.once)
|
|
123
123
|
emitter.once(eventName, fn);
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk2TLXS2XOjs = require('./chunk-2TLXS2XO.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -514,4 +514,4 @@ _chunkPC6CFB6Sjs.__name.call(void 0, PExtension, "PExtension");
|
|
|
514
514
|
|
|
515
515
|
|
|
516
516
|
|
|
517
|
-
exports.Arg = Arg; exports.BadGatewayException = _chunkBZFD4POHjs.BadGatewayException; exports.BadRequestException = _chunkBZFD4POHjs.BadRequestException; exports.BaseParam = BaseParam; exports.Body = Body; exports.ConflictException = _chunkBZFD4POHjs.ConflictException; exports.Context = _chunkBZFD4POHjs.Context; exports.Controller = Controller; exports.Ctx = Ctx; exports.Define = Define; exports.Delete = Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkPC6CFB6Sjs.ERROR_SYMBOL; exports.Event = Event; exports.Exception = _chunkBZFD4POHjs.Exception; exports.Factory =
|
|
517
|
+
exports.Arg = Arg; exports.BadGatewayException = _chunkBZFD4POHjs.BadGatewayException; exports.BadRequestException = _chunkBZFD4POHjs.BadRequestException; exports.BaseParam = BaseParam; exports.Body = Body; exports.ConflictException = _chunkBZFD4POHjs.ConflictException; exports.Context = _chunkBZFD4POHjs.Context; exports.Controller = Controller; exports.Ctx = Ctx; exports.Define = Define; exports.Delete = Delete; exports.Dev = Dev; exports.ERROR_SYMBOL = _chunkPC6CFB6Sjs.ERROR_SYMBOL; exports.Event = Event; exports.Exception = _chunkBZFD4POHjs.Exception; exports.Factory = _chunk2TLXS2XOjs.Factory; exports.Filter = Filter; exports.ForbiddenException = _chunkBZFD4POHjs.ForbiddenException; exports.FrameworkException = _chunkBZFD4POHjs.FrameworkException; exports.Get = Get; exports.Guard = Guard; exports.Head = Head; exports.Header = Header; exports.IS_DEV = _chunkPC6CFB6Sjs.IS_DEV; exports.IS_LOG_BAN = _chunkPC6CFB6Sjs.IS_LOG_BAN; exports.IS_STRICT = _chunkPC6CFB6Sjs.IS_STRICT; exports.Injectable = _chunk2TLXS2XOjs.Injectable; exports.Interceptor = Interceptor; exports.InvalidInputException = _chunkBZFD4POHjs.InvalidInputException; exports.MERGE_SYMBOL = _chunkPC6CFB6Sjs.MERGE_SYMBOL; exports.META_SYMBOL = _chunkPC6CFB6Sjs.META_SYMBOL; exports.MODULE_SYMBOL = _chunkPC6CFB6Sjs.MODULE_SYMBOL; exports.Meta = _chunk2TLXS2XOjs.Meta; exports.Mix = _chunkPC6CFB6Sjs.Mix; exports.NotFoundException = _chunkBZFD4POHjs.NotFoundException; exports.PExtension = PExtension; exports.PFilter = PFilter; exports.PGuard = PGuard; exports.PInterceptor = PInterceptor; exports.PPipe = PPipe; exports.PPlugin = PPlugin; exports.PS_FILE_RE = _chunkPC6CFB6Sjs.PS_FILE_RE; exports.PS_IMPORT_RE = _chunkPC6CFB6Sjs.PS_IMPORT_RE; exports.PS_SYMBOL = _chunkPC6CFB6Sjs.PS_SYMBOL; exports.Param = Param; exports.Patch = Patch; exports.PayloadLargeException = _chunkBZFD4POHjs.PayloadLargeException; exports.Pipe = Pipe; exports.Plugin = Plugin; exports.Post = Post; exports.Put = Put; exports.Query = Query; exports.Route = Route; exports.Rpc = Rpc; exports.ServiceUnavailableException = _chunkBZFD4POHjs.ServiceUnavailableException; exports.TimeoutException = _chunkBZFD4POHjs.TimeoutException; exports.UNMOUNT_SYMBOL = _chunkPC6CFB6Sjs.UNMOUNT_SYMBOL; exports.UnauthorizedException = _chunkBZFD4POHjs.UnauthorizedException; exports.UndefinedException = _chunkBZFD4POHjs.UndefinedException; exports.UnsupportedMediaTypeException = _chunkBZFD4POHjs.UnsupportedMediaTypeException; exports.ValidateException = _chunkBZFD4POHjs.ValidateException; exports.addFilter = _chunkBZFD4POHjs.addFilter; exports.addGuard = _chunkBZFD4POHjs.addGuard; exports.addInterceptor = _chunkBZFD4POHjs.addInterceptor; exports.addPipe = _chunkBZFD4POHjs.addPipe; exports.addPlugin = _chunkBZFD4POHjs.addPlugin; exports.argToReq = _chunkXCXOCS2Zjs.argToReq; exports.defaultPipe = _chunkBZFD4POHjs.defaultPipe; exports.emitter = _chunk2TLXS2XOjs.emitter; exports.generateHTTPCode = _chunk2TLXS2XOjs.generateHTTPCode; exports.generateRPCCode = _chunk2TLXS2XOjs.generateRPCCode; exports.getConfig = _chunkPC6CFB6Sjs.getConfig; exports.isAopDepInject = _chunkBZFD4POHjs.isAopDepInject; exports.log = _chunkPC6CFB6Sjs.log; exports.resolveDep = _chunkXCXOCS2Zjs.resolveDep; exports.setConfig = _chunkPC6CFB6Sjs.setConfig;
|
package/dist/index.mjs
CHANGED
package/dist/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2TLXS2XOjs = require('./chunk-2TLXS2XO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkPC6CFB6Sjs = require('./chunk-PC6CFB6S.js');
|
|
@@ -8,7 +8,7 @@ var _chunkPC6CFB6Sjs = require('./chunk-PC6CFB6S.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 _chunk2TLXS2XOjs.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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phecda-server",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.24",
|
|
4
4
|
"description": "provide express middlewares, `nestjs` format",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"hyper-express": "^6.15.2",
|
|
130
130
|
"picocolors": "^1.0.0",
|
|
131
131
|
"reflect-metadata": "^0.1.13",
|
|
132
|
-
"phecda-core": "3.0.0-beta.
|
|
132
|
+
"phecda-core": "3.0.0-beta.16"
|
|
133
133
|
},
|
|
134
134
|
"scripts": {
|
|
135
135
|
"dev": "tsup --watch",
|