mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: standardize tsconfig (#9568)
This commit is contained in:
@@ -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": []
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
@@ -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>`,
|
||||
});
|
||||
@@ -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 &&
|
||||
|
||||
@@ -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`);
|
||||
}
|
||||
|
||||
@@ -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": []
|
||||
}
|
||||
@@ -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" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user