agentful 0.2.2 → 0.2.3
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/index.cjs +14 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3044,7 +3044,7 @@ var VERSION, brand, useColor, wrap, paint, sym, ui;
|
|
|
3044
3044
|
var init_branding = __esm({
|
|
3045
3045
|
"src/branding.ts"() {
|
|
3046
3046
|
"use strict";
|
|
3047
|
-
VERSION = "0.2.
|
|
3047
|
+
VERSION = "0.2.3" ? "0.2.3" : null.version;
|
|
3048
3048
|
brand = {
|
|
3049
3049
|
name: "agentful",
|
|
3050
3050
|
// the command users type
|
|
@@ -7028,13 +7028,23 @@ async function upgradeCommand() {
|
|
|
7028
7028
|
console.log(banner());
|
|
7029
7029
|
let latest = "";
|
|
7030
7030
|
try {
|
|
7031
|
-
const
|
|
7032
|
-
|
|
7031
|
+
const registry = await request(
|
|
7032
|
+
`https://registry.npmjs.org/${brand.name}/latest`,
|
|
7033
7033
|
{ timeoutMs: 8e3 }
|
|
7034
7034
|
);
|
|
7035
|
-
latest =
|
|
7035
|
+
latest = registry.version || "";
|
|
7036
7036
|
} catch {
|
|
7037
7037
|
}
|
|
7038
|
+
if (!latest) {
|
|
7039
|
+
try {
|
|
7040
|
+
const manifest = await request(
|
|
7041
|
+
`${APP_URL}/cli/engine-manifest.json`,
|
|
7042
|
+
{ timeoutMs: 8e3 }
|
|
7043
|
+
);
|
|
7044
|
+
latest = manifest.latest_cli_version || "";
|
|
7045
|
+
} catch {
|
|
7046
|
+
}
|
|
7047
|
+
}
|
|
7038
7048
|
if (latest && compareVersions(VERSION, latest) >= 0) {
|
|
7039
7049
|
ui.ok(`Already on the latest version (v${VERSION}).`);
|
|
7040
7050
|
return;
|