@bool-ts/core 2.0.1 → 2.0.3
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/dist/index.js +3 -3
- package/dist/index.js.map +3 -3
- package/package.json +27 -30
- package/src/entities/application.ts +11 -9
package/package.json
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
2
|
+
"author": "Trần Đức Tâm (Neo)",
|
|
3
|
+
"bugs": {
|
|
4
|
+
"url": "https://github.com/BoolTS/core/issues"
|
|
5
|
+
},
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@bool-ts/date-time": "^1.0.0",
|
|
8
|
+
"qs": "^6.14.0",
|
|
9
|
+
"reflect-metadata": "^0.2.2",
|
|
10
|
+
"zod": "^4.1.8"
|
|
11
|
+
},
|
|
4
12
|
"description": "Core package for BoolTS framework",
|
|
5
|
-
"
|
|
6
|
-
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/bun": "latest",
|
|
15
|
+
"@types/qs": "^6.14.0",
|
|
16
|
+
"typescript": "^5.9.2"
|
|
17
|
+
},
|
|
7
18
|
"files": [
|
|
8
19
|
"./dist",
|
|
9
20
|
"./src"
|
|
10
21
|
],
|
|
22
|
+
"homepage": "https://github.com/BoolTS/core#readme",
|
|
11
23
|
"keywords": [
|
|
12
24
|
"bool",
|
|
13
25
|
"typescript",
|
|
@@ -15,36 +27,21 @@
|
|
|
15
27
|
"bun",
|
|
16
28
|
"framework"
|
|
17
29
|
],
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"main": "./dist/index.js",
|
|
32
|
+
"name": "@bool-ts/core",
|
|
33
|
+
"private": false,
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
21
36
|
},
|
|
22
37
|
"repository": {
|
|
23
38
|
"type": "git",
|
|
24
39
|
"url": "git+https://github.com/BoolTS/core.git"
|
|
25
40
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"url": "https://github.com/BoolTS/core/issues"
|
|
30
|
-
},
|
|
31
|
-
"homepage": "https://github.com/BoolTS/core#readme",
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@bool-ts/date-time": "^1.0.0",
|
|
34
|
-
"qs": "^6.14.0",
|
|
35
|
-
"reflect-metadata": "^0.2.2",
|
|
36
|
-
"zod": "^3.25.67"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@types/bun": "latest",
|
|
40
|
-
"@types/qs": "^6.14.0",
|
|
41
|
-
"typescript": "^5.8.3"
|
|
42
|
-
},
|
|
43
|
-
"peerDependencies": {
|
|
44
|
-
"zod": "^3.25.61"
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc --emitDeclarationOnly && bun run app.build.ts",
|
|
43
|
+
"test": "bun --hot run __test/index.ts"
|
|
45
44
|
},
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"access": "public"
|
|
49
|
-
}
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
|
+
"version": "2.0.3"
|
|
50
47
|
}
|
|
@@ -511,14 +511,11 @@ export class Application<TRootClass extends Object = Object> {
|
|
|
511
511
|
.setOptions({ isStatic: false })
|
|
512
512
|
.set(responseStatusArgsKey, 404)
|
|
513
513
|
.set(responseStatusTextArgsKey, "Not found.")
|
|
514
|
-
.set(
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
data: undefined
|
|
520
|
-
})
|
|
521
|
-
);
|
|
514
|
+
.set(responseBodyArgsKey, {
|
|
515
|
+
httpCode: 404,
|
|
516
|
+
message: "Route not found",
|
|
517
|
+
data: undefined
|
|
518
|
+
});
|
|
522
519
|
} else {
|
|
523
520
|
const { context: newContext } = await this.httpFetcher({
|
|
524
521
|
context: context,
|
|
@@ -1474,7 +1471,12 @@ export class Application<TRootClass extends Object = Object> {
|
|
|
1474
1471
|
data instanceof ReadableStream
|
|
1475
1472
|
) {
|
|
1476
1473
|
return this.finalizeResponse(
|
|
1477
|
-
new Response(
|
|
1474
|
+
new Response(
|
|
1475
|
+
data instanceof Uint8Array
|
|
1476
|
+
? String.fromCharCode(...new Uint8Array(data))
|
|
1477
|
+
: data,
|
|
1478
|
+
{ status: status, statusText: statusText, headers: headers }
|
|
1479
|
+
)
|
|
1478
1480
|
);
|
|
1479
1481
|
}
|
|
1480
1482
|
|