@zenofolio/hyper-decor 1.0.62 → 1.0.63
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.
|
@@ -142,6 +142,12 @@ function prepareTarget(_a) {
|
|
|
142
142
|
return __awaiter(this, arguments, void 0, function* ({ target, router, prefix, namespace = "", instance, imports = [], log, hooks, }) {
|
|
143
143
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
144
144
|
const data = getData(target);
|
|
145
|
+
if (data.module) {
|
|
146
|
+
log("modules", `${namespace} { ${prefix || "/"} }`);
|
|
147
|
+
}
|
|
148
|
+
else if (data.controller) {
|
|
149
|
+
log("controllers", `${namespace} { ${prefix || "/"} }`);
|
|
150
|
+
}
|
|
145
151
|
const modules = (_c = (_b = data.module) === null || _b === void 0 ? void 0 : _b.modules) !== null && _c !== void 0 ? _c : [];
|
|
146
152
|
const controllers = (_e = (_d = data.module) === null || _d === void 0 ? void 0 : _d.controllers) !== null && _e !== void 0 ? _e : [];
|
|
147
153
|
const routes = (_f = data.routes) !== null && _f !== void 0 ? _f : { routes: [] };
|
|
@@ -24,7 +24,7 @@ const prepare_helper_1 = require("../__internals/helpers/prepare.helper");
|
|
|
24
24
|
const HyperApp = (options) => (0, decorator_base_1.DecoratorHelper)({
|
|
25
25
|
type: constants_1.KEY_TYPE_APP,
|
|
26
26
|
key: constants_1.KEY_PARAMS_APP,
|
|
27
|
-
options:
|
|
27
|
+
options: Object.assign({ modules: [], logger: console.log }, options),
|
|
28
28
|
}, (options, Target) => {
|
|
29
29
|
return class extends hyper_express_1.Server {
|
|
30
30
|
constructor(...args) {
|
|
@@ -21,6 +21,7 @@ export type ConstructorDecorator = (target: Constructor, kay?: any, descriptor?:
|
|
|
21
21
|
export type HyperClassDecorator<T> = (options?: T) => ConstructorDecorator;
|
|
22
22
|
export type HyperMethodDecorator<T> = (options?: T) => (target: any, key?: any, descriptor?: PropertyDescriptor) => void;
|
|
23
23
|
export interface LogSpaces {
|
|
24
|
+
modules: boolean;
|
|
24
25
|
controllers: boolean;
|
|
25
26
|
middleware: boolean;
|
|
26
27
|
routes: boolean;
|
|
@@ -37,7 +38,7 @@ export interface HyperAppMetadata {
|
|
|
37
38
|
license?: string;
|
|
38
39
|
prefix?: string;
|
|
39
40
|
logger?: (...args: any[]) => void;
|
|
40
|
-
logs?: LogSpaces
|
|
41
|
+
logs?: Partial<LogSpaces>;
|
|
41
42
|
modules: Constructor[];
|
|
42
43
|
imports?: ImportType[];
|
|
43
44
|
options?: ServerConstructorOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,3 @@ export * from "./stores";
|
|
|
11
11
|
export * from "./type";
|
|
12
12
|
export * from "./common/transport";
|
|
13
13
|
export * from "./common/message-bus";
|
|
14
|
-
/**
|
|
15
|
-
* Simple delay helper to avoid ESM issues with the 'delay' package in CJS.
|
|
16
|
-
*/
|
|
17
|
-
export declare const delay: (ms: number) => Promise<unknown>;
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.delay = void 0;
|
|
18
17
|
__exportStar(require("./exeptions"), exports);
|
|
19
18
|
__exportStar(require("./constants"), exports);
|
|
20
19
|
__exportStar(require("./extension"), exports);
|
|
@@ -28,8 +27,3 @@ __exportStar(require("./stores"), exports);
|
|
|
28
27
|
__exportStar(require("./type"), exports);
|
|
29
28
|
__exportStar(require("./common/transport"), exports);
|
|
30
29
|
__exportStar(require("./common/message-bus"), exports);
|
|
31
|
-
/**
|
|
32
|
-
* Simple delay helper to avoid ESM issues with the 'delay' package in CJS.
|
|
33
|
-
*/
|
|
34
|
-
const delay = (ms) => new Promise((res) => setTimeout(res, ms));
|
|
35
|
-
exports.delay = delay;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenofolio/hyper-decor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.63",
|
|
4
4
|
"description": "Project core with utilities and features",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "zenozaga",
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
"bin": {
|
|
64
64
|
"hyper-clean-uws": "./scripts/clean.js"
|
|
65
65
|
}
|
|
66
|
-
}
|
|
66
|
+
}
|
package/debug.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
State: class-before-dep-ok
|