inferay 0.1.10 → 0.1.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/cli.js +1 -1
- package/src/doctor.js +1 -1
- package/src/platform.js +12 -4
package/package.json
CHANGED
package/src/cli.js
CHANGED
package/src/doctor.js
CHANGED
|
@@ -40,7 +40,7 @@ async function appVersion(appPath) {
|
|
|
40
40
|
|
|
41
41
|
export async function doctor({ dev = false } = {}) {
|
|
42
42
|
const platform = platformInfo();
|
|
43
|
-
const appPath = findExistingApp();
|
|
43
|
+
const appPath = findExistingApp(process.cwd(), { includeDev: dev });
|
|
44
44
|
const version = await appVersion(appPath);
|
|
45
45
|
const channel = await getChannel();
|
|
46
46
|
const checks = [
|
package/src/platform.js
CHANGED
|
@@ -21,17 +21,25 @@ export function defaultInstallPath() {
|
|
|
21
21
|
return "/Applications/inferay.app";
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
function installedAppCandidates() {
|
|
25
|
+
return [join(homedir(), "Applications/inferay.app"), defaultInstallPath()];
|
|
26
|
+
}
|
|
27
|
+
|
|
24
28
|
function devAppCandidates(cwd = process.cwd()) {
|
|
25
29
|
return [
|
|
26
30
|
resolve(cwd, "build/dev-macos-arm64/inferay-dev.app"),
|
|
27
31
|
resolve(cwd, "build/dev-macos-arm64/inferay.app"),
|
|
28
32
|
resolve(cwd, "build/stable-macos-arm64/inferay.app"),
|
|
29
33
|
resolve(cwd, "build/macos-arm64/inferay.app"),
|
|
30
|
-
join(homedir(), "Applications/inferay.app"),
|
|
31
|
-
defaultInstallPath(),
|
|
32
34
|
];
|
|
33
35
|
}
|
|
34
36
|
|
|
35
|
-
export function findExistingApp(
|
|
36
|
-
|
|
37
|
+
export function findExistingApp(
|
|
38
|
+
cwd = process.cwd(),
|
|
39
|
+
{ includeDev = false } = {}
|
|
40
|
+
) {
|
|
41
|
+
const candidates = includeDev
|
|
42
|
+
? [...devAppCandidates(cwd), ...installedAppCandidates()]
|
|
43
|
+
: installedAppCandidates();
|
|
44
|
+
return candidates.find((candidate) => existsSync(candidate));
|
|
37
45
|
}
|