bunite-core 0.0.9 → 0.0.11
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 +3 -10
package/package.json
CHANGED
package/src/shared/paths.ts
CHANGED
|
@@ -35,8 +35,7 @@ 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"))
|
|
39
|
-
|| existsSync(join(dir, "Release", "libcef.dll")) || existsSync(join(dir, "Release", "libcef.so"));
|
|
38
|
+
return existsSync(join(dir, "libcef.dll")) || existsSync(join(dir, "libcef.so"));
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
function parseCefVersion(name: string): number[] | null {
|
|
@@ -83,13 +82,7 @@ function resolveCefDir(searchDirs: string[]): string | null {
|
|
|
83
82
|
} catch {}
|
|
84
83
|
}
|
|
85
84
|
|
|
86
|
-
// 3.
|
|
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)
|
|
85
|
+
// 3. vendors/cef inside bunite-core package (monorepo dev)
|
|
93
86
|
const packageRoot = resolveBunitePackageRoot();
|
|
94
87
|
if (packageRoot) {
|
|
95
88
|
const vendorPath = join(packageRoot, "vendors", "cef");
|
|
@@ -162,7 +155,7 @@ export function resolveNativeArtifacts(): ResolvedNativeArtifacts {
|
|
|
162
155
|
processHelperPath: packagedProcessHelperPath,
|
|
163
156
|
cefDir: (packagedCefDir && existsSync(packagedCefDir))
|
|
164
157
|
? packagedCefDir
|
|
165
|
-
: resolveCefDir(
|
|
158
|
+
: resolveCefDir([nativePackageRoot, packageRoot].filter(Boolean) as string[])
|
|
166
159
|
};
|
|
167
160
|
}
|
|
168
161
|
|