jeopi-cli 16.2.18 → 16.2.19
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/CHANGELOG.md +7 -0
- package/dist/cli.js +2098 -2098
- package/dist/types/cli/update-cli.d.ts +26 -1
- package/package.json +12 -12
- package/src/cli/update-cli.ts +50 -18
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/main.ts +2 -15
package/src/main.ts
CHANGED
|
@@ -29,6 +29,7 @@ import { processFileArguments } from "./cli/file-processor";
|
|
|
29
29
|
import { buildInitialMessage } from "./cli/initial-message";
|
|
30
30
|
import { selectSession } from "./cli/session-picker";
|
|
31
31
|
import { applyStartupCwd } from "./cli/startup-cwd";
|
|
32
|
+
import { fetchNewerPublishedVersion } from "./cli/update-cli";
|
|
32
33
|
import { findConfigFile } from "./config";
|
|
33
34
|
import { ModelRegistry } from "./config/model-registry";
|
|
34
35
|
import {
|
|
@@ -102,21 +103,7 @@ async function checkForNewVersion(currentVersion: string): Promise<string | unde
|
|
|
102
103
|
if (!settings.get("startup.checkUpdate")) {
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
105
|
-
|
|
106
|
-
const response = await fetch("https://registry.npmjs.org/jeopi/latest");
|
|
107
|
-
if (!response.ok) return undefined;
|
|
108
|
-
|
|
109
|
-
const data = (await response.json()) as { version?: string };
|
|
110
|
-
const latestVersion = data.version;
|
|
111
|
-
|
|
112
|
-
if (latestVersion && Bun.semver.order(latestVersion, currentVersion) > 0) {
|
|
113
|
-
return latestVersion;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return undefined;
|
|
117
|
-
} catch {
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
106
|
+
return await fetchNewerPublishedVersion(currentVersion);
|
|
120
107
|
}
|
|
121
108
|
|
|
122
109
|
// Todo settings are caller-controlled in protocol modes. Do not host-default them:
|