agent-transport-system 0.7.65 → 0.7.67
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/ats.js +9 -6
- package/dist/ats.js.map +1 -1
- package/package.json +1 -1
package/dist/ats.js
CHANGED
|
@@ -28,7 +28,7 @@ import { Box, Container, Editor, Key, ProcessTerminal, TUI, Text, getEditorKeybi
|
|
|
28
28
|
import { ReadStream, WriteStream } from "node:tty";
|
|
29
29
|
|
|
30
30
|
//#region package.json
|
|
31
|
-
var version = "0.7.
|
|
31
|
+
var version = "0.7.67";
|
|
32
32
|
var package_default = {
|
|
33
33
|
$schema: "https://www.schemastore.org/package.json",
|
|
34
34
|
name: "agent-transport-system",
|
|
@@ -10492,9 +10492,6 @@ async function fetchLatestPackageInfo(packageName) {
|
|
|
10492
10492
|
inFlightVersionRequests.delete(packageName);
|
|
10493
10493
|
}
|
|
10494
10494
|
}
|
|
10495
|
-
async function fetchLatestPackageVersion(packageName) {
|
|
10496
|
-
return (await fetchLatestPackageInfo(packageName)).version;
|
|
10497
|
-
}
|
|
10498
10495
|
async function requestLatestPackageInfo(packageName) {
|
|
10499
10496
|
const response = await fetch(`https://registry.npmjs.org/${encodeURIComponent(packageName)}/latest`, {
|
|
10500
10497
|
method: "GET",
|
|
@@ -84174,6 +84171,7 @@ async function runUpgrade(input) {
|
|
|
84174
84171
|
previous: previousVersionState,
|
|
84175
84172
|
currentVersion,
|
|
84176
84173
|
latestVersion: upgradeStatus.latestVersion,
|
|
84174
|
+
requiredFloor: upgradeStatus.requiredFloor,
|
|
84177
84175
|
checkedAt
|
|
84178
84176
|
}));
|
|
84179
84177
|
if (input.check) {
|
|
@@ -84237,6 +84235,7 @@ async function runUpgrade(input) {
|
|
|
84237
84235
|
previous: previousVersionState,
|
|
84238
84236
|
currentVersion: latestVersion,
|
|
84239
84237
|
latestVersion,
|
|
84238
|
+
requiredFloor: upgradeStatus.requiredFloor,
|
|
84240
84239
|
checkedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
84241
84240
|
}));
|
|
84242
84241
|
await handoffUpgradeServiceAlignmentToLatestBinary({
|
|
@@ -84298,7 +84297,8 @@ function handleUpgradeCheckFailure(input) {
|
|
|
84298
84297
|
}
|
|
84299
84298
|
async function resolveUpgradeStatus(input) {
|
|
84300
84299
|
try {
|
|
84301
|
-
const
|
|
84300
|
+
const latestInfo = await fetchLatestPackageInfo(ATS_PACKAGE_NAME$1);
|
|
84301
|
+
const latestVersion = latestInfo.version;
|
|
84302
84302
|
return {
|
|
84303
84303
|
status: resolveUpgradeStatusKind(resolveVersionChangeDirection({
|
|
84304
84304
|
fromVersion: input.currentVersion,
|
|
@@ -84306,6 +84306,7 @@ async function resolveUpgradeStatus(input) {
|
|
|
84306
84306
|
})),
|
|
84307
84307
|
currentVersion: input.currentVersion,
|
|
84308
84308
|
latestVersion,
|
|
84309
|
+
requiredFloor: latestInfo.minRequiredCliVersion,
|
|
84309
84310
|
checkedAt: input.checkedAt
|
|
84310
84311
|
};
|
|
84311
84312
|
} catch (error) {
|
|
@@ -84760,9 +84761,11 @@ async function readFreshCachedInfo(currentVersion) {
|
|
|
84760
84761
|
if (state?.last_version !== currentVersion || !state.latest_version || !state.last_checked_at) return null;
|
|
84761
84762
|
const checkedAt = Date.parse(state.last_checked_at);
|
|
84762
84763
|
if (Number.isNaN(checkedAt) || Date.now() - checkedAt >= CLI_UPDATE_CACHE_TTL_MS) return null;
|
|
84764
|
+
const cachedRequiredFloor = state.required_floor ?? null;
|
|
84765
|
+
if (cachedRequiredFloor !== null && !isPlainReleaseVersion(cachedRequiredFloor)) return null;
|
|
84763
84766
|
return {
|
|
84764
84767
|
version: state.latest_version,
|
|
84765
|
-
minRequiredCliVersion:
|
|
84768
|
+
minRequiredCliVersion: cachedRequiredFloor
|
|
84766
84769
|
};
|
|
84767
84770
|
}
|
|
84768
84771
|
async function persistInfo(input) {
|