@gravity-rail/cli 0.36.0 → 0.36.2
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/{account-verify-phone-5DY6ETMV.js → account-verify-phone-KEYD64YM.js} +3 -3
- package/dist/{chunk-KHUZAYUS.js → chunk-CQVOVKKR.js} +22 -69
- package/dist/chunk-CQVOVKKR.js.map +1 -0
- package/dist/{chunk-IGZVMTG5.js → chunk-FSY2BM4J.js} +26 -1
- package/dist/chunk-FSY2BM4J.js.map +1 -0
- package/dist/cli-utils.d.ts +15 -1
- package/dist/cli-utils.js +3 -1
- package/dist/gr.js +133 -66
- package/dist/gr.js.map +1 -1
- package/dist/lib.js +64 -17
- package/dist/lib.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-IGZVMTG5.js.map +0 -1
- package/dist/chunk-KHUZAYUS.js.map +0 -1
- /package/dist/{account-verify-phone-5DY6ETMV.js.map → account-verify-phone-KEYD64YM.js.map} +0 -0
package/dist/lib.js
CHANGED
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
startAccountPhoneVerify,
|
|
34
34
|
stderr,
|
|
35
35
|
unwrapItems
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-CQVOVKKR.js";
|
|
37
37
|
import {
|
|
38
38
|
AGUIClient,
|
|
39
39
|
formatTimestamp,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
getTextDelta,
|
|
42
42
|
performOAuthFlow,
|
|
43
43
|
selectFromList
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-FSY2BM4J.js";
|
|
45
45
|
import {
|
|
46
46
|
AuthRequiredError,
|
|
47
47
|
CLIError,
|
|
@@ -3173,7 +3173,14 @@ var workflowsDomain = {
|
|
|
3173
3173
|
supportsCascade: true,
|
|
3174
3174
|
archiveMethod: "archiveWorkflow",
|
|
3175
3175
|
unarchiveMethod: "unarchiveWorkflow",
|
|
3176
|
-
columns: COLUMNS5
|
|
3176
|
+
columns: COLUMNS5,
|
|
3177
|
+
// `GET /workflows` is a `PaginatedResponse` (pageSize default 100, max
|
|
3178
|
+
// 500 — lib/routes/workspace/workflows/list.py). Without this opt-in the
|
|
3179
|
+
// command exposes no `--page` / `--all`, so a caller reading the list
|
|
3180
|
+
// sees page 1 only and cannot tell: the truncation notice, when it is
|
|
3181
|
+
// printed at all, goes to stderr. A workspace with more than 100
|
|
3182
|
+
// workflows then yields a silently short inventory.
|
|
3183
|
+
paginationSupport: "full"
|
|
3177
3184
|
}),
|
|
3178
3185
|
// Clone
|
|
3179
3186
|
{
|
|
@@ -4014,13 +4021,41 @@ function renderImportPlan(projection) {
|
|
|
4014
4021
|
return lines.join("\n") + "\n";
|
|
4015
4022
|
}
|
|
4016
4023
|
|
|
4024
|
+
// src/lib/workspace-sync/progress.ts
|
|
4025
|
+
async function withTransferProgress(stage, workspaceUuid, operation, options = {}) {
|
|
4026
|
+
const started = performance.now();
|
|
4027
|
+
const elapsed = () => Math.floor((performance.now() - started) / 1e3);
|
|
4028
|
+
const label = `${workspaceUuid}: ${stage}`;
|
|
4029
|
+
stderr(`${label} started`);
|
|
4030
|
+
const timer = setInterval(() => {
|
|
4031
|
+
stderr(`${label} waiting (${elapsed()}s elapsed)`);
|
|
4032
|
+
}, 3e4);
|
|
4033
|
+
timer.unref();
|
|
4034
|
+
try {
|
|
4035
|
+
const result2 = await operation();
|
|
4036
|
+
stderr(`${label} completed (${elapsed()}s elapsed)`);
|
|
4037
|
+
return result2;
|
|
4038
|
+
} catch (error) {
|
|
4039
|
+
if (options.reportFailure !== false) {
|
|
4040
|
+
stderr(`${label} failed (${elapsed()}s elapsed)`);
|
|
4041
|
+
}
|
|
4042
|
+
throw error;
|
|
4043
|
+
} finally {
|
|
4044
|
+
clearInterval(timer);
|
|
4045
|
+
}
|
|
4046
|
+
}
|
|
4047
|
+
|
|
4017
4048
|
// src/domains/workspaces.ts
|
|
4018
4049
|
function archiveBlob(zip) {
|
|
4019
4050
|
return new Blob([new Uint8Array(zip)]);
|
|
4020
4051
|
}
|
|
4021
4052
|
var REAPPLY_EXPORT_EXCLUDE = "channels";
|
|
4022
4053
|
async function exportTemplateArchive(client, templateUuid) {
|
|
4023
|
-
return
|
|
4054
|
+
return withTransferProgress(
|
|
4055
|
+
"template archive",
|
|
4056
|
+
templateUuid,
|
|
4057
|
+
() => client.exportWorkspaceZip(templateUuid, void 0, void 0, REAPPLY_EXPORT_EXCLUDE)
|
|
4058
|
+
);
|
|
4024
4059
|
}
|
|
4025
4060
|
async function readBindingsFile(filePath, targets) {
|
|
4026
4061
|
if (!filePath) return {};
|
|
@@ -4102,10 +4137,14 @@ async function reapplyOneTarget(ctx, client, options) {
|
|
|
4102
4137
|
const { targetUuid, bindings, planOnly, autoConfirm } = options;
|
|
4103
4138
|
let projection;
|
|
4104
4139
|
try {
|
|
4105
|
-
const preview = await
|
|
4140
|
+
const preview = await withTransferProgress(
|
|
4141
|
+
"target preview",
|
|
4106
4142
|
targetUuid,
|
|
4107
|
-
archiveBlob(options.archive),
|
|
4108
|
-
|
|
4143
|
+
() => client.previewWorkspaceImportZip(targetUuid, archiveBlob(options.archive), {
|
|
4144
|
+
intent: "template_reapply",
|
|
4145
|
+
bindings
|
|
4146
|
+
}),
|
|
4147
|
+
{ reportFailure: false }
|
|
4109
4148
|
);
|
|
4110
4149
|
projection = projectImportPlan(preview);
|
|
4111
4150
|
} catch (err) {
|
|
@@ -4147,11 +4186,16 @@ ${renderImportPlan(projection)}`);
|
|
|
4147
4186
|
return { target: targetUuid, status: "skipped", code: "not_confirmed", plan: projection };
|
|
4148
4187
|
}
|
|
4149
4188
|
try {
|
|
4150
|
-
const applied = await
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4189
|
+
const applied = await withTransferProgress(
|
|
4190
|
+
"target apply",
|
|
4191
|
+
targetUuid,
|
|
4192
|
+
() => client.importWorkspaceZip(targetUuid, archiveBlob(options.archive), {
|
|
4193
|
+
intent: "template_reapply",
|
|
4194
|
+
expectedPlanFingerprint: projection.planFingerprint,
|
|
4195
|
+
bindings
|
|
4196
|
+
}),
|
|
4197
|
+
{ reportFailure: false }
|
|
4198
|
+
);
|
|
4155
4199
|
if (applied.status === "noop") {
|
|
4156
4200
|
return {
|
|
4157
4201
|
target: targetUuid,
|
|
@@ -4644,10 +4688,12 @@ Provisioning started. Watch it come up with:
|
|
|
4644
4688
|
const templateUuid = requireArg(hctx, "template");
|
|
4645
4689
|
const client = ctx.apiClient;
|
|
4646
4690
|
const archive = await exportTemplateArchive(client, templateUuid);
|
|
4647
|
-
const preview = await
|
|
4691
|
+
const preview = await withTransferProgress(
|
|
4692
|
+
"target preview",
|
|
4648
4693
|
hctx.workspace,
|
|
4649
|
-
archiveBlob(archive),
|
|
4650
|
-
|
|
4694
|
+
() => client.previewWorkspaceImportZip(hctx.workspace, archiveBlob(archive), {
|
|
4695
|
+
intent: "template_reapply"
|
|
4696
|
+
})
|
|
4651
4697
|
);
|
|
4652
4698
|
const projection = projectImportPlan(preview);
|
|
4653
4699
|
emitReport(ctx, renderImportPlan(projection), projection);
|
|
@@ -10252,7 +10298,8 @@ var NO_UUID_LOOKUP = /* @__PURE__ */ new Set([
|
|
|
10252
10298
|
"purchase",
|
|
10253
10299
|
"import",
|
|
10254
10300
|
"invoice",
|
|
10255
|
-
"workspace_config"
|
|
10301
|
+
"workspace_config",
|
|
10302
|
+
"data_record"
|
|
10256
10303
|
]);
|
|
10257
10304
|
var HYDRATORS = {
|
|
10258
10305
|
workspace: async ({ client }, ref) => (await client.getWorkspace(ref.uuid)).name,
|
|
@@ -24716,7 +24763,7 @@ var topLevelCommands = [
|
|
|
24716
24763
|
mutates: true,
|
|
24717
24764
|
args: [{ name: "phone", description: "E.164 phone number (optional; prompts if omitted)" }],
|
|
24718
24765
|
handler: async (hctx) => {
|
|
24719
|
-
const { accountVerifyPhoneCommand } = await import("./account-verify-phone-
|
|
24766
|
+
const { accountVerifyPhoneCommand } = await import("./account-verify-phone-KEYD64YM.js");
|
|
24720
24767
|
await accountVerifyPhoneCommand(hctx);
|
|
24721
24768
|
}
|
|
24722
24769
|
},
|