hereya-cli 0.96.0 → 0.97.0

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.
@@ -1,5 +1,6 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
2
  import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
3
+ import { CloudBackend } from '../../../backend/cloud/cloud-backend.js';
3
4
  import { getCloudCredentials, loadBackendConfig } from '../../../backend/config.js';
4
5
  import { getBackend } from '../../../backend/index.js';
5
6
  import { getExecutorForWorkspace } from '../../../executor/context.js';
@@ -192,6 +193,24 @@ export default class DevenvUninstall extends Command {
192
193
  },
193
194
  title: 'Destroying dev environment',
194
195
  },
196
+ {
197
+ async task() {
198
+ const backend = await getBackend();
199
+ if (!(backend instanceof CloudBackend)) {
200
+ // Local-only setup — no devenv tokens to revoke. Silently skip.
201
+ return;
202
+ }
203
+ const result = await backend.revokeDevenvToken({ workspace: flags.workspace });
204
+ if (!result.success) {
205
+ // Non-fatal: destroy already succeeded. Surface a warning so the
206
+ // user knows the token will only expire on its own (365-day TTL).
207
+ // Mirrors the executor uninstall's posture — destroy is the
208
+ // unrecoverable step; auth cleanup is best-effort.
209
+ process.stderr.write(`warning: failed to revoke devenv token: ${result.reason}\n`);
210
+ }
211
+ },
212
+ title: 'Revoking devenv token',
213
+ },
195
214
  {
196
215
  async task(ctx) {
197
216
  const { env, metadata } = ctx.destroyOutput;