hereya-cli 0.96.0 → 0.98.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.
- package/README.md +69 -67
- package/dist/backend/cloud/cloud-backend/executor-jobs.d.ts +8 -0
- package/dist/backend/cloud/cloud-backend/executor-jobs.js +11 -0
- package/dist/backend/cloud/cloud-backend.d.ts +8 -0
- package/dist/backend/cloud/cloud-backend.js +3 -0
- package/dist/commands/devenv/uninstall/index.js +19 -0
- package/dist/commands/workspace/executor/install/index.d.ts +1 -0
- package/dist/commands/workspace/executor/install/index.js +5 -2
- package/oclif.manifest.json +247 -240
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -6,6 +6,7 @@ export default class WorkspaceExecutorInstall extends Command {
|
|
|
6
6
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
mode: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
parameter: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
};
|
|
11
12
|
run(): Promise<void>;
|
|
@@ -25,6 +25,9 @@ Provisions hereya/remote-executor-aws. Two modes are supported:
|
|
|
25
25
|
description: "parameter for the package, in the form of 'key=value'. Can be specified multiple times.",
|
|
26
26
|
multiple: true,
|
|
27
27
|
}),
|
|
28
|
+
version: Flags.string({
|
|
29
|
+
description: 'executor package version to install (defaults to latest)',
|
|
30
|
+
}),
|
|
28
31
|
workspace: Flags.string({
|
|
29
32
|
char: 'w',
|
|
30
33
|
description: 'name of the workspace',
|
|
@@ -112,7 +115,7 @@ Provisions hereya/remote-executor-aws. Two modes are supported:
|
|
|
112
115
|
}
|
|
113
116
|
const provisionOutput = await executor.provision({
|
|
114
117
|
logger: getLogger(task),
|
|
115
|
-
package: EXECUTOR_PACKAGE,
|
|
118
|
+
package: flags.version ? `${EXECUTOR_PACKAGE}@${flags.version}` : EXECUTOR_PACKAGE,
|
|
116
119
|
parameters,
|
|
117
120
|
skipDeploy: true,
|
|
118
121
|
workspace: flags.workspace,
|
|
@@ -179,7 +182,7 @@ Provisions hereya/remote-executor-aws. Two modes are supported:
|
|
|
179
182
|
async task(_ctx, task) {
|
|
180
183
|
return task.newListr(subTasks, { concurrent: false, rendererOptions: { collapseSubtasks: !isDebug() } });
|
|
181
184
|
},
|
|
182
|
-
title: `Installing executor on workspace ${flags.workspace} (mode: ${flags.mode})`,
|
|
185
|
+
title: `Installing executor on workspace ${flags.workspace} (mode: ${flags.mode}) (version: ${flags.version ?? 'latest'})`,
|
|
183
186
|
},
|
|
184
187
|
], { concurrent: false });
|
|
185
188
|
try {
|