bunite-core 0.0.7 → 0.0.9
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/package.json +1 -1
- package/src/shared/paths.ts +12 -3
package/package.json
CHANGED
package/src/shared/paths.ts
CHANGED
|
@@ -35,7 +35,8 @@ export function resolveBunitePackageRoot(): string | null {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function hasCefRuntime(dir: string): boolean {
|
|
38
|
-
return existsSync(join(dir, "libcef.dll")) || existsSync(join(dir, "libcef.so"))
|
|
38
|
+
return existsSync(join(dir, "libcef.dll")) || existsSync(join(dir, "libcef.so"))
|
|
39
|
+
|| existsSync(join(dir, "Release", "libcef.dll")) || existsSync(join(dir, "Release", "libcef.so"));
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
function parseCefVersion(name: string): number[] | null {
|
|
@@ -82,7 +83,13 @@ function resolveCefDir(searchDirs: string[]): string | null {
|
|
|
82
83
|
} catch {}
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
// 3.
|
|
86
|
+
// 3. .bunite/cef in project root (standalone project)
|
|
87
|
+
const localCef = join(process.cwd(), ".bunite", "cef");
|
|
88
|
+
if (hasCefRuntime(localCef)) {
|
|
89
|
+
return localCef;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// 4. vendors/cef inside bunite-core package (monorepo dev)
|
|
86
93
|
const packageRoot = resolveBunitePackageRoot();
|
|
87
94
|
if (packageRoot) {
|
|
88
95
|
const vendorPath = join(packageRoot, "vendors", "cef");
|
|
@@ -153,7 +160,9 @@ export function resolveNativeArtifacts(): ResolvedNativeArtifacts {
|
|
|
153
160
|
cefPackageName: packagedCefDir && existsSync(packagedCefDir) ? cefPackageName : null,
|
|
154
161
|
nativeLibPath: packagedNativeLibPath,
|
|
155
162
|
processHelperPath: packagedProcessHelperPath,
|
|
156
|
-
cefDir: packagedCefDir && existsSync(packagedCefDir)
|
|
163
|
+
cefDir: (packagedCefDir && existsSync(packagedCefDir))
|
|
164
|
+
? packagedCefDir
|
|
165
|
+
: resolveCefDir(packageRoot ? [packageRoot] : [])
|
|
157
166
|
};
|
|
158
167
|
}
|
|
159
168
|
|