@agentvalet/register 0.4.8 → 0.4.9
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.js +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1753,6 +1753,12 @@ function uninstallCommand() {
|
|
|
1753
1753
|
body: JSON.stringify({ reason: "CLI uninstall" })
|
|
1754
1754
|
});
|
|
1755
1755
|
const body = await res.json();
|
|
1756
|
+
if (res.status === 404 || res.status === 409) {
|
|
1757
|
+
console.log(chalk11.yellow(` \u26A0 Agent not found on server (already revoked?) \u2014 cleaning local files.`));
|
|
1758
|
+
cleanLocally();
|
|
1759
|
+
console.log(chalk11.dim("\n To register a new agent: npx @agentvalet/register"));
|
|
1760
|
+
return;
|
|
1761
|
+
}
|
|
1756
1762
|
if (!res.ok || !body.revocation_token) {
|
|
1757
1763
|
throw new Error(body.error ?? `HTTP ${res.status}`);
|
|
1758
1764
|
}
|