pinsay-cli 0.7.1 → 0.7.2
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/dist/cli.js +15 -35
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -15,7 +15,7 @@ var init_build_constants = __esm({
|
|
|
15
15
|
"src/build-constants.ts"() {
|
|
16
16
|
"use strict";
|
|
17
17
|
BUILD_DEFAULT_SERVER = true ? "https://app.pinsay.dev" : "https://app.pinsay.dev";
|
|
18
|
-
BUILD_CLI_VERSION = true ? "0.7.
|
|
18
|
+
BUILD_CLI_VERSION = true ? "0.7.2" : "0.0.0-dev";
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -5816,6 +5816,18 @@ async function exitIfWorkspaceFrozen(server, token) {
|
|
|
5816
5816
|
} catch {
|
|
5817
5817
|
}
|
|
5818
5818
|
}
|
|
5819
|
+
async function checkMetaAndNotify(server, config, root, parsed) {
|
|
5820
|
+
try {
|
|
5821
|
+
const meta = await api(server, "/api/meta");
|
|
5822
|
+
const minCli = meta?.minCliVersion || "0.0.0";
|
|
5823
|
+
if (compareSemver(BUILD_CLI_VERSION, minCli) < 0) {
|
|
5824
|
+
console.error(tooOldMessage(BUILD_CLI_VERSION, minCli));
|
|
5825
|
+
process.exit(5);
|
|
5826
|
+
}
|
|
5827
|
+
await checkAndNotifyUpdates({ meta, config, cwd: root, silent: Boolean(parsed["json"]) });
|
|
5828
|
+
} catch {
|
|
5829
|
+
}
|
|
5830
|
+
}
|
|
5819
5831
|
function parseModelFlags(parsed) {
|
|
5820
5832
|
try {
|
|
5821
5833
|
return resolveModels({
|
|
@@ -5859,23 +5871,7 @@ async function applyCommand(cwd2, parsed, positionals = []) {
|
|
|
5859
5871
|
return;
|
|
5860
5872
|
}
|
|
5861
5873
|
const project = resolved.ok ? resolved.project.key : "";
|
|
5862
|
-
|
|
5863
|
-
const meta = await api(server, "/api/meta");
|
|
5864
|
-
const minCli = meta?.minCliVersion || "0.0.0";
|
|
5865
|
-
if (compareSemver(BUILD_CLI_VERSION, minCli) < 0) {
|
|
5866
|
-
console.error(tooOldMessage(BUILD_CLI_VERSION, minCli));
|
|
5867
|
-
process.exit(5);
|
|
5868
|
-
}
|
|
5869
|
-
await checkAndNotifyUpdates({
|
|
5870
|
-
meta,
|
|
5871
|
-
config,
|
|
5872
|
-
cwd: root,
|
|
5873
|
-
silent: Boolean(parsed["json"])
|
|
5874
|
-
});
|
|
5875
|
-
} catch (err) {
|
|
5876
|
-
if (!(err instanceof ApiError && err.code === 404)) {
|
|
5877
|
-
}
|
|
5878
|
-
}
|
|
5874
|
+
await checkMetaAndNotify(server, config, root, parsed);
|
|
5879
5875
|
const explicitKey = typeof parsed["key"] === "string" ? parsed["key"] : void 0;
|
|
5880
5876
|
const token = await resolveToken(server, root, explicitKey);
|
|
5881
5877
|
const apiKey = explicitKey || await readApiKey(root, server);
|
|
@@ -6014,23 +6010,7 @@ async function applyAllProjects(root, cwd2, config, server, parsed) {
|
|
|
6014
6010
|
console.error("--tool needs a single project \u2014 pass --project <key> (several are configured).");
|
|
6015
6011
|
process.exit(2);
|
|
6016
6012
|
}
|
|
6017
|
-
|
|
6018
|
-
const meta = await api(server, "/api/meta");
|
|
6019
|
-
const minCli = meta?.minCliVersion || "0.0.0";
|
|
6020
|
-
if (compareSemver(BUILD_CLI_VERSION, minCli) < 0) {
|
|
6021
|
-
console.error(tooOldMessage(BUILD_CLI_VERSION, minCli));
|
|
6022
|
-
process.exit(5);
|
|
6023
|
-
}
|
|
6024
|
-
await checkAndNotifyUpdates({
|
|
6025
|
-
meta,
|
|
6026
|
-
config,
|
|
6027
|
-
cwd: root,
|
|
6028
|
-
silent: Boolean(parsed["json"])
|
|
6029
|
-
});
|
|
6030
|
-
} catch (err) {
|
|
6031
|
-
if (!(err instanceof ApiError && err.code === 404)) {
|
|
6032
|
-
}
|
|
6033
|
-
}
|
|
6013
|
+
await checkMetaAndNotify(server, config, root, parsed);
|
|
6034
6014
|
const explicitKey = typeof parsed["key"] === "string" ? parsed["key"] : void 0;
|
|
6035
6015
|
const token = await resolveToken(server, root, explicitKey);
|
|
6036
6016
|
const apiKey = explicitKey || await readApiKey(root, server);
|
package/package.json
CHANGED