@gravity-rail/cli 0.36.1 → 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/gr.js CHANGED
@@ -3230,7 +3230,7 @@ var init_libphonenumber_js = __esm({
3230
3230
  }
3231
3231
  });
3232
3232
 
3233
- // ../sdk/dist/chunk-R6S5RXW5.js
3233
+ // ../sdk/dist/chunk-KPHA7BN5.js
3234
3234
  function sanitizePhoneForBackend(phoneNumber) {
3235
3235
  try {
3236
3236
  let parsed = parsePhoneNumber4(phoneNumber);
@@ -4615,8 +4615,8 @@ function getRevisionState(workflow, revision) {
4615
4615
  };
4616
4616
  }
4617
4617
  var AbilitiesApi, AccessGrantsApi, AgentTasksApi, AgentsApi, AIModelsApi, ApiKeysApi, AppsApi, AssignmentsApi, VoiceApi, AuthApi, BuildersApi, CalendarsApi, CallsApi, CELApi, ChatsApi, ConfluenceApi, CustomToolkitsApi, DataTypesApi, DiscordBotsApi, SlackAppsApi, EventsApi, FeaturesApi, FhirConnectionsApi, InboundFaxStatus, DocumoFaxApi, HealthieApi, FilesApi, InboxesApi, InquiriesApi, AppConnectionsApi, McpServersApi, MemberImportValidationError, MembersApi, MondayIntegrationApi, NotificationRulesApi, OperatorApi, OrgApi, OAuthConnectionsApi, OAuthApi, PhoneNumbersApi, PronunciationsApi, PromptsApi, PersonasApi, QueriesApi, QualificationsApi, ReportsApi, SalesforceApi, ConnectionSyncApi, HubspotApi, SitesApi, SubscriptionsApi, SupportRequestsApi, CustomersApi, ResellersApi, SupervisorsApi, TasksApi, TemplatesApi, ToolkitsApi, JourneysApi, WorkflowsApi, WorkflowNotesApi, EventRuleObjectType, EventRuleEventType, EventRuleActionType, DriverMode, WorkspaceInvitationsApi, WorkspacesApi, DashboardsApi, DevicesApi, TeamsAppsApi, ExperimentsApi, PatientSyncConnectionsApi, ActivityApi, MotdApi, InterventionRequestsApi, MetricsApi, ProjectsApi, TrackedLinksApi, WORKSPACE_METHOD_NAMES, WORKSPACE_METHOD_NAME_SET, GravityRailClient, WIDGET_SLUGS, CHAT_TYPES, BUILTIN_ASSISTANT_CHAT_TYPES, MEMBER_AGENT_CHAT_TYPES, ActivityGrain, ActivityGroupBy, ActivityOpenItemOrder, ActivityWindowBasis;
4618
- var init_chunk_R6S5RXW5 = __esm({
4619
- "../sdk/dist/chunk-R6S5RXW5.js"() {
4618
+ var init_chunk_KPHA7BN5 = __esm({
4619
+ "../sdk/dist/chunk-KPHA7BN5.js"() {
4620
4620
  init_chunk_P2E6LU7I();
4621
4621
  init_libphonenumber_js();
4622
4622
  AbilitiesApi = class extends BaseApiClient {
@@ -12636,6 +12636,7 @@ var init_chunk_R6S5RXW5 = __esm({
12636
12636
  EventRuleEventType2["CHAT_CREATED"] = "chat:created";
12637
12637
  EventRuleEventType2["CHAT_SUMMARY"] = "chat:summary";
12638
12638
  EventRuleEventType2["MESSAGE_CREATED"] = "message:created";
12639
+ EventRuleEventType2["LINK_CLICKED"] = "link:clicked";
12639
12640
  EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
12640
12641
  EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
12641
12642
  EventRuleEventType2["ROUTINE_TRIGGERED"] = "routine:triggered";
@@ -16315,9 +16316,9 @@ var init_chunk_R6S5RXW5 = __esm({
16315
16316
  }
16316
16317
  });
16317
16318
 
16318
- // ../sdk/dist/chunk-HRUMZ46V.js
16319
- var init_chunk_HRUMZ46V = __esm({
16320
- "../sdk/dist/chunk-HRUMZ46V.js"() {
16319
+ // ../sdk/dist/chunk-DUEN4F6K.js
16320
+ var init_chunk_DUEN4F6K = __esm({
16321
+ "../sdk/dist/chunk-DUEN4F6K.js"() {
16321
16322
  }
16322
16323
  });
16323
16324
 
@@ -16325,8 +16326,8 @@ var init_chunk_HRUMZ46V = __esm({
16325
16326
  var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS, ActivityEventType, EntityKind;
16326
16327
  var init_dist = __esm({
16327
16328
  "../sdk/dist/index.js"() {
16328
- init_chunk_R6S5RXW5();
16329
- init_chunk_HRUMZ46V();
16329
+ init_chunk_KPHA7BN5();
16330
+ init_chunk_DUEN4F6K();
16330
16331
  init_chunk_P2E6LU7I();
16331
16332
  SEARCHABLE_EVENT_RULE_SOURCE_FIELDS = [
16332
16333
  "taskId",
@@ -16384,7 +16385,9 @@ var init_dist = __esm({
16384
16385
  phone_numberarchived: "phone_number.archived",
16385
16386
  domainlinked: "domain.linked",
16386
16387
  domainverified: "domain.verified",
16387
- configupdated: "config.updated"
16388
+ configupdated: "config.updated",
16389
+ data_recordcreated: "data_record.created",
16390
+ data_recordupdated: "data_record.updated"
16388
16391
  };
16389
16392
  EntityKind = {
16390
16393
  account: "account",
@@ -16416,7 +16419,8 @@ var init_dist = __esm({
16416
16419
  purchase: "purchase",
16417
16420
  subscription: "subscription",
16418
16421
  data_type: "data_type",
16419
- workspace_config: "workspace_config"
16422
+ workspace_config: "workspace_config",
16423
+ data_record: "data_record"
16420
16424
  };
16421
16425
  }
16422
16426
  });
@@ -24813,13 +24817,42 @@ function renderImportPlan(projection) {
24813
24817
  return lines.join("\n") + "\n";
24814
24818
  }
24815
24819
 
24820
+ // src/lib/workspace-sync/progress.ts
24821
+ init_output();
24822
+ async function withTransferProgress(stage, workspaceUuid, operation, options = {}) {
24823
+ const started = performance.now();
24824
+ const elapsed = () => Math.floor((performance.now() - started) / 1e3);
24825
+ const label = `${workspaceUuid}: ${stage}`;
24826
+ stderr2(`${label} started`);
24827
+ const timer = setInterval(() => {
24828
+ stderr2(`${label} waiting (${elapsed()}s elapsed)`);
24829
+ }, 3e4);
24830
+ timer.unref();
24831
+ try {
24832
+ const result2 = await operation();
24833
+ stderr2(`${label} completed (${elapsed()}s elapsed)`);
24834
+ return result2;
24835
+ } catch (error) {
24836
+ if (options.reportFailure !== false) {
24837
+ stderr2(`${label} failed (${elapsed()}s elapsed)`);
24838
+ }
24839
+ throw error;
24840
+ } finally {
24841
+ clearInterval(timer);
24842
+ }
24843
+ }
24844
+
24816
24845
  // src/domains/workspaces.ts
24817
24846
  function archiveBlob(zip) {
24818
24847
  return new Blob([new Uint8Array(zip)]);
24819
24848
  }
24820
24849
  var REAPPLY_EXPORT_EXCLUDE = "channels";
24821
24850
  async function exportTemplateArchive(client, templateUuid) {
24822
- return client.exportWorkspaceZip(templateUuid, void 0, void 0, REAPPLY_EXPORT_EXCLUDE);
24851
+ return withTransferProgress(
24852
+ "template archive",
24853
+ templateUuid,
24854
+ () => client.exportWorkspaceZip(templateUuid, void 0, void 0, REAPPLY_EXPORT_EXCLUDE)
24855
+ );
24823
24856
  }
24824
24857
  async function readBindingsFile(filePath, targets) {
24825
24858
  if (!filePath) return {};
@@ -24901,10 +24934,14 @@ async function reapplyOneTarget(ctx, client, options) {
24901
24934
  const { targetUuid, bindings, planOnly, autoConfirm } = options;
24902
24935
  let projection;
24903
24936
  try {
24904
- const preview = await client.previewWorkspaceImportZip(
24937
+ const preview = await withTransferProgress(
24938
+ "target preview",
24905
24939
  targetUuid,
24906
- archiveBlob(options.archive),
24907
- { intent: "template_reapply", bindings }
24940
+ () => client.previewWorkspaceImportZip(targetUuid, archiveBlob(options.archive), {
24941
+ intent: "template_reapply",
24942
+ bindings
24943
+ }),
24944
+ { reportFailure: false }
24908
24945
  );
24909
24946
  projection = projectImportPlan(preview);
24910
24947
  } catch (err) {
@@ -24946,11 +24983,16 @@ ${renderImportPlan(projection)}`);
24946
24983
  return { target: targetUuid, status: "skipped", code: "not_confirmed", plan: projection };
24947
24984
  }
24948
24985
  try {
24949
- const applied = await client.importWorkspaceZip(targetUuid, archiveBlob(options.archive), {
24950
- intent: "template_reapply",
24951
- expectedPlanFingerprint: projection.planFingerprint,
24952
- bindings
24953
- });
24986
+ const applied = await withTransferProgress(
24987
+ "target apply",
24988
+ targetUuid,
24989
+ () => client.importWorkspaceZip(targetUuid, archiveBlob(options.archive), {
24990
+ intent: "template_reapply",
24991
+ expectedPlanFingerprint: projection.planFingerprint,
24992
+ bindings
24993
+ }),
24994
+ { reportFailure: false }
24995
+ );
24954
24996
  if (applied.status === "noop") {
24955
24997
  return {
24956
24998
  target: targetUuid,
@@ -25443,10 +25485,12 @@ Provisioning started. Watch it come up with:
25443
25485
  const templateUuid = requireArg(hctx, "template");
25444
25486
  const client = ctx.apiClient;
25445
25487
  const archive = await exportTemplateArchive(client, templateUuid);
25446
- const preview = await client.previewWorkspaceImportZip(
25488
+ const preview = await withTransferProgress(
25489
+ "target preview",
25447
25490
  hctx.workspace,
25448
- archiveBlob(archive),
25449
- { intent: "template_reapply" }
25491
+ () => client.previewWorkspaceImportZip(hctx.workspace, archiveBlob(archive), {
25492
+ intent: "template_reapply"
25493
+ })
25450
25494
  );
25451
25495
  const projection = projectImportPlan(preview);
25452
25496
  emitReport(ctx, renderImportPlan(projection), projection);
@@ -31072,7 +31116,8 @@ var NO_UUID_LOOKUP = /* @__PURE__ */ new Set([
31072
31116
  "purchase",
31073
31117
  "import",
31074
31118
  "invoice",
31075
- "workspace_config"
31119
+ "workspace_config",
31120
+ "data_record"
31076
31121
  ]);
31077
31122
  var HYDRATORS = {
31078
31123
  workspace: async ({ client }, ref) => (await client.getWorkspace(ref.uuid)).name,
@@ -43398,7 +43443,7 @@ init_concierge_api();
43398
43443
 
43399
43444
  // package.json
43400
43445
  var package_default = {
43401
- version: "0.36.1"};
43446
+ version: "0.36.2"};
43402
43447
 
43403
43448
  // src/gr.ts
43404
43449
  var VERSION = package_default.version;