koatty_router 2.1.6 → 2.1.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.
@@ -1,28 +1,28 @@
1
1
 
2
2
  
3
- > koatty_router@2.1.6 build /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
3
+ > koatty_router@2.1.8 build /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
4
4
  > pnpm run build:js && pnpm run build:dts && pnpm run build:doc && pnpm run build:cp
5
5
 
6
6
 
7
- > koatty_router@2.1.6 build:js /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
7
+ > koatty_router@2.1.8 build:js /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
8
8
  > tsup
9
9
 
10
10
  CLI Building entry: src/index.ts
11
11
  CLI Using tsconfig: tsconfig.json
12
12
  CLI tsup v8.5.1
13
- CLI Using tsup config: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/tsup.config.ts
13
+ CLI Using tsup config: /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/tsup.config.ts
14
14
  CLI Target: node18
15
15
  CLI Cleaning output folder
16
16
  CJS Build start
17
17
  ESM Build start
18
- CJS dist/index.js 148.11 KB
19
- CJS dist/index.js.map 376.39 KB
20
- CJS ⚡️ Build success in 978ms
21
- ESM dist/index.mjs 142.07 KB
22
- ESM dist/index.mjs.map 376.08 KB
23
- ESM ⚡️ Build success in 993ms
24
-
25
- > koatty_router@2.1.6 build:dts /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
18
+ ESM dist/index.mjs 141.83 KB
19
+ ESM dist/index.mjs.map 376.26 KB
20
+ ESM ⚡️ Build success in 686ms
21
+ CJS dist/index.js 147.84 KB
22
+ CJS dist/index.js.map 376.58 KB
23
+ CJS ⚡️ Build success in 686ms
24
+
25
+ > koatty_router@2.1.8 build:dts /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
26
26
  > bash ../../scripts/build-dts.sh
27
27
 
28
28
  🔨 Building type declarations for koatty-router...
@@ -32,59 +32,24 @@
32
32
  ✓ koatty_container type declarations ready
33
33
  ✓ koatty_core type declarations ready
34
34
  ✓ koatty_exception type declarations ready
35
+ ✓ koatty_graphql type declarations ready
35
36
  ✓ koatty_lib type declarations ready
36
37
  ✓ koatty_logger type declarations ready
37
38
  ✓ koatty_proto type declarations ready
38
39
  ✓ koatty_validation type declarations ready
39
- ⏳ Waiting for: koatty_graphql (0s)
40
- ✗ koatty_graphql: missing .d.ts
41
- ⏳ Waiting for: koatty_graphql (5s)
42
- ✗ koatty_graphql: missing .d.ts
43
- ⏳ Waiting for: koatty_graphql (10s)
44
- ✗ koatty_graphql: missing .d.ts
45
- ⏳ Waiting for: koatty_graphql (15s)
46
- ✗ koatty_graphql: missing .d.ts
47
- ⏳ Waiting for: koatty_graphql (20s)
48
- ✗ koatty_graphql: missing .d.ts
49
- ⏳ Waiting for: koatty_graphql (25s)
50
- ✗ koatty_graphql: missing .d.ts
51
- ⏳ Waiting for: koatty_graphql (30s)
52
- ✗ koatty_graphql: missing .d.ts
53
- ⏳ Waiting for: koatty_graphql (35s)
54
- ✗ koatty_graphql: missing .d.ts
55
- ⏳ Waiting for: koatty_graphql (40s)
56
- ✗ koatty_graphql: missing .d.ts
57
- ⏳ Waiting for: koatty_graphql (45s)
58
- ✗ koatty_graphql: missing .d.ts
59
- ⏳ Waiting for: koatty_graphql (50s)
60
- ✗ koatty_graphql: missing .d.ts
61
- ⏳ Waiting for: koatty_graphql (55s)
62
- ✗ koatty_graphql: missing .d.ts
63
-
64
- ⚠️ Timeout waiting for dependencies: koatty_graphql
65
- Maximum wait time: 60000ms
66
- Continuing build anyway - dependencies may be building in parallel
67
- 📝 Running TypeScript compiler...
68
- src/router/graphql.ts:19:29 - error TS7016: Could not find a declaration file for module 'koatty_graphql'. '/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-graphql/dist/index.js' implicitly has an 'any' type.
69
- Try `npm i --save-dev @types/koatty_graphql` if it exists or add a new declaration (.d.ts) file containing `declare module 'koatty_graphql';`
70
-
71
- 19 import { buildSchema } from "koatty_graphql";
72
-    ~~~~~~~~~~~~~~~~
73
-
74
40
 
75
- Found 1 error in src/router/graphql.ts:19
76
-
77
- ⠙⚠️ TypeScript compilation had errors, but continuing...
78
- 📦 Running API Extractor...
41
+ All dependencies ready (waited 1ms)
42
+ 📝 Running TypeScript compiler...
43
+ ⠙⠙📦 Running API Extractor...
79
44
  
80
45
  api-extractor 7.55.2  - https://api-extractor.com/
81
46
  
82
47
  Using configuration from ./api-extractor.json
83
48
  Analysis will use the bundled TypeScript version 5.8.2
84
49
  *** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
85
- Writing: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/temp/koatty_router.api.json
86
- Writing package typings: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/dist/index.d.ts
87
- Warning: src/RouterComponent.ts:160:38 - (tsdoc-characters-after-block-tag) The token "@OnEvent" looks like a TSDoc tag but contains an invalid character "("; if it is not a tag, use a backslash to escape the "@"
50
+ Writing: /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/temp/koatty_router.api.json
51
+ Writing package typings: /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router/dist/index.d.ts
52
+ Warning: src/RouterComponent.ts:161:38 - (tsdoc-characters-after-block-tag) The token "@OnEvent" looks like a TSDoc tag but contains an invalid character "("; if it is not a tag, use a backslash to escape the "@"
88
53
  Warning: src/params/mapping.ts:33:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
89
54
  Warning: src/params/mapping.ts:34:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration
90
55
  Warning: src/params/mapping.ts:47:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration
@@ -172,7 +137,7 @@ Analysis will use the bundled TypeScript version 5.8.2
172
137
  API Extractor completed successfully
173
138
  ⠙✅ Type declarations built successfully
174
139
 
175
- > koatty_router@2.1.6 build:doc /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
140
+ > koatty_router@2.1.8 build:doc /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
176
141
  > api-documenter markdown --input temp --output docs/api
177
142
 
178
143
 
@@ -215,7 +180,7 @@ Unsupported block tag: @interface
215
180
  Unsupported block tag: @RequestBody
216
181
  Unsupported block tag: @RequestParam
217
182
 
218
- > koatty_router@2.1.6 build:cp /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
183
+ > koatty_router@2.1.8 build:cp /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-router
219
184
  > node ../../scripts/postBuild.js
220
185
 
221
186
  📦 postBuild: koatty-router
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - koatty_lib@1.4.8
9
+ - koatty_container@2.0.6
10
+ - koatty_core@2.1.7
11
+ - koatty_exception@2.1.7
12
+ - koatty_graphql@1.1.8
13
+ - koatty_logger@2.8.4
14
+ - koatty_proto@1.3.8
15
+ - koatty_validation@2.0.6
16
+
17
+ ## 2.1.7
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+ - koatty_graphql@1.1.7
23
+
3
24
  ## 2.1.6
4
25
 
5
26
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2026-02-11 11:43:06
3
+ * @Date: 2026-03-02 23:05:43
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -387,7 +387,6 @@ export declare class RouterComponent implements IComponent {
387
387
  *
388
388
  * @param app - Koatty application instance
389
389
  */
390
- run(app: KoattyApplication): Promise<void>;
391
390
  /**
392
391
  * Cleanup router resources on app stop
393
392
  *
package/dist/index.js CHANGED
@@ -54,7 +54,7 @@ var onFinished__default = /*#__PURE__*/_interopDefault(onFinished);
54
54
 
55
55
  /*!
56
56
  * @Author: richen
57
- * @Date: 2026-02-11 03:41:57
57
+ * @Date: 2026-03-02 15:05:34
58
58
  * @License: BSD (3-Clause)
59
59
  * @Copyright (c) - <richenlin(at)gmail.com>
60
60
  * @HomePage: https://koatty.org/
@@ -4289,6 +4289,8 @@ exports.RouterComponent = class RouterComponent {
4289
4289
  this.factory = factory;
4290
4290
  koatty_logger.DefaultLogger.Log("Koatty", "", "\u2713 Router initialized");
4291
4291
  }
4292
+ app.use(payload(app.config("payload", "router")));
4293
+ koatty_logger.DefaultLogger.Log("Koatty", "", "\u2713 Payload middleware registered");
4292
4294
  await this.loadRoutes(app);
4293
4295
  }
4294
4296
  /**
@@ -4321,9 +4323,6 @@ exports.RouterComponent = class RouterComponent {
4321
4323
  }
4322
4324
  koatty_logger.DefaultLogger.Log("Koatty", "", "\u2713 Routes loaded");
4323
4325
  }
4324
- async run(app) {
4325
- app.use(payload(app.config("payload", "router")));
4326
- }
4327
4326
  /**
4328
4327
  * Cleanup router resources on app stop
4329
4328
  *
@@ -4346,14 +4345,6 @@ _ts_decorate([
4346
4345
  ]),
4347
4346
  _ts_metadata("design:returntype", Promise)
4348
4347
  ], exports.RouterComponent.prototype, "initRouter", null);
4349
- _ts_decorate([
4350
- koatty_core.OnEvent(koatty_core.AppEvent.appReady),
4351
- _ts_metadata("design:type", Function),
4352
- _ts_metadata("design:paramtypes", [
4353
- typeof koatty_core.KoattyApplication === "undefined" ? Object : koatty_core.KoattyApplication
4354
- ]),
4355
- _ts_metadata("design:returntype", Promise)
4356
- ], exports.RouterComponent.prototype, "run", null);
4357
4348
  _ts_decorate([
4358
4349
  koatty_core.OnEvent(koatty_core.AppEvent.appStop),
4359
4350
  _ts_metadata("design:type", Function),