@nocobase/build 2.1.0-alpha.19 → 2.1.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/buildDeclaration.js +11 -1
- package/package.json +2 -2
package/lib/buildDeclaration.js
CHANGED
|
@@ -97,7 +97,17 @@ const buildDeclaration = async (cwd, targetDir) => {
|
|
|
97
97
|
outDir: targetPath,
|
|
98
98
|
rootDir: srcPath
|
|
99
99
|
};
|
|
100
|
-
const
|
|
100
|
+
const host = import_typescript.default.createCompilerHost(compilerOptions);
|
|
101
|
+
const originalDirectoryExists = host.directoryExists?.bind(host);
|
|
102
|
+
const rootPrefix = import_constant.ROOT_PATH.endsWith(import_path.default.sep) ? import_constant.ROOT_PATH : import_constant.ROOT_PATH + import_path.default.sep;
|
|
103
|
+
host.directoryExists = (dirPath) => {
|
|
104
|
+
const resolved = import_path.default.resolve(dirPath);
|
|
105
|
+
if (resolved !== import_constant.ROOT_PATH && !resolved.startsWith(rootPrefix) && resolved.includes(`${import_path.default.sep}node_modules`)) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
return originalDirectoryExists ? originalDirectoryExists(dirPath) : import_typescript.default.sys.directoryExists(dirPath);
|
|
109
|
+
};
|
|
110
|
+
const program = import_typescript.default.createProgram(files, compilerOptions, host);
|
|
101
111
|
const emitResult = program.emit(void 0, void 0, void 0, true);
|
|
102
112
|
const diagnostics = import_typescript.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
103
113
|
if (diagnostics.length) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/build",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.20",
|
|
4
4
|
"description": "Library build tool based on rollup.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"build": "tsup",
|
|
54
54
|
"build:watch": "tsup --watch"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "3d1535db6bf93ca23257faf474afee0d565f54c6"
|
|
57
57
|
}
|