mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-02 17:08:32 +00:00
fix: typescript errors (#5214)
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
"@rollup/plugin-typescript": "^9.0.2",
|
||||
"@types/jest": "^29.5.11",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/node": "^24.1.0",
|
||||
"babel-jest": "^29.7.0",
|
||||
"jest": "^29.2.0",
|
||||
"rimraf": "^3.0.2",
|
||||
@@ -43,4 +44,4 @@
|
||||
"@usebruno/lang": "0.12.0",
|
||||
"lodash": "^4.17.21"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,13 +61,13 @@ const getWorkerInstance = (): BruParserWorker => {
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.on('uncaughtException', async (error) => {
|
||||
process.on('uncaughtException', async (error: Error) => {
|
||||
console.error('Uncaught Exception:', error);
|
||||
await cleanup();
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
process.on('unhandledRejection', async (reason) => {
|
||||
process.on('unhandledRejection', async (reason: unknown) => {
|
||||
console.error('Unhandled Rejection:', reason);
|
||||
await cleanup();
|
||||
process.exit(1);
|
||||
@@ -137,4 +137,4 @@ export const parseDotEnv = (content: string): Record<string, string> => {
|
||||
};
|
||||
|
||||
export { BruParserWorker };
|
||||
export * from './types';
|
||||
export * from './types';
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Worker } from 'worker_threads';
|
||||
import { Worker } from 'node:worker_threads';
|
||||
|
||||
interface QueuedTask {
|
||||
priority: number;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import WorkerQueue from "./WorkerQueue";
|
||||
import { Lane } from "../types";
|
||||
import path from "path";
|
||||
import WorkerQueue from './WorkerQueue';
|
||||
import { Lane } from '../types';
|
||||
import path from 'node:path';
|
||||
|
||||
const sizeInMB = (size: number): number => {
|
||||
return size / (1024 * 1024);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { parentPort } from 'worker_threads';
|
||||
import { parentPort } from 'node:worker_threads';
|
||||
import { bruRequestToJson, jsonRequestToBru } from '../formats/bru';
|
||||
|
||||
interface WorkerMessage {
|
||||
@@ -24,4 +24,4 @@ parentPort?.on('message', async (message: WorkerMessage) => {
|
||||
console.error('Worker error:', error);
|
||||
parentPort?.postMessage({ error: error?.message });
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -15,6 +15,8 @@
|
||||
"declarationDir": "./dist/types",
|
||||
"allowJs": true,
|
||||
"checkJs": false,
|
||||
"types": ["node"],
|
||||
"lib": ["ES2020"],
|
||||
"typeRoots": ["./node_modules/@types", "./src/types"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.d.ts"],
|
||||
|
||||
Reference in New Issue
Block a user