preflightlaunch 0.2.4 → 0.2.5
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.
|
@@ -32352,7 +32352,7 @@ function formatBytes(bytes) {
|
|
|
32352
32352
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
32353
32353
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
32354
32354
|
}
|
|
32355
|
-
var APP_VERSION = "0.2.
|
|
32355
|
+
var APP_VERSION = "0.2.5";
|
|
32356
32356
|
var APP_NAME = "Preflight";
|
|
32357
32357
|
var APP_TAGLINE = "App Store Review Scanner";
|
|
32358
32358
|
|
|
@@ -33525,9 +33525,10 @@ function renderHeader(email, credits) {
|
|
|
33525
33525
|
clearScreen();
|
|
33526
33526
|
console.log();
|
|
33527
33527
|
console.log(brand(` ${APP_NAME.split("").map((c) => c.toUpperCase()).join(" ")}`));
|
|
33528
|
-
|
|
33529
|
-
|
|
33530
|
-
|
|
33528
|
+
const creditDisplay = credits !== void 0 ? credits < 100 ? source_default.yellow(`${credits} credits`) : `${credits} credits` : "";
|
|
33529
|
+
const infoParts = [email, creditDisplay, `v${APP_VERSION}`].filter(Boolean);
|
|
33530
|
+
if (infoParts.length > 0) {
|
|
33531
|
+
console.log(subtext(` ${infoParts.join(" \xB7 ")}`));
|
|
33531
33532
|
} else {
|
|
33532
33533
|
console.log(subtext(` ${APP_TAGLINE}`));
|
|
33533
33534
|
}
|
|
@@ -34968,6 +34969,7 @@ export {
|
|
|
34968
34969
|
error,
|
|
34969
34970
|
DEFAULT_API_URL,
|
|
34970
34971
|
getConfig,
|
|
34972
|
+
setUser,
|
|
34971
34973
|
clearAuth,
|
|
34972
34974
|
isLoggedIn,
|
|
34973
34975
|
hasRunBefore,
|
|
@@ -34993,4 +34995,4 @@ export {
|
|
|
34993
34995
|
submitCommand,
|
|
34994
34996
|
resumeSubmitCommand
|
|
34995
34997
|
};
|
|
34996
|
-
//# sourceMappingURL=chunk-
|
|
34998
|
+
//# sourceMappingURL=chunk-LRZZ7PW6.js.map
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
select,
|
|
32
32
|
setAscConnected,
|
|
33
33
|
setLastScannedPath,
|
|
34
|
+
setUser,
|
|
34
35
|
source_default,
|
|
35
36
|
spinner,
|
|
36
37
|
submitCommand,
|
|
@@ -39,7 +40,7 @@ import {
|
|
|
39
40
|
text,
|
|
40
41
|
tip,
|
|
41
42
|
warning
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-LRZZ7PW6.js";
|
|
43
44
|
import {
|
|
44
45
|
__commonJS,
|
|
45
46
|
__require,
|
|
@@ -5389,7 +5390,7 @@ async function scanCommand(path) {
|
|
|
5389
5390
|
]
|
|
5390
5391
|
});
|
|
5391
5392
|
if (next === "submit") {
|
|
5392
|
-
const { submitCommand: submitCommand2 } = await import("./submit-
|
|
5393
|
+
const { submitCommand: submitCommand2 } = await import("./submit-LXDPUOAK.js");
|
|
5393
5394
|
await submitCommand2(dir, {});
|
|
5394
5395
|
} else {
|
|
5395
5396
|
tip(`Run ${brand("preflight submit")} anytime to get AI-powered fix instructions.`);
|
|
@@ -5991,10 +5992,14 @@ async function ascInteractiveMenu() {
|
|
|
5991
5992
|
// src/commands/update.ts
|
|
5992
5993
|
init_esm_shims();
|
|
5993
5994
|
import { execFileSync } from "child_process";
|
|
5994
|
-
import {
|
|
5995
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
5996
|
+
import { fileURLToPath } from "url";
|
|
5997
|
+
import { dirname, resolve as resolve3 } from "path";
|
|
5995
5998
|
function getCurrentVersion() {
|
|
5996
|
-
const
|
|
5997
|
-
const
|
|
5999
|
+
const __filename2 = fileURLToPath(import.meta.url);
|
|
6000
|
+
const __dirname2 = dirname(__filename2);
|
|
6001
|
+
const pkgPath = resolve3(__dirname2, "..", "package.json");
|
|
6002
|
+
const pkg = JSON.parse(readFileSync2(pkgPath, "utf-8"));
|
|
5998
6003
|
return pkg.version;
|
|
5999
6004
|
}
|
|
6000
6005
|
async function getLatestVersion() {
|
|
@@ -6065,7 +6070,7 @@ async function updateCommand() {
|
|
|
6065
6070
|
|
|
6066
6071
|
// src/index.ts
|
|
6067
6072
|
var program2 = new Command();
|
|
6068
|
-
program2.name("preflight").description("Preflight - App Store Review Scanner").version("0.2.
|
|
6073
|
+
program2.name("preflight").description("Preflight - App Store Review Scanner").version("0.2.5");
|
|
6069
6074
|
program2.command("login").description("Log in to Preflight (opens browser)").action(loginCommand);
|
|
6070
6075
|
program2.command("logout").description("Log out and clear stored credentials").action(logoutCommand);
|
|
6071
6076
|
program2.command("whoami").description("Show current user and credit balance").action(whoamiCommand);
|
|
@@ -6113,6 +6118,18 @@ async function interactiveMenu() {
|
|
|
6113
6118
|
const authenticated = await showAuthScreen();
|
|
6114
6119
|
if (!authenticated) return;
|
|
6115
6120
|
}
|
|
6121
|
+
if (!getConfig().email) {
|
|
6122
|
+
try {
|
|
6123
|
+
const res = await apiRequest("/api/me");
|
|
6124
|
+
if (res.ok) {
|
|
6125
|
+
const data = await res.json();
|
|
6126
|
+
if (data.user?.email) {
|
|
6127
|
+
setUser(data.user.id, data.user.email);
|
|
6128
|
+
}
|
|
6129
|
+
}
|
|
6130
|
+
} catch {
|
|
6131
|
+
}
|
|
6132
|
+
}
|
|
6116
6133
|
let cachedCredits;
|
|
6117
6134
|
cachedCredits = await fetchCredits();
|
|
6118
6135
|
while (true) {
|
|
@@ -4,10 +4,10 @@ const require = createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
resumeSubmitCommand,
|
|
6
6
|
submitCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LRZZ7PW6.js";
|
|
8
8
|
import "./chunk-45JYNMSU.js";
|
|
9
9
|
export {
|
|
10
10
|
resumeSubmitCommand,
|
|
11
11
|
submitCommand
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=submit-
|
|
13
|
+
//# sourceMappingURL=submit-LXDPUOAK.js.map
|