chore: standardize tsconfig (#9568)

This commit is contained in:
forehalo
2025-01-08 04:07:56 +00:00
parent 39f4b17315
commit c0ed74dfed
151 changed files with 1041 additions and 1566 deletions

View File

@@ -1,9 +1,8 @@
{
"extends": "../../../tsconfig.json",
"extends": "../../../tsconfig.node.json",
"compilerOptions": {
"noEmit": false,
"outDir": "lib",
"composite": true
"outDir": "./dist"
},
"include": ["index.d.ts"]
"include": ["index.d.ts"],
"references": []
}

View File

@@ -1,16 +0,0 @@
import crypto from 'node:crypto';
const { privateKey, publicKey } = crypto.generateKeyPairSync('ec', {
namedCurve: 'prime256v1',
publicKeyEncoding: {
type: 'spki',
format: 'pem',
},
privateKeyEncoding: {
type: 'pkcs8',
format: 'pem',
},
});
console.log('ECDSA Public Key:\n', publicKey);
console.log('ECDSA Private Key:\n', privateKey);

View File

@@ -1,18 +0,0 @@
import { createTransport } from 'nodemailer';
const transport = createTransport({
host: '0.0.0.0',
port: 1025,
secure: false,
auth: {
user: 'himself65',
pass: '123456',
},
});
await transport.sendMail({
from: 'noreply@toeverything.info',
to: 'himself65@outlook.com',
subject: 'test',
html: `<div>hello world</div>`,
});

View File

@@ -47,7 +47,7 @@ export class CaptchaService {
body: formData,
method: 'POST',
});
const outcome = await result.json();
const outcome: any = await result.json();
return (
!!outcome.success &&

View File

@@ -23,7 +23,7 @@ export class CopilotWorkflowService {
const node = workflow.get(nodeData.id);
if (!node) {
this.logger.error(
`Failed to init workflow ${name}: node ${nodeData.id} not found`
`Failed to init workflow ${graph.name}: node ${nodeData.id} not found`
);
throw new Error(`Node ${nodeData.id} not found`);
}
@@ -31,7 +31,7 @@ export class CopilotWorkflowService {
const edge = workflow.get(edgeId);
if (!edge) {
this.logger.error(
`Failed to init workflow ${name}: edge ${edgeId} not found in node ${nodeData.id}`
`Failed to init workflow ${graph.name}: edge ${edgeId} not found in node ${nodeData.id}`
);
throw new Error(`Edge ${edgeId} not found`);
}

View File

@@ -1,23 +0,0 @@
{
"extends": "../../../../tsconfig.json",
"compilerOptions": {
"composite": true,
"target": "ES2022",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"rootDir": ".",
"outDir": "../lib/tests",
"verbatimModuleSyntax": false,
"tsBuildInfoFile": "../lib/tests/.tsbuildinfo"
},
"references": [
{
"path": "../tsconfig.json"
},
{
"path": "../../../../tests/kit/tsconfig.json"
}
],
"include": ["."],
"exclude": []
}

View File

@@ -1,33 +1,18 @@
{
"extends": "../../../tsconfig.json",
"extends": "../../../tsconfig.node.json",
"compilerOptions": {
"composite": true,
"target": "ES2022",
"module": "ESNext",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "Bundler",
"allowSyntheticDefaultImports": true,
"isolatedModules": false,
"resolveJsonModule": true,
"types": ["node"],
"outDir": "dist",
"noEmit": false,
"verbatimModuleSyntax": false,
"rootDir": "./src"
"rootDir": "./src",
"outDir": "./dist",
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
},
"include": ["./src"],
"exclude": ["dist", "lib", "tests"],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "../native/tsconfig.json"
}
],
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node"
}
{ "path": "../../../tests/kit" },
{ "path": "../../../tools/cli" },
{ "path": "../native" }
]
}

View File

@@ -1,20 +1,10 @@
{
"extends": "../../../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": true,
"target": "ESNext",
"module": "ESNext",
"resolveJsonModule": true,
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"outDir": "./lib/scripts",
"rootDir": "."
"allowJs": true,
"rootDir": ".",
"outDir": "./lib",
"tsBuildInfoFile": "./lib/tsconfig.tsbuildinfo"
},
"references": [
{
"path": "../../../tests/kit"
}
],
"include": ["scripts", "package.json"],
"exclude": ["tests"]
"include": ["./scripts", "./tests"]
}