zenweb 6.1.0 → 6.2.0
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/README.md +7 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -59,10 +59,13 @@ create().start();
|
|
|
59
59
|
create `src/service/hello.ts` file
|
|
60
60
|
|
|
61
61
|
```ts
|
|
62
|
-
import {
|
|
62
|
+
import { Component, Context } from 'zenweb';
|
|
63
63
|
|
|
64
|
+
@Component
|
|
64
65
|
export class HelloService {
|
|
65
|
-
|
|
66
|
+
constructor(
|
|
67
|
+
private ctx: Context,
|
|
68
|
+
){}
|
|
66
69
|
|
|
67
70
|
getIp() {
|
|
68
71
|
return this.ctx.ip;
|
|
@@ -73,11 +76,11 @@ export class HelloService {
|
|
|
73
76
|
create `src/controller/hello.ts` file
|
|
74
77
|
|
|
75
78
|
```ts
|
|
76
|
-
import {
|
|
79
|
+
import { Get } from 'zenweb';
|
|
77
80
|
import { HelloService } from '../service/hello';
|
|
78
81
|
|
|
79
82
|
export class HelloController {
|
|
80
|
-
@
|
|
83
|
+
@Get()
|
|
81
84
|
index(service: HelloService) {
|
|
82
85
|
const ip = service.getIp();
|
|
83
86
|
return `Hello ZenWeb! ${ip}`;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Core } from '@zenweb/core';
|
|
2
2
|
import { CreateOptions } from './types.js';
|
|
3
|
-
export {
|
|
3
|
+
export { Init, Inject, Component, Scope, $getInstance } from '@zenweb/inject';
|
|
4
4
|
export { Router, RouterMethod, RouterPath } from '@zenweb/router';
|
|
5
5
|
export { ResultFail, fail } from '@zenweb/result';
|
|
6
|
-
export {
|
|
6
|
+
export { Controller, Mapping, Get, Post, Put, Patch, Delete, All, } from '@zenweb/controller';
|
|
7
7
|
export { Next, SetupFunction, Context, Middleware, SetupHelper, $getCore, $getContext, $core, $ctx, $debug, createDebug, } from '@zenweb/core';
|
|
8
8
|
export { Body, ObjectBody, BodyHelper, RawBody, TextBody, useBodyParser, $body, $getTextBody, $getRawBody, $getObjectBody, } from '@zenweb/body';
|
|
9
9
|
export { QueryHelper, TypeCastHelper, ParamHelper, $param, $query, $helperBase, } from '@zenweb/helper';
|
package/dist/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import result from '@zenweb/result';
|
|
|
8
8
|
import helper from '@zenweb/helper';
|
|
9
9
|
import controller from '@zenweb/controller';
|
|
10
10
|
import { Core, $initCore } from '@zenweb/core';
|
|
11
|
-
export {
|
|
11
|
+
export { Init, Inject, Component, Scope, $getInstance } from '@zenweb/inject';
|
|
12
12
|
export { Router } from '@zenweb/router';
|
|
13
13
|
export { ResultFail, fail } from '@zenweb/result';
|
|
14
|
-
export {
|
|
14
|
+
export { Controller, Mapping, Get, Post, Put, Patch, Delete, All, } from '@zenweb/controller';
|
|
15
15
|
export { Context, SetupHelper, $getCore, $getContext, $core, $ctx, $debug, createDebug, } from '@zenweb/core';
|
|
16
16
|
export { Body, ObjectBody, BodyHelper, RawBody, TextBody, useBodyParser, $body, $getTextBody, $getRawBody, $getObjectBody, } from '@zenweb/body';
|
|
17
17
|
export { QueryHelper, TypeCastHelper, ParamHelper, $param, $query, $helperBase, } from '@zenweb/helper';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zenweb",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.2.0",
|
|
5
5
|
"description": "Modular lightweight web framework based on Koa",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"typings": "./dist/index.d.ts",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"homepage": "https://zenweb.node.ltd",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@zenweb/body": "^5.
|
|
32
|
-
"@zenweb/controller": "^6.1
|
|
31
|
+
"@zenweb/body": "^5.2.1",
|
|
32
|
+
"@zenweb/controller": "^6.2.1",
|
|
33
33
|
"@zenweb/core": "^5.2.1",
|
|
34
|
-
"@zenweb/helper": "^5.
|
|
35
|
-
"@zenweb/inject": "^5.
|
|
34
|
+
"@zenweb/helper": "^5.2.0",
|
|
35
|
+
"@zenweb/inject": "^5.2.0",
|
|
36
36
|
"@zenweb/log": "^5.1.0",
|
|
37
|
-
"@zenweb/messagecode": "^5.
|
|
37
|
+
"@zenweb/messagecode": "^5.2.0",
|
|
38
38
|
"@zenweb/meta": "^5.1.1",
|
|
39
|
-
"@zenweb/result": "^5.
|
|
40
|
-
"@zenweb/router": "^6.
|
|
39
|
+
"@zenweb/result": "^5.1.0",
|
|
40
|
+
"@zenweb/router": "^6.4.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^20.19.
|
|
43
|
+
"@types/node": "^20.19.39",
|
|
44
44
|
"rimraf": "^4.4.1",
|
|
45
45
|
"ts-node": "^10.9.2",
|
|
46
46
|
"typescript": "^5.9.3"
|