[retry] upgrade to bun 1.0.33 + upgrade deps #5
9 changed files with 33 additions and 26 deletions
|
@ -10,5 +10,6 @@ steps:
|
|||
|
||||
matrix:
|
||||
BUN_VERSION:
|
||||
- 1.0.25
|
||||
- 1.0.26
|
||||
- 1.0.31
|
||||
- 1.0.32
|
||||
- 1.0.33
|
|
@ -3,7 +3,7 @@ when:
|
|||
|
||||
steps:
|
||||
lint:
|
||||
image: oven/bun:1.0.26-slim
|
||||
image: oven/bun:1.0.33-slim
|
||||
commands:
|
||||
- bun install
|
||||
- bun run ci
|
||||
|
|
|
@ -12,8 +12,9 @@ steps:
|
|||
|
||||
matrix:
|
||||
BUN_VERSION:
|
||||
- 1.0.25
|
||||
- 1.0.26
|
||||
- 1.0.31
|
||||
- 1.0.32
|
||||
- 1.0.33
|
||||
|
||||
services:
|
||||
nats:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
|
||||
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
},
|
||||
|
|
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
@ -12,7 +12,7 @@
|
|||
"build": "tsc --project tsconfig.build.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.5.3",
|
||||
"@biomejs/biome": "1.6.1",
|
||||
"@types/bun": "latest",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
|
|
|
@ -52,6 +52,7 @@ export default class NatsAdaptor implements Adaptor {
|
|||
}
|
||||
|
||||
async stop(): Promise<void> {
|
||||
this.sub?.unsubscribe();
|
||||
await this.nc?.drain();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { z } from "zod";
|
||||
import type { z } from "zod";
|
||||
import type Adaptor from "./adaptors/adaptor";
|
||||
import { RequestError } from "./error";
|
||||
import {
|
||||
|
@ -36,6 +36,7 @@ export default class Service {
|
|||
async (rawReq) => {
|
||||
const rawReqJson = JSON.parse(rawReq);
|
||||
const internalRequestJson = InternalRequestSchema.safeParse(rawReqJson);
|
||||
|
||||
if (!internalRequestJson.success) {
|
||||
return JSON.stringify({
|
||||
statusCode: 400,
|
||||
|
@ -51,12 +52,14 @@ export default class Service {
|
|||
|
||||
if (internalRequest.data && schema) {
|
||||
const validate = schema.safeParse(internalRequest.data);
|
||||
|
||||
if (!validate.success) {
|
||||
return JSON.stringify({
|
||||
statusCode: 400,
|
||||
data: validate.error,
|
||||
} satisfies InternalResponse);
|
||||
}
|
||||
|
||||
req.data = validate.data;
|
||||
}
|
||||
|
||||
|
@ -75,6 +78,7 @@ export default class Service {
|
|||
data: err.message,
|
||||
} satisfies InternalResponse);
|
||||
}
|
||||
|
||||
return JSON.stringify({
|
||||
statusCode: 500,
|
||||
data: "unknow error apend",
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext"],
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleDetection": "force",
|
||||
"jsx": "react-jsx",
|
||||
"allowJs": true,
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext"],
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleDetection": "force",
|
||||
"jsx": "react-jsx",
|
||||
"allowJs": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noEmit": true,
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
/* Linting */
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue