feat: 大幅优化build编译性能,支持检查checker中的大部分情况

This commit is contained in:
Pan Qiancheng 2026-01-04 22:52:39 +08:00
parent b777ef0ad9
commit 09b1207af3
7 changed files with 1763 additions and 566 deletions

File diff suppressed because it is too large Load Diff

View File

@ -76,7 +76,7 @@ export declare abstract class CascadeStore<ED extends EntityDict & BaseEntityDic
};
protected preProcessDataCreated<T extends keyof ED>(entity: T, data: ED[T]['Create']['data']): void;
protected preProcessDataUpdated(action: string, data: Record<string, any>, async?: true): void;
judgeRelation(entity: keyof ED, attr: string): string | 1 | 2 | string[] | 0 | -1;
judgeRelation(entity: keyof ED, attr: string): string | 2 | 1 | string[] | 0 | -1;
private tryMergeModi;
/**
* update过程无关的例程放在这里later动作的处理oper的记录以及对record的收集等

View File

@ -9,4 +9,4 @@ import { StorageSchema } from "../types/Storage";
* @param row
* @returns
*/
export declare function judgeRelation<ED extends EntityDict & BaseEntityDict>(schema: StorageSchema<ED>, entity: keyof ED, attr: string, allowUnrecognized?: boolean): string | 1 | 2 | string[] | 0 | -1;
export declare function judgeRelation<ED extends EntityDict & BaseEntityDict>(schema: StorageSchema<ED>, entity: keyof ED, attr: string, allowUnrecognized?: boolean): string | 2 | 1 | string[] | 0 | -1;

View File

@ -6,7 +6,8 @@
},
"scripts": {
"make:domain": "ts-node scripts/make.ts",
"build": "node --stack-size=4096 ./scripts/build.js -p ./tsconfig.json",
"build": "node --stack-size=65500 ./scripts/build.js -p ./tsconfig.json",
"test:build": "node --stack-size=65500 ./scripts/build.js -p ./tsconfig.test.json",
"prebuild": "npm run make:domain",
"test": "ts-node test/test.ts"
},

File diff suppressed because it is too large Load Diff

View File

@ -71,5 +71,11 @@
"**/*.spec.ts",
"test",
"src/base-app-domain-back"
]
],
"oakBuildChecks": {
"context": {
"checkAsyncContext": true,
"targetModules": ["store/AsyncRowStore"]
}
}
}

33
tsconfig.test.json Normal file
View File

@ -0,0 +1,33 @@
{
"compilerOptions": {
"jsx": "preserve",
"target": "ESNEXT", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"declaration": true, /* Generates corresponding '.d.ts' file. */
"importHelpers": true,
"rootDir": ".", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
"strict": true, /* Enable all strict type-checking options. */
"skipLibCheck": true,
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
"noEmit": true
},
"include": ["test/builder/**/*", "src/***/*.ts"],
"exclude": [
"node_modules",
"**/*.spec.ts",
],
"oakBuildChecks": {
"context": {
"checkAsyncContext": true,
"targetModules": ["store/AsyncRowStore"]
}
}
}