koatty 4.1.0 → 4.1.2
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +15 -0
- package/README.md +29 -19
- package/dist/README.md +29 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -7
- package/dist/index.mjs +178 -179
- package/dist/package.json +3 -3
- package/examples/basic-app/package.json +4 -1
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> koatty@4.1.
|
|
3
|
+
> koatty@4.1.2 build /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty
|
|
4
4
|
> npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
> koatty@4.1.
|
|
7
|
+
> koatty@4.1.2 build:js
|
|
8
8
|
> npx rollup --bundleConfigAsCjs -c .rollup.config.js
|
|
9
9
|
|
|
10
10
|
[1G[0K[1G[0K[36m
|
|
11
11
|
[1m./src/index.ts[22m → [1m./dist/index.js, ./dist/index.mjs[22m...[39m
|
|
12
|
-
[32mcreated [1m./dist/index.js, ./dist/index.mjs[22m in [
|
|
12
|
+
[32mcreated [1m./dist/index.js, ./dist/index.mjs[22m in [1m1s[22m[39m
|
|
13
13
|
[1G[0K⠙[1G[0K[1G[0K⠙[1G[0K
|
|
14
|
-
> koatty@4.1.
|
|
14
|
+
> koatty@4.1.2 build:dts
|
|
15
15
|
> bash scripts/build-dts.sh
|
|
16
16
|
|
|
17
17
|
[1G[0K🔨 Building type declarations for koatty...
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
✅ All dependencies ready (waited 2ms)
|
|
34
34
|
📝 Running TypeScript compiler...
|
|
35
35
|
[1G[0K[1G[0K⠙[1G[0K📦 Running API Extractor...
|
|
36
|
-
[1G[0K
|
|
36
|
+
[1G[0K⠙[1G[0K
|
|
37
37
|
[1mapi-extractor 7.55.2 [36m - https://api-extractor.com/[39m
|
|
38
38
|
[22m
|
|
39
39
|
Using configuration from ./api-extractor.json
|
|
@@ -64,7 +64,7 @@ Analysis will use the bundled TypeScript version 5.8.2
|
|
|
64
64
|
API Extractor completed successfully
|
|
65
65
|
[1G[0K⠙[1G[0K✅ Type declarations built successfully
|
|
66
66
|
[1G[0K⠙[1G[0K
|
|
67
|
-
> koatty@4.1.
|
|
67
|
+
> koatty@4.1.2 build:doc
|
|
68
68
|
> npx api-documenter markdown --input temp --output docs/api
|
|
69
69
|
|
|
70
70
|
[1G[0K[1G[0K
|
|
@@ -75,7 +75,7 @@ Reading koatty.api.json
|
|
|
75
75
|
Deleting old output from docs/api
|
|
76
76
|
Writing koatty package
|
|
77
77
|
[1G[0K⠙[1G[0K[1G[0K⠙[1G[0K
|
|
78
|
-
> koatty@4.1.
|
|
78
|
+
> koatty@4.1.2 build:cp
|
|
79
79
|
> node scripts/copyFiles && node scripts/postBuild
|
|
80
80
|
|
|
81
81
|
[1G[0KCopied package.json to dist/
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Koa + TypeScript + IOC = Koatty. **Koatty** is a progressive Node.js framework f
|
|
|
23
23
|
- ✅ **Protocol-Specific Middleware** - Bind middleware to specific protocols with `@Middleware({ protocol: [...] })`
|
|
24
24
|
- ✅ **Graceful Shutdown** - Enhanced connection pool management and cleanup handlers
|
|
25
25
|
- ✅ **Enhanced gRPC Support** - Timeout detection, duplicate call protection, streaming improvements
|
|
26
|
-
- ✅ **Application Lifecycle Hooks** - Custom decorators with `
|
|
26
|
+
- ✅ **Application Lifecycle Hooks** - Custom decorators with `@OnEvent` decorator API for framework lifecycle events
|
|
27
27
|
- ✅ **Version Conflict Detection** - Automatic detection and resolution of dependency conflicts
|
|
28
28
|
- ✅ **GraphQL over HTTP/2** - Automatic HTTP/2 upgrade with SSL for multiplexing and compression
|
|
29
29
|
- ✅ **Global Exception Handling** - `@ExceptionHandler()` decorator for centralized error management
|
|
@@ -274,24 +274,34 @@ export class LoggerPlugin implements IPlugin {
|
|
|
274
274
|
|
|
275
275
|
**Application Lifecycle Events:**
|
|
276
276
|
```typescript
|
|
277
|
-
// Use
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
277
|
+
// Use @OnEvent to hook into application lifecycle events
|
|
278
|
+
@Component("MyComponent", {
|
|
279
|
+
scope: 'user',
|
|
280
|
+
priority: 50,
|
|
281
|
+
description: 'Custom component example'
|
|
282
|
+
})
|
|
283
|
+
export class MyComponent {
|
|
284
|
+
|
|
285
|
+
// Execute when router loads
|
|
286
|
+
@OnEvent(AppEvent.loadRouter)
|
|
287
|
+
async initRouter(app: KoattyApplication) {
|
|
288
|
+
console.log('Initializing router...');
|
|
289
|
+
// Custom router initialization logic
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Execute when application is ready
|
|
293
|
+
@OnEvent(AppEvent.appReady)
|
|
294
|
+
async onReady(app: KoattyApplication) {
|
|
295
|
+
console.log('Application ready');
|
|
296
|
+
// Service registration, connection pool initialization, etc.
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Execute when application stops
|
|
300
|
+
@OnEvent(AppEvent.appStop)
|
|
301
|
+
async cleanup(app: KoattyApplication) {
|
|
302
|
+
console.log('Cleaning up resources...');
|
|
303
|
+
// Close connections, release resources
|
|
304
|
+
}
|
|
295
305
|
}
|
|
296
306
|
```
|
|
297
307
|
|
package/dist/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Koa + TypeScript + IOC = Koatty. **Koatty** is a progressive Node.js framework f
|
|
|
23
23
|
- ✅ **Protocol-Specific Middleware** - Bind middleware to specific protocols with `@Middleware({ protocol: [...] })`
|
|
24
24
|
- ✅ **Graceful Shutdown** - Enhanced connection pool management and cleanup handlers
|
|
25
25
|
- ✅ **Enhanced gRPC Support** - Timeout detection, duplicate call protection, streaming improvements
|
|
26
|
-
- ✅ **Application Lifecycle Hooks** - Custom decorators with `
|
|
26
|
+
- ✅ **Application Lifecycle Hooks** - Custom decorators with `@OnEvent` decorator API for framework lifecycle events
|
|
27
27
|
- ✅ **Version Conflict Detection** - Automatic detection and resolution of dependency conflicts
|
|
28
28
|
- ✅ **GraphQL over HTTP/2** - Automatic HTTP/2 upgrade with SSL for multiplexing and compression
|
|
29
29
|
- ✅ **Global Exception Handling** - `@ExceptionHandler()` decorator for centralized error management
|
|
@@ -274,24 +274,34 @@ export class LoggerPlugin implements IPlugin {
|
|
|
274
274
|
|
|
275
275
|
**Application Lifecycle Events:**
|
|
276
276
|
```typescript
|
|
277
|
-
// Use
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
277
|
+
// Use @OnEvent to hook into application lifecycle events
|
|
278
|
+
@Component("MyComponent", {
|
|
279
|
+
scope: 'user',
|
|
280
|
+
priority: 50,
|
|
281
|
+
description: 'Custom component example'
|
|
282
|
+
})
|
|
283
|
+
export class MyComponent {
|
|
284
|
+
|
|
285
|
+
// Execute when router loads
|
|
286
|
+
@OnEvent(AppEvent.loadRouter)
|
|
287
|
+
async initRouter(app: KoattyApplication) {
|
|
288
|
+
console.log('Initializing router...');
|
|
289
|
+
// Custom router initialization logic
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Execute when application is ready
|
|
293
|
+
@OnEvent(AppEvent.appReady)
|
|
294
|
+
async onReady(app: KoattyApplication) {
|
|
295
|
+
console.log('Application ready');
|
|
296
|
+
// Service registration, connection pool initialization, etc.
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Execute when application stops
|
|
300
|
+
@OnEvent(AppEvent.appStop)
|
|
301
|
+
async cleanup(app: KoattyApplication) {
|
|
302
|
+
console.log('Cleaning up resources...');
|
|
303
|
+
// Close connections, release resources
|
|
304
|
+
}
|
|
295
305
|
}
|
|
296
306
|
```
|
|
297
307
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @Author: richen
|
|
3
|
-
* @Date: 2026-
|
|
3
|
+
* @Date: 2026-02-03 10:52:21
|
|
4
4
|
* @License: BSD (3-Clause)
|
|
5
5
|
* @Copyright (c) - <richenlin(at)gmail.com>
|
|
6
6
|
* @HomePage: https://koatty.org/
|
|
@@ -165,7 +165,6 @@ class Loader {
|
|
|
165
165
|
e.version = e.version || t.version;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
u.Warn("Using process.env for paths is deprecated. Use app.rootPath, app.appPath, app.koattyPath instead.");
|
|
169
168
|
process.env.ROOT_PATH = t;
|
|
170
169
|
process.env.APP_PATH = o;
|
|
171
170
|
process.env.KOATTY_PATH = a;
|
|
@@ -458,7 +457,7 @@ class Loader {
|
|
|
458
457
|
return function(a) {
|
|
459
458
|
if (!(a.prototype instanceof o.Koatty)) throw new Error(`class does not inherit from Koatty`);
|
|
460
459
|
t.IOC.saveClass("COMPONENT", a, "KOATTY_APP");
|
|
461
|
-
|
|
460
|
+
H(a, e);
|
|
462
461
|
return a;
|
|
463
462
|
};
|
|
464
463
|
}
|
|
@@ -466,7 +465,7 @@ class Loader {
|
|
|
466
465
|
function A(e) {
|
|
467
466
|
return async t => {
|
|
468
467
|
if (!(t.prototype instanceof o.Koatty)) throw new Error(`class ${t.name} does not inherit from Koatty`);
|
|
469
|
-
return await
|
|
468
|
+
return await H(t, e, !0);
|
|
470
469
|
};
|
|
471
470
|
}
|
|
472
471
|
|
|
@@ -486,7 +485,7 @@ function M(e) {
|
|
|
486
485
|
};
|
|
487
486
|
}
|
|
488
487
|
|
|
489
|
-
const
|
|
488
|
+
const H = async function(e, a, n = !1) {
|
|
490
489
|
if (process.env.NODE_DEBUG) {
|
|
491
490
|
const e = process.env.NODE_DEBUG.split(",").filter(e => !e.includes("winston")).join(",");
|
|
492
491
|
process.env.NODE_DEBUG = e;
|
|
@@ -511,14 +510,14 @@ const k = async function(e, a, n = !1) {
|
|
|
511
510
|
u.Log("Koatty", "", "ComponentScan ...");
|
|
512
511
|
Loader.CheckAllComponents(i, e);
|
|
513
512
|
await Loader.LoadAllComponents(i, e);
|
|
514
|
-
if (!s) i.listen(
|
|
513
|
+
if (!s) i.listen(T);
|
|
515
514
|
return i;
|
|
516
515
|
} catch (e) {
|
|
517
516
|
u.Fatal(e);
|
|
518
517
|
}
|
|
519
518
|
};
|
|
520
519
|
|
|
521
|
-
const
|
|
520
|
+
const T = e => {
|
|
522
521
|
u.Log("Koatty", "", "====================================");
|
|
523
522
|
u.Log("Koatty", "", `Nodejs Version: ${process.version}`);
|
|
524
523
|
u.Log("Koatty", "", `Koatty Version: v${m}`);
|
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @Author: richen
|
|
3
|
-
* @Date: 2026-
|
|
3
|
+
* @Date: 2026-02-03 10:52:21
|
|
4
4
|
* @License: BSD (3-Clause)
|
|
5
5
|
* @Copyright (c) - <richenlin(at)gmail.com>
|
|
6
6
|
* @HomePage: https://koatty.org/
|
|
7
7
|
*/
|
|
8
|
-
import { LoadConfigs as
|
|
8
|
+
import { LoadConfigs as e } from "koatty_config";
|
|
9
9
|
|
|
10
10
|
export { Config } from "koatty_config";
|
|
11
11
|
|
|
12
|
-
import { IOC as
|
|
12
|
+
import { IOC as t, TAGGED_CLS as o } from "koatty_container";
|
|
13
13
|
|
|
14
14
|
export * from "koatty_container";
|
|
15
15
|
|
|
16
|
-
import { AppEvent as a, AppEventArr as s, asyncEvent as n, ComponentManager as i, implementsMiddlewareInterface as r, MIDDLEWARE_OPTIONS as l, protocolMiddleware as c, implementsControllerInterface as d, implementsServiceInterface as
|
|
16
|
+
import { AppEvent as a, AppEventArr as s, asyncEvent as n, ComponentManager as i, implementsMiddlewareInterface as r, MIDDLEWARE_OPTIONS as l, protocolMiddleware as c, implementsControllerInterface as d, implementsServiceInterface as f, implementsAspectInterface as p, Koatty as g } from "koatty_core";
|
|
17
17
|
|
|
18
18
|
export * from "koatty_core";
|
|
19
19
|
|
|
@@ -46,22 +46,22 @@ import * as v from "path";
|
|
|
46
46
|
*/
|
|
47
47
|
const L = u;
|
|
48
48
|
|
|
49
|
-
function w(
|
|
50
|
-
if (!
|
|
49
|
+
function w(e, t) {
|
|
50
|
+
if (!e.appDebug) {
|
|
51
51
|
u.enableBatch(!0);
|
|
52
52
|
u.setBatchConfig({
|
|
53
53
|
maxSize: 200,
|
|
54
54
|
flushInterval: 500
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
if (
|
|
58
|
-
if (
|
|
59
|
-
m.define(
|
|
60
|
-
process.env.LOGS_PATH =
|
|
61
|
-
u.setLogFilePath(
|
|
57
|
+
if (t.logLevel) u.setLevel(t.logLevel);
|
|
58
|
+
if (t.logFilePath && !e.silent) {
|
|
59
|
+
m.define(e, "logsPath", t.logFilePath);
|
|
60
|
+
process.env.LOGS_PATH = t.logFilePath;
|
|
61
|
+
u.setLogFilePath(t.logFilePath);
|
|
62
62
|
}
|
|
63
|
-
if (
|
|
64
|
-
|
|
63
|
+
if (t.sensFields) u.setSensFields(t.sensFields);
|
|
64
|
+
e.once(a.appStop, async () => {
|
|
65
65
|
await u.flushBatch();
|
|
66
66
|
await u.destroy();
|
|
67
67
|
});
|
|
@@ -81,34 +81,34 @@ const {engines: E, version: P} = C;
|
|
|
81
81
|
|
|
82
82
|
const b = P;
|
|
83
83
|
|
|
84
|
-
const
|
|
84
|
+
const M = E.node.slice(1) || "12.0.0";
|
|
85
85
|
|
|
86
|
-
function
|
|
87
|
-
if (m.isClass(o) && o.name !=
|
|
86
|
+
function k(e, t, o, a) {
|
|
87
|
+
if (m.isClass(o) && o.name != e) throw Error(`The file(${t}) name should be always the same as class name.`);
|
|
88
88
|
if (o["__esModule"]) if (o.name === void 0) {
|
|
89
89
|
const a = Object.keys(o);
|
|
90
|
-
if (a[0] !=
|
|
91
|
-
} else if (o.name !=
|
|
90
|
+
if (a[0] != e && m.isClass(o[a[0]])) throw Error(`The file(${t}) name should be always the same as class name.`);
|
|
91
|
+
} else if (o.name != e) throw Error(`The file(${t}) name should be always the same as class name.`);
|
|
92
92
|
if (!a) return;
|
|
93
|
-
if (a.has(
|
|
94
|
-
a.add(
|
|
93
|
+
if (a.has(e)) throw new Error(`A same class already exists. at \`${t}\`.`);
|
|
94
|
+
a.add(e);
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
function O() {
|
|
99
|
-
let
|
|
100
|
-
t = t.slice(0, t.lastIndexOf("."));
|
|
101
|
-
let e = process.version;
|
|
102
|
-
if (e[0] === "v") e = e.slice(1);
|
|
99
|
+
let e = M;
|
|
103
100
|
e = e.slice(0, e.lastIndexOf("."));
|
|
104
|
-
|
|
101
|
+
let t = process.version;
|
|
102
|
+
if (t[0] === "v") t = t.slice(1);
|
|
103
|
+
t = t.slice(0, t.lastIndexOf("."));
|
|
104
|
+
if (m.toNumber(e) > m.toNumber(t)) L.Fatal(`Koatty need node version > ${e}, current version is ${t}, please upgrade it.`);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
const T = () => {
|
|
108
|
-
let
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
return
|
|
108
|
+
let e = !1;
|
|
109
|
+
const t = JSON.stringify(process.argv[1]);
|
|
110
|
+
if (t.indexOf("jest") > -1) e = !0;
|
|
111
|
+
return e;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
/*
|
|
@@ -135,95 +135,94 @@ const $ = `\n\n┬┌─┌─┐┌─┐┌┬┐┌┬┐┬ ┬\n├┴┐
|
|
|
135
135
|
*/;
|
|
136
136
|
|
|
137
137
|
class Loader {
|
|
138
|
-
constructor(
|
|
139
|
-
this.app =
|
|
138
|
+
constructor(e) {
|
|
139
|
+
this.app = e;
|
|
140
140
|
}
|
|
141
|
-
static initialize(
|
|
142
|
-
if (
|
|
143
|
-
const
|
|
144
|
-
const o =
|
|
141
|
+
static initialize(e) {
|
|
142
|
+
if (e.env == "development") L.setLevel("debug"); else L.setLevel("info");
|
|
143
|
+
const t = e.rootPath || process.cwd();
|
|
144
|
+
const o = e.appPath || v.resolve(t, e.appDebug ? "src" : "dist");
|
|
145
145
|
const a = v.resolve(__dirname, "..");
|
|
146
|
-
m.define(
|
|
147
|
-
m.define(
|
|
148
|
-
m.define(
|
|
149
|
-
if (m.isEmpty(
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
-
|
|
146
|
+
m.define(e, "rootPath", t);
|
|
147
|
+
m.define(e, "appPath", o);
|
|
148
|
+
m.define(e, "koattyPath", a);
|
|
149
|
+
if (m.isEmpty(e.name)) {
|
|
150
|
+
const t = m.safeRequire(`${v.dirname(o)}/package.json`);
|
|
151
|
+
if (t.name) {
|
|
152
|
+
e.name = t.name;
|
|
153
|
+
e.version = e.version || t.version;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
|
|
157
|
-
process.env.ROOT_PATH = e;
|
|
156
|
+
process.env.ROOT_PATH = t;
|
|
158
157
|
process.env.APP_PATH = o;
|
|
159
158
|
process.env.KOATTY_PATH = a;
|
|
160
|
-
m.define(
|
|
159
|
+
m.define(e, "thinkPath", a);
|
|
161
160
|
process.env.THINK_PATH = a;
|
|
162
161
|
}
|
|
163
|
-
static GetComponentMeta(
|
|
162
|
+
static GetComponentMeta(e, a) {
|
|
164
163
|
let s = [];
|
|
165
|
-
const n =
|
|
164
|
+
const n = t.getClassMetadata(o, _, a);
|
|
166
165
|
if (n) if (m.isArray(n)) s = n; else s.push(n);
|
|
167
|
-
if (s.length < 1) s = [
|
|
166
|
+
if (s.length < 1) s = [ e.appPath ];
|
|
168
167
|
return s;
|
|
169
168
|
}
|
|
170
|
-
static GetConfigurationMeta(
|
|
171
|
-
const s =
|
|
169
|
+
static GetConfigurationMeta(e, a) {
|
|
170
|
+
const s = t.getClassMetadata(o, A, a);
|
|
172
171
|
let n = [];
|
|
173
172
|
if (s) if (m.isArray(s)) n = s; else n.push(s);
|
|
174
173
|
return n;
|
|
175
174
|
}
|
|
176
|
-
static CheckAllComponents(
|
|
177
|
-
const o = Loader.GetComponentMeta(
|
|
178
|
-
const a = Loader.GetConfigurationMeta(
|
|
175
|
+
static CheckAllComponents(e, t) {
|
|
176
|
+
const o = Loader.GetComponentMeta(e, t);
|
|
177
|
+
const a = Loader.GetConfigurationMeta(e, t);
|
|
179
178
|
const s = new Set;
|
|
180
|
-
h(o, "", (
|
|
181
|
-
|
|
182
|
-
}, [ "**/**.js", "**/**.ts", "!**/**.d.ts" ], [ ...a, `${
|
|
179
|
+
h(o, "", (e, t, o) => {
|
|
180
|
+
k(e, t, o, s);
|
|
181
|
+
}, [ "**/**.js", "**/**.ts", "!**/**.d.ts" ], [ ...a, `${t.name || ".no"}.ts` ]);
|
|
183
182
|
s.clear();
|
|
184
183
|
}
|
|
185
|
-
static SetLogger(
|
|
186
|
-
const
|
|
187
|
-
const o =
|
|
184
|
+
static SetLogger(e) {
|
|
185
|
+
const t = e.getMetaData("_configs") || [];
|
|
186
|
+
const o = t[0] || {};
|
|
188
187
|
if (o.config) {
|
|
189
|
-
const
|
|
188
|
+
const t = o.config;
|
|
190
189
|
let a = "debug", s = "", n = [];
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
w(
|
|
190
|
+
if (e.env === "production") a = "info";
|
|
191
|
+
if (t.logsLevel) a = t.logsLevel.toLowerCase();
|
|
192
|
+
if (t.logsPath) s = t.logsPath;
|
|
193
|
+
if (t.sensFields) n = t.sensFields;
|
|
194
|
+
w(e, {
|
|
196
195
|
logLevel: a,
|
|
197
196
|
logFilePath: s,
|
|
198
197
|
sensFields: n
|
|
199
198
|
});
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
|
-
static async LoadAllComponents(
|
|
201
|
+
static async LoadAllComponents(e, o) {
|
|
203
202
|
try {
|
|
204
|
-
if (m.isFunction(
|
|
203
|
+
if (m.isFunction(t.preloadMetadata)) t.preloadMetadata();
|
|
205
204
|
} catch {
|
|
206
205
|
L.Warn("[Loader] preloadMetadata is optional, ignore if not available");
|
|
207
206
|
}
|
|
208
|
-
const r = Loader.GetConfigurationMeta(
|
|
209
|
-
const l = new Loader(
|
|
210
|
-
for (const
|
|
207
|
+
const r = Loader.GetConfigurationMeta(e, o);
|
|
208
|
+
const l = new Loader(e);
|
|
209
|
+
for (const t of s) switch (t) {
|
|
211
210
|
case a.appBoot:
|
|
212
211
|
L.Log("Koatty", "", "Load Configurations ...");
|
|
213
212
|
l.LoadConfigs(r);
|
|
214
|
-
Loader.SetLogger(
|
|
215
|
-
await n(
|
|
213
|
+
Loader.SetLogger(e);
|
|
214
|
+
await n(e, t);
|
|
216
215
|
break;
|
|
217
216
|
|
|
218
217
|
case a.loadConfigure:
|
|
219
218
|
L.Log("Koatty", "", "Emit loadConfigure ...");
|
|
220
|
-
await n(
|
|
219
|
+
await n(e, t);
|
|
221
220
|
break;
|
|
222
221
|
|
|
223
222
|
case a.loadComponent:
|
|
224
223
|
L.Log("Koatty", "", "Initializing Component Manager ...");
|
|
225
|
-
const s = new i(
|
|
226
|
-
m.define(
|
|
224
|
+
const s = new i(e);
|
|
225
|
+
m.define(e, "componentManager", s);
|
|
227
226
|
s.discoverComponents();
|
|
228
227
|
const c = s.getStats();
|
|
229
228
|
L.Log("Koatty", "", `Discovered ${c.coreComponents} core components, ${c.userComponents} user components`);
|
|
@@ -231,108 +230,108 @@ class Loader {
|
|
|
231
230
|
await l.LoadComponents(s);
|
|
232
231
|
s.registerAppEvents(o);
|
|
233
232
|
s.registerCoreComponentHooks();
|
|
234
|
-
await n(
|
|
233
|
+
await n(e, t);
|
|
235
234
|
break;
|
|
236
235
|
|
|
237
236
|
case a.loadPlugin:
|
|
238
237
|
L.Log("Koatty", "", "Emit loadPlugin ...");
|
|
239
|
-
await n(
|
|
238
|
+
await n(e, t);
|
|
240
239
|
break;
|
|
241
240
|
|
|
242
241
|
case a.loadMiddleware:
|
|
243
242
|
L.Log("Koatty", "", "Load Middlewares ...");
|
|
244
243
|
await l.LoadMiddlewares();
|
|
245
|
-
await n(
|
|
244
|
+
await n(e, t);
|
|
246
245
|
break;
|
|
247
246
|
|
|
248
247
|
case a.loadService:
|
|
249
248
|
L.Log("Koatty", "", "Load Services ...");
|
|
250
249
|
await l.LoadServices();
|
|
251
|
-
await n(
|
|
250
|
+
await n(e, t);
|
|
252
251
|
break;
|
|
253
252
|
|
|
254
253
|
case a.loadController:
|
|
255
254
|
L.Log("Koatty", "", "Load Controllers ...");
|
|
256
255
|
await l.LoadControllers();
|
|
257
|
-
await n(
|
|
256
|
+
await n(e, t);
|
|
258
257
|
break;
|
|
259
258
|
|
|
260
259
|
case a.loadRouter:
|
|
261
260
|
L.Log("Koatty", "", "Initialize Router and Load Routes ...");
|
|
262
|
-
await n(
|
|
261
|
+
await n(e, t);
|
|
263
262
|
break;
|
|
264
263
|
|
|
265
264
|
case a.loadServe:
|
|
266
265
|
L.Log("Koatty", "", "Emit loadServe ...");
|
|
267
|
-
await n(
|
|
266
|
+
await n(e, t);
|
|
268
267
|
break;
|
|
269
268
|
|
|
270
269
|
case a.appReady:
|
|
271
270
|
L.Log("Koatty", "", "Emit appReady ...");
|
|
272
|
-
await n(
|
|
271
|
+
await n(e, t);
|
|
273
272
|
break;
|
|
274
273
|
|
|
275
274
|
default:
|
|
276
|
-
await n(
|
|
275
|
+
await n(e, t);
|
|
277
276
|
break;
|
|
278
277
|
}
|
|
279
278
|
}
|
|
280
|
-
LoadConfigs(
|
|
279
|
+
LoadConfigs(t) {
|
|
281
280
|
const o = {};
|
|
282
|
-
h([ "./config" ], this.app.koattyPath, function(
|
|
283
|
-
o[
|
|
281
|
+
h([ "./config" ], this.app.koattyPath, function(e, t, a) {
|
|
282
|
+
o[e] = a;
|
|
284
283
|
});
|
|
285
|
-
if (m.isArray(
|
|
286
|
-
let a = t
|
|
284
|
+
if (m.isArray(t)) t = t.length > 0 ? t : [ "./config" ];
|
|
285
|
+
let a = e(t, this.app.appPath);
|
|
287
286
|
a = m.extend(o, a, !0);
|
|
288
287
|
this.app.setMetaData("_configs", a);
|
|
289
288
|
}
|
|
290
289
|
async LoadMiddlewares() {
|
|
291
|
-
var
|
|
290
|
+
var e, o, a, s;
|
|
292
291
|
let n = this.app.config(void 0, "middleware");
|
|
293
292
|
if (m.isEmpty(n)) n = {
|
|
294
293
|
config: {},
|
|
295
294
|
list: []
|
|
296
295
|
};
|
|
297
296
|
try {
|
|
298
|
-
const
|
|
299
|
-
const a = y(
|
|
297
|
+
const t = (o = (e = n.config) === null || e === void 0 ? void 0 : e.trace) !== null && o !== void 0 ? o : {};
|
|
298
|
+
const a = y(t, this.app);
|
|
300
299
|
m.define(this.app, "tracer", a);
|
|
301
300
|
this.app.use(a);
|
|
302
301
|
L.Debug(`Trace middleware registered`);
|
|
303
|
-
} catch (
|
|
304
|
-
L.Warn(`Trace middleware failed to load: ${
|
|
302
|
+
} catch (e) {
|
|
303
|
+
L.Warn(`Trace middleware failed to load: ${e.message}`);
|
|
305
304
|
}
|
|
306
|
-
const i = (a =
|
|
307
|
-
i.forEach(
|
|
305
|
+
const i = (a = t.listClass("MIDDLEWARE")) !== null && a !== void 0 ? a : [];
|
|
306
|
+
i.forEach(e => {
|
|
308
307
|
var o;
|
|
309
|
-
|
|
310
|
-
if (
|
|
311
|
-
|
|
308
|
+
e.id = ((o = e.id) !== null && o !== void 0 ? o : "").replace("MIDDLEWARE:", "");
|
|
309
|
+
if (e.id && m.isClass(e.target)) {
|
|
310
|
+
t.reg(e.id, e.target, {
|
|
312
311
|
scope: "Prototype",
|
|
313
312
|
type: "MIDDLEWARE",
|
|
314
313
|
args: []
|
|
315
314
|
});
|
|
316
|
-
const o =
|
|
317
|
-
if (!r(o)) throw Error(`The middleware ${
|
|
315
|
+
const o = t.getInsByClass(e.target);
|
|
316
|
+
if (!r(o)) throw Error(`The middleware ${e.id} must implements interface 'IMiddleware'.`);
|
|
318
317
|
}
|
|
319
318
|
});
|
|
320
319
|
const d = n.list || [];
|
|
321
|
-
const
|
|
322
|
-
d.forEach(
|
|
323
|
-
|
|
320
|
+
const f = new Set([]);
|
|
321
|
+
d.forEach(e => {
|
|
322
|
+
f.add(e);
|
|
324
323
|
});
|
|
325
|
-
const
|
|
326
|
-
for (const
|
|
327
|
-
const o =
|
|
328
|
-
if (!o) throw Error(`Middleware ${
|
|
329
|
-
if (!m.isFunction(o.run)) throw Error(`The middleware ${
|
|
330
|
-
L.Debug(`Load middleware: ${
|
|
331
|
-
const a =
|
|
332
|
-
const n = (s = i.find(
|
|
324
|
+
const p = n.config || {};
|
|
325
|
+
for (const e of Array.from(f)) {
|
|
326
|
+
const o = t.get(e, "MIDDLEWARE");
|
|
327
|
+
if (!o) throw Error(`Middleware ${e} load error.`);
|
|
328
|
+
if (!m.isFunction(o.run)) throw Error(`The middleware ${e} must implements interface 'IMiddleware'.`);
|
|
329
|
+
L.Debug(`Load middleware: ${e}`);
|
|
330
|
+
const a = p[e] || {};
|
|
331
|
+
const n = (s = i.find(t => t.id === e)) === null || s === void 0 ? void 0 : s.target;
|
|
333
332
|
let r = {};
|
|
334
333
|
if (n) try {
|
|
335
|
-
r =
|
|
334
|
+
r = t.getPropertyData(l, n, e) || {};
|
|
336
335
|
} catch {
|
|
337
336
|
r = {};
|
|
338
337
|
}
|
|
@@ -341,94 +340,94 @@ class Loader {
|
|
|
341
340
|
...a
|
|
342
341
|
};
|
|
343
342
|
if (d.enabled === !1) {
|
|
344
|
-
L.Warn(`The middleware ${
|
|
343
|
+
L.Warn(`The middleware ${e} has been loaded but is disabled.`);
|
|
345
344
|
continue;
|
|
346
345
|
}
|
|
347
|
-
const
|
|
348
|
-
if (m.isFunction(
|
|
349
|
-
let
|
|
346
|
+
const f = await o.run(d, this.app);
|
|
347
|
+
if (m.isFunction(f)) {
|
|
348
|
+
let t = f;
|
|
350
349
|
if (d.protocol) {
|
|
351
350
|
const o = m.isArray(d.protocol) ? d.protocol : [ d.protocol ];
|
|
352
|
-
L.Log("Koatty", "", `Middleware ${
|
|
353
|
-
|
|
351
|
+
L.Log("Koatty", "", `Middleware ${e} limited to protocols: ${o.join(", ")}`);
|
|
352
|
+
t = c(o, f);
|
|
354
353
|
}
|
|
355
|
-
if (
|
|
354
|
+
if (t.length < 3) this.app.use(t); else this.app.useExp(t);
|
|
356
355
|
}
|
|
357
356
|
}
|
|
358
357
|
}
|
|
359
358
|
async LoadControllers() {
|
|
360
|
-
const
|
|
359
|
+
const e = t.listClass("CONTROLLER");
|
|
361
360
|
const o = [];
|
|
362
|
-
|
|
361
|
+
e.forEach(e => {
|
|
363
362
|
var a;
|
|
364
|
-
|
|
365
|
-
if (
|
|
366
|
-
L.Debug(`Load controller: ${
|
|
367
|
-
|
|
363
|
+
e.id = ((a = e.id) !== null && a !== void 0 ? a : "").replace("CONTROLLER:", "");
|
|
364
|
+
if (e.id && m.isClass(e.target)) {
|
|
365
|
+
L.Debug(`Load controller: ${e.id}`);
|
|
366
|
+
t.reg(e.id, e.target, {
|
|
368
367
|
scope: "Prototype",
|
|
369
368
|
type: "CONTROLLER",
|
|
370
369
|
args: []
|
|
371
370
|
});
|
|
372
|
-
const a =
|
|
373
|
-
if (!d(a)) throw Error(`The controller ${
|
|
374
|
-
o.push(
|
|
371
|
+
const a = t.getInsByClass(e.target);
|
|
372
|
+
if (!d(a)) throw Error(`The controller ${e.id} must implements interface 'IController'.`);
|
|
373
|
+
o.push(e.id);
|
|
375
374
|
}
|
|
376
375
|
});
|
|
377
376
|
this.app.setMetaData("_controllers", o);
|
|
378
377
|
return o;
|
|
379
378
|
}
|
|
380
379
|
async LoadServices() {
|
|
381
|
-
var
|
|
382
|
-
const o =
|
|
380
|
+
var e;
|
|
381
|
+
const o = t.listClass("SERVICE");
|
|
383
382
|
for (const a of o) {
|
|
384
|
-
a.id = ((
|
|
383
|
+
a.id = ((e = a.id) !== null && e !== void 0 ? e : "").replace("SERVICE:", "");
|
|
385
384
|
if (a.id && m.isClass(a.target)) {
|
|
386
385
|
L.Debug(`Load service: ${a.id}`);
|
|
387
|
-
|
|
386
|
+
t.reg(a.id, a.target, {
|
|
388
387
|
scope: "Singleton",
|
|
389
388
|
type: "SERVICE",
|
|
390
389
|
args: []
|
|
391
390
|
});
|
|
392
|
-
const
|
|
393
|
-
if (!
|
|
391
|
+
const e = t.getInsByClass(a.target);
|
|
392
|
+
if (!f(e)) throw Error(`The service ${a.id} must implements interface 'IService'.`);
|
|
394
393
|
}
|
|
395
394
|
}
|
|
396
395
|
}
|
|
397
|
-
async LoadComponents(
|
|
396
|
+
async LoadComponents(e) {
|
|
398
397
|
var o, a;
|
|
399
|
-
const s =
|
|
400
|
-
s.forEach(
|
|
398
|
+
const s = t.listClass("COMPONENT");
|
|
399
|
+
s.forEach(e => {
|
|
401
400
|
var o;
|
|
402
|
-
|
|
403
|
-
if (m.isClass(
|
|
404
|
-
|
|
401
|
+
e.id = ((o = e.id) !== null && o !== void 0 ? o : "").replace("COMPONENT:", "");
|
|
402
|
+
if (m.isClass(e.target)) {
|
|
403
|
+
t.reg(e.id, e.target, {
|
|
405
404
|
scope: "Singleton",
|
|
406
405
|
type: "COMPONENT",
|
|
407
406
|
args: []
|
|
408
407
|
});
|
|
409
|
-
if (
|
|
410
|
-
const o =
|
|
411
|
-
if (!
|
|
408
|
+
if (e.id && e.id.endsWith("Aspect")) {
|
|
409
|
+
const o = t.getInsByClass(e.target);
|
|
410
|
+
if (!p(o)) throw Error(`The aspect ${e.id} must implements interface 'IAspect'.`);
|
|
412
411
|
}
|
|
413
412
|
}
|
|
414
413
|
});
|
|
415
|
-
if (
|
|
414
|
+
if (e) await e.loadUserComponents(); else {
|
|
416
415
|
L.Warn("Loading plugins in legacy mode");
|
|
417
|
-
let
|
|
418
|
-
if (m.isEmpty(
|
|
416
|
+
let e = this.app.config(void 0, "plugin");
|
|
417
|
+
if (m.isEmpty(e)) e = {
|
|
419
418
|
config: {},
|
|
420
419
|
list: []
|
|
421
420
|
};
|
|
422
|
-
const s = (o =
|
|
421
|
+
const s = (o = e.list) !== null && o !== void 0 ? o : [];
|
|
423
422
|
for (const o of s) {
|
|
424
|
-
const s =
|
|
423
|
+
const s = t.get(o, "COMPONENT");
|
|
425
424
|
if (!s) throw Error(`Plugin ${o} load error.`);
|
|
426
425
|
if (!m.isFunction(s.run)) throw Error(`Plugin ${o} must implements interface 'IPlugin'.`);
|
|
427
|
-
if (
|
|
426
|
+
if (e.config[o] === !1) {
|
|
428
427
|
L.Warn(`Plugin ${o} already loaded but not effective.`);
|
|
429
428
|
continue;
|
|
430
429
|
}
|
|
431
|
-
await s.run((a =
|
|
430
|
+
await s.run((a = e.config[o]) !== null && a !== void 0 ? a : {}, this.app);
|
|
432
431
|
}
|
|
433
432
|
}
|
|
434
433
|
}
|
|
@@ -442,78 +441,78 @@ class Loader {
|
|
|
442
441
|
* @LastEditTime: 2025-01-14 16:11:21
|
|
443
442
|
* @License: BSD (3-Clause)
|
|
444
443
|
* @Copyright (c): <richenlin(at)gmail.com>
|
|
445
|
-
*/ function K(
|
|
444
|
+
*/ function K(e) {
|
|
446
445
|
return function(o) {
|
|
447
446
|
if (!(o.prototype instanceof g)) throw new Error(`class does not inherit from Koatty`);
|
|
448
|
-
|
|
449
|
-
I(o,
|
|
447
|
+
t.saveClass("COMPONENT", o, "KOATTY_APP");
|
|
448
|
+
I(o, e);
|
|
450
449
|
return o;
|
|
451
450
|
};
|
|
452
451
|
}
|
|
453
452
|
|
|
454
|
-
function N(
|
|
455
|
-
return async
|
|
456
|
-
if (!(
|
|
457
|
-
return await I(
|
|
453
|
+
function N(e) {
|
|
454
|
+
return async t => {
|
|
455
|
+
if (!(t.prototype instanceof g)) throw new Error(`class ${t.name} does not inherit from Koatty`);
|
|
456
|
+
return await I(t, e, !0);
|
|
458
457
|
};
|
|
459
458
|
}
|
|
460
459
|
|
|
461
|
-
function D(
|
|
460
|
+
function D(e) {
|
|
462
461
|
return a => {
|
|
463
462
|
if (!(a.prototype instanceof g)) throw new Error(`class does not inherit from Koatty`);
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
e = e !== null && e !== void 0 ? e : "";
|
|
464
|
+
t.saveClassMetadata(o, _, e, a);
|
|
466
465
|
};
|
|
467
466
|
}
|
|
468
467
|
|
|
469
|
-
function S(
|
|
468
|
+
function S(e) {
|
|
470
469
|
return a => {
|
|
471
470
|
if (!(a.prototype instanceof g)) throw new Error(`class does not inherit from Koatty`);
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
e = e !== null && e !== void 0 ? e : "";
|
|
472
|
+
t.saveClassMetadata(o, A, e, a);
|
|
474
473
|
};
|
|
475
474
|
}
|
|
476
475
|
|
|
477
|
-
const I = async function(
|
|
476
|
+
const I = async function(e, o, a = !1) {
|
|
478
477
|
if (process.env.NODE_DEBUG) {
|
|
479
|
-
const
|
|
480
|
-
process.env.NODE_DEBUG =
|
|
478
|
+
const e = process.env.NODE_DEBUG.split(",").filter(e => !e.includes("winston")).join(",");
|
|
479
|
+
process.env.NODE_DEBUG = e;
|
|
481
480
|
}
|
|
482
481
|
O();
|
|
483
482
|
const s = T();
|
|
484
483
|
if (!a && s) return;
|
|
485
|
-
const n = Reflect.construct(
|
|
484
|
+
const n = Reflect.construct(e, []);
|
|
486
485
|
if (s) {
|
|
487
486
|
n.silent = !0;
|
|
488
487
|
L.enable(!1);
|
|
489
488
|
}
|
|
490
489
|
try {
|
|
491
490
|
if (!n.silent) console.log($);
|
|
492
|
-
if (!(n instanceof g)) throw new Error(`class ${
|
|
491
|
+
if (!(n instanceof g)) throw new Error(`class ${e.name} does not inherit from Koatty`);
|
|
493
492
|
Loader.initialize(n);
|
|
494
493
|
if (m.isFunction(o)) {
|
|
495
494
|
L.Log("Koatty", "", "Execute bootFunc ...");
|
|
496
495
|
await o(n);
|
|
497
496
|
}
|
|
498
|
-
|
|
497
|
+
t.setApp(n);
|
|
499
498
|
L.Log("Koatty", "", "ComponentScan ...");
|
|
500
|
-
Loader.CheckAllComponents(n,
|
|
501
|
-
await Loader.LoadAllComponents(n,
|
|
499
|
+
Loader.CheckAllComponents(n, e);
|
|
500
|
+
await Loader.LoadAllComponents(n, e);
|
|
502
501
|
if (!s) n.listen(R);
|
|
503
502
|
return n;
|
|
504
|
-
} catch (
|
|
505
|
-
L.Fatal(
|
|
503
|
+
} catch (e) {
|
|
504
|
+
L.Fatal(e);
|
|
506
505
|
}
|
|
507
506
|
};
|
|
508
507
|
|
|
509
|
-
const R =
|
|
508
|
+
const R = e => {
|
|
510
509
|
L.Log("Koatty", "", "====================================");
|
|
511
510
|
L.Log("Koatty", "", `Nodejs Version: ${process.version}`);
|
|
512
511
|
L.Log("Koatty", "", `Koatty Version: v${b}`);
|
|
513
|
-
L.Log("Koatty", "", `App Environment: ${
|
|
514
|
-
if (
|
|
512
|
+
L.Log("Koatty", "", `App Environment: ${e.env}`);
|
|
513
|
+
if (e.appDebug) L.Warn(`Running in debug mode.`);
|
|
515
514
|
L.Log("Koatty", "", "====================================");
|
|
516
|
-
n(
|
|
515
|
+
n(e, a.appStart);
|
|
517
516
|
};
|
|
518
517
|
|
|
519
518
|
export { K as Bootstrap, D as ComponentScan, S as ConfigurationScan, N as ExecBootStrap, L as Logger };
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koatty",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Koa + Typescript = koatty. Use Typescript's decorator implement auto injection.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"koatty_loader": "^1.1.4",
|
|
92
92
|
"koatty_logger": "^2.4.0",
|
|
93
93
|
"koatty_router": "^2.1.0",
|
|
94
|
-
"koatty_serve": "^3.1.
|
|
95
|
-
"koatty_trace": "^2.1.
|
|
94
|
+
"koatty_serve": "^3.1.1",
|
|
95
|
+
"koatty_trace": "^2.1.1",
|
|
96
96
|
"ts-morph": "^27.0.2"
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -11,8 +11,11 @@
|
|
|
11
11
|
],
|
|
12
12
|
"author": "richenlin",
|
|
13
13
|
"license": "BSD-3-Clause",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "node --nolazy -r ts-node/register ./src/App.ts"
|
|
16
|
+
},
|
|
14
17
|
"devDependencies": {
|
|
15
|
-
"@types/node": "^
|
|
18
|
+
"@types/node": "^25.1.0",
|
|
16
19
|
"ts-node": "^10.x.x",
|
|
17
20
|
"tsconfig-paths": "^4.x.x",
|
|
18
21
|
"typescript": "^5.x.x"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koatty",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Koa + Typescript = koatty. Use Typescript's decorator implement auto injection.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -75,15 +75,15 @@
|
|
|
75
75
|
"koa": "^3.1.1",
|
|
76
76
|
"ts-morph": "^27.0.2",
|
|
77
77
|
"koatty_config": "1.2.9",
|
|
78
|
-
"
|
|
78
|
+
"koatty_container": "2.0.0",
|
|
79
79
|
"koatty_exception": "2.1.0",
|
|
80
|
+
"koatty_core": "2.1.0",
|
|
80
81
|
"koatty_lib": "1.4.5",
|
|
81
82
|
"koatty_logger": "2.4.0",
|
|
82
|
-
"koatty_loader": "1.1.4",
|
|
83
|
-
"koatty_serve": "3.1.0",
|
|
84
|
-
"koatty_trace": "2.1.0",
|
|
85
83
|
"koatty_router": "2.1.0",
|
|
86
|
-
"
|
|
84
|
+
"koatty_trace": "2.1.1",
|
|
85
|
+
"koatty_serve": "3.1.1",
|
|
86
|
+
"koatty_loader": "1.1.4"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
|