@hyperdrive.bot/cli 1.0.13 → 1.0.16
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 +1495 -474
- package/dist/commands/deploy.d.ts +18 -0
- package/dist/commands/deploy.js +239 -0
- package/dist/commands/deployment/create.js +10 -2
- package/dist/commands/domain/{switch.d.ts → set-production.d.ts} +1 -1
- package/dist/commands/domain/set-production.js +27 -0
- package/dist/commands/git/list-open-prs.d.ts +12 -0
- package/dist/commands/git/list-open-prs.js +87 -0
- package/dist/commands/hook/add.d.ts +22 -0
- package/dist/commands/hook/add.js +299 -0
- package/dist/commands/hook/list.d.ts +11 -0
- package/dist/commands/hook/list.js +111 -0
- package/dist/commands/hook/logs.d.ts +13 -0
- package/dist/commands/hook/logs.js +124 -0
- package/dist/commands/hook/remove.d.ts +12 -0
- package/dist/commands/hook/remove.js +115 -0
- package/dist/commands/hook/toggle.d.ts +12 -0
- package/dist/commands/hook/toggle.js +125 -0
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +49 -9
- package/dist/commands/module/bindings.d.ts +14 -0
- package/dist/commands/module/bindings.js +125 -0
- package/dist/commands/module/create.d.ts +3 -0
- package/dist/commands/module/create.js +156 -78
- package/dist/commands/module/list.d.ts +1 -0
- package/dist/commands/module/list.js +22 -1
- package/dist/commands/module/sync.d.ts +29 -0
- package/dist/commands/module/sync.js +409 -0
- package/dist/commands/module/unlink.d.ts +11 -0
- package/dist/commands/module/unlink.js +77 -0
- package/dist/commands/module/update.d.ts +10 -0
- package/dist/commands/module/update.js +168 -5
- package/dist/commands/network/discover.d.ts +12 -0
- package/dist/commands/network/discover.js +210 -0
- package/dist/commands/network/get.d.ts +13 -0
- package/dist/commands/network/get.js +90 -0
- package/dist/commands/{auth/logout.d.ts → network/list.d.ts} +2 -9
- package/dist/commands/network/list.js +71 -0
- package/dist/commands/network/register.d.ts +16 -0
- package/dist/commands/network/register.js +144 -0
- package/dist/commands/parameter/sync.d.ts +13 -0
- package/dist/commands/parameter/sync.js +69 -1
- package/dist/commands/project/sync.d.ts +5 -11
- package/dist/commands/project/sync.js +12 -381
- package/dist/commands/seed.d.ts +93 -0
- package/dist/commands/seed.js +324 -0
- package/dist/commands/service/backup.d.ts +17 -0
- package/dist/commands/service/backup.js +156 -0
- package/dist/commands/service/backups.d.ts +14 -0
- package/dist/commands/service/backups.js +110 -0
- package/dist/commands/service/bind.d.ts +16 -0
- package/dist/commands/service/bind.js +106 -0
- package/dist/commands/service/bindings.d.ts +13 -0
- package/dist/commands/service/bindings.js +78 -0
- package/dist/commands/service/clone.d.ts +19 -0
- package/dist/commands/service/clone.js +153 -0
- package/dist/commands/service/create.d.ts +16 -0
- package/dist/commands/service/create.js +212 -0
- package/dist/commands/service/get.d.ts +13 -0
- package/dist/commands/service/get.js +97 -0
- package/dist/commands/service/list.d.ts +12 -0
- package/dist/commands/service/list.js +86 -0
- package/dist/commands/service/register.d.ts +21 -0
- package/dist/commands/service/register.js +215 -0
- package/dist/commands/service/restore.d.ts +19 -0
- package/dist/commands/service/restore.js +158 -0
- package/dist/commands/service/seed.d.ts +17 -0
- package/dist/commands/service/seed.js +173 -0
- package/dist/commands/service/templates.d.ts +10 -0
- package/dist/commands/service/templates.js +66 -0
- package/dist/commands/service/unbind.d.ts +15 -0
- package/dist/commands/service/unbind.js +74 -0
- package/dist/commands/stage/create.d.ts +23 -0
- package/dist/commands/stage/create.js +145 -6
- package/dist/commands/stage/delete.d.ts +11 -0
- package/dist/commands/stage/delete.js +85 -0
- package/dist/commands/stage/deploy.d.ts +34 -0
- package/dist/commands/stage/deploy.js +294 -0
- package/dist/commands/stage/ensure-branches.d.ts +23 -0
- package/dist/commands/stage/ensure-branches.js +101 -0
- package/dist/commands/stage/list.js +4 -0
- package/dist/commands/stage/status.d.ts +14 -0
- package/dist/commands/stage/status.js +100 -0
- package/dist/commands/{jira → tracker}/connect.js +32 -23
- package/dist/commands/tracker/hook/add.d.ts +25 -0
- package/dist/commands/tracker/hook/add.js +284 -0
- package/dist/commands/{jira → tracker}/hook/list.js +20 -11
- package/dist/commands/{jira/hook/add.d.ts → tracker/hook/logs.d.ts} +2 -3
- package/dist/commands/tracker/hook/logs.js +126 -0
- package/dist/commands/{jira → tracker}/hook/remove.js +9 -8
- package/dist/commands/{jira → tracker}/hook/toggle.js +14 -12
- package/dist/commands/tracker/project/init.d.ts +17 -0
- package/dist/commands/tracker/project/init.js +178 -0
- package/dist/commands/tracker/project/link-module.d.ts +17 -0
- package/dist/commands/tracker/project/link-module.js +287 -0
- package/dist/commands/tracker/project/list-modules.d.ts +11 -0
- package/dist/commands/tracker/project/list-modules.js +117 -0
- package/dist/commands/tracker/project/list.d.ts +10 -0
- package/dist/commands/tracker/project/list.js +90 -0
- package/dist/commands/tracker/project/status.d.ts +13 -0
- package/dist/commands/tracker/project/status.js +168 -0
- package/dist/commands/tracker/project/unlink-module.d.ts +13 -0
- package/dist/commands/tracker/project/unlink-module.js +251 -0
- package/dist/commands/{jira → tracker}/status.js +3 -3
- package/dist/lib/ensure-branches.d.ts +53 -0
- package/dist/lib/ensure-branches.js +149 -0
- package/dist/lib/git-providers/github.d.ts +16 -0
- package/dist/lib/git-providers/github.js +157 -0
- package/dist/lib/git-providers/gitlab.d.ts +16 -0
- package/dist/lib/git-providers/gitlab.js +148 -0
- package/dist/lib/git-providers/index.d.ts +67 -0
- package/dist/lib/git-providers/index.js +39 -0
- package/dist/lib/lambda-warmer.d.ts +106 -0
- package/dist/lib/lambda-warmer.js +189 -0
- package/dist/services/hyperdrive-sigv4.d.ts +359 -5
- package/dist/services/hyperdrive-sigv4.js +177 -12
- package/dist/utils/hook-flow.d.ts +60 -3
- package/dist/utils/hook-flow.js +437 -2
- package/dist/utils/hook-normalize.d.ts +6 -0
- package/dist/utils/hook-normalize.js +33 -0
- package/dist/utils/lifecycle-poller.d.ts +32 -0
- package/dist/utils/lifecycle-poller.js +72 -0
- package/dist/utils/retry.d.ts +43 -0
- package/dist/utils/retry.js +88 -0
- package/dist/utils/summary-display.js +1 -1
- package/dist/utils/tracker-project-flow.d.ts +84 -0
- package/dist/utils/tracker-project-flow.js +564 -0
- package/package.json +35 -7
- package/dist/commands/auth/login.d.ts +0 -16
- package/dist/commands/auth/login.js +0 -179
- package/dist/commands/auth/logout.js +0 -116
- package/dist/commands/auth/refresh.d.ts +0 -6
- package/dist/commands/auth/refresh.js +0 -66
- package/dist/commands/auth/status.d.ts +0 -6
- package/dist/commands/auth/status.js +0 -63
- package/dist/commands/config/get.d.ts +0 -9
- package/dist/commands/config/get.js +0 -37
- package/dist/commands/config/set.d.ts +0 -10
- package/dist/commands/config/set.js +0 -48
- package/dist/commands/config/show.d.ts +0 -6
- package/dist/commands/config/show.js +0 -10
- package/dist/commands/domain/current.d.ts +0 -6
- package/dist/commands/domain/current.js +0 -18
- package/dist/commands/domain/list.d.ts +0 -6
- package/dist/commands/domain/list.js +0 -42
- package/dist/commands/domain/switch.js +0 -40
- package/dist/commands/jira/hook/add.js +0 -147
- package/dist/services/tenant-service.d.ts +0 -127
- package/dist/services/tenant-service.js +0 -396
- package/dist/utils/auth-flow.d.ts +0 -147
- package/dist/utils/auth-flow.js +0 -479
- package/oclif.manifest.json +0 -3519
- /package/dist/commands/{jira → tracker}/connect.d.ts +0 -0
- /package/dist/commands/{jira → tracker}/hook/list.d.ts +0 -0
- /package/dist/commands/{jira → tracker}/hook/remove.d.ts +0 -0
- /package/dist/commands/{jira → tracker}/hook/toggle.d.ts +0 -0
- /package/dist/commands/{jira → tracker}/status.d.ts +0 -0
|
@@ -17,9 +17,15 @@ const CLI_VERSION = packageJson.version;
|
|
|
17
17
|
/**
|
|
18
18
|
* Hyperdrive API Service with AWS SigV4 authentication
|
|
19
19
|
*/
|
|
20
|
+
// API-137: parameter HTTP endpoints split out of the main hyperdrive APIGW
|
|
21
|
+
// into a dedicated `api-hyperdrive-parameter-live` APIGW (API-135 follow-up).
|
|
22
|
+
// Hardcoded fallback used until the auth bootstrap returns this entry in
|
|
23
|
+
// `additionalApiUrls['hyperdrive-parameter']`.
|
|
24
|
+
const HYPERDRIVE_PARAMETER_API_URL_LIVE = 'https://rtxiim14g6.execute-api.sa-east-1.amazonaws.com/live';
|
|
20
25
|
export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
21
26
|
projectsApiUrl;
|
|
22
27
|
userGroupsApiUrl;
|
|
28
|
+
parameterApiUrl;
|
|
23
29
|
constructor(domain) {
|
|
24
30
|
super({
|
|
25
31
|
authConfig: HYPERDRIVE_AUTH_CONFIG,
|
|
@@ -29,10 +35,17 @@ export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
|
29
35
|
apiUrlOverride: process.env.HYPERDRIVE_API_URL,
|
|
30
36
|
regionOverride: process.env.HYPERDRIVE_AWS_REGION,
|
|
31
37
|
});
|
|
32
|
-
//
|
|
33
|
-
this.projectsApiUrl =
|
|
34
|
-
|| this.getAdditionalApiUrl('hyperdrive-projects');
|
|
38
|
+
// Reunified: all endpoints served by the main hyperdrive API
|
|
39
|
+
this.projectsApiUrl = this.getAdditionalApiUrl('hyperdrive');
|
|
35
40
|
this.userGroupsApiUrl = this.getAdditionalApiUrl('user-groups');
|
|
41
|
+
// Parameter sub-module APIGW (API-135). Prefer dynamic discovery; fall
|
|
42
|
+
// back to env override or hardcoded live URL until backend wires the
|
|
43
|
+
// discovery entry. Once `additionalApiUrls['hyperdrive-parameter']` is
|
|
44
|
+
// populated, the fallback becomes inert without touching this code.
|
|
45
|
+
this.parameterApiUrl =
|
|
46
|
+
this.getAdditionalApiUrl('hyperdrive-parameter') ??
|
|
47
|
+
process.env.HYPERDRIVE_PARAMETER_API_URL ??
|
|
48
|
+
HYPERDRIVE_PARAMETER_API_URL_LIVE;
|
|
36
49
|
}
|
|
37
50
|
// ============================================================================
|
|
38
51
|
// AWS Account Methods
|
|
@@ -187,6 +200,15 @@ export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
|
187
200
|
async deploymentList(params) {
|
|
188
201
|
return this.makeSignedRequest('GET', `/deployments?projectSlug=${params.projectSlug}&stage=${params.stage}`);
|
|
189
202
|
}
|
|
203
|
+
async deploymentCreateStatic(params) {
|
|
204
|
+
return this.makeSignedRequest('POST', '/deployments/static', params);
|
|
205
|
+
}
|
|
206
|
+
async deploymentFinalizeStatic(deploymentId, options) {
|
|
207
|
+
return this.makeSignedRequest('POST', `/deployments/${deploymentId}/finalize`, {
|
|
208
|
+
deploymentId,
|
|
209
|
+
...(options?.spa !== undefined && { spa: options.spa }),
|
|
210
|
+
});
|
|
211
|
+
}
|
|
190
212
|
// ============================================================================
|
|
191
213
|
// Git Integration Methods
|
|
192
214
|
// ============================================================================
|
|
@@ -239,18 +261,104 @@ export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
|
239
261
|
async hookUpdate(projectId, hookId, body) {
|
|
240
262
|
return this.makeSignedRequest('PATCH', `/hyperdrive/projects/${encodeURIComponent(projectId)}/hooks/${encodeURIComponent(hookId)}`, body, this.projectsApiUrl);
|
|
241
263
|
}
|
|
264
|
+
// ============================================================================
|
|
265
|
+
// Tenant Lifecycle Hook Methods
|
|
266
|
+
// ============================================================================
|
|
267
|
+
async tenantHookCreate(body) {
|
|
268
|
+
return this.makeSignedRequest('POST', '/hyperdrive/hooks', body, this.projectsApiUrl);
|
|
269
|
+
}
|
|
270
|
+
async tenantHookDelete(hookId) {
|
|
271
|
+
return this.makeSignedRequest('DELETE', `/hyperdrive/hooks/${encodeURIComponent(hookId)}`, undefined, this.projectsApiUrl);
|
|
272
|
+
}
|
|
273
|
+
async tenantHookGet(hookId) {
|
|
274
|
+
return this.makeSignedRequest('GET', `/hyperdrive/hooks/${encodeURIComponent(hookId)}`, undefined, this.projectsApiUrl);
|
|
275
|
+
}
|
|
276
|
+
async tenantHookList() {
|
|
277
|
+
return this.makeSignedRequest('GET', '/hyperdrive/hooks', undefined, this.projectsApiUrl);
|
|
278
|
+
}
|
|
279
|
+
async tenantHookLogList(options) {
|
|
280
|
+
const params = new URLSearchParams();
|
|
281
|
+
if (options?.limit)
|
|
282
|
+
params.set('limit', String(options.limit));
|
|
283
|
+
if (options?.status)
|
|
284
|
+
params.set('status', options.status);
|
|
285
|
+
const qs = params.toString() ? `?${params.toString()}` : '';
|
|
286
|
+
return this.makeSignedRequest('GET', `/hyperdrive/hooks/logs${qs}`, undefined, this.projectsApiUrl);
|
|
287
|
+
}
|
|
288
|
+
async tenantHookUpdate(hookId, body) {
|
|
289
|
+
return this.makeSignedRequest('PATCH', `/hyperdrive/hooks/${encodeURIComponent(hookId)}`, body, this.projectsApiUrl);
|
|
290
|
+
}
|
|
242
291
|
async projectGetJiraStatuses(projectId) {
|
|
243
292
|
return this.makeSignedRequest('GET', `/hyperdrive/projects/${encodeURIComponent(projectId)}/jira/statuses`);
|
|
244
293
|
}
|
|
245
294
|
// ============================================================================
|
|
246
295
|
// Jira Integration Methods
|
|
247
296
|
// ============================================================================
|
|
297
|
+
async jiraListProjects() {
|
|
298
|
+
return this.makeSignedRequest('GET', '/hyperdrive/jira/projects', undefined, this.projectsApiUrl);
|
|
299
|
+
}
|
|
248
300
|
async jiraGetProjectStatuses(jiraProjectKey) {
|
|
249
|
-
return this.makeSignedRequest('GET', `/hyperdrive/jira/projects/${encodeURIComponent(jiraProjectKey)}/statuses
|
|
301
|
+
return this.makeSignedRequest('GET', `/hyperdrive/jira/projects/${encodeURIComponent(jiraProjectKey)}/statuses`, undefined, this.projectsApiUrl);
|
|
250
302
|
}
|
|
251
303
|
async jiraPreRegister(params) {
|
|
252
304
|
return this.makeSignedRequest('POST', '/hyperdrive/jira/pre-register', params, this.projectsApiUrl);
|
|
253
305
|
}
|
|
306
|
+
async jiraStatus() {
|
|
307
|
+
return this.makeSignedRequest('GET', '/hyperdrive/jira/status', undefined, this.projectsApiUrl);
|
|
308
|
+
}
|
|
309
|
+
// ============================================================================
|
|
310
|
+
// Tracker Project Methods
|
|
311
|
+
// ============================================================================
|
|
312
|
+
async trackerProjectCreate(data) {
|
|
313
|
+
return this.makeSignedRequest('POST', '/hyperdrive/tracker-projects', data, this.projectsApiUrl);
|
|
314
|
+
}
|
|
315
|
+
async trackerProjectDelete(trackerProjectId) {
|
|
316
|
+
return this.makeSignedRequest('DELETE', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}`, undefined, this.projectsApiUrl);
|
|
317
|
+
}
|
|
318
|
+
async trackerProjectHookCreate(trackerProjectId, body) {
|
|
319
|
+
return this.makeSignedRequest('POST', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/hooks`, body, this.projectsApiUrl);
|
|
320
|
+
}
|
|
321
|
+
async trackerProjectHookCreateV2(trackerProjectId, body) {
|
|
322
|
+
return this.makeSignedRequest('POST', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/hooks`, body, this.projectsApiUrl);
|
|
323
|
+
}
|
|
324
|
+
async trackerProjectHookDelete(trackerProjectId, hookId) {
|
|
325
|
+
return this.makeSignedRequest('DELETE', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/hooks/${encodeURIComponent(hookId)}`, undefined, this.projectsApiUrl);
|
|
326
|
+
}
|
|
327
|
+
async trackerProjectHookList(trackerProjectId) {
|
|
328
|
+
return this.makeSignedRequest('GET', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/hooks`, undefined, this.projectsApiUrl);
|
|
329
|
+
}
|
|
330
|
+
async trackerProjectHookLogList(trackerProjectId, options) {
|
|
331
|
+
const params = new URLSearchParams();
|
|
332
|
+
if (options?.limit)
|
|
333
|
+
params.set('limit', String(options.limit));
|
|
334
|
+
if (options?.status)
|
|
335
|
+
params.set('status', options.status);
|
|
336
|
+
const qs = params.toString() ? `?${params.toString()}` : '';
|
|
337
|
+
return this.makeSignedRequest('GET', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/hook-logs${qs}`, undefined, this.projectsApiUrl);
|
|
338
|
+
}
|
|
339
|
+
async trackerProjectHookUpdate(trackerProjectId, hookId, body) {
|
|
340
|
+
return this.makeSignedRequest('PATCH', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/hooks/${encodeURIComponent(hookId)}`, body, this.projectsApiUrl);
|
|
341
|
+
}
|
|
342
|
+
async trackerProjectLinkModule(trackerProjectId, data) {
|
|
343
|
+
return this.makeSignedRequest('POST', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/modules`, data, this.projectsApiUrl);
|
|
344
|
+
}
|
|
345
|
+
async trackerProjectList() {
|
|
346
|
+
const response = await this.makeSignedRequest('GET', '/hyperdrive/tracker-projects', undefined, this.projectsApiUrl);
|
|
347
|
+
return Array.isArray(response) ? response : response.items;
|
|
348
|
+
}
|
|
349
|
+
async trackerProjectListModules(trackerProjectId) {
|
|
350
|
+
const response = await this.makeSignedRequest('GET', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/modules`, undefined, this.projectsApiUrl);
|
|
351
|
+
return response.items ?? [];
|
|
352
|
+
}
|
|
353
|
+
async trackerProjectUnlinkModule(trackerProjectId, moduleId) {
|
|
354
|
+
await this.makeSignedRequest('DELETE', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/modules/${encodeURIComponent(moduleId)}`, undefined, this.projectsApiUrl);
|
|
355
|
+
}
|
|
356
|
+
async trackerProjectGet(trackerProjectId) {
|
|
357
|
+
return this.makeSignedRequest('GET', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}`, undefined, this.projectsApiUrl);
|
|
358
|
+
}
|
|
359
|
+
async trackerProjectGetContext(trackerProjectId) {
|
|
360
|
+
return this.makeSignedRequest('GET', `/hyperdrive/tracker-projects/${encodeURIComponent(trackerProjectId)}/context`, undefined, this.projectsApiUrl);
|
|
361
|
+
}
|
|
254
362
|
// ============================================================================
|
|
255
363
|
// Hyperdrive Project Methods
|
|
256
364
|
// ============================================================================
|
|
@@ -307,12 +415,18 @@ export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
|
307
415
|
async moduleLink(params) {
|
|
308
416
|
return this.makeSignedRequest('POST', '/modules/link', params);
|
|
309
417
|
}
|
|
418
|
+
async moduleUnlink(params) {
|
|
419
|
+
return this.makeSignedRequest('POST', '/modules/unlink', params);
|
|
420
|
+
}
|
|
310
421
|
async moduleList() {
|
|
311
422
|
return this.makeSignedRequest('GET', '/modules');
|
|
312
423
|
}
|
|
313
424
|
async moduleReanalyze(slug, userPrompt) {
|
|
314
425
|
return this.makeSignedRequest('POST', `/modules/${slug}/reanalyze`, { userPrompt });
|
|
315
426
|
}
|
|
427
|
+
async moduleUpdateContext(moduleSlug, data) {
|
|
428
|
+
return this.makeSignedRequest('PUT', `/modules/${encodeURIComponent(moduleSlug)}/context`, data);
|
|
429
|
+
}
|
|
316
430
|
async moduleUpdate(params) {
|
|
317
431
|
const { slug, ...updateData } = params;
|
|
318
432
|
return this.makeSignedRequest('PUT', `/modules/${slug}`, updateData);
|
|
@@ -321,25 +435,25 @@ export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
|
321
435
|
// Parameter Methods
|
|
322
436
|
// ============================================================================
|
|
323
437
|
async parameterAdd(params) {
|
|
324
|
-
return this.makeSignedRequest('POST', '/parameters', params);
|
|
438
|
+
return this.makeSignedRequest('POST', '/parameters', params, this.parameterApiUrl);
|
|
325
439
|
}
|
|
326
440
|
async parameterBackfill(params) {
|
|
327
|
-
return this.makeSignedRequest('POST', '/parameters/backfill', params);
|
|
441
|
+
return this.makeSignedRequest('POST', '/parameters/backfill', params, this.parameterApiUrl);
|
|
328
442
|
}
|
|
329
443
|
async parameterClear(params) {
|
|
330
|
-
return this.makeSignedRequest('POST', '/parameters/clear', params);
|
|
444
|
+
return this.makeSignedRequest('POST', '/parameters/clear', params, this.parameterApiUrl);
|
|
331
445
|
}
|
|
332
446
|
async parameterList(params) {
|
|
333
|
-
return this.makeSignedRequest('GET', `/parameters?accountId=${params.accountId}&projectSlug=${params.projectSlug}&specific=${params.specific}&stage=${params.stage}
|
|
447
|
+
return this.makeSignedRequest('GET', `/parameters?accountId=${params.accountId}&projectSlug=${params.projectSlug}&specific=${params.specific}&stage=${params.stage}`, undefined, this.parameterApiUrl);
|
|
334
448
|
}
|
|
335
449
|
async parameterRemove(params) {
|
|
336
|
-
return this.makeSignedRequest('DELETE', `/parameters/${params.key}?accountId=${params.accountId}&projectSlug=${params.projectSlug}&specific=${params.specific}&stage=${params.stage}
|
|
450
|
+
return this.makeSignedRequest('DELETE', `/parameters/${params.key}?accountId=${params.accountId}&projectSlug=${params.projectSlug}&specific=${params.specific}&stage=${params.stage}`, undefined, this.parameterApiUrl);
|
|
337
451
|
}
|
|
338
452
|
async parameterSync(params) {
|
|
339
|
-
return this.makeSignedRequest('POST', '/parameters/sync', params);
|
|
453
|
+
return this.makeSignedRequest('POST', '/parameters/sync', params, this.parameterApiUrl);
|
|
340
454
|
}
|
|
341
455
|
async parameterSyncStatus(params) {
|
|
342
|
-
return this.makeSignedRequest('GET', `/parameters/sync/${params.taskId}
|
|
456
|
+
return this.makeSignedRequest('GET', `/parameters/sync/${params.taskId}`, undefined, this.parameterApiUrl);
|
|
343
457
|
}
|
|
344
458
|
async parameterUpdate(params) {
|
|
345
459
|
return this.makeSignedRequest('PUT', `/parameters/${params.key}`, {
|
|
@@ -348,7 +462,7 @@ export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
|
348
462
|
projectSlug: params.projectSlug,
|
|
349
463
|
specific: params.specific,
|
|
350
464
|
stage: params.stage
|
|
351
|
-
});
|
|
465
|
+
}, this.parameterApiUrl);
|
|
352
466
|
}
|
|
353
467
|
// ============================================================================
|
|
354
468
|
// Stage Methods
|
|
@@ -362,6 +476,19 @@ export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
|
362
476
|
async stageList() {
|
|
363
477
|
return this.makeSignedRequest('GET', '/stages');
|
|
364
478
|
}
|
|
479
|
+
async stageGetDeployManifest(stageName) {
|
|
480
|
+
return this.makeSignedRequest('GET', `/stages/${stageName}/deploy-manifest`);
|
|
481
|
+
}
|
|
482
|
+
async stageDeploy(params) {
|
|
483
|
+
return this.makeSignedRequest('POST', `/stages/${params.stageName}/deploy`, {
|
|
484
|
+
mode: params.mode,
|
|
485
|
+
moduleSlug: params.moduleSlug
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
async stageDelete(stageName, force = false) {
|
|
489
|
+
const qs = force ? '?force=true' : '';
|
|
490
|
+
return this.makeSignedRequest('DELETE', `/stages/${stageName}${qs}`);
|
|
491
|
+
}
|
|
365
492
|
// ============================================================================
|
|
366
493
|
// Stage Access Methods
|
|
367
494
|
// ============================================================================
|
|
@@ -394,7 +521,45 @@ export class HyperdriveSigV4Service extends SigV4ApiClient {
|
|
|
394
521
|
const { data } = errorData;
|
|
395
522
|
const inquirer = (await import('inquirer')).default;
|
|
396
523
|
const open = (await import('open')).default;
|
|
524
|
+
const accounts = data.outdatedAccounts;
|
|
525
|
+
// Multi-account flow: show all outdated accounts with individual URLs
|
|
526
|
+
if (accounts && accounts.length > 1) {
|
|
527
|
+
console.error(`\n❌ ${accounts.length} AWS accounts have outdated cross-account roles\n`);
|
|
528
|
+
console.error(`Required version: ${data.requiredVersion}\n`);
|
|
529
|
+
for (const account of accounts) {
|
|
530
|
+
const label = account.name ? `${account.name} (${account.accountId})` : account.accountId;
|
|
531
|
+
console.error(` • ${label} — current: ${account.currentVersion || 'unknown'}`);
|
|
532
|
+
}
|
|
533
|
+
console.error('\nYou must update the CloudFormation stack in each AWS account listed above.');
|
|
534
|
+
console.error('Log into each account and run the stack update.\n');
|
|
535
|
+
const { openBrowser } = await inquirer.prompt([{
|
|
536
|
+
default: true,
|
|
537
|
+
message: `Open CloudFormation console for all ${accounts.length} accounts?`,
|
|
538
|
+
name: 'openBrowser',
|
|
539
|
+
type: 'confirm'
|
|
540
|
+
}]);
|
|
541
|
+
if (openBrowser) {
|
|
542
|
+
for (const account of accounts) {
|
|
543
|
+
const label = account.name ? `${account.name} (${account.accountId})` : account.accountId;
|
|
544
|
+
console.log(`\n Opening update page for ${label}...`);
|
|
545
|
+
await open(account.quickCreateUrl);
|
|
546
|
+
}
|
|
547
|
+
console.log('\n✓ Browser tabs opened. Update each stack, then retry your command.\n');
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
console.error('\nUpdate URLs (copy and paste, log into each account):');
|
|
551
|
+
for (const account of accounts) {
|
|
552
|
+
const label = account.name ? `${account.name} (${account.accountId})` : account.accountId;
|
|
553
|
+
console.error(`\n ${label}:`);
|
|
554
|
+
console.error(` ${account.quickCreateUrl}`);
|
|
555
|
+
}
|
|
556
|
+
console.error('');
|
|
557
|
+
}
|
|
558
|
+
process.exit(1);
|
|
559
|
+
}
|
|
560
|
+
// Single-account flow (backward compatible)
|
|
397
561
|
console.error('\n❌ Your cross-account IAM role needs an update\n');
|
|
562
|
+
console.error(`Account: ${data.accountId}`);
|
|
398
563
|
console.error(`Current version: ${data.currentVersion || 'unknown'}`);
|
|
399
564
|
console.error(`Required version: ${data.requiredVersion}\n`);
|
|
400
565
|
console.error('Update steps:');
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
import type { HookActionCategory, HookActionType, HookResponse, HookTriggerEvent, HyperdriveLifecycleEvent, TenantHookResponse, TrackerHookResponseV2 } from '../services/hyperdrive-sigv4.js';
|
|
3
|
+
export declare const VALID_TRIGGER_EVENTS: HookTriggerEvent[];
|
|
4
|
+
export declare const ALL_ACTION_TYPES: HookActionType[];
|
|
5
|
+
export declare const VALID_LIFECYCLE_EVENTS: HyperdriveLifecycleEvent[];
|
|
6
|
+
export declare const LIFECYCLE_EVENT_GROUPS: (inquirer.Separator | {
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
})[];
|
|
10
|
+
export declare const LIFECYCLE_CONDITION_FIELDS: Record<string, string[]>;
|
|
11
|
+
export declare function getActionCategory(type: HookActionType): HookActionCategory;
|
|
2
12
|
/**
|
|
3
13
|
* Prompt user to select a trigger status from available Jira statuses
|
|
4
14
|
*/
|
|
@@ -11,11 +21,58 @@ export declare function promptActionType(): Promise<HookActionType>;
|
|
|
11
21
|
* Prompt for action-specific configuration based on action type
|
|
12
22
|
*/
|
|
13
23
|
export declare function promptActionConfig(actionType: HookActionType): Promise<Record<string, unknown>>;
|
|
24
|
+
/**
|
|
25
|
+
* Prompt user to select a trigger event type
|
|
26
|
+
*/
|
|
27
|
+
export declare function promptTriggerEvent(): Promise<HookTriggerEvent>;
|
|
28
|
+
/**
|
|
29
|
+
* Prompt for event-specific trigger conditions
|
|
30
|
+
*/
|
|
31
|
+
export declare function promptTriggerConditions(event: HookTriggerEvent): Promise<Record<string, string>>;
|
|
32
|
+
/**
|
|
33
|
+
* Prompt user to select an action type with category grouping
|
|
34
|
+
*/
|
|
35
|
+
export declare function promptActionTypeV2(): Promise<{
|
|
36
|
+
category: HookActionCategory;
|
|
37
|
+
type: HookActionType;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Prompt for execution order
|
|
41
|
+
*/
|
|
42
|
+
export declare function promptOrder(): Promise<number | undefined>;
|
|
14
43
|
/**
|
|
15
44
|
* Prompt user to select a hook from a list
|
|
16
45
|
*/
|
|
17
|
-
export declare function promptSelectHook(hooks: HookResponse
|
|
46
|
+
export declare function promptSelectHook(hooks: Array<HookResponse | TenantHookResponse | TrackerHookResponseV2>): Promise<HookResponse | TenantHookResponse | TrackerHookResponseV2>;
|
|
18
47
|
/**
|
|
19
48
|
* Prompt user to confirm hook deletion
|
|
20
49
|
*/
|
|
21
|
-
export declare function promptConfirmDelete(hook: HookResponse): Promise<boolean>;
|
|
50
|
+
export declare function promptConfirmDelete(hook: HookResponse | TenantHookResponse | TrackerHookResponseV2): Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* Prompt user to choose between lifecycle event trigger and cron trigger
|
|
53
|
+
*/
|
|
54
|
+
export declare function promptTriggerType(): Promise<'cron' | 'lifecycle'>;
|
|
55
|
+
/**
|
|
56
|
+
* Prompt user for a cron expression or rate expression
|
|
57
|
+
*/
|
|
58
|
+
export declare function promptCronExpression(): Promise<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Prompt user for an IANA timezone
|
|
61
|
+
*/
|
|
62
|
+
export declare function promptCronTimezone(): Promise<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Prompt user for the flexible time window (optional)
|
|
65
|
+
*/
|
|
66
|
+
export declare function promptFlexibleWindow(): Promise<number | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* Prompt user to select a lifecycle event for tenant hooks
|
|
69
|
+
*/
|
|
70
|
+
export declare function promptLifecycleEvent(): Promise<HyperdriveLifecycleEvent>;
|
|
71
|
+
/**
|
|
72
|
+
* Prompt for lifecycle event-specific conditions
|
|
73
|
+
*
|
|
74
|
+
* Extracts group prefix from the event (e.g., deploy.completed → deploy)
|
|
75
|
+
* and prompts for each field in LIFECYCLE_CONDITION_FIELDS[group].
|
|
76
|
+
* Returns only non-empty values.
|
|
77
|
+
*/
|
|
78
|
+
export declare function promptLifecycleConditions(event: string): Promise<Record<string, string>>;
|