@haakco/hostingctl 1.0.855 → 1.0.862

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/main.js CHANGED
@@ -35201,6 +35201,38 @@ function hostingExternalSecretRevoke(options) {
35201
35201
  }));
35202
35202
  }
35203
35203
  /**
35204
+ * {@link /c/:company/hosting/environments/:environmentUuid/file-backup-rotation}
35205
+ */
35206
+ function hostingEnvironmentsFileBackupRotationShow(options) {
35207
+ const { client: request = client, ...config } = options;
35208
+ return withUnwrap(request({
35209
+ method: "GET",
35210
+ url: "/c/{company}/hosting/environments/{environmentUuid}/file-backup-rotation",
35211
+ security: [{
35212
+ type: "http",
35213
+ scheme: "bearer"
35214
+ }],
35215
+ ...config,
35216
+ throwOnError: config.throwOnError ?? true
35217
+ }));
35218
+ }
35219
+ /**
35220
+ * {@link /c/:company/hosting/environments/:environmentUuid/file-backup-rotation}
35221
+ */
35222
+ function hostingEnvironmentsFileBackupRotationStart(options) {
35223
+ const { client: request = client, ...config } = options;
35224
+ return withUnwrap(request({
35225
+ method: "POST",
35226
+ url: "/c/{company}/hosting/environments/{environmentUuid}/file-backup-rotation",
35227
+ security: [{
35228
+ type: "http",
35229
+ scheme: "bearer"
35230
+ }],
35231
+ ...config,
35232
+ throwOnError: config.throwOnError ?? true
35233
+ }));
35234
+ }
35235
+ /**
35204
35236
  * {@link /c/:company/hosting/environments/:environmentUuid/file-imports}
35205
35237
  */
35206
35238
  function hostingFileImportsIndex(options) {
@@ -35876,6 +35908,38 @@ function hostingPurchasesIndex(options) {
35876
35908
  }));
35877
35909
  }
35878
35910
  /**
35911
+ * {@link /c/:company/hosting/environments/:environmentUuid/services/:workloadUuid/credential-rotation}
35912
+ */
35913
+ function hostingEnvironmentsRedisRotationShow(options) {
35914
+ const { client: request = client, ...config } = options;
35915
+ return withUnwrap(request({
35916
+ method: "GET",
35917
+ url: "/c/{company}/hosting/environments/{environmentUuid}/services/{workloadUuid}/credential-rotation",
35918
+ security: [{
35919
+ type: "http",
35920
+ scheme: "bearer"
35921
+ }],
35922
+ ...config,
35923
+ throwOnError: config.throwOnError ?? true
35924
+ }));
35925
+ }
35926
+ /**
35927
+ * {@link /c/:company/hosting/environments/:environmentUuid/services/:workloadUuid/credential-rotation}
35928
+ */
35929
+ function hostingEnvironmentsRedisRotationStart(options) {
35930
+ const { client: request = client, ...config } = options;
35931
+ return withUnwrap(request({
35932
+ method: "POST",
35933
+ url: "/c/{company}/hosting/environments/{environmentUuid}/services/{workloadUuid}/credential-rotation",
35934
+ security: [{
35935
+ type: "http",
35936
+ scheme: "bearer"
35937
+ }],
35938
+ ...config,
35939
+ throwOnError: config.throwOnError ?? true
35940
+ }));
35941
+ }
35942
+ /**
35879
35943
  * {@link /c/:company/hosting/registry/connections}
35880
35944
  */
35881
35945
  function hostingRegistryConnectionsIndex(options) {
@@ -37792,6 +37856,38 @@ function hostingEnvironmentsStorageUsage(options) {
37792
37856
  }));
37793
37857
  }
37794
37858
  /**
37859
+ * {@link /c/:company/hosting/environments/:environmentUuid/tool-credential-rotation}
37860
+ */
37861
+ function hostingEnvironmentsToolCredentialRotationShow(options) {
37862
+ const { client: request = client, ...config } = options;
37863
+ return withUnwrap(request({
37864
+ method: "GET",
37865
+ url: "/c/{company}/hosting/environments/{environmentUuid}/tool-credential-rotation",
37866
+ security: [{
37867
+ type: "http",
37868
+ scheme: "bearer"
37869
+ }],
37870
+ ...config,
37871
+ throwOnError: config.throwOnError ?? true
37872
+ }));
37873
+ }
37874
+ /**
37875
+ * {@link /c/:company/hosting/environments/:environmentUuid/tool-credential-rotation}
37876
+ */
37877
+ function hostingEnvironmentsToolCredentialRotationStart(options) {
37878
+ const { client: request = client, ...config } = options;
37879
+ return withUnwrap(request({
37880
+ method: "POST",
37881
+ url: "/c/{company}/hosting/environments/{environmentUuid}/tool-credential-rotation",
37882
+ security: [{
37883
+ type: "http",
37884
+ scheme: "bearer"
37885
+ }],
37886
+ ...config,
37887
+ throwOnError: config.throwOnError ?? true
37888
+ }));
37889
+ }
37890
+ /**
37795
37891
  * {@link /c/:company/hosting/environments/:environmentUuid/tools/:tool}
37796
37892
  */
37797
37893
  function hostingToolsUpdateSelection(options) {
@@ -41278,7 +41374,7 @@ function emailText(email) {
41278
41374
  ].join("\n");
41279
41375
  }
41280
41376
  // src/commands/auth-account.ts
41281
- var USAGE$67 = [
41377
+ var USAGE$70 = [
41282
41378
  "Usage: hostingctl auth closure show",
41283
41379
  " hostingctl auth closure request --reason <text> (--current-password-file <path>|--current-password-stdin)",
41284
41380
  " hostingctl auth picture set --image-file <path>",
@@ -41304,26 +41400,26 @@ async function account$1(context, subcommand, rest) {
41304
41400
  if (subcommand === "picture") return await picture(context, action, tail);
41305
41401
  if (subcommand === "notifications") return await notifications(context, action, tail);
41306
41402
  if (subcommand === "sent-email" || subcommand === "sent-email-show") return await sentEmail(context, { kind: "auth" }, subcommand, rest);
41307
- throw new UsageError(USAGE$67);
41403
+ throw new UsageError(USAGE$70);
41308
41404
  }
41309
41405
  /** `auth closure show|request`. */
41310
41406
  async function closure(context, action, tail) {
41311
- if (tail.length > 0) throw new UsageError(USAGE$67);
41407
+ if (tail.length > 0) throw new UsageError(USAGE$70);
41312
41408
  if (action === "show") return (await accountClosureShow({})).data;
41313
41409
  if (action === "request") return await closeAccount(context);
41314
- throw new UsageError(USAGE$67);
41410
+ throw new UsageError(USAGE$70);
41315
41411
  }
41316
41412
  /** `auth picture set|remove`. */
41317
41413
  async function picture(context, action, tail) {
41318
- if (tail.length > 0) throw new UsageError(USAGE$67);
41414
+ if (tail.length > 0) throw new UsageError(USAGE$70);
41319
41415
  if (action === "set") return await setPicture(context);
41320
41416
  if (action === "remove") return await removePicture(context);
41321
- throw new UsageError(USAGE$67);
41417
+ throw new UsageError(USAGE$70);
41322
41418
  }
41323
41419
  /** `auth notifications`, `read <id>` or `read-all`. */
41324
41420
  async function notifications(context, action, tail) {
41325
41421
  if (action === void 0) {
41326
- if (tail.length > 0) throw new UsageError(USAGE$67);
41422
+ if (tail.length > 0) throw new UsageError(USAGE$70);
41327
41423
  return await allPages(async (page, perPage) => {
41328
41424
  const answer = await notificationIndex({ query: {
41329
41425
  page,
@@ -41339,7 +41435,7 @@ async function notifications(context, action, tail) {
41339
41435
  await notificationMarkAllRead({});
41340
41436
  return null;
41341
41437
  });
41342
- if (action !== "read" || tail.length !== 1) throw new UsageError(USAGE$67);
41438
+ if (action !== "read" || tail.length !== 1) throw new UsageError(USAGE$70);
41343
41439
  const notification = tail[0] ?? "";
41344
41440
  return await confirmableWrite(context, `Mark notification ${notification} read.`, async () => {
41345
41441
  await notificationMarkRead({ path: { notification } });
@@ -41355,11 +41451,11 @@ async function notifications(context, action, tail) {
41355
41451
  */
41356
41452
  async function closeAccount(context) {
41357
41453
  const reason = context.flags.get("--reason")?.trim() ?? "";
41358
- if (reason === "") throw new UsageError(`closure request needs --reason.\n\n${USAGE$67}`);
41454
+ if (reason === "") throw new UsageError(`closure request needs --reason.\n\n${USAGE$70}`);
41359
41455
  return await confirmableWrite(context, ["Close this account, which removes the data the review lists and keeps what it lists as retained.", " The review is re-read first, so the digest sent is the one you are shown now."].join("\n"), async () => {
41360
41456
  const review = (await accountClosureShow({})).data;
41361
41457
  if (review.blockingReasons.length > 0) throw new UsageError(["This account cannot be closed while these reasons block it:", ...review.blockingReasons.map((one) => ` ${one.companySlug} (${one.role}): ${one.reason}`)].join("\n"));
41362
- const currentPassword = readSecret(context, "current-password", 1024, USAGE$67);
41458
+ const currentPassword = readSecret(context, "current-password", 1024, USAGE$70);
41363
41459
  return (await accountClosureStore({ body: {
41364
41460
  reason,
41365
41461
  reviewedDigest: review.digest,
@@ -41371,7 +41467,7 @@ async function closeAccount(context) {
41371
41467
  async function setPicture(context) {
41372
41468
  const file = context.flags.get("--image-file") ?? "";
41373
41469
  return await confirmableWrite(context, file === "" ? "Set the profile picture." : `Set the profile picture to ${file}.`, async () => {
41374
- return (await profilePictureStore({ body: await imageUpload(file, USAGE$67) })).data;
41470
+ return (await profilePictureStore({ body: await imageUpload(file, USAGE$70) })).data;
41375
41471
  });
41376
41472
  }
41377
41473
  /** `auth picture remove`. */
@@ -41381,7 +41477,7 @@ async function removePicture(context) {
41381
41477
  });
41382
41478
  }
41383
41479
  // src/commands/auth-identity.ts
41384
- var USAGE$66 = [
41480
+ var USAGE$69 = [
41385
41481
  "Usage: hostingctl auth profile [--name <name>] [--email <email>] [--current-password-file <path>]",
41386
41482
  " hostingctl auth password (--current-password-file <path>|--current-password-stdin) (--new-password-file <path>|--new-password-stdin)",
41387
41483
  " hostingctl auth register --name <name> --email <email> (--password-file <path>|--password-stdin)",
@@ -41406,12 +41502,12 @@ var MAX_TOKEN_BYTES = 4096;
41406
41502
  /** One required flag's value, or a refusal naming the flag. */
41407
41503
  function required$8(context, flag) {
41408
41504
  const value = context.flags.get(flag)?.trim() ?? "";
41409
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$66}`);
41505
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$69}`);
41410
41506
  return value;
41411
41507
  }
41412
41508
  /** No positional arguments: every input here is a flag or a secret source. */
41413
41509
  function noPositional(rest) {
41414
- if (rest.length > 0) throw new UsageError(USAGE$66);
41510
+ if (rest.length > 0) throw new UsageError(USAGE$69);
41415
41511
  }
41416
41512
  /** The API's password contract takes a confirmation; the CLI's one input is the new password itself. */
41417
41513
  function passwordBody(password) {
@@ -41434,16 +41530,16 @@ async function identity(context, subcommand, rest) {
41434
41530
  if (subcommand === "forgot-password") return await forgotPassword(context);
41435
41531
  if (subcommand === "reset-password") return await resetPassword(context);
41436
41532
  if (subcommand === "verify-email") return await verifyEmail(context);
41437
- throw new UsageError(USAGE$66);
41533
+ throw new UsageError(USAGE$69);
41438
41534
  }
41439
41535
  /** `auth profile`: the account's own name and email, with the current password only when the email changes. */
41440
41536
  async function profile$2(context) {
41441
41537
  const name = context.flags.get("--name")?.trim() ?? "";
41442
41538
  const email = context.flags.get("--email")?.trim() ?? "";
41443
- if (name === "" && email === "" && !context.flags.has("--current-password-file") && !context.flags.has("--current-password-stdin")) throw new UsageError(`Pass --name, --email, or both.\n\n${USAGE$66}`);
41539
+ if (name === "" && email === "" && !context.flags.has("--current-password-file") && !context.flags.has("--current-password-stdin")) throw new UsageError(`Pass --name, --email, or both.\n\n${USAGE$69}`);
41444
41540
  return await confirmableWrite(context, `Update the account's ${[name === "" ? null : `name to "${name}"`, email === "" ? null : `email to ${email}`].filter((one) => one !== null).join(" and ")}.`, async () => {
41445
41541
  const current = (await authMe({})).data;
41446
- const currentPassword = hasSecret(context, "current-password") ? readSecret(context, "current-password", MAX_PASSWORD_BYTES$1, USAGE$66) : void 0;
41542
+ const currentPassword = hasSecret(context, "current-password") ? readSecret(context, "current-password", MAX_PASSWORD_BYTES$1, USAGE$69) : void 0;
41447
41543
  return (await authUpdateProfile({ body: {
41448
41544
  name: name === "" ? current.name ?? "" : name,
41449
41545
  email: email === "" ? current.email ?? "" : email,
@@ -41459,8 +41555,8 @@ function hasSecret(context, name) {
41459
41555
  async function password$1(context) {
41460
41556
  return await confirmableWrite(context, "Change the account's password.", async () => {
41461
41557
  return (await authChangePassword({ body: {
41462
- currentPassword: readSecret(context, "current-password", MAX_PASSWORD_BYTES$1, USAGE$66),
41463
- ...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES$1, USAGE$66))
41558
+ currentPassword: readSecret(context, "current-password", MAX_PASSWORD_BYTES$1, USAGE$69),
41559
+ ...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES$1, USAGE$69))
41464
41560
  } })).data;
41465
41561
  });
41466
41562
  }
@@ -41472,7 +41568,7 @@ async function register$1(context) {
41472
41568
  return (await authRegister({ body: {
41473
41569
  name,
41474
41570
  email,
41475
- ...passwordBody(readSecret(context, "password", MAX_PASSWORD_BYTES$1, USAGE$66))
41571
+ ...passwordBody(readSecret(context, "password", MAX_PASSWORD_BYTES$1, USAGE$69))
41476
41572
  } })).data;
41477
41573
  });
41478
41574
  }
@@ -41487,8 +41583,8 @@ async function forgotPassword(context) {
41487
41583
  async function resetPassword(context) {
41488
41584
  const email = required$8(context, "--email");
41489
41585
  return await confirmableWrite(context, `Reset the password for ${email}.`, async () => {
41490
- const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$66);
41491
- const password = readSecret(context, "password", MAX_PASSWORD_BYTES$1, USAGE$66);
41586
+ const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$69);
41587
+ const password = readSecret(context, "password", MAX_PASSWORD_BYTES$1, USAGE$69);
41492
41588
  return (await authResetPassword({ body: {
41493
41589
  token,
41494
41590
  email,
@@ -41503,7 +41599,7 @@ async function verifyEmail(context) {
41503
41599
  });
41504
41600
  }
41505
41601
  // src/commands/auth-impersonation.ts
41506
- var USAGE$65 = [
41602
+ var USAGE$68 = [
41507
41603
  "Usage: hostingctl auth impersonate start --target <user-uuid> --company <slug> --reason <text> [--minutes <n>] --store-as <profile>",
41508
41604
  " hostingctl auth impersonate status",
41509
41605
  " hostingctl auth impersonate stop",
@@ -41536,7 +41632,7 @@ async function impersonation(context, rest) {
41536
41632
  if (action === "stop" && tail.length === 0) return await stop(context);
41537
41633
  if (action === "list" && tail.length === 0) return await list$7();
41538
41634
  if (action === "end" && tail.length === 1) return await end(context, tail[0] ?? "");
41539
- throw new UsageError(USAGE$65);
41635
+ throw new UsageError(USAGE$68);
41540
41636
  }
41541
41637
  /** `start`: mint a token for another user, and keep it in a profile of its own. */
41542
41638
  async function start$2(context) {
@@ -41544,8 +41640,8 @@ async function start$2(context) {
41544
41640
  const company = context.flags.get("--company")?.trim() ?? "";
41545
41641
  const reason = context.flags.get("--reason")?.trim() ?? "";
41546
41642
  const storeAs = context.flags.get("--store-as")?.trim() ?? "";
41547
- if (target === "" || company === "" || reason === "") throw new UsageError(`start needs --target, --company and --reason.\n\n${USAGE$65}`);
41548
- if (storeAs === "") throw new UsageError(`start needs --store-as <profile>.\n\n${USAGE$65}`);
41643
+ if (target === "" || company === "" || reason === "") throw new UsageError(`start needs --target, --company and --reason.\n\n${USAGE$68}`);
41644
+ if (storeAs === "") throw new UsageError(`start needs --store-as <profile>.\n\n${USAGE$68}`);
41549
41645
  const minutes = wholeNumberFlag(context.flags, "--minutes") ?? DEFAULT_MINUTES;
41550
41646
  const document = await readProfiles();
41551
41647
  const operator = namedProfile(context.flags, document);
@@ -41639,7 +41735,7 @@ async function list$7() {
41639
41735
  }
41640
41736
  /** `end <uuid>`: end one recorded session by its uuid. */
41641
41737
  async function end(context, uuid) {
41642
- if (uuid === "") throw new UsageError(USAGE$65);
41738
+ if (uuid === "") throw new UsageError(USAGE$68);
41643
41739
  return await confirmableWrite(context, `End impersonation session ${uuid}.`, async () => ({
41644
41740
  ...EMPTY,
41645
41741
  action: "end",
@@ -41647,7 +41743,7 @@ async function end(context, uuid) {
41647
41743
  }));
41648
41744
  }
41649
41745
  // src/commands/auth-push.ts
41650
- var USAGE$64 = [
41746
+ var USAGE$67 = [
41651
41747
  "Usage: hostingctl auth push-token set (--token-file <path>|--token-stdin)",
41652
41748
  " hostingctl auth push-token remove (--token-file <path>|--token-stdin)",
41653
41749
  "",
@@ -41658,12 +41754,12 @@ var USAGE$64 = [
41658
41754
  /** `auth push-token set|remove`: this account's mobile push registration. */
41659
41755
  async function authPush(context, rest) {
41660
41756
  const [action, ...tail] = rest;
41661
- if (tail.length > 0) throw new UsageError(USAGE$64);
41757
+ if (tail.length > 0) throw new UsageError(USAGE$67);
41662
41758
  if (action === "set") return {
41663
41759
  kind: "push-token",
41664
41760
  action: "set",
41665
41761
  sent: (await confirmableWrite(context, "Register this device's push token.", async () => {
41666
- await expoTokenStore({ body: { token: readSecret(context, "token", 4096, USAGE$64) } });
41762
+ await expoTokenStore({ body: { token: readSecret(context, "token", 4096, USAGE$67) } });
41667
41763
  return null;
41668
41764
  })).sent
41669
41765
  };
@@ -41671,11 +41767,11 @@ async function authPush(context, rest) {
41671
41767
  kind: "push-token",
41672
41768
  action: "remove",
41673
41769
  sent: (await confirmableWrite(context, "Remove this device's push token.", async () => {
41674
- await expoTokenDestroy({ query: { token: readSecret(context, "token", 4096, USAGE$64) } });
41770
+ await expoTokenDestroy({ query: { token: readSecret(context, "token", 4096, USAGE$67) } });
41675
41771
  return null;
41676
41772
  })).sent
41677
41773
  };
41678
- throw new UsageError(USAGE$64);
41774
+ throw new UsageError(USAGE$67);
41679
41775
  }
41680
41776
  /** The `auth push-token` renderer. */
41681
41777
  function authPushText(report) {
@@ -41903,51 +41999,51 @@ var AUTH_TOPICS = [
41903
41999
  },
41904
42000
  {
41905
42001
  path: ["profile"],
41906
- usage: USAGE$66
42002
+ usage: USAGE$69
41907
42003
  },
41908
42004
  {
41909
42005
  path: ["password"],
41910
- usage: USAGE$66
42006
+ usage: USAGE$69
41911
42007
  },
41912
42008
  {
41913
42009
  path: ["register"],
41914
- usage: USAGE$66
42010
+ usage: USAGE$69
41915
42011
  },
41916
42012
  {
41917
42013
  path: ["forgot-password"],
41918
- usage: USAGE$66
42014
+ usage: USAGE$69
41919
42015
  },
41920
42016
  {
41921
42017
  path: ["reset-password"],
41922
- usage: USAGE$66
42018
+ usage: USAGE$69
41923
42019
  },
41924
42020
  {
41925
42021
  path: ["verify-email"],
41926
- usage: USAGE$66
42022
+ usage: USAGE$69
41927
42023
  },
41928
42024
  {
41929
42025
  path: ["closure"],
41930
- usage: USAGE$67
42026
+ usage: USAGE$70
41931
42027
  },
41932
42028
  {
41933
42029
  path: ["picture"],
41934
- usage: USAGE$67
42030
+ usage: USAGE$70
41935
42031
  },
41936
42032
  {
41937
42033
  path: ["notifications"],
41938
- usage: USAGE$67
42034
+ usage: USAGE$70
41939
42035
  },
41940
42036
  {
41941
42037
  path: ["push-token"],
41942
- usage: USAGE$64
42038
+ usage: USAGE$67
41943
42039
  },
41944
42040
  {
41945
42041
  path: ["impersonate"],
41946
- usage: USAGE$65
42042
+ usage: USAGE$68
41947
42043
  }
41948
42044
  ];
41949
42045
  // src/commands/auth-sessions.ts
41950
- var USAGE$63 = [
42046
+ var USAGE$66 = [
41951
42047
  "Usage: hostingctl auth profiles",
41952
42048
  "",
41953
42049
  "Lists every session this machine holds: the profile name, the API it signs in to, when its access token",
@@ -41965,7 +42061,7 @@ var USAGE$63 = [
41965
42061
  * made a machine signed in to two accounts look like a machine signed in to none.
41966
42062
  */
41967
42063
  async function authSessions(context, rest) {
41968
- if (rest.length > 0) throw new UsageError(USAGE$63);
42064
+ if (rest.length > 0) throw new UsageError(USAGE$66);
41969
42065
  const document = await readProfiles();
41970
42066
  const selected = namedProfile(context.flags, document);
41971
42067
  const profiles = Object.entries(document.profiles).map(([name, stored]) => ({
@@ -42713,7 +42809,7 @@ var MAILBOX_TOPICS = [{
42713
42809
  usage: MAILBOX_IMPORT_USAGE
42714
42810
  }];
42715
42811
  // src/commands/mailbox-recovery.ts
42716
- var USAGE$62 = [
42812
+ var USAGE$65 = [
42717
42813
  "Usage: hostingctl mailbox recovery <request|verify|reset> [options]",
42718
42814
  "",
42719
42815
  " request --address <address> Ask for a self-service reset link for a mailbox address.",
@@ -42741,16 +42837,16 @@ function isSessionlessMailboxCommand(argv) {
42741
42837
  /** `mailbox recovery request|verify|reset`: the unauthenticated, token-authorized recovery journey. */
42742
42838
  async function runMailboxRecovery(context, rest) {
42743
42839
  const [action, extra] = rest;
42744
- if (extra !== void 0) throw new UsageError(USAGE$62);
42840
+ if (extra !== void 0) throw new UsageError(USAGE$65);
42745
42841
  if (action === "request") return await request$3(context);
42746
42842
  if (action === "verify") return await verify$2(context);
42747
42843
  if (action === "reset") return await reset(context);
42748
- throw new UsageError(USAGE$62);
42844
+ throw new UsageError(USAGE$65);
42749
42845
  }
42750
42846
  /** `request`: the answer is deliberately identical whether or not an eligible mailbox exists. */
42751
42847
  async function request$3(context) {
42752
42848
  const address = context.flags.get("--address");
42753
- if (address === void 0 || address === "") throw new UsageError(USAGE$62);
42849
+ if (address === void 0 || address === "") throw new UsageError(USAGE$65);
42754
42850
  return await confirmableWrite(context, `Request a mailbox recovery link for ${address}. The answer is the same for an unknown mailbox, one with no confirmed fallback, and an eligible one.`, async () => (await emailMailboxRecoveryRequest({ body: { address } })).data);
42755
42851
  }
42756
42852
  /** `verify`: the token is read only when the send actually happens, so a dry run never touches a secret. */
@@ -42771,7 +42867,7 @@ async function reset(context) {
42771
42867
  }
42772
42868
  /** One recovery token or new password, read from a private file or stdin under the recovery bound. */
42773
42869
  function recoverySecret(context, name) {
42774
- return readSecret(context, name, MAX_RECOVERY_SECRET_BYTES, USAGE$62);
42870
+ return readSecret(context, name, MAX_RECOVERY_SECRET_BYTES, USAGE$65);
42775
42871
  }
42776
42872
  // src/commands/mailbox.ts
42777
42873
  /**
@@ -42904,7 +43000,7 @@ async function environmentGeneration(path) {
42904
43000
  }
42905
43001
  // src/commands/access-credentials.ts
42906
43002
  /** The usage this module refuses with, owned by the commands it implements. */
42907
- var USAGE$61 = [
43003
+ var USAGE$64 = [
42908
43004
  "Usage: hostingctl access key add <environment-uuid> --company <slug> --access-user <uuid> --name <n> --public-key-file <path>",
42909
43005
  " hostingctl access key remove <environment-uuid> --company <slug> --access-user <uuid> <key-uuid>",
42910
43006
  " hostingctl access password set <environment-uuid> --company <slug> --access-user <uuid> (--password-file <path>|--password-stdin)",
@@ -42922,12 +43018,12 @@ var USAGE$61 = [
42922
43018
  /** `key add|remove`. */
42923
43019
  async function key(context, path, action, tail) {
42924
43020
  const accessUserUuid = context.flags.get("--access-user") ?? "";
42925
- if (accessUserUuid === "") throw new UsageError(`key needs --access-user.\\n\\n${USAGE$61}`);
43021
+ if (accessUserUuid === "") throw new UsageError(`key needs --access-user.\\n\\n${USAGE$64}`);
42926
43022
  if (action === "add") {
42927
- if (tail.length > 0) throw new UsageError(USAGE$61);
43023
+ if (tail.length > 0) throw new UsageError(USAGE$64);
42928
43024
  const name = context.flags.get("--name")?.trim() ?? "";
42929
43025
  const file = context.flags.get("--public-key-file") ?? "";
42930
- if (name === "" || file === "") throw new UsageError(`key add needs --name and --public-key-file.\\n\\n${USAGE$61}`);
43026
+ if (name === "" || file === "") throw new UsageError(`key add needs --name and --public-key-file.\\n\\n${USAGE$64}`);
42931
43027
  const publicKey = readPrivateFile(file, "public key", 8192).trim();
42932
43028
  return await confirmableWrite(context, `Add key "${name}" to login ${accessUserUuid}.`, async () => {
42933
43029
  const body = {
@@ -42946,7 +43042,7 @@ async function key(context, path, action, tail) {
42946
43042
  }
42947
43043
  if (action === "remove") {
42948
43044
  const [keyUuid, ...extra] = tail;
42949
- if (keyUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$61);
43045
+ if (keyUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$64);
42950
43046
  return await confirmableWrite(context, `Remove key ${keyUuid} from login ${accessUserUuid}.`, async () => {
42951
43047
  return (await hostingAccessDestroyKey({
42952
43048
  path: {
@@ -42958,18 +43054,18 @@ async function key(context, path, action, tail) {
42958
43054
  })).data;
42959
43055
  });
42960
43056
  }
42961
- throw new UsageError(USAGE$61);
43057
+ throw new UsageError(USAGE$64);
42962
43058
  }
42963
43059
  /** `password set|clear`. */
42964
43060
  async function password(context, path, action, tail) {
42965
43061
  const accessUserUuid = context.flags.get("--access-user") ?? "";
42966
- if (accessUserUuid === "" || tail.length > 0) throw new UsageError(`password needs --access-user.\\n\\n${USAGE$61}`);
43062
+ if (accessUserUuid === "" || tail.length > 0) throw new UsageError(`password needs --access-user.\\n\\n${USAGE$64}`);
42967
43063
  const userPath = {
42968
43064
  ...path,
42969
43065
  accessUserUuid
42970
43066
  };
42971
43067
  if (action === "set") return await confirmableWrite(context, "Set this login's password. The previous password stops working when the change is applied.", async () => {
42972
- const password = readSecret(context, "password", 1024, USAGE$61);
43068
+ const password = readSecret(context, "password", 1024, USAGE$64);
42973
43069
  const body = {
42974
43070
  desiredGeneration: await environmentGeneration(path),
42975
43071
  password,
@@ -42987,7 +43083,7 @@ async function password(context, path, action, tail) {
42987
43083
  query
42988
43084
  })).data;
42989
43085
  });
42990
- throw new UsageError(USAGE$61);
43086
+ throw new UsageError(USAGE$64);
42991
43087
  }
42992
43088
  // src/commands/booleans.ts
42993
43089
  /**
@@ -43010,7 +43106,7 @@ function onOff$5(context, flag, usage) {
43010
43106
  return value;
43011
43107
  }
43012
43108
  // src/commands/access-admin.ts
43013
- var USAGE$60 = [
43109
+ var USAGE$63 = [
43014
43110
  "Usage: hostingctl access settings <environment-uuid> --company <slug>",
43015
43111
  " hostingctl access settings-set <environment-uuid> --company <slug> --password <on|off> --sftp-only <on|off>",
43016
43112
  " hostingctl access grants <environment-uuid> --company <slug>",
@@ -43038,7 +43134,7 @@ var USAGE$60 = [
43038
43134
  /** `access settings|settings-set|grants|grant|un-grant|key|password|user-show|user-set|received`. */
43039
43135
  async function accessAdmin(context, subcommand, rest) {
43040
43136
  if (subcommand === "received") {
43041
- if (rest.length > 0) throw new UsageError(USAGE$60);
43137
+ if (rest.length > 0) throw new UsageError(USAGE$63);
43042
43138
  return {
43043
43139
  kind: "received",
43044
43140
  grants: (await hostingAccessReceivedIndex({})).data.items
@@ -43046,7 +43142,7 @@ async function accessAdmin(context, subcommand, rest) {
43046
43142
  }
43047
43143
  const [first, ...after] = rest;
43048
43144
  const takesAction = subcommand === "key" || subcommand === "password";
43049
- const path = await environmentPath$1(context, takesAction ? after[0] : first, USAGE$60);
43145
+ const path = await environmentPath$1(context, takesAction ? after[0] : first, USAGE$63);
43050
43146
  const tail = takesAction ? after.slice(1) : after;
43051
43147
  return await routed(context, subcommand, path, first ?? "", tail);
43052
43148
  }
@@ -43061,7 +43157,7 @@ async function routed(context, subcommand, path, action, tail) {
43061
43157
  if (subcommand === "password") return await written$9(password(context, path, action, tail));
43062
43158
  if (subcommand === "user-show") return await userShow(path, tail);
43063
43159
  if (subcommand === "user-set") return await written$9(userSet(context, path, tail));
43064
- throw new UsageError(USAGE$60);
43160
+ throw new UsageError(USAGE$63);
43065
43161
  }
43066
43162
  /** Tag one write's outcome with the group that produced it. */
43067
43163
  async function written$9(pending) {
@@ -43072,7 +43168,7 @@ async function written$9(pending) {
43072
43168
  }
43073
43169
  /** A company-wide read takes no positionals. */
43074
43170
  function noExtra$22(rest) {
43075
- if (rest.length > 0) throw new UsageError(USAGE$60);
43171
+ if (rest.length > 0) throw new UsageError(USAGE$63);
43076
43172
  }
43077
43173
  /** `settings`. */
43078
43174
  async function settings$1(path, rest) {
@@ -43085,8 +43181,8 @@ async function settings$1(path, rest) {
43085
43181
  /** `settings-set --password … --sftp-only …`. */
43086
43182
  async function settingsSet(context, path, rest) {
43087
43183
  noExtra$22(rest);
43088
- const passwordEnabled = onOff$5(context, "--password", USAGE$60);
43089
- const sftpOnly = onOff$5(context, "--sftp-only", USAGE$60);
43184
+ const passwordEnabled = onOff$5(context, "--password", USAGE$63);
43185
+ const sftpOnly = onOff$5(context, "--sftp-only", USAGE$63);
43090
43186
  return await confirmableWrite(context, [`Set password sign-in ${passwordEnabled ? "on" : "off"} and SFTP-only ${sftpOnly ? "on" : "off"}.`, " Logins keep their keys either way; this changes how a login may authenticate."].join("\\n"), async () => {
43091
43187
  return (await hostingAccessUpdate({
43092
43188
  path,
@@ -43111,7 +43207,7 @@ async function grant$1(context, path, rest) {
43111
43207
  noExtra$22(rest);
43112
43208
  const userUuid = context.flags.get("--user") ?? "";
43113
43209
  const accessUserUuid = context.flags.get("--access-user") ?? "";
43114
- if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$60}`);
43210
+ if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$63}`);
43115
43211
  return await confirmableWrite(context, `Grant user ${userUuid} the login ${accessUserUuid} on this environment.`, async () => {
43116
43212
  return (await hostingAccessGrantStore({
43117
43213
  path,
@@ -43126,7 +43222,7 @@ async function grant$1(context, path, rest) {
43126
43222
  /** `un-grant <grant-uuid>`. */
43127
43223
  async function unGrant(context, path, rest) {
43128
43224
  const [grantUuid, ...extra] = rest;
43129
- if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$60);
43225
+ if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$63);
43130
43226
  return await confirmableWrite(context, `Withdraw grant ${grantUuid}. The login stays; only this account's access to it ends.`, async () => {
43131
43227
  const query = { desiredGeneration: await environmentGeneration(path) };
43132
43228
  return (await hostingAccessGrantDestroy({
@@ -43141,7 +43237,7 @@ async function unGrant(context, path, rest) {
43141
43237
  /** `user-show <access-user-uuid>`. */
43142
43238
  async function userShow(path, rest) {
43143
43239
  const [accessUserUuid, ...extra] = rest;
43144
- if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$60);
43240
+ if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$63);
43145
43241
  return {
43146
43242
  kind: "user",
43147
43243
  user: (await hostingAccessShowUser({ path: {
@@ -43153,7 +43249,7 @@ async function userShow(path, rest) {
43153
43249
  /** `user-set <access-user-uuid> [--name] [--enabled] [--read-only]`. */
43154
43250
  async function userSet(context, path, rest) {
43155
43251
  const [accessUserUuid, ...extra] = rest;
43156
- if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$60);
43252
+ if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$63);
43157
43253
  const userPath = {
43158
43254
  ...path,
43159
43255
  accessUserUuid
@@ -43162,7 +43258,7 @@ async function userSet(context, path, rest) {
43162
43258
  const name = context.flags.get("--name")?.trim();
43163
43259
  const enabled = onOffFlag(context, "--enabled");
43164
43260
  const readOnly = onOffFlag(context, "--read-only");
43165
- if (name === void 0 && enabled === null && readOnly === null) throw new UsageError(`user-set needs --name, --enabled, --read-only or a combination.\\n\\n${USAGE$60}`);
43261
+ if (name === void 0 && enabled === null && readOnly === null) throw new UsageError(`user-set needs --name, --enabled, --read-only or a combination.\\n\\n${USAGE$63}`);
43166
43262
  const body = {
43167
43263
  desiredGeneration: await environmentGeneration(path),
43168
43264
  name: name === void 0 || name === "" ? current.name : name,
@@ -43312,43 +43408,43 @@ var ACCESS_METADATA = {
43312
43408
  var ACCESS_TOPICS = [
43313
43409
  {
43314
43410
  path: ["settings"],
43315
- usage: USAGE$60
43411
+ usage: USAGE$63
43316
43412
  },
43317
43413
  {
43318
43414
  path: ["settings-set"],
43319
- usage: USAGE$60
43415
+ usage: USAGE$63
43320
43416
  },
43321
43417
  {
43322
43418
  path: ["grants"],
43323
- usage: USAGE$60
43419
+ usage: USAGE$63
43324
43420
  },
43325
43421
  {
43326
43422
  path: ["grant"],
43327
- usage: USAGE$60
43423
+ usage: USAGE$63
43328
43424
  },
43329
43425
  {
43330
43426
  path: ["un-grant"],
43331
- usage: USAGE$60
43427
+ usage: USAGE$63
43332
43428
  },
43333
43429
  {
43334
43430
  path: ["user-show"],
43335
- usage: USAGE$60
43431
+ usage: USAGE$63
43336
43432
  },
43337
43433
  {
43338
43434
  path: ["user-set"],
43339
- usage: USAGE$60
43435
+ usage: USAGE$63
43340
43436
  },
43341
43437
  {
43342
43438
  path: ["received"],
43343
- usage: USAGE$60
43439
+ usage: USAGE$63
43344
43440
  },
43345
43441
  {
43346
43442
  path: ["key"],
43347
- usage: USAGE$61
43443
+ usage: USAGE$64
43348
43444
  },
43349
43445
  {
43350
43446
  path: ["password"],
43351
- usage: USAGE$61
43447
+ usage: USAGE$64
43352
43448
  }
43353
43449
  ];
43354
43450
  // src/commands/access.ts
@@ -43713,7 +43809,7 @@ function notAMember(unknown, eligible) {
43713
43809
  ].join("\n");
43714
43810
  }
43715
43811
  // src/commands/environment-storage-usage.ts
43716
- var USAGE$59 = [
43812
+ var USAGE$62 = [
43717
43813
  "Usage: hostingctl environment storage-usage <environment-uuid> --company <slug>",
43718
43814
  "",
43719
43815
  " storage-usage What each volume was allocated, what it has written and what is left, from the",
@@ -43732,7 +43828,7 @@ var USAGE$59 = [
43732
43828
  */
43733
43829
  async function environmentStorageUsage(context, rest) {
43734
43830
  const [uuid, ...extra] = rest;
43735
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$59);
43831
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$62);
43736
43832
  return (await hostingEnvironmentsStorageUsage({ path: {
43737
43833
  company: await requireCompany(context.flags),
43738
43834
  environmentUuid: uuid
@@ -44180,7 +44276,7 @@ var ADMIN_ACTIONS = /* @__PURE__ */ new Set([
44180
44276
  "recovery-cancel"
44181
44277
  ]);
44182
44278
  // src/commands/application-admin.ts
44183
- var USAGE$58 = [
44279
+ var USAGE$61 = [
44184
44280
  "Usage: hostingctl application administrator <environment-uuid> <application-uuid> --company <slug>",
44185
44281
  " hostingctl application administrator-reset|administrator-reveal <environment-uuid> <application-uuid> --company <slug>",
44186
44282
  " hostingctl application recovery-status|recovery-retry|recovery-cancel <environment-uuid> <application-uuid> <recovery-uuid> --company <slug>",
@@ -44207,7 +44303,7 @@ async function applicationAdmin(context, action, path, rest) {
44207
44303
  if (action === "administrator-reset") return await credential(context, path, rest, "reset");
44208
44304
  if (action === "administrator-reveal") return await credential(context, path, rest, "reveal");
44209
44305
  const [recoveryUuid, ...extra] = rest;
44210
- if (recoveryUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$58);
44306
+ if (recoveryUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$61);
44211
44307
  const recoveryPath = {
44212
44308
  ...path,
44213
44309
  recoveryUuid
@@ -44220,7 +44316,7 @@ async function applicationAdmin(context, action, path, rest) {
44220
44316
  return (await hostingApplicationRecoveryRetry({ path: recoveryPath })).data;
44221
44317
  }));
44222
44318
  if (action === "recovery-cancel") return await written$8(confirmableWrite(context, "Cancel this recovery. Writers are released and the application returns to its previous state.", async () => (await hostingApplicationRecoveryCancel({ path: recoveryPath })).data));
44223
- throw new UsageError(USAGE$58);
44319
+ throw new UsageError(USAGE$61);
44224
44320
  }
44225
44321
  /** `administrator-reset|reveal`: the one place the application's own password is printed. */
44226
44322
  async function credential(context, path, rest, kind) {
@@ -44241,7 +44337,7 @@ async function written$8(pending) {
44241
44337
  }
44242
44338
  /** No positional arguments, or a usage refusal. */
44243
44339
  function noExtra$21(rest) {
44244
- if (rest.length > 0) throw new UsageError(USAGE$58);
44340
+ if (rest.length > 0) throw new UsageError(USAGE$61);
44245
44341
  }
44246
44342
  /** One recovery as one line: what it is doing, how far, and what it holds. */
44247
44343
  function recoveryLines$1(one) {
@@ -44640,7 +44736,7 @@ async function requireSelectionBranch(company, selectionUuid, branch) {
44640
44736
  throw new UsageError(`Branch "${branch}" is not a branch of ${found.selection.owner}/${found.selection.name}. Its branches: ${offered.branches.join(", ")}.`);
44641
44737
  }
44642
44738
  // src/commands/application-builds.ts
44643
- var USAGE$57 = [
44739
+ var USAGE$60 = [
44644
44740
  "Usage: hostingctl application build <environment-uuid> <application-uuid> --company <slug> [--source <selection-uuid> | --source-upload <upload-uuid> | --ssh-source <connection-uuid>] [--idempotency-key <key>] [--wait [--timeout <seconds>]]",
44645
44741
  " hostingctl application build-log <environment-uuid> <application-uuid> <build-uuid> --company <slug>",
44646
44742
  " hostingctl application build-retry|build-cancel <environment-uuid> <application-uuid> <build-uuid> --company <slug>",
@@ -44670,7 +44766,7 @@ async function applicationBuilds(context, action, path, rest) {
44670
44766
  }
44671
44767
  if (action === "source-bind") return await bind$2(context, path, rest);
44672
44768
  const [buildUuid, ...extra] = rest;
44673
- if (buildUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$57);
44769
+ if (buildUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$60);
44674
44770
  const buildPath = {
44675
44771
  ...path,
44676
44772
  buildUuid
@@ -44685,7 +44781,7 @@ async function applicationBuilds(context, action, path, rest) {
44685
44781
  if (action === "build-cancel") return await written$7(confirmableWrite(context, "Stop this build. A running build stops where it is.", async () => {
44686
44782
  return (await hostingDeploymentCancel({ path: buildPath })).data;
44687
44783
  }));
44688
- throw new UsageError(USAGE$57);
44784
+ throw new UsageError(USAGE$60);
44689
44785
  }
44690
44786
  /**
44691
44787
  * `source-bind --selection … | --ssh-source … [--source-kind …] [--branch …] [--tag …] [--auto-deploy …]`.
@@ -44697,7 +44793,7 @@ async function bind$2(context, path, rest) {
44697
44793
  noExtra$20(rest);
44698
44794
  const repositorySelectionUuid = context.flags.get("--selection")?.trim() ?? "";
44699
44795
  const sshSourceUuid = context.flags.get("--ssh-source")?.trim() ?? "";
44700
- if (repositorySelectionUuid === "" === (sshSourceUuid === "")) throw new UsageError(`source-bind needs exactly one of --selection or --ssh-source.\n\n${USAGE$57}`);
44796
+ if (repositorySelectionUuid === "" === (sshSourceUuid === "")) throw new UsageError(`source-bind needs exactly one of --selection or --ssh-source.\n\n${USAGE$60}`);
44701
44797
  const sourceKind = sourceKindFlag(context, sshSourceUuid === "" ? "github" : "ssh");
44702
44798
  const branch = context.flags.get("--branch")?.trim();
44703
44799
  const tag = context.flags.get("--tag")?.trim();
@@ -44722,8 +44818,8 @@ async function bind$2(context, path, rest) {
44722
44818
  function sourceKindFlag(context, implied) {
44723
44819
  const value = context.flags.get("--source-kind")?.trim() ?? "";
44724
44820
  if (value === "") return implied;
44725
- if (value !== "github" && value !== "ssh") throw new UsageError(`--source-kind must be github or ssh (got "${value}").\n\n${USAGE$57}`);
44726
- if (value !== implied) throw new UsageError(`--source-kind ${value} does not match the ${implied} reference named.\n\n${USAGE$57}`);
44821
+ if (value !== "github" && value !== "ssh") throw new UsageError(`--source-kind must be github or ssh (got "${value}").\n\n${USAGE$60}`);
44822
+ if (value !== implied) throw new UsageError(`--source-kind ${value} does not match the ${implied} reference named.\n\n${USAGE$60}`);
44727
44823
  return value;
44728
44824
  }
44729
44825
  /** Tag one write's outcome with the group that produced it. */
@@ -44735,7 +44831,7 @@ async function written$7(pending) {
44735
44831
  }
44736
44832
  /** No positional arguments, or a usage refusal. */
44737
44833
  function noExtra$20(rest) {
44738
- if (rest.length > 0) throw new UsageError(USAGE$57);
44834
+ if (rest.length > 0) throw new UsageError(USAGE$60);
44739
44835
  }
44740
44836
  /**
44741
44837
  * `build <env> <workload> [--source …|--source-upload …|--ssh-source …] [--idempotency-key …]`: queue a build.
@@ -44862,7 +44958,7 @@ function overCurrent(current, named) {
44862
44958
  };
44863
44959
  }
44864
44960
  // src/commands/application-cache.ts
44865
- var USAGE$56 = [
44961
+ var USAGE$59 = [
44866
44962
  "Usage: hostingctl application cache <environment-uuid> <application-uuid> --company <slug>",
44867
44963
  " hostingctl application cache-set <environment-uuid> <application-uuid> --company <slug> [--enabled <on|off>] [--fresh <s>] [--background <s>] [--browser <s>] [--reset <on|off>] [--template <id> | --rules-file <rules.json>]",
44868
44964
  " hostingctl application cache-purge <environment-uuid> <application-uuid> --company <slug>",
@@ -44905,7 +45001,7 @@ async function applicationCache(context, action, path, rest) {
44905
45001
  }
44906
45002
  if (action === "canonical") {
44907
45003
  const routeUuid = context.flags.get("--route") ?? "";
44908
- if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$56}`);
45004
+ if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$59}`);
44909
45005
  return await written$6(confirmableWrite(context, `Make route ${routeUuid} this application's canonical address.`, async () => {
44910
45006
  const desiredGeneration = await generation$1(path);
44911
45007
  return (await hostingApplicationRouteSelectCanonical({
@@ -44917,7 +45013,7 @@ async function applicationCache(context, action, path, rest) {
44917
45013
  })).data;
44918
45014
  }));
44919
45015
  }
44920
- throw new UsageError(USAGE$56);
45016
+ throw new UsageError(USAGE$59);
44921
45017
  }
44922
45018
  /** `application routes|route-add|route-remove`, which are environment-scoped. */
44923
45019
  async function applicationRoutes(context, action, path, rest) {
@@ -44931,7 +45027,7 @@ async function applicationRoutes(context, action, path, rest) {
44931
45027
  if (action === "route-add") return await addRoute(context, path, rest);
44932
45028
  if (action === "route-remove") {
44933
45029
  const [routeUuid, ...extra] = rest;
44934
- if (routeUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$56);
45030
+ if (routeUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$59);
44935
45031
  return await written$6(confirmableWrite(context, `Remove route ${routeUuid}.`, async () => {
44936
45032
  const body = { desiredGeneration: await generation$1(path) };
44937
45033
  return (await hostingApplicationRouteRemove({
@@ -44943,7 +45039,7 @@ async function applicationRoutes(context, action, path, rest) {
44943
45039
  })).data;
44944
45040
  }));
44945
45041
  }
44946
- throw new UsageError(USAGE$56);
45042
+ throw new UsageError(USAGE$59);
44947
45043
  }
44948
45044
  /** `route-add --source … --target … --path …`. */
44949
45045
  async function addRoute(context, path, rest) {
@@ -44951,7 +45047,7 @@ async function addRoute(context, path, rest) {
44951
45047
  const sourceWorkloadUuid = context.flags.get("--source") ?? "";
44952
45048
  const targetWorkloadUuid = context.flags.get("--target") ?? "";
44953
45049
  const routePath = context.flags.get("--path") ?? "";
44954
- if (sourceWorkloadUuid === "" || targetWorkloadUuid === "" || routePath === "") throw new UsageError(`route-add needs --source, --target and --path.\n\n${USAGE$56}`);
45050
+ if (sourceWorkloadUuid === "" || targetWorkloadUuid === "" || routePath === "") throw new UsageError(`route-add needs --source, --target and --path.\n\n${USAGE$59}`);
44955
45051
  const domainUuid = context.flags.get("--domain")?.trim();
44956
45052
  const canonical = onOffFlag(context, "--canonical") ?? false;
44957
45053
  return await written$6(confirmableWrite(context, `Route ${routePath} from ${sourceWorkloadUuid} to ${targetWorkloadUuid}${canonical ? " as canonical" : ""}.`, async () => {
@@ -44984,11 +45080,11 @@ function cacheBody(context) {
44984
45080
  const raw = context.flags.get(flag)?.trim() ?? "";
44985
45081
  if (raw === "") continue;
44986
45082
  const value = Number(raw);
44987
- if (!Number.isInteger(value) || value < 0) throw new UsageError(`${flag} must be a whole number of seconds.\n\n${USAGE$56}`);
45083
+ if (!Number.isInteger(value) || value < 0) throw new UsageError(`${flag} must be a whole number of seconds.\n\n${USAGE$59}`);
44988
45084
  body[field] = value;
44989
45085
  }
44990
- addCacheRules(context, body, USAGE$56);
44991
- if (Object.keys(body).length === 0) throw new UsageError(`cache-set needs at least one field.\n\n${USAGE$56}`);
45086
+ addCacheRules(context, body, USAGE$59);
45087
+ if (Object.keys(body).length === 0) throw new UsageError(`cache-set needs at least one field.\n\n${USAGE$59}`);
44992
45088
  return body;
44993
45089
  }
44994
45090
  /** The environment's generation, which every write here must name. */
@@ -45004,7 +45100,7 @@ async function written$6(pending) {
45004
45100
  }
45005
45101
  /** No positional arguments, or a usage refusal. */
45006
45102
  function noExtra$19(rest) {
45007
- if (rest.length > 0) throw new UsageError(USAGE$56);
45103
+ if (rest.length > 0) throw new UsageError(USAGE$59);
45008
45104
  }
45009
45105
  /** The `application cache*|routes|route-*` renderer. */
45010
45106
  function applicationCacheText(report) {
@@ -45164,7 +45260,7 @@ function describeAuth(workloadUuid, auth) {
45164
45260
  ].join("\n");
45165
45261
  }
45166
45262
  // src/commands/application-create.ts
45167
- var USAGE$55 = [
45263
+ var USAGE$58 = [
45168
45264
  "Usage: hostingctl application create <environment-uuid> --company <slug> --type <type> --name <name>",
45169
45265
  " --cpu-request <millicores> --memory-request <MiB>",
45170
45266
  " [--cpu-limit <millicores>] [--memory-limit <MiB>] [--label <text>] [--hostname <host>]",
@@ -45201,11 +45297,11 @@ var CREATE_FLAGS = [{
45201
45297
  }];
45202
45298
  /** `application create <env> …`, from the `application` command. */
45203
45299
  async function applicationCreate(context, path, rest) {
45204
- if (rest.length > 0) throw new UsageError(USAGE$55);
45300
+ if (rest.length > 0) throw new UsageError(USAGE$58);
45205
45301
  const type = context.flags.get("--type")?.trim().toLowerCase() ?? "";
45206
- if (!TYPES.has(type)) throw new UsageError(`create needs --type wordpress, moodle, infisical, supabase-auth, supabase-rest or supabase-realtime.\n\n${USAGE$55}`);
45302
+ if (!TYPES.has(type)) throw new UsageError(`create needs --type wordpress, moodle, infisical, supabase-auth, supabase-rest or supabase-realtime.\n\n${USAGE$58}`);
45207
45303
  const name = context.flags.get("--name")?.trim() ?? "";
45208
- if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$55}`);
45304
+ if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$58}`);
45209
45305
  const resources = requestedResources(context);
45210
45306
  const label = context.flags.get("--label")?.trim() ?? "";
45211
45307
  const intendedHostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
@@ -45250,7 +45346,7 @@ function requestedResources(context) {
45250
45346
  /** One required whole-number flag, or a usage refusal naming the flag. */
45251
45347
  function required$7(context, flag) {
45252
45348
  const value = wholeNumberFlag(context.flags, flag);
45253
- if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$55}`);
45349
+ if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$58}`);
45254
45350
  return value;
45255
45351
  }
45256
45352
  // src/commands/application-import-fetch.ts
@@ -45317,7 +45413,7 @@ async function fetchImport(context, action, path, rest) {
45317
45413
  })).data);
45318
45414
  }
45319
45415
  // src/commands/application-upload.ts
45320
- var USAGE$54 = [
45416
+ var USAGE$57 = [
45321
45417
  "Usage: hostingctl application import-upload <environment-uuid> <application-uuid> --company <slug>",
45322
45418
  " --database <path-to.sql> --archive <path-to.zip|path-to.jpa> | --directory <dir>",
45323
45419
  "",
@@ -45346,12 +45442,12 @@ var STAGING_WAIT_MS = 9e5;
45346
45442
  /** How often the staged import is asked for its state while the queue works. */
45347
45443
  var STAGING_POLL_MS = 3e3;
45348
45444
  async function applicationUpload(context, path, rest) {
45349
- if (rest.length > 0) throw new UsageError(USAGE$54);
45445
+ if (rest.length > 0) throw new UsageError(USAGE$57);
45350
45446
  const database = context.flags.get("--database")?.trim() ?? "";
45351
45447
  const archive = context.flags.get("--archive")?.trim() ?? "";
45352
45448
  const directory = context.flags.get("--directory")?.trim() ?? "";
45353
- if (archive !== "" && directory !== "") throw new UsageError(`Send the site files as either --archive or --directory, not both.\n\n${USAGE$54}`);
45354
- if (database === "" && !isAkeebaArchive(archive)) throw new UsageError(`--database is required unless --archive is an Akeeba backup (.jpa or .jps), which carries the site's database inside the archive. If --archive is an Akeeba backup renamed .zip, rename it so its own database is used.\n\n${USAGE$54}`);
45449
+ if (archive !== "" && directory !== "") throw new UsageError(`Send the site files as either --archive or --directory, not both.\n\n${USAGE$57}`);
45450
+ if (database === "" && !isAkeebaArchive(archive)) throw new UsageError(`--database is required unless --archive is an Akeeba backup (.jpa or .jps), which carries the site's database inside the archive. If --archive is an Akeeba backup renamed .zip, rename it so its own database is used.\n\n${USAGE$57}`);
45355
45451
  const databaseBytes = database === "" ? 0 : await sizeOf(database, "database");
45356
45452
  const files = directory === "" ? [] : await manifestOf(directory);
45357
45453
  const fileBytes = directory === "" ? 0 : await totalSize(files);
@@ -45460,7 +45556,7 @@ function describe$2(bytes) {
45460
45556
  return `${(bytes / 1048576).toFixed(1)} MiB`;
45461
45557
  }
45462
45558
  // src/commands/application-import.ts
45463
- var USAGE$53 = [
45559
+ var USAGE$56 = [
45464
45560
  "Usage: hostingctl application import <environment-uuid> <application-uuid> <import-uuid> --company <slug>",
45465
45561
  " hostingctl application import-upload <environment-uuid> <application-uuid> --company <slug>",
45466
45562
  " --database <path-to.sql> [--archive <path-to.zip> | --directory <dir>]",
@@ -45486,7 +45582,7 @@ async function applicationImport(context, action, path, rest) {
45486
45582
  outcome: await fetchImport(context, action, path, rest)
45487
45583
  };
45488
45584
  const [importUuid, ...extra] = rest;
45489
- if (importUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$53);
45585
+ if (importUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$56);
45490
45586
  if (action === "import") return {
45491
45587
  kind: "import",
45492
45588
  staged: (await hostingWordpressImportShowImport({ path: {
@@ -45499,13 +45595,13 @@ async function applicationImport(context, action, path, rest) {
45499
45595
  importUuid
45500
45596
  } })).data));
45501
45597
  if (action === "url-repair-confirm") return await confirmRepair(context, path, importUuid);
45502
- throw new UsageError(USAGE$53);
45598
+ throw new UsageError(USAGE$56);
45503
45599
  }
45504
45600
  /** `url-repair-preview --source-url …`: the review a confirmation is made against. */
45505
45601
  async function previewRepair(context, path, rest) {
45506
- if (rest.length > 0) throw new UsageError(USAGE$53);
45602
+ if (rest.length > 0) throw new UsageError(USAGE$56);
45507
45603
  const sourceUrl = context.flags.get("--source-url")?.trim() ?? "";
45508
- if (sourceUrl === "") throw new UsageError(`url-repair-preview needs --source-url.\n\n${USAGE$53}`);
45604
+ if (sourceUrl === "") throw new UsageError(`url-repair-preview needs --source-url.\n\n${USAGE$56}`);
45509
45605
  return {
45510
45606
  kind: "url-repair",
45511
45607
  recovery: (await hostingWordpressUrlRepairPreview({
@@ -45517,7 +45613,7 @@ async function previewRepair(context, path, rest) {
45517
45613
  /** `url-repair-confirm <recovery> --confirmation …`: the typed text the review asked for. */
45518
45614
  async function confirmRepair(context, path, recoveryUuid) {
45519
45615
  const confirmation = context.flags.get("--confirmation")?.trim() ?? "";
45520
- if (confirmation === "") throw new UsageError(`url-repair-confirm needs --confirmation.\n\n${USAGE$53}`);
45616
+ if (confirmation === "") throw new UsageError(`url-repair-confirm needs --confirmation.\n\n${USAGE$56}`);
45521
45617
  return await written$5(confirmableWrite(context, `Confirm the URL repair by typing its confirmation ("${confirmation}").`, async () => {
45522
45618
  const desiredGeneration = (await hostingEnvironmentShow({ path })).data.desiredGeneration;
45523
45619
  const body = {
@@ -45661,7 +45757,7 @@ function recoveryWaitText(report) {
45661
45757
  return `Recovery ${report.recovery.uuid} ${report.recovery.statusName}: ${report.recovery.actionName} of ${report.recovery.workloadName} is done.`;
45662
45758
  }
45663
45759
  // src/commands/application-recovery.ts
45664
- var USAGE$52 = [
45760
+ var USAGE$55 = [
45665
45761
  "Usage: hostingctl application recovery-review <environment-uuid> <application-uuid> --company <slug> [--import <uuid>]",
45666
45762
  " hostingctl application recovery-confirm <environment-uuid> <application-uuid> --company <slug> --confirmation <text> [--import <uuid>] [--wait [--timeout <seconds>]]",
45667
45763
  "",
@@ -45681,9 +45777,9 @@ var USAGE$52 = [
45681
45777
  ].join("\n");
45682
45778
  /** `application recovery-review|recovery-confirm`. */
45683
45779
  async function applicationRecovery(context, action, path, rest) {
45684
- if (rest.length > 0) throw new UsageError(USAGE$52);
45780
+ if (rest.length > 0) throw new UsageError(USAGE$55);
45685
45781
  const importUuid = context.flags.get("--import")?.trim();
45686
- if (importUuid === "") throw new UsageError(`--import needs the staged import's id.\n\n${USAGE$52}`);
45782
+ if (importUuid === "") throw new UsageError(`--import needs the staged import's id.\n\n${USAGE$55}`);
45687
45783
  const review = (await hostingApplicationRecoveryShow({
45688
45784
  path,
45689
45785
  ...importUuid === void 0 ? {} : { query: { importUuid } }
@@ -45692,10 +45788,10 @@ async function applicationRecovery(context, action, path, rest) {
45692
45788
  kind: "recovery-review",
45693
45789
  review
45694
45790
  };
45695
- if (action !== "recovery-confirm") throw new UsageError(USAGE$52);
45791
+ if (action !== "recovery-confirm") throw new UsageError(USAGE$55);
45696
45792
  if (review.blockedReason !== null) throw new UsageError(`This restore is blocked: ${review.blockedReason}`);
45697
45793
  const confirmation = context.flags.get("--confirmation")?.trim() ?? "";
45698
- if (confirmation === "") throw new UsageError(`recovery-confirm needs --confirmation.\n\n${USAGE$52}`);
45794
+ if (confirmation === "") throw new UsageError(`recovery-confirm needs --confirmation.\n\n${USAGE$55}`);
45699
45795
  const wait = context.flags.has("--wait");
45700
45796
  const deadline = wait ? commandDeadline(context.flags) : 0;
45701
45797
  const outcome = await confirmableWrite(context, `Confirm ${review.actionName} of ${review.name}${review.installedVersion === null ? "" : ` from ${review.installedVersion}`}: ${String(review.routeUuids.length)} route(s) and ${String(review.hosts.length)} host(s) are rewritten.`, async () => {
@@ -45897,13 +45993,13 @@ function siteAccessText(report) {
45897
45993
  return report.assignments.length === 0 ? "Nobody has been invited to sign in." : report.assignments.map(assignmentLine).join("\n");
45898
45994
  }
45899
45995
  // src/commands/application-site-access.ts
45900
- var USAGE$51 = [
45996
+ var USAGE$54 = [
45901
45997
  "Usage: hostingctl application site-access <environment-uuid> <application-uuid> --company <slug>",
45902
45998
  " hostingctl application site-access-set <environment-uuid> <application-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
45903
45999
  " hostingctl application site-access-rotate <environment-uuid> <application-uuid> --company <slug>",
45904
46000
  " hostingctl application site-users <environment-uuid> <application-uuid> --company <slug>",
45905
- " hostingctl application site-user invite <environment-uuid> <application-uuid> --company <slug> --email <address>",
45906
- " hostingctl application site-user <resend|refresh|remove> <environment-uuid> <application-uuid> <assignment-uuid> --company <slug>",
46001
+ " hostingctl application site-user <environment-uuid> <application-uuid> invite --company <slug> --email <address>",
46002
+ " hostingctl application site-user <environment-uuid> <application-uuid> <resend|refresh|remove> <assignment-uuid> --company <slug>",
45907
46003
  "",
45908
46004
  "The same reads and writes as `environment site-access`, narrowed to one application, so both are rendered by",
45909
46005
  "one owner. Every write needs --confirm; --dry-run describes the change without sending it."
@@ -45940,14 +46036,14 @@ var flow$1 = siteAccessFlow({
45940
46036
  refresh: async (path) => (await hostingApplicationSiteAccessUsersRefresh({ path })).data,
45941
46037
  destroy: async (path) => (await hostingApplicationSiteAccessUsersDestroy({ path })).data,
45942
46038
  rotate: async (path) => (await hostingApplicationSiteAccessRotate({ path })).data
45943
- }, USAGE$51);
46039
+ }, USAGE$54);
45944
46040
  /** `application site-access*|site-user*`, which the application dispatcher calls with its resolved path. */
45945
46041
  async function applicationSiteAccess(context, action, path, rest) {
45946
- if (rest.some((one) => one === "")) throw new UsageError(USAGE$51);
46042
+ if (rest.some((one) => one === "")) throw new UsageError(USAGE$54);
45947
46043
  return await flow$1(context, action, path, rest);
45948
46044
  }
45949
46045
  // src/commands/application-source-ssh.ts
45950
- var USAGE$50 = [
46046
+ var USAGE$53 = [
45951
46047
  "Usage: hostingctl application source-ssh-list --company <slug>",
45952
46048
  " hostingctl application source-ssh-show <connection-uuid> --company <slug>",
45953
46049
  " hostingctl application source-ssh-create --company <slug> --name <label> --repo <url> --ref <name> [--ref-kind branch|tag]",
@@ -45999,7 +46095,7 @@ async function applicationSshSources(context, action, company, rest) {
45999
46095
  }
46000
46096
  if (action === "source-ssh-create") return await create$5(context, company, rest);
46001
46097
  const [connectionUuid, ...extra] = rest;
46002
- if (connectionUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$50);
46098
+ if (connectionUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$53);
46003
46099
  const path = {
46004
46100
  company,
46005
46101
  connectionUuid
@@ -46021,7 +46117,7 @@ async function applicationSshSources(context, action, company, rest) {
46021
46117
  "to be installed on the Git server before access can be proved again."
46022
46118
  ].join("\n"), async () => (await hostingSshSourcesRotateKey({ path })).data));
46023
46119
  if (action === "source-ssh-revoke") return await written$4(confirmableWrite(context, [`Retire the SSH source ${connectionUuid}.`, "The source stops fetching and cannot promote a pending candidate; a release already serving is unchanged."].join("\n"), async () => (await hostingSshSourcesRevoke({ path })).data));
46024
- throw new UsageError(USAGE$50);
46120
+ throw new UsageError(USAGE$53);
46025
46121
  }
46026
46122
  /** `source-ssh-create --name … --repo … --ref … [--ref-kind …]`: one repository and the ref it reads. */
46027
46123
  async function create$5(context, company, rest) {
@@ -46051,7 +46147,7 @@ async function update$5(context, path) {
46051
46147
  const name = optionalFlag(context, "--name");
46052
46148
  const ref = optionalFlag(context, "--ref");
46053
46149
  const refKind = refKindFlag(context);
46054
- if (name === null && ref === null && refKind === null) throw new UsageError(`source-ssh-update needs --name, --ref or --ref-kind.\n\n${USAGE$50}`);
46150
+ if (name === null && ref === null && refKind === null) throw new UsageError(`source-ssh-update needs --name, --ref or --ref-kind.\n\n${USAGE$53}`);
46055
46151
  const described = [name === null ? "" : `label ${name}`, ref === null ? "" : `ref ${ref}`].filter((one) => one !== "").join(", ");
46056
46152
  return await written$4(confirmableWrite(context, [
46057
46153
  `Edit the SSH source ${path.connectionUuid}${described === "" ? "" : `: ${described}`}.`,
@@ -46083,7 +46179,7 @@ async function confirmHostKey(context, path) {
46083
46179
  /** A required flag's value, or a refusal naming the flag. */
46084
46180
  function required$6(context, flag) {
46085
46181
  const value = context.flags.get(flag)?.trim() ?? "";
46086
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$50}`);
46182
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$53}`);
46087
46183
  return value;
46088
46184
  }
46089
46185
  /** An optional flag's value, or null when it was not given. */
@@ -46096,7 +46192,7 @@ function refKindFlag(context) {
46096
46192
  const value = context.flags.get("--ref-kind")?.trim() ?? "";
46097
46193
  if (value === "") return null;
46098
46194
  if (value === "branch" || value === "tag") return value;
46099
- throw new UsageError(`--ref-kind must be branch or tag (got "${value}").\n\n${USAGE$50}`);
46195
+ throw new UsageError(`--ref-kind must be branch or tag (got "${value}").\n\n${USAGE$53}`);
46100
46196
  }
46101
46197
  /** Tag one write's outcome with the group that produced it. */
46102
46198
  async function written$4(pending) {
@@ -46107,10 +46203,10 @@ async function written$4(pending) {
46107
46203
  }
46108
46204
  /** No positional arguments, or a usage refusal. */
46109
46205
  function noExtra$17(rest) {
46110
- if (rest.length > 0) throw new UsageError(USAGE$50);
46206
+ if (rest.length > 0) throw new UsageError(USAGE$53);
46111
46207
  }
46112
46208
  // src/commands/application-source-upload.ts
46113
- var USAGE$49 = [
46209
+ var USAGE$52 = [
46114
46210
  "Usage: hostingctl application source-upload <environment-uuid> <application-uuid> --company <slug> --file <path-to.zip>",
46115
46211
  " hostingctl application source-uploads <environment-uuid> <application-uuid> --company <slug>",
46116
46212
  " hostingctl application source-upload-show <environment-uuid> <application-uuid> <upload-uuid> --company <slug>",
@@ -46149,7 +46245,7 @@ async function applicationSourceUploads(context, action, path, rest) {
46149
46245
  };
46150
46246
  }
46151
46247
  const [uploadUuid, ...extra] = rest;
46152
- if (uploadUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$49);
46248
+ if (uploadUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$52);
46153
46249
  const uploadPath = {
46154
46250
  ...path,
46155
46251
  uploadUuid
@@ -46161,7 +46257,7 @@ async function applicationSourceUploads(context, action, path, rest) {
46161
46257
  if (action === "source-upload-discard") return await written$3(confirmableWrite(context, [`Discard the staged source upload ${uploadUuid}.`, "A build that already used it keeps the copy it was handed, so nothing that is serving changes."].join("\n"), async () => {
46162
46258
  await hostingSourceUploadsDestroy({ path: uploadPath });
46163
46259
  }));
46164
- throw new UsageError(USAGE$49);
46260
+ throw new UsageError(USAGE$52);
46165
46261
  }
46166
46262
  /**
46167
46263
  * `source-upload --file …`: stage one ZIP as the application's source.
@@ -46173,7 +46269,7 @@ async function applicationSourceUploads(context, action, path, rest) {
46173
46269
  async function store(context, path, rest) {
46174
46270
  noExtra$16(rest);
46175
46271
  const file = context.flags.get("--file")?.trim() ?? "";
46176
- if (file === "") throw new UsageError(`source-upload needs --file.\n\n${USAGE$49}`);
46272
+ if (file === "") throw new UsageError(`source-upload needs --file.\n\n${USAGE$52}`);
46177
46273
  return await written$3(confirmableWrite(context, [
46178
46274
  `Upload ${file} as the staged source for application ${path.workloadUuid}.`,
46179
46275
  "The platform normalizes the archive, measures it and reviews it; installing dependencies and changing anything",
@@ -46213,7 +46309,7 @@ async function written$3(pending) {
46213
46309
  }
46214
46310
  /** No positional arguments, or a usage refusal. */
46215
46311
  function noExtra$16(rest) {
46216
- if (rest.length > 0) throw new UsageError(USAGE$49);
46312
+ if (rest.length > 0) throw new UsageError(USAGE$52);
46217
46313
  }
46218
46314
  /** One staged upload: what the platform measured, what the review found, and when staging expires. */
46219
46315
  function uploadLines(upload) {
@@ -46340,51 +46436,51 @@ var SOURCE_SUBCOMMANDS = [
46340
46436
  var SOURCE_TOPICS = [
46341
46437
  {
46342
46438
  path: ["source-upload"],
46343
- usage: USAGE$49
46439
+ usage: USAGE$52
46344
46440
  },
46345
46441
  {
46346
46442
  path: ["source-uploads"],
46347
- usage: USAGE$49
46443
+ usage: USAGE$52
46348
46444
  },
46349
46445
  {
46350
46446
  path: ["source-upload-show"],
46351
- usage: USAGE$49
46447
+ usage: USAGE$52
46352
46448
  },
46353
46449
  {
46354
46450
  path: ["source-upload-discard"],
46355
- usage: USAGE$49
46451
+ usage: USAGE$52
46356
46452
  },
46357
46453
  {
46358
46454
  path: ["source-ssh-list"],
46359
- usage: USAGE$50
46455
+ usage: USAGE$53
46360
46456
  },
46361
46457
  {
46362
46458
  path: ["source-ssh-show"],
46363
- usage: USAGE$50
46459
+ usage: USAGE$53
46364
46460
  },
46365
46461
  {
46366
46462
  path: ["source-ssh-create"],
46367
- usage: USAGE$50
46463
+ usage: USAGE$53
46368
46464
  },
46369
46465
  {
46370
46466
  path: ["source-ssh-update"],
46371
- usage: USAGE$50
46467
+ usage: USAGE$53
46372
46468
  },
46373
46469
  {
46374
46470
  path: ["source-ssh-confirm-host-key"],
46375
- usage: USAGE$50
46471
+ usage: USAGE$53
46376
46472
  },
46377
46473
  {
46378
46474
  path: ["source-ssh-verify"],
46379
- usage: USAGE$50
46475
+ usage: USAGE$53
46380
46476
  },
46381
46477
  {
46382
46478
  path: ["source-ssh-rotate-key"],
46383
- usage: USAGE$50
46479
+ usage: USAGE$53
46384
46480
  },
46385
46481
  {
46386
46482
  path: ["source-ssh-revoke"],
46387
- usage: USAGE$50
46483
+ usage: USAGE$53
46388
46484
  }
46389
46485
  ];
46390
46486
  // src/commands/application-speed.ts
@@ -46414,7 +46510,7 @@ function applicationSpeedText(check) {
46414
46510
  * paused. It starts no build and promotes nothing. The pause is the customer's own control: while it holds, a push to
46415
46511
  * the bound ref is read and matched but builds nothing, and the release that is serving is untouched either way.
46416
46512
  */
46417
- var USAGE$48 = [
46513
+ var USAGE$51 = [
46418
46514
  "Usage: hostingctl application updates <environment-uuid> <application-uuid> --company <slug>",
46419
46515
  " hostingctl application updates-pause <environment-uuid> <application-uuid> --company <slug>",
46420
46516
  " hostingctl application updates-resume <environment-uuid> <application-uuid> --company <slug>",
@@ -46427,7 +46523,7 @@ var USAGE$48 = [
46427
46523
  "Both writes need --confirm; --dry-run describes the change without sending it."
46428
46524
  ].join("\n");
46429
46525
  async function applicationUpdates(context, action, path, rest) {
46430
- if (rest.length > 0) throw new UsageError(USAGE$48);
46526
+ if (rest.length > 0) throw new UsageError(USAGE$51);
46431
46527
  if (action === "updates") return {
46432
46528
  kind: "updates",
46433
46529
  surface: (await hostingApplicationUpdatesShow({ path })).data
@@ -46439,7 +46535,7 @@ async function applicationUpdates(context, action, path, rest) {
46439
46535
  outcome: await confirmableWrite(context, pausing ? `Pause updates for application ${path.workloadUuid}: a push to its bound ref stops building it, and the release that is serving is unchanged.` : `Resume updates for application ${path.workloadUuid}: it may be a candidate again. Nothing is deployed by resuming.`, async () => pausing ? (await hostingApplicationUpdatesPause({ path })).data : (await hostingApplicationUpdatesResume({ path })).data)
46440
46536
  };
46441
46537
  }
46442
- throw new UsageError(USAGE$48);
46538
+ throw new UsageError(USAGE$51);
46443
46539
  }
46444
46540
  /**
46445
46541
  * The update state in words.
@@ -46691,64 +46787,64 @@ var APPLICATION_TOPICS = [
46691
46787
  },
46692
46788
  {
46693
46789
  path: ["create"],
46694
- usage: USAGE$55
46790
+ usage: USAGE$58
46695
46791
  },
46696
46792
  {
46697
46793
  path: ["build-log"],
46698
- usage: USAGE$57
46794
+ usage: USAGE$60
46699
46795
  },
46700
46796
  {
46701
46797
  path: ["build-retry"],
46702
- usage: USAGE$57
46798
+ usage: USAGE$60
46703
46799
  },
46704
46800
  {
46705
46801
  path: ["build-cancel"],
46706
- usage: USAGE$57
46802
+ usage: USAGE$60
46707
46803
  },
46708
46804
  {
46709
46805
  path: ["source-bind"],
46710
- usage: USAGE$57
46806
+ usage: USAGE$60
46711
46807
  },
46712
46808
  {
46713
46809
  path: ["source-unbind"],
46714
- usage: USAGE$57
46810
+ usage: USAGE$60
46715
46811
  },
46716
46812
  ...SOURCE_TOPICS,
46717
46813
  {
46718
46814
  path: ["cache"],
46719
- usage: USAGE$56
46815
+ usage: USAGE$59
46720
46816
  },
46721
46817
  {
46722
46818
  path: ["cache-set"],
46723
- usage: USAGE$56
46819
+ usage: USAGE$59
46724
46820
  },
46725
46821
  {
46726
46822
  path: ["cache-purge"],
46727
- usage: USAGE$56
46823
+ usage: USAGE$59
46728
46824
  },
46729
46825
  {
46730
46826
  path: ["routes"],
46731
- usage: USAGE$56
46827
+ usage: USAGE$59
46732
46828
  },
46733
46829
  {
46734
46830
  path: ["route-add"],
46735
- usage: USAGE$56
46831
+ usage: USAGE$59
46736
46832
  },
46737
46833
  {
46738
46834
  path: ["route-remove"],
46739
- usage: USAGE$56
46835
+ usage: USAGE$59
46740
46836
  },
46741
46837
  {
46742
46838
  path: ["canonical"],
46743
- usage: USAGE$56
46839
+ usage: USAGE$59
46744
46840
  },
46745
46841
  {
46746
46842
  path: ["import"],
46747
- usage: USAGE$53
46843
+ usage: USAGE$56
46748
46844
  },
46749
46845
  {
46750
46846
  path: ["import-upload"],
46751
- usage: USAGE$54
46847
+ usage: USAGE$57
46752
46848
  },
46753
46849
  ...[
46754
46850
  "import-discard",
@@ -46756,16 +46852,16 @@ var APPLICATION_TOPICS = [
46756
46852
  "url-repair-confirm"
46757
46853
  ].map((one) => ({
46758
46854
  path: [one],
46759
- usage: USAGE$53
46855
+ usage: USAGE$56
46760
46856
  })),
46761
46857
  ...FETCH_TOPICS,
46762
46858
  {
46763
46859
  path: ["recovery-review"],
46764
- usage: USAGE$52
46860
+ usage: USAGE$55
46765
46861
  },
46766
46862
  {
46767
46863
  path: ["recovery-confirm"],
46768
- usage: USAGE$52
46864
+ usage: USAGE$55
46769
46865
  },
46770
46866
  {
46771
46867
  path: ["runtime"],
@@ -46777,59 +46873,59 @@ var APPLICATION_TOPICS = [
46777
46873
  },
46778
46874
  {
46779
46875
  path: ["site-access"],
46780
- usage: USAGE$51
46876
+ usage: USAGE$54
46781
46877
  },
46782
46878
  {
46783
46879
  path: ["site-access-set"],
46784
- usage: USAGE$51
46880
+ usage: USAGE$54
46785
46881
  },
46786
46882
  {
46787
46883
  path: ["site-access-rotate"],
46788
- usage: USAGE$51
46884
+ usage: USAGE$54
46789
46885
  },
46790
46886
  {
46791
46887
  path: ["site-users"],
46792
- usage: USAGE$51
46888
+ usage: USAGE$54
46793
46889
  },
46794
46890
  {
46795
46891
  path: ["site-user"],
46796
- usage: USAGE$51
46892
+ usage: USAGE$54
46797
46893
  },
46798
46894
  {
46799
46895
  path: ["updates"],
46800
- usage: USAGE$48
46896
+ usage: USAGE$51
46801
46897
  },
46802
46898
  {
46803
46899
  path: ["updates-pause"],
46804
- usage: USAGE$48
46900
+ usage: USAGE$51
46805
46901
  },
46806
46902
  {
46807
46903
  path: ["updates-resume"],
46808
- usage: USAGE$48
46904
+ usage: USAGE$51
46809
46905
  },
46810
46906
  {
46811
46907
  path: ["administrator"],
46812
- usage: USAGE$58
46908
+ usage: USAGE$61
46813
46909
  },
46814
46910
  {
46815
46911
  path: ["administrator-reset"],
46816
- usage: USAGE$58
46912
+ usage: USAGE$61
46817
46913
  },
46818
46914
  {
46819
46915
  path: ["administrator-reveal"],
46820
- usage: USAGE$58
46916
+ usage: USAGE$61
46821
46917
  },
46822
46918
  {
46823
46919
  path: ["recovery-status"],
46824
- usage: USAGE$58
46920
+ usage: USAGE$61
46825
46921
  },
46826
46922
  {
46827
46923
  path: ["recovery-retry"],
46828
- usage: USAGE$58
46924
+ usage: USAGE$61
46829
46925
  },
46830
46926
  {
46831
46927
  path: ["recovery-cancel"],
46832
- usage: USAGE$58
46928
+ usage: USAGE$61
46833
46929
  }
46834
46930
  ];
46835
46931
  // src/commands/application-lifecycle.ts
@@ -59368,6 +59464,14 @@ object({
59368
59464
  declarations: array(hostingConsumerDeclarationDataSchema),
59369
59465
  refusals: array(hostingConsumerDeclarationRefusalDataSchema)
59370
59466
  });
59467
+ object({
59468
+ version: int(),
59469
+ appliedVersion: int(),
59470
+ pending: boolean(),
59471
+ canRotate: boolean(),
59472
+ canRetry: boolean(),
59473
+ message: string()
59474
+ });
59371
59475
  var hostingDataHandoverEnumSchema = _enum(["test_copy_is_current", "refreshed_from_source"]).describe("How the client says a tested copy relates to the site it was copied from, when it is made live (Plan 146). Going live is a configuration and traffic change, never a fresh restore over newer data, so the platform cannot know whether the original took orders, comments or sign-ups while the copy was tested. The client states it.\n| |\n|---|\n| `test_copy_is_current` <br/> The test copy holds everything that should go live; nothing the original took since the copy is needed. |\n| `refreshed_from_source` <br/> The original was restored into this test environment again, after writes stopped, just before going live. |");
59372
59476
  object({
59373
59477
  databaseUuid: string(),
@@ -60225,6 +60329,23 @@ object({
60225
60329
  checkedAt: string().nullable(),
60226
60330
  message: string().nullable()
60227
60331
  });
60332
+ var hostingStorageRotationPhaseEnumSchema = _enum([
60333
+ "preparing",
60334
+ "waiting_for_uploads",
60335
+ "rewriting",
60336
+ "verifying",
60337
+ "retaining",
60338
+ "completed",
60339
+ "failed"
60340
+ ]);
60341
+ object({
60342
+ uuid: string().nullable(),
60343
+ phase: union([hostingStorageRotationPhaseEnumSchema, _null()]),
60344
+ pending: boolean(),
60345
+ canRotate: boolean(),
60346
+ canRetry: boolean(),
60347
+ message: string()
60348
+ });
60228
60349
  var hostingFileImportConflictDataSchema = object({
60229
60350
  message: string(),
60230
60351
  runningImport: string(),
@@ -61687,15 +61808,6 @@ var hostingStorageQuoteDataSchema = object({
61687
61808
  reviewToken: string().describe("The confirmation token a purchase or increase must send back. Every answer a client can act on is signed;\nonly the internal pre-sign construction behind it carries an empty string."),
61688
61809
  contentFormat: string().describe("How the purchased bucket's bytes will be represented: `native` or `rclone_crypt`. It is part of the priced decision because it is part of what is bought, and it is defaulted so a quote issued\nbefore the format existed still reads as the native product it was.")
61689
61810
  });
61690
- var hostingStorageRotationPhaseEnumSchema = _enum([
61691
- "preparing",
61692
- "waiting_for_uploads",
61693
- "rewriting",
61694
- "verifying",
61695
- "retaining",
61696
- "completed",
61697
- "failed"
61698
- ]);
61699
61811
  object({ rotation: union([object({
61700
61812
  uuid: string(),
61701
61813
  phase: hostingStorageRotationPhaseEnumSchema,
@@ -67135,6 +67247,25 @@ object({
67135
67247
  company: string(),
67136
67248
  environmentUuid: string()
67137
67249
  });
67250
+ union([
67251
+ object({ message: string().describe("Error overview.") }),
67252
+ object({ message: string().describe("Error overview.") }),
67253
+ messageDataSchema,
67254
+ validationErrorDataSchema
67255
+ ]);
67256
+ object({
67257
+ company: string(),
67258
+ environmentUuid: string()
67259
+ });
67260
+ union([
67261
+ object({ message: string().describe("Error overview.") }),
67262
+ object({ message: string().describe("Error overview.") }),
67263
+ messageDataSchema
67264
+ ]);
67265
+ object({
67266
+ company: string(),
67267
+ environmentUuid: string()
67268
+ });
67138
67269
  var hostingFileImportsStoreStatus200Schema = hostingFileImportPreviewDataSchema;
67139
67270
  var hostingFileImportsStoreStatus201Schema = hostingFileImportDataSchema;
67140
67271
  var hostingFileImportsStoreStatus401Schema = object({ message: string().describe("Error overview.") });
@@ -67513,6 +67644,27 @@ object({
67513
67644
  cursor: string().max(512).nullish(),
67514
67645
  company: string().max(64).nullish().describe("Read only by the platform read, which can be asked for one company or for every company. The\ncompany-scoped read takes its company from the route and ignores this one entirely.")
67515
67646
  });
67647
+ union([
67648
+ object({ message: string().describe("Error overview.") }),
67649
+ object({ message: string().describe("Error overview.") }),
67650
+ messageDataSchema
67651
+ ]);
67652
+ object({
67653
+ company: string(),
67654
+ environmentUuid: string(),
67655
+ workloadUuid: string()
67656
+ });
67657
+ union([
67658
+ object({ message: string().describe("Error overview.") }),
67659
+ object({ message: string().describe("Error overview.") }),
67660
+ messageDataSchema,
67661
+ validationErrorDataSchema
67662
+ ]);
67663
+ object({
67664
+ company: string(),
67665
+ environmentUuid: string(),
67666
+ workloadUuid: string()
67667
+ });
67516
67668
  union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
67517
67669
  object({ company: string() });
67518
67670
  union([
@@ -68728,6 +68880,25 @@ object({
68728
68880
  company: string(),
68729
68881
  environmentUuid: string()
68730
68882
  });
68883
+ union([
68884
+ object({ message: string().describe("Error overview.") }),
68885
+ object({ message: string().describe("Error overview.") }),
68886
+ messageDataSchema
68887
+ ]);
68888
+ object({
68889
+ company: string(),
68890
+ environmentUuid: string()
68891
+ });
68892
+ union([
68893
+ object({ message: string().describe("Error overview.") }),
68894
+ object({ message: string().describe("Error overview.") }),
68895
+ messageDataSchema,
68896
+ validationErrorDataSchema
68897
+ ]);
68898
+ object({
68899
+ company: string(),
68900
+ environmentUuid: string()
68901
+ });
68731
68902
  union([
68732
68903
  object({ message: string().describe("Error overview.") }),
68733
68904
  object({ message: string().describe("Error overview.") }),
@@ -71918,7 +72089,7 @@ function episode(rest) {
71918
72089
  };
71919
72090
  }
71920
72091
  // src/commands/company-assets.ts
71921
- var USAGE$47 = [
72092
+ var USAGE$50 = [
71922
72093
  "Usage: hostingctl company logo|favicon set --image-file <path> --company <slug>",
71923
72094
  " hostingctl company logo|favicon remove --company <slug>",
71924
72095
  "",
@@ -71933,17 +72104,17 @@ var USAGE$47 = [
71933
72104
  */
71934
72105
  async function companyAssets(context, asset, rest) {
71935
72106
  const [action, ...tail] = rest;
71936
- if (tail.length > 0) throw new UsageError(USAGE$47);
72107
+ if (tail.length > 0) throw new UsageError(USAGE$50);
71937
72108
  const company = await requireCompany(context.flags);
71938
72109
  if (action === "set") return await set$2(context, asset, company);
71939
72110
  if (action === "remove") return await remove$4(context, asset, company);
71940
- throw new UsageError(USAGE$47);
72111
+ throw new UsageError(USAGE$50);
71941
72112
  }
71942
72113
  /** `set --image-file …`: one multipart upload of the asset. */
71943
72114
  async function set$2(context, asset, company) {
71944
72115
  const file = context.flags.get("--image-file") ?? "";
71945
72116
  return await confirmableWrite(context, file === "" ? `Set ${company}'s ${asset}.` : `Set ${company}'s ${asset} to ${file}.`, async () => {
71946
- const body = await imageUpload(file, USAGE$47);
72117
+ const body = await imageUpload(file, USAGE$50);
71947
72118
  return asset === "logo" ? (await companyAssetStoreLogo({
71948
72119
  path: { company },
71949
72120
  body
@@ -71979,7 +72150,7 @@ function companyRole(raw, usage) {
71979
72150
  return named;
71980
72151
  }
71981
72152
  // src/commands/company-invitations.ts
71982
- var USAGE$46 = [
72153
+ var USAGE$49 = [
71983
72154
  "Usage: hostingctl company invitations --company <slug>",
71984
72155
  " hostingctl company invite --company <slug> --email <email> --name <name> --role <admin|member>",
71985
72156
  " hostingctl company cancel-invitation <invitation-uuid> --company <slug>",
@@ -72003,7 +72174,7 @@ var MAX_INVITATION_TOKEN_BYTES = 4096;
72003
72174
  */
72004
72175
  async function companyInvitations(context, subcommand, rest) {
72005
72176
  if (subcommand === "invitations") {
72006
- if (rest.length > 0) throw new UsageError(USAGE$46);
72177
+ if (rest.length > 0) throw new UsageError(USAGE$49);
72007
72178
  const company = await requireCompany(context.flags);
72008
72179
  return {
72009
72180
  kind: "invitations",
@@ -72014,20 +72185,20 @@ async function companyInvitations(context, subcommand, rest) {
72014
72185
  if (subcommand === "invite") return await invite(context, rest);
72015
72186
  if (subcommand === "cancel-invitation") return await cancel$1(context, rest);
72016
72187
  if (subcommand === "invitation-preview") return (await companyInvitationPreview({
72017
- path: { invitationUuid: oneUuid$7(rest, USAGE$46) },
72018
- body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$46) }
72188
+ path: { invitationUuid: oneUuid$7(rest, USAGE$49) },
72189
+ body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$49) }
72019
72190
  })).data;
72020
72191
  if (subcommand === "invitation-accept") return await accept(context, rest);
72021
- throw new UsageError(USAGE$46);
72192
+ throw new UsageError(USAGE$49);
72022
72193
  }
72023
72194
  /** `invite --email … --name … --role …`. */
72024
72195
  async function invite(context, rest) {
72025
- if (rest.length > 0) throw new UsageError(USAGE$46);
72196
+ if (rest.length > 0) throw new UsageError(USAGE$49);
72026
72197
  const company = await requireCompany(context.flags);
72027
72198
  const email = context.flags.get("--email")?.trim() ?? "";
72028
72199
  const name = context.flags.get("--name")?.trim() ?? "";
72029
- const role = companyRole(context.flags.get("--role"), USAGE$46);
72030
- if (email === "" || name === "") throw new UsageError(`invite needs --email and --name.\n\n${USAGE$46}`);
72200
+ const role = companyRole(context.flags.get("--role"), USAGE$49);
72201
+ if (email === "" || name === "") throw new UsageError(`invite needs --email and --name.\n\n${USAGE$49}`);
72031
72202
  return await confirmableWrite(context, `Invite ${name} <${email}> into ${company} as ${role}.`, async () => (await companyInvitationStore({
72032
72203
  path: { company },
72033
72204
  body: {
@@ -72039,7 +72210,7 @@ async function invite(context, rest) {
72039
72210
  }
72040
72211
  /** `cancel-invitation <uuid> --company …`. */
72041
72212
  async function cancel$1(context, rest) {
72042
- const invitationUuid = oneUuid$7(rest, USAGE$46);
72213
+ const invitationUuid = oneUuid$7(rest, USAGE$49);
72043
72214
  const company = await requireCompany(context.flags);
72044
72215
  return await confirmableWrite(context, `Cancel invitation ${invitationUuid}.`, async () => {
72045
72216
  return (await companyInvitationDestroy({ path: {
@@ -72050,11 +72221,11 @@ async function cancel$1(context, rest) {
72050
72221
  }
72051
72222
  /** `invitation-accept <uuid>`: join the company the invitation names. */
72052
72223
  async function accept(context, rest) {
72053
- const invitationUuid = oneUuid$7(rest, USAGE$46);
72224
+ const invitationUuid = oneUuid$7(rest, USAGE$49);
72054
72225
  return await confirmableWrite(context, `Accept invitation ${invitationUuid}.`, async () => {
72055
72226
  return (await companyInvitationAccept({
72056
72227
  path: { invitationUuid },
72057
- body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$46) }
72228
+ body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$49) }
72058
72229
  })).data;
72059
72230
  });
72060
72231
  }
@@ -72173,31 +72344,31 @@ var COMPANY_TOPICS = [
72173
72344
  },
72174
72345
  {
72175
72346
  path: ["logo"],
72176
- usage: USAGE$47
72347
+ usage: USAGE$50
72177
72348
  },
72178
72349
  {
72179
72350
  path: ["favicon"],
72180
- usage: USAGE$47
72351
+ usage: USAGE$50
72181
72352
  },
72182
72353
  {
72183
72354
  path: ["invitations"],
72184
- usage: USAGE$46
72355
+ usage: USAGE$49
72185
72356
  },
72186
72357
  {
72187
72358
  path: ["invite"],
72188
- usage: USAGE$46
72359
+ usage: USAGE$49
72189
72360
  },
72190
72361
  {
72191
72362
  path: ["cancel-invitation"],
72192
- usage: USAGE$46
72363
+ usage: USAGE$49
72193
72364
  },
72194
72365
  {
72195
72366
  path: ["invitation-preview"],
72196
- usage: USAGE$46
72367
+ usage: USAGE$49
72197
72368
  },
72198
72369
  {
72199
72370
  path: ["invitation-accept"],
72200
- usage: USAGE$46
72371
+ usage: USAGE$49
72201
72372
  }
72202
72373
  ];
72203
72374
  // src/commands/company-text.ts
@@ -74731,7 +74902,7 @@ var diagnostics = {
74731
74902
  }
74732
74903
  };
74733
74904
  // src/commands/dns-records.ts
74734
- var USAGE$45 = [
74905
+ var USAGE$48 = [
74735
74906
  "Usage: hostingctl dns enable <domain-uuid> --company <slug>",
74736
74907
  " hostingctl dns record set <domain-uuid> --company <slug> --file <set.json>",
74737
74908
  " hostingctl dns record remove <domain-uuid> --company <slug> --name <relative> --type <type>",
@@ -74770,7 +74941,7 @@ async function dnsWrites(context, subcommand, rest) {
74770
74941
  if (subcommand === "record") return await record$2(context, rest);
74771
74942
  if (subcommand === "dnssec") return await changeDnssec(context, rest);
74772
74943
  if (subcommand === "handover") return await handover(context, rest);
74773
- throw new UsageError(USAGE$45);
74944
+ throw new UsageError(USAGE$48);
74774
74945
  }
74775
74946
  /** The zone's current desired generation, which every write must name. */
74776
74947
  async function generation(company, domainUuid) {
@@ -74781,7 +74952,7 @@ async function generation(company, domainUuid) {
74781
74952
  }
74782
74953
  /** `dns enable <uuid>`: take the zone over into managed DNS. */
74783
74954
  async function enable(context, rest) {
74784
- const domainUuid = oneUuid$7(rest, USAGE$45);
74955
+ const domainUuid = oneUuid$7(rest, USAGE$48);
74785
74956
  const company = await requireCompany(context.flags);
74786
74957
  return await confirmableWrite(context, "Publish this name's zone in managed DNS.", async () => (await domainsDnsStore({ path: {
74787
74958
  company,
@@ -74791,16 +74962,16 @@ async function enable(context, rest) {
74791
74962
  /** `dns record set|remove`. */
74792
74963
  async function record$2(context, rest) {
74793
74964
  const [action, ...tail] = rest;
74794
- const domainUuid = oneUuid$7(tail, USAGE$45);
74965
+ const domainUuid = oneUuid$7(tail, USAGE$48);
74795
74966
  const company = await requireCompany(context.flags);
74796
74967
  if (action === "set") return await setRecord(context, company, domainUuid);
74797
74968
  if (action === "remove") return await removeRecord(context, company, domainUuid);
74798
- throw new UsageError(USAGE$45);
74969
+ throw new UsageError(USAGE$48);
74799
74970
  }
74800
74971
  /** `record set --file`: replace one set with the file's own values. */
74801
74972
  async function setRecord(context, company, domainUuid) {
74802
74973
  const file = context.flags.get("--file") ?? "";
74803
- if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$45}`);
74974
+ if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$48}`);
74804
74975
  const set = recordSetFromFile(file);
74805
74976
  return await confirmableWrite(context, [`Replace the ${set.recordType.toUpperCase()} set "${set.relativeName}" (ttl ${String(set.ttlSeconds)}) with:`, ...set.values.map((one) => ` ${one}`)].join("\n"), async () => {
74806
74977
  const body = {
@@ -74820,7 +74991,7 @@ async function setRecord(context, company, domainUuid) {
74820
74991
  async function removeRecord(context, company, domainUuid) {
74821
74992
  const relativeName = context.flags.get("--name") ?? "";
74822
74993
  const recordType = recordTypeFlag(context);
74823
- if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$45}`);
74994
+ if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$48}`);
74824
74995
  return await confirmableWrite(context, `Remove the ${recordType.toUpperCase()} set "${relativeName}".`, async () => {
74825
74996
  const query = {
74826
74997
  relativeName,
@@ -74839,8 +75010,8 @@ async function removeRecord(context, company, domainUuid) {
74839
75010
  /** `dns dnssec <signed|unsigned> <uuid>`: the signing mode, with the confirmation the API requires. */
74840
75011
  async function changeDnssec(context, rest) {
74841
75012
  const [mode, uuid, ...extra] = rest;
74842
- if (mode === void 0 || mode !== "signed" && mode !== "unsigned" || extra.length > 0) throw new UsageError(USAGE$45);
74843
- const domainUuid = oneUuid$7(uuid === void 0 ? [] : [uuid], USAGE$45);
75013
+ if (mode === void 0 || mode !== "signed" && mode !== "unsigned" || extra.length > 0) throw new UsageError(USAGE$48);
75014
+ const domainUuid = oneUuid$7(uuid === void 0 ? [] : [uuid], USAGE$48);
74844
75015
  const company = await requireCompany(context.flags);
74845
75016
  return await confirmableWrite(context, [`Set the zone's signing mode to ${mode}.`, ...mode === "signed" ? [" DNSSEC signing is added; resolvers that fail validation will not answer until DS records match."] : [" DNSSEC signing is removed; the DS record in the parent zone has to be removed too."]].join("\n"), async () => {
74846
75017
  const body = {
@@ -74859,7 +75030,7 @@ async function changeDnssec(context, rest) {
74859
75030
  }
74860
75031
  /** `dns handover <uuid>`: hand the zone back, dropping what this platform publishes. */
74861
75032
  async function handover(context, rest) {
74862
- const domainUuid = oneUuid$7(rest, USAGE$45);
75033
+ const domainUuid = oneUuid$7(rest, USAGE$48);
74863
75034
  const company = await requireCompany(context.flags);
74864
75035
  return await confirmableWrite(context, ["Hand this name's zone back out of managed DNS.", " Address records published here stop being published; the name and its applications stay."].join("\n"), async () => {
74865
75036
  const body = {
@@ -74878,7 +75049,7 @@ async function handover(context, rest) {
74878
75049
  /** A record type flag, refused when it is not one of the API's own values. */
74879
75050
  function recordTypeFlag(context) {
74880
75051
  const raw = (context.flags.get("--type") ?? "").trim().toLowerCase();
74881
- if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$45}`);
75052
+ if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$48}`);
74882
75053
  return raw;
74883
75054
  }
74884
75055
  /**
@@ -74911,7 +75082,7 @@ function recordSetFromValue(value, subject) {
74911
75082
  };
74912
75083
  }
74913
75084
  // src/commands/dns-templates.ts
74914
- var USAGE$44 = [
75085
+ var USAGE$47 = [
74915
75086
  "Usage: hostingctl dns template list --company <slug>",
74916
75087
  " hostingctl dns template show <template-uuid> --company <slug>",
74917
75088
  " hostingctl dns template save [<template-uuid>] --company <slug> --file <template.json>",
@@ -74933,24 +75104,24 @@ var USAGE$44 = [
74933
75104
  async function dnsTemplates(context, rest) {
74934
75105
  const [action, ...tail] = rest;
74935
75106
  if (action === "list") {
74936
- if (tail.length > 0) throw new UsageError(USAGE$44);
75107
+ if (tail.length > 0) throw new UsageError(USAGE$47);
74937
75108
  return {
74938
75109
  kind: "templates",
74939
75110
  templates: (await dnsTemplatesIndex({ path: { company: await requireCompany(context.flags) } })).data.templates
74940
75111
  };
74941
75112
  }
74942
- if (action === "show") return await show$5(context, oneUuid$7(tail, USAGE$44));
75113
+ if (action === "show") return await show$5(context, oneUuid$7(tail, USAGE$47));
74943
75114
  if (action === "save") return await save$1(context, tail[0]);
74944
- if (action === "delete") return await destroy$1(context, oneUuid$7(tail, USAGE$44));
74945
- if (action === "from-zone") return await fromZone(context, oneUuid$7(tail, USAGE$44));
75115
+ if (action === "delete") return await destroy$1(context, oneUuid$7(tail, USAGE$47));
75116
+ if (action === "from-zone") return await fromZone(context, oneUuid$7(tail, USAGE$47));
74946
75117
  if (action === "preview") return await preview$2(context, tail);
74947
75118
  if (action === "apply") return await apply(context, tail);
74948
- throw new UsageError(USAGE$44);
75119
+ throw new UsageError(USAGE$47);
74949
75120
  }
74950
75121
  /** Two uuids: the template, then the zone it applies to. */
74951
75122
  function templateAndZone(rest) {
74952
75123
  const [templateUuid, domainUuid, ...extra] = rest;
74953
- if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$44);
75124
+ if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$47);
74954
75125
  return {
74955
75126
  templateUuid,
74956
75127
  domainUuid
@@ -74969,7 +75140,7 @@ async function show$5(context, templateUuid) {
74969
75140
  /** `save [<uuid>] --file …`: record a new template, or replace the one named. */
74970
75141
  async function save$1(context, templateUuid) {
74971
75142
  const file = context.flags.get("--file") ?? "";
74972
- if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$44}`);
75143
+ if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$47}`);
74973
75144
  const company = await requireCompany(context.flags);
74974
75145
  const document = readJsonObject(file, "template");
74975
75146
  const name = typeof document.name === "string" ? document.name.trim() : "";
@@ -75005,7 +75176,7 @@ async function destroy$1(context, templateUuid) {
75005
75176
  async function fromZone(context, domainUuid) {
75006
75177
  const company = await requireCompany(context.flags);
75007
75178
  const name = context.flags.get("--name")?.trim() ?? "";
75008
- if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$44}`);
75179
+ if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$47}`);
75009
75180
  const zone = (await domainsDnsShow({ path: {
75010
75181
  company,
75011
75182
  domainUuid
@@ -75074,7 +75245,7 @@ function recordSetsFromFile$1(document, subject) {
75074
75245
  });
75075
75246
  }
75076
75247
  // src/commands/dns-text.ts
75077
- var USAGE$43 = [
75248
+ var USAGE$46 = [
75078
75249
  "Usage: hostingctl dns <zone|export> <domain-uuid> --company <slug>",
75079
75250
  " hostingctl dns import <preview|apply> <domain-uuid> --company <slug> --file <path> [--confirm]",
75080
75251
  " hostingctl dns enable <domain-uuid> --company <slug>",
@@ -75144,7 +75315,7 @@ function applyText(result) {
75144
75315
  var DNS_METADATA = {
75145
75316
  name: "dns",
75146
75317
  summary: "A managed name's zone, its zone-file export, and the reviewed import write.",
75147
- usage: USAGE$43,
75318
+ usage: USAGE$46,
75148
75319
  flags: [
75149
75320
  {
75150
75321
  name: "--file",
@@ -75182,23 +75353,23 @@ var DNS_METADATA = {
75182
75353
  var DNS_TOPICS = [
75183
75354
  {
75184
75355
  path: ["enable"],
75185
- usage: USAGE$45
75356
+ usage: USAGE$48
75186
75357
  },
75187
75358
  {
75188
75359
  path: ["record"],
75189
- usage: USAGE$45
75360
+ usage: USAGE$48
75190
75361
  },
75191
75362
  {
75192
75363
  path: ["dnssec"],
75193
- usage: USAGE$45
75364
+ usage: USAGE$48
75194
75365
  },
75195
75366
  {
75196
75367
  path: ["handover"],
75197
- usage: USAGE$45
75368
+ usage: USAGE$48
75198
75369
  },
75199
75370
  {
75200
75371
  path: ["template"],
75201
- usage: USAGE$44
75372
+ usage: USAGE$47
75202
75373
  }
75203
75374
  ];
75204
75375
  // src/commands/dns-import.ts
@@ -75215,7 +75386,7 @@ var IMPORT_LINE = /^(\S+)\s+(\d+)\s+(\S+)\s+(.+)$/;
75215
75386
  * hold customer DNS data, so its contents are never printed; only the API's own answer is shown.
75216
75387
  */
75217
75388
  function recordSetsFromFile(file) {
75218
- if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$43}`);
75389
+ if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$46}`);
75219
75390
  const sets = /* @__PURE__ */ new Map();
75220
75391
  for (const [index, raw] of readBoundedImportFile(file, "import").split("\n").entries()) addLine(sets, raw.trim(), index + 1);
75221
75392
  if (sets.size === 0) throw new UsageError(`The import file [${file}] holds no record sets.`);
@@ -75307,7 +75478,7 @@ var dns = {
75307
75478
  if (subcommand === "import") return await importRecords(context, rest);
75308
75479
  if (subcommand === "template") return await dnsTemplates(context, rest);
75309
75480
  if (WRITE_SUBCOMMANDS$1.has(subcommand ?? "")) return await dnsWrites(context, subcommand ?? "", rest);
75310
- throw new UsageError(USAGE$43);
75481
+ throw new UsageError(USAGE$46);
75311
75482
  },
75312
75483
  human(report) {
75313
75484
  if ("sent" in report) return renderWriteOutcome(report, dnsWriteText);
@@ -75326,7 +75497,7 @@ async function readZone(context, rest, which) {
75326
75497
  /** `import preview|apply <uuid> --file <path>`: the review, or the reviewed write. */
75327
75498
  async function importRecords(context, rest) {
75328
75499
  const [action, ...tail] = rest;
75329
- if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$43);
75500
+ if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$46);
75330
75501
  const path = await domainPath$1(context, tail);
75331
75502
  const recordSets = recordSetsFromFile(context.flags.get("--file"));
75332
75503
  if (action === "preview") return (await domainsDnsImportPreview({
@@ -75363,7 +75534,7 @@ async function applyImport(context, path, recordSets) {
75363
75534
  /** The company and the one domain uuid a DNS subcommand needs, or a usage refusal. */
75364
75535
  async function domainPath$1(context, rest) {
75365
75536
  const [domainUuid, ...extra] = rest;
75366
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$43);
75537
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$46);
75367
75538
  return {
75368
75539
  company: await requireCompany(context.flags),
75369
75540
  domainUuid
@@ -75529,7 +75700,7 @@ function checkText(check) {
75529
75700
  }
75530
75701
  // src/commands/email-alias.ts
75531
75702
  /** The one usage string this group refuses with, owned by the group it belongs to. */
75532
- var USAGE$42 = [
75703
+ var USAGE$45 = [
75533
75704
  "Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
75534
75705
  " hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
75535
75706
  " hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
@@ -75553,16 +75724,16 @@ async function aliasGroup(context, action, tail) {
75553
75724
  if (action === "set") return await aliasSet(context, tail);
75554
75725
  if (action === "remove") return await aliasRemove(context, tail);
75555
75726
  if (action === "unroute") return await aliasUnroute(context, tail);
75556
- throw new UsageError(USAGE$42);
75727
+ throw new UsageError(USAGE$45);
75557
75728
  }
75558
75729
  /** `alias add <domain> --local … --destinations …`: a new forwarding address. */
75559
75730
  async function aliasAdd(context, tail) {
75560
75731
  const [emailDomainUuid, ...extra] = tail;
75561
- if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75732
+ if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$45);
75562
75733
  const company = await requireCompany(context.flags);
75563
75734
  const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
75564
75735
  const list = destinations$1(context);
75565
- if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$42}`);
75736
+ if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$45}`);
75566
75737
  return await confirmableWrite(context, [`Create ${localPart}@… forwarding to:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
75567
75738
  return (await emailAliasesStore({
75568
75739
  path: {
@@ -75579,10 +75750,10 @@ async function aliasAdd(context, tail) {
75579
75750
  /** `alias set <domain> <alias> --destinations …`: replace the complete recipient list. */
75580
75751
  async function aliasSet(context, tail) {
75581
75752
  const [emailDomainUuid, aliasUuid, ...extra] = tail;
75582
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75753
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$45);
75583
75754
  const company = await requireCompany(context.flags);
75584
75755
  const list = destinations$1(context);
75585
- if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$42}`);
75756
+ if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$45}`);
75586
75757
  return await confirmableWrite(context, [`Replace ${aliasUuid}'s destinations with:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
75587
75758
  return (await emailAliasesUpdate({
75588
75759
  path: {
@@ -75597,7 +75768,7 @@ async function aliasSet(context, tail) {
75597
75768
  /** `alias remove <domain> <alias>`. */
75598
75769
  async function aliasRemove(context, tail) {
75599
75770
  const [emailDomainUuid, aliasUuid, ...extra] = tail;
75600
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75771
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$45);
75601
75772
  const company = await requireCompany(context.flags);
75602
75773
  return await confirmableWrite(context, `Remove alias ${aliasUuid}.`, async () => {
75603
75774
  return (await emailAliasesDestroy({ path: {
@@ -75610,7 +75781,7 @@ async function aliasRemove(context, tail) {
75610
75781
  /** `alias unroute <domain> <alias> <mailbox>`: drop one destination. */
75611
75782
  async function aliasUnroute(context, tail) {
75612
75783
  const [emailDomainUuid, aliasUuid, mailboxUuid, ...extra] = tail;
75613
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75784
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$45);
75614
75785
  const company = await requireCompany(context.flags);
75615
75786
  return await confirmableWrite(context, `Stop forwarding ${aliasUuid} to mailbox ${mailboxUuid}.`, async () => {
75616
75787
  return (await emailAliasesDestinationsDestroy({ path: {
@@ -75622,7 +75793,7 @@ async function aliasUnroute(context, tail) {
75622
75793
  });
75623
75794
  }
75624
75795
  // src/commands/email-address.ts
75625
- var USAGE$41 = [
75796
+ var USAGE$44 = [
75626
75797
  "Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
75627
75798
  " hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
75628
75799
  " hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
@@ -75648,13 +75819,13 @@ async function emailAddresses(context, subcommand, rest) {
75648
75819
  if (subcommand === "alias") return await aliasGroup(context, action, tail);
75649
75820
  if (subcommand === "app-token") return await appToken(context, action, tail);
75650
75821
  if (subcommand === "send-as") return await sendAs(context, action, tail);
75651
- throw new UsageError(USAGE$41);
75822
+ throw new UsageError(USAGE$44);
75652
75823
  }
75653
75824
  /** `app-token list|issue|revoke|deliver`. */
75654
75825
  async function appToken(context, action, tail) {
75655
75826
  const company = await requireCompany(context.flags);
75656
75827
  const [emailDomainUuid, mailboxUuid, third, ...extra] = tail;
75657
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75828
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$44);
75658
75829
  const path = {
75659
75830
  company,
75660
75831
  emailDomainUuid,
@@ -75682,7 +75853,7 @@ async function appToken(context, action, tail) {
75682
75853
  }
75683
75854
  if (action === "issue" && third === void 0) {
75684
75855
  const label = context.flags.get("--label")?.trim() ?? "";
75685
- if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$41}`);
75856
+ if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$44}`);
75686
75857
  return await confirmableWrite(context, `Create an application password labelled "${label}".`, async () => {
75687
75858
  return (await emailAppTokensStore({
75688
75859
  path,
@@ -75690,7 +75861,7 @@ async function appToken(context, action, tail) {
75690
75861
  })).data;
75691
75862
  });
75692
75863
  }
75693
- if (third === void 0) throw new UsageError(USAGE$41);
75864
+ if (third === void 0) throw new UsageError(USAGE$44);
75694
75865
  const tokenPath = {
75695
75866
  ...path,
75696
75867
  tokenUuid: third
@@ -75699,14 +75870,14 @@ async function appToken(context, action, tail) {
75699
75870
  return (await emailAppTokensRevoke({ path: tokenPath })).data;
75700
75871
  });
75701
75872
  if (action === "deliver") return await confirmableWrite(context, [`Return application password ${third} once.`, " The value is printed here and not stored: it cannot be read again after this."].join("\n"), async () => (await emailAppTokensDeliver({ path: tokenPath })).data);
75702
- throw new UsageError(USAGE$41);
75873
+ throw new UsageError(USAGE$44);
75703
75874
  }
75704
75875
  /** `send-as list|grant|revoke`. */
75705
75876
  async function sendAs(context, action, tail) {
75706
75877
  const company = await requireCompany(context.flags);
75707
75878
  if (action === "revoke") {
75708
75879
  const [grantUuid, ...extra] = tail;
75709
- if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75880
+ if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$44);
75710
75881
  return await confirmableWrite(context, `Revoke send-as grant ${grantUuid}.`, async () => {
75711
75882
  return (await emailSendAsGrantsDestroy({ path: {
75712
75883
  company,
@@ -75715,7 +75886,7 @@ async function sendAs(context, action, tail) {
75715
75886
  });
75716
75887
  }
75717
75888
  const [emailDomainUuid, mailboxUuid, ...extra] = tail;
75718
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75889
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$44);
75719
75890
  const path = {
75720
75891
  company,
75721
75892
  emailDomainUuid,
@@ -75742,7 +75913,7 @@ async function sendAs(context, action, tail) {
75742
75913
  }
75743
75914
  if (action === "grant") {
75744
75915
  const grantedAddressUuid = context.flags.get("--address") ?? "";
75745
- if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$41}`);
75916
+ if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$44}`);
75746
75917
  return await confirmableWrite(context, `Allow this mailbox to send as address ${grantedAddressUuid}.`, async () => {
75747
75918
  return (await emailSendAsGrantsStore({
75748
75919
  path,
@@ -75750,7 +75921,7 @@ async function sendAs(context, action, tail) {
75750
75921
  })).data;
75751
75922
  });
75752
75923
  }
75753
- throw new UsageError(USAGE$41);
75924
+ throw new UsageError(USAGE$44);
75754
75925
  }
75755
75926
  // src/commands/email-write-text.ts
75756
75927
  /**
@@ -75816,7 +75987,7 @@ function emailAddressText(report) {
75816
75987
  return "Done.";
75817
75988
  }
75818
75989
  // src/commands/email-domain.ts
75819
- var USAGE$40 = [
75990
+ var USAGE$43 = [
75820
75991
  "Usage: hostingctl email offer",
75821
75992
  " hostingctl email enroll --company <slug>",
75822
75993
  " hostingctl email agree --company <slug> --term <package-term-uuid>",
@@ -75837,7 +76008,7 @@ var USAGE$40 = [
75837
76008
  /** `email offer|agree|provision|domain|catch-all`, dispatched from the `email` command. */
75838
76009
  async function emailDomains(context, subcommand, rest) {
75839
76010
  if (subcommand === "offer") {
75840
- if (rest.length > 0) throw new UsageError(USAGE$40);
76011
+ if (rest.length > 0) throw new UsageError(USAGE$43);
75841
76012
  return {
75842
76013
  kind: "offers",
75843
76014
  offers: (await emailOffers({ path: { company: await requireCompany(context.flags) } })).data
@@ -75848,11 +76019,11 @@ async function emailDomains(context, subcommand, rest) {
75848
76019
  if (subcommand === "provision") return await provision(context, rest);
75849
76020
  if (subcommand === "domain") return await domain(context, rest);
75850
76021
  if (subcommand === "catch-all") return await catchAll(context, rest);
75851
- throw new UsageError(USAGE$40);
76022
+ throw new UsageError(USAGE$43);
75852
76023
  }
75853
76024
  /** A company-wide command takes no positionals. */
75854
76025
  function noExtra$14(rest) {
75855
- if (rest.length > 0) throw new UsageError(USAGE$40);
76026
+ if (rest.length > 0) throw new UsageError(USAGE$43);
75856
76027
  }
75857
76028
  /** `enroll`: create the service record and start provisioning, which is the API's own create. */
75858
76029
  async function enroll(context, rest) {
@@ -75865,7 +76036,7 @@ async function agree(context, rest) {
75865
76036
  noExtra$14(rest);
75866
76037
  const company = await requireCompany(context.flags);
75867
76038
  const packageTermUuid = context.flags.get("--term") ?? "";
75868
- if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$40}`);
76039
+ if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$43}`);
75869
76040
  return await confirmableWrite(context, `Accept email package term ${packageTermUuid} for ${company}.`, async () => (await emailAgreement({
75870
76041
  path: { company },
75871
76042
  body: { packageTermUuid }
@@ -75884,7 +76055,7 @@ async function domain(context, rest) {
75884
76055
  if (action === "add") {
75885
76056
  noExtra$14(tail);
75886
76057
  const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
75887
- if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$40}`);
76058
+ if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$43}`);
75888
76059
  return await confirmableWrite(context, `Attach ${hostname} to ${company}'s mail service.`, async () => {
75889
76060
  return (await emailDomainsStore({
75890
76061
  path: { company },
@@ -75894,7 +76065,7 @@ async function domain(context, rest) {
75894
76065
  }
75895
76066
  const path = {
75896
76067
  company,
75897
- emailDomainUuid: oneUuid$7(tail, USAGE$40)
76068
+ emailDomainUuid: oneUuid$7(tail, USAGE$43)
75898
76069
  };
75899
76070
  if (action === "recheck") return await confirmableWrite(context, "Re-observe this name's DNS now.", async () => {
75900
76071
  return (await emailDomainsRecheck({ path })).data;
@@ -75914,14 +76085,14 @@ async function domain(context, rest) {
75914
76085
  body
75915
76086
  })).data;
75916
76087
  });
75917
- throw new UsageError(USAGE$40);
76088
+ throw new UsageError(USAGE$43);
75918
76089
  }
75919
76090
  /** `catch-all show|set|clear`. */
75920
76091
  async function catchAll(context, rest) {
75921
76092
  const [action, ...tail] = rest;
75922
76093
  const path = {
75923
76094
  company: await requireCompany(context.flags),
75924
- emailDomainUuid: oneUuid$7(tail, USAGE$40)
76095
+ emailDomainUuid: oneUuid$7(tail, USAGE$43)
75925
76096
  };
75926
76097
  if (action === "show") return {
75927
76098
  kind: "catch-all",
@@ -75929,7 +76100,7 @@ async function catchAll(context, rest) {
75929
76100
  };
75930
76101
  if (action === "set") {
75931
76102
  const destinations = destinationList(context);
75932
- if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$40}`);
76103
+ if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$43}`);
75933
76104
  return await confirmableWrite(context, [`Enable the catch-all for this name, forwarding to:`, ...destinations.map((one) => ` ${one}`)].join("\n"), async () => {
75934
76105
  return (await emailCatchAllUpdate({
75935
76106
  path,
@@ -75941,7 +76112,7 @@ async function catchAll(context, rest) {
75941
76112
  });
75942
76113
  }
75943
76114
  if (action === "clear") return await confirmableWrite(context, "Disable the catch-all: mail to an unknown address at this name is refused rather than forwarded.", async () => (await emailCatchAllDestroy({ path })).data);
75944
- throw new UsageError(USAGE$40);
76115
+ throw new UsageError(USAGE$43);
75945
76116
  }
75946
76117
  /**
75947
76118
  * The comma-separated `--destinations`.
@@ -75972,7 +76143,7 @@ function catchAllText(one) {
75972
76143
  return ` the catch-all forwards to ${one.destinations.join(", ") || "nobody"}`;
75973
76144
  }
75974
76145
  // src/commands/email-holds.ts
75975
- var USAGE$39 = [
76146
+ var USAGE$42 = [
75976
76147
  "Usage: hostingctl email hold list --company <slug>",
75977
76148
  " hostingctl email hold create --company <slug> --reason <compromise|abuse|operator> [--mailbox <uuid>]",
75978
76149
  " hostingctl email hold release <hold-uuid> --company <slug>",
@@ -75995,21 +76166,21 @@ async function emailHolds(context, rest) {
75995
76166
  const [action, ...tail] = rest;
75996
76167
  const company = await requireCompany(context.flags);
75997
76168
  if (action === "list") {
75998
- if (tail.length > 0) throw new UsageError(USAGE$39);
76169
+ if (tail.length > 0) throw new UsageError(USAGE$42);
75999
76170
  return {
76000
76171
  kind: "holds",
76001
76172
  holds: (await emailHoldsIndex({ path: { company } })).data.holds
76002
76173
  };
76003
76174
  }
76004
76175
  if (action === "create") return await create$3(context, tail, company);
76005
- if (action === "release") return await release$1(context, oneUuid$7(tail, USAGE$39), company);
76006
- throw new UsageError(USAGE$39);
76176
+ if (action === "release") return await release$1(context, oneUuid$7(tail, USAGE$42), company);
76177
+ throw new UsageError(USAGE$42);
76007
76178
  }
76008
76179
  /** `create --reason … [--mailbox …]`. */
76009
76180
  async function create$3(context, tail, company) {
76010
- if (tail.length > 0) throw new UsageError(USAGE$39);
76181
+ if (tail.length > 0) throw new UsageError(USAGE$42);
76011
76182
  const raw = context.flags.get("--reason")?.trim() ?? "";
76012
- if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$39}`);
76183
+ if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$42}`);
76013
76184
  const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
76014
76185
  return await confirmableWrite(context, [`Hold outbound mail for ${mailboxUuid === "" ? "the whole service" : `mailbox ${mailboxUuid}`} because: ${raw}.`, " Nothing is sent until this hold is released."].join("\n"), async () => {
76015
76186
  return (await emailHoldsStore({
@@ -76044,7 +76215,7 @@ function emailHoldText(report) {
76044
76215
  return report.holds.length === 0 ? "No sending holds." : report.holds.map(holdLine).join("\n");
76045
76216
  }
76046
76217
  // src/commands/email-mailbox-admin.ts
76047
- var USAGE$38 = [
76218
+ var USAGE$41 = [
76048
76219
  "Usage: hostingctl email mailbox add <email-domain-uuid> --company <slug> --local <name> --quota <gb-5|gb-10|gb-20>",
76049
76220
  " hostingctl email mailbox change <email-domain-uuid> <mailbox-uuid> --company <slug> [--status enabled|suspended] [--quota <size>]",
76050
76221
  " hostingctl email mailbox remove <email-domain-uuid> <mailbox-uuid> --company <slug>",
@@ -76076,7 +76247,7 @@ var STATUSES = /* @__PURE__ */ new Set(["enabled", "suspended"]);
76076
76247
  async function emailMailboxAdmin(context, action, tail) {
76077
76248
  if (action === "add") return await add$8(context, tail);
76078
76249
  const [emailDomainUuid, mailboxUuid, ...extra] = tail;
76079
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$38);
76250
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
76080
76251
  const path = {
76081
76252
  company: await requireCompany(context.flags),
76082
76253
  emailDomainUuid,
@@ -76094,7 +76265,7 @@ async function emailMailboxAdmin(context, action, tail) {
76094
76265
  if (action === "preferences-set") return await preferences(context, path);
76095
76266
  if (action === "credential") return await revealCredential(context, path, false);
76096
76267
  if (action === "reset-credential") return await revealCredential(context, path, true);
76097
- throw new UsageError(USAGE$38);
76268
+ throw new UsageError(USAGE$41);
76098
76269
  }
76099
76270
  /** A quota flag from the API's own values. */
76100
76271
  function quota(context) {
@@ -76110,11 +76281,11 @@ function destinations(context) {
76110
76281
  /** `add <domain> --local … --quota …`. */
76111
76282
  async function add$8(context, tail) {
76112
76283
  const [emailDomainUuid, ...extra] = tail;
76113
- if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$38);
76284
+ if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
76114
76285
  const company = await requireCompany(context.flags);
76115
76286
  const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
76116
76287
  const size = quota(context);
76117
- if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$38}`);
76288
+ if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$41}`);
76118
76289
  return await confirmableWrite(context, `Create mailbox ${localPart}@… with a ${size} quota.`, async () => {
76119
76290
  return (await emailMailboxesStore({
76120
76291
  path: {
@@ -76139,7 +76310,7 @@ function statusFlag(context) {
76139
76310
  async function change$1(context, path) {
76140
76311
  const status = statusFlag(context);
76141
76312
  const size = quota(context);
76142
- if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$38}`);
76313
+ if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$41}`);
76143
76314
  return await confirmableWrite(context, `Set this mailbox's ${[status === null ? null : `status to ${status}`, size === null ? null : `quota to ${size}`].filter((one) => one !== null).join(" and ")}.`, async () => {
76144
76315
  return (await emailMailboxesUpdate({
76145
76316
  path,
@@ -76167,7 +76338,7 @@ async function preferences(context, path) {
76167
76338
  const markRead = onOff$4(context, "--spam-mark-read");
76168
76339
  const threshold = context.flags.get("--spam-threshold");
76169
76340
  const summary = context.flags.get("--vacation-subject");
76170
- if (vacation === null && markRead === null && threshold === void 0 && summary === void 0) throw new UsageError(`preferences-set needs --vacation, --spam-threshold, --spam-mark-read or --vacation-subject.\n\n${USAGE$38}`);
76341
+ if (vacation === null && markRead === null && threshold === void 0 && summary === void 0) throw new UsageError(`preferences-set needs --vacation, --spam-threshold, --spam-mark-read or --vacation-subject.\n\n${USAGE$41}`);
76171
76342
  const body = {
76172
76343
  vacationEnabled: vacation ?? current.vacationEnabled,
76173
76344
  vacationSubject: context.flags.get("--vacation-subject") ?? current.vacationSubject,
@@ -76221,7 +76392,7 @@ function emailMailboxAdminText(report) {
76221
76392
  return preferencesText(report.preferences);
76222
76393
  }
76223
76394
  // src/commands/email-service.ts
76224
- var USAGE$37 = [
76395
+ var USAGE$40 = [
76225
76396
  "Usage: hostingctl email service <suspend|resume> --company <slug>",
76226
76397
  " hostingctl email service cancellation --company <slug>",
76227
76398
  " hostingctl email service cancel --company <slug> --ends-at <iso-date>",
@@ -76248,11 +76419,11 @@ async function emailService(context, subcommand, rest) {
76248
76419
  if (subcommand === "dmarc-set") return await dmarcSet$1(context, rest);
76249
76420
  if (subcommand === "blocklist-set") return await blocklistSet(context, rest);
76250
76421
  if (subcommand === "service") return await service(context, rest);
76251
- throw new UsageError(USAGE$37);
76422
+ throw new UsageError(USAGE$40);
76252
76423
  }
76253
76424
  /** A company-wide command takes no positionals. */
76254
76425
  function noExtra$13(rest) {
76255
- if (rest.length > 0) throw new UsageError(USAGE$37);
76426
+ if (rest.length > 0) throw new UsageError(USAGE$40);
76256
76427
  }
76257
76428
  /** `service suspend|resume|cancellation|cancel|cancel-withdraw`. */
76258
76429
  async function service(context, rest) {
@@ -76278,7 +76449,7 @@ async function service(context, rest) {
76278
76449
  if (action === "cancel") {
76279
76450
  noExtra$13(tail);
76280
76451
  const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
76281
- if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$37}`);
76452
+ if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$40}`);
76282
76453
  if (Number.isNaN(Date.parse(endsAt))) throw new UsageError(`--ends-at must be an ISO date (got "${endsAt}").`);
76283
76454
  return await confirmableWrite(context, [`End the mail service at ${endsAt}.`, " Mail keeps working until then; the cancellation can be withdrawn before that date."].join("\n"), async () => (await emailCancellationStore({
76284
76455
  path: { company },
@@ -76291,7 +76462,7 @@ async function service(context, rest) {
76291
76462
  return (await emailCancellationWithdraw({ path: { company } })).data;
76292
76463
  });
76293
76464
  }
76294
- throw new UsageError(USAGE$37);
76465
+ throw new UsageError(USAGE$40);
76295
76466
  }
76296
76467
  /** `dmarc`: DMARC reporting for every attached name. */
76297
76468
  async function dmarc$1(context, rest) {
@@ -76311,7 +76482,7 @@ async function blocklist$1(context, rest) {
76311
76482
  }
76312
76483
  /** `dmarc-set <name> --enabled on|off`. */
76313
76484
  async function dmarcSet$1(context, rest) {
76314
- const emailDomainUuid = oneUuid$7(rest, USAGE$37);
76485
+ const emailDomainUuid = oneUuid$7(rest, USAGE$40);
76315
76486
  const company = await requireCompany(context.flags);
76316
76487
  const enabled = onOff$3(context);
76317
76488
  return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} DMARC reporting for this name.`, async () => {
@@ -76326,7 +76497,7 @@ async function dmarcSet$1(context, rest) {
76326
76497
  }
76327
76498
  /** `blocklist-set <name> --enabled on|off`. */
76328
76499
  async function blocklistSet(context, rest) {
76329
- const emailDomainUuid = oneUuid$7(rest, USAGE$37);
76500
+ const emailDomainUuid = oneUuid$7(rest, USAGE$40);
76330
76501
  const company = await requireCompany(context.flags);
76331
76502
  const enabled = onOff$3(context);
76332
76503
  return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} blocklist monitoring for this name.`, async () => {
@@ -76343,7 +76514,7 @@ async function blocklistSet(context, rest) {
76343
76514
  async function importSchema(context, rest) {
76344
76515
  noExtra$13(rest);
76345
76516
  const version = context.flags.get("--version")?.trim() ?? "";
76346
- if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$37}`);
76517
+ if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$40}`);
76347
76518
  return {
76348
76519
  kind: "schema",
76349
76520
  version,
@@ -76355,7 +76526,7 @@ function onOff$3(context) {
76355
76526
  const raw = context.flags.get("--enabled")?.trim() ?? "";
76356
76527
  if (raw === "on" || raw === "true") return true;
76357
76528
  if (raw === "off" || raw === "false") return false;
76358
- throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$37}`);
76529
+ throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$40}`);
76359
76530
  }
76360
76531
  /** The `email service|dmarc|blocklist|import-schema` renderer. */
76361
76532
  function emailServiceText(report) {
@@ -76367,7 +76538,7 @@ function emailServiceText(report) {
76367
76538
  }
76368
76539
  // src/commands/email-sync-csv.ts
76369
76540
  /** The usage this group refuses with, owned by the command it belongs to. */
76370
- var USAGE$36 = [
76541
+ var USAGE$39 = [
76371
76542
  "Usage: hostingctl email sync csv <preview|commit> <email-domain-uuid> --company <slug> --file <path>",
76372
76543
  "",
76373
76544
  " preview What the file's rows would become. Writes nothing.",
@@ -76378,7 +76549,7 @@ var USAGE$36 = [
76378
76549
  /** One named uuid, or a usage refusal. */
76379
76550
  function one$2(rest) {
76380
76551
  const [uuid, ...extra] = rest;
76381
- if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$36);
76552
+ if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$39);
76382
76553
  return uuid;
76383
76554
  }
76384
76555
  /** `csv preview|commit <domain> --file <path>`: one multipart upload of the CSV itself. */
@@ -76386,7 +76557,7 @@ async function csv(context, tail) {
76386
76557
  const [action, ...args] = tail;
76387
76558
  const path = await domainPath(context, one$2(args));
76388
76559
  const file = context.flags.get("--file") ?? "";
76389
- if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$36}`);
76560
+ if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$39}`);
76390
76561
  if (action === "preview") return {
76391
76562
  kind: "csv-preview",
76392
76563
  rows: (await emailMailboxSyncCsvPreview({
@@ -76394,10 +76565,10 @@ async function csv(context, tail) {
76394
76565
  body: await csvPreviewBody(file)
76395
76566
  })).data.rows
76396
76567
  };
76397
- if (action !== "commit") throw new UsageError(USAGE$36);
76568
+ if (action !== "commit") throw new UsageError(USAGE$39);
76398
76569
  const recurrence = recurrenceFlag(context) ?? "once";
76399
76570
  const endsAt = context.flags.get("--ends-at")?.trim() || null;
76400
- if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$36}`);
76571
+ if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$39}`);
76401
76572
  return await confirmableWrite(context, [`Commit the sync accounts in ${file}, once the API has reviewed it.`, ` The review is re-read here and only its accepted rows are committed: ${recurrence}${endsAt === null ? "" : ` until ${endsAt}`}.`].join("\n"), async () => {
76402
76573
  const accepted = (await emailMailboxSyncCsvPreview({
76403
76574
  path,
@@ -76445,7 +76616,7 @@ async function csvCommitBody(file, accepted, recurrence, endsAt) {
76445
76616
  return form;
76446
76617
  }
76447
76618
  // src/commands/email-sync.ts
76448
- var USAGE$35 = [
76619
+ var USAGE$38 = [
76449
76620
  "Usage: hostingctl email sync show <email-domain-uuid> --company <slug>",
76450
76621
  " hostingctl email sync server <email-domain-uuid> --company <slug> --host <host> --port <n> --encryption <tls|starttls>",
76451
76622
  " hostingctl email sync account add <email-domain-uuid> --company <slug> --username <login> (--password-file <path>|--password-stdin) --mailbox <uuid> --recurrence <once|until> [--ends-at <iso>]",
@@ -76470,12 +76641,12 @@ async function emailSync(context, rest) {
76470
76641
  if (action === "server") return await server(context, tail);
76471
76642
  if (action === "account") return await account(context, tail);
76472
76643
  if (action === "csv") return await csv(context, tail);
76473
- throw new UsageError(USAGE$35);
76644
+ throw new UsageError(USAGE$38);
76474
76645
  }
76475
76646
  /** One named uuid, or a usage refusal. */
76476
76647
  function one$1(rest) {
76477
76648
  const [uuid, ...extra] = rest;
76478
- if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$35);
76649
+ if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$38);
76479
76650
  return uuid;
76480
76651
  }
76481
76652
  /** `show`: the server and every account. */
@@ -76491,9 +76662,9 @@ async function server(context, tail) {
76491
76662
  const host = context.flags.get("--host")?.trim() ?? "";
76492
76663
  const port = Number(context.flags.get("--port") ?? "");
76493
76664
  const encryption = context.flags.get("--encryption")?.trim() ?? "";
76494
- if (host === "") throw new UsageError(`sync server needs --host.\n\n${USAGE$35}`);
76495
- if (!Number.isInteger(port) || port < 1 || port > 65535) throw new UsageError(`--port must be a whole number between 1 and 65535.\n\n${USAGE$35}`);
76496
- if (!ENCRYPTIONS.has(encryption)) throw new UsageError(`--encryption must be tls or starttls (got "${encryption}").\n\n${USAGE$35}`);
76665
+ if (host === "") throw new UsageError(`sync server needs --host.\n\n${USAGE$38}`);
76666
+ if (!Number.isInteger(port) || port < 1 || port > 65535) throw new UsageError(`--port must be a whole number between 1 and 65535.\n\n${USAGE$38}`);
76667
+ if (!ENCRYPTIONS.has(encryption)) throw new UsageError(`--encryption must be tls or starttls (got "${encryption}").\n\n${USAGE$38}`);
76497
76668
  return await confirmableWrite(context, `Point the mailbox sync source at ${host}:${String(port)} over ${encryption}.`, async () => {
76498
76669
  return (await emailMailboxSyncServerUpdate({
76499
76670
  path,
@@ -76517,9 +76688,9 @@ async function account(context, tail) {
76517
76688
  const [action, ...args] = tail;
76518
76689
  if (action === "add") return await accountAdd(context, args);
76519
76690
  if (action === "change") return await accountChange(context, args);
76520
- if (action === void 0) throw new UsageError(USAGE$35);
76691
+ if (action === void 0) throw new UsageError(USAGE$38);
76521
76692
  const [emailDomainUuid, accountUuid, ...extra] = args;
76522
- if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
76693
+ if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$38);
76523
76694
  return await accountAction(context, action, {
76524
76695
  ...await domainPath(context, emailDomainUuid),
76525
76696
  accountUuid
@@ -76538,13 +76709,13 @@ async function accountAction(context, action, path) {
76538
76709
  if (action === "start") return await startAccount(context, path);
76539
76710
  if (action === "stop") return await confirmableWrite(context, "Stop this account's scheduled sync. The source credential is kept.", async () => (await emailMailboxSyncAccountsStop({ path })).data);
76540
76711
  if (action === "forget") return await confirmableWrite(context, "Forget this account's source credential and stop future work.", async () => (await emailMailboxSyncAccountsForget({ path })).data);
76541
- throw new UsageError(USAGE$35);
76712
+ throw new UsageError(USAGE$38);
76542
76713
  }
76543
76714
  /** `start`: the schedule the account should run on from now. */
76544
76715
  async function startAccount(context, path) {
76545
76716
  const recurrence = recurrenceFlag(context) ?? "once";
76546
76717
  const endsAt = context.flags.get("--ends-at")?.trim() || null;
76547
- if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$35}`);
76718
+ if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$38}`);
76548
76719
  return await confirmableWrite(context, `Start this account's scheduled sync (${recurrence}${endsAt === null ? "" : ` until ${endsAt}`}).`, async () => (await emailMailboxSyncAccountsStart({
76549
76720
  path,
76550
76721
  body: {
@@ -76557,7 +76728,7 @@ async function startAccount(context, path) {
76557
76728
  async function accountAdd(context, args) {
76558
76729
  const path = await domainPath(context, one$1(args));
76559
76730
  const body = accountBody(context);
76560
- const sourcePassword = readSecret(context, "password", 4096, USAGE$35);
76731
+ const sourcePassword = readSecret(context, "password", 4096, USAGE$38);
76561
76732
  return await confirmableWrite(context, [`Add a sync account for ${body.sourceUsername} into mailbox ${body.mailboxUuid}.`, ` It runs ${body.recurrence === "once" ? "once" : `until ${String(body.endsAt)}`}.`].join("\n"), async () => (await emailMailboxSyncAccountsStore({
76562
76733
  path,
76563
76734
  body: {
@@ -76569,7 +76740,7 @@ async function accountAdd(context, args) {
76569
76740
  /** `account change <domain> <account> [fields]`: only the fields named are sent. */
76570
76741
  async function accountChange(context, args) {
76571
76742
  const [emailDomainUuid, accountUuid, ...extra] = args;
76572
- if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
76743
+ if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$38);
76573
76744
  const path = {
76574
76745
  ...await domainPath(context, emailDomainUuid),
76575
76746
  accountUuid
@@ -76583,8 +76754,8 @@ async function accountChange(context, args) {
76583
76754
  if (mailbox !== "") body.mailboxUuid = mailbox;
76584
76755
  if (recurrence !== null) body.recurrence = recurrence;
76585
76756
  if (endsAt !== "") body.endsAt = endsAt;
76586
- if (context.flags.has("--password-file") || context.flags.has("--password-stdin")) body.sourcePassword = readSecret(context, "password", 4096, USAGE$35);
76587
- if (Object.keys(body).length === 0) throw new UsageError(`account change needs at least one field.\n\n${USAGE$35}`);
76757
+ if (context.flags.has("--password-file") || context.flags.has("--password-stdin")) body.sourcePassword = readSecret(context, "password", 4096, USAGE$38);
76758
+ if (Object.keys(body).length === 0) throw new UsageError(`account change needs at least one field.\n\n${USAGE$38}`);
76588
76759
  return await confirmableWrite(context, "Change this sync account.", async () => {
76589
76760
  return (await emailMailboxSyncAccountsUpdate({
76590
76761
  path,
@@ -76598,8 +76769,8 @@ function accountBody(context) {
76598
76769
  const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
76599
76770
  const recurrence = recurrenceFlag(context) ?? "once";
76600
76771
  const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
76601
- if (sourceUsername === "" || mailboxUuid === "") throw new UsageError(`account add needs --username and --mailbox.\n\n${USAGE$35}`);
76602
- if (recurrence === "until" && endsAt === "") throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$35}`);
76772
+ if (sourceUsername === "" || mailboxUuid === "") throw new UsageError(`account add needs --username and --mailbox.\n\n${USAGE$38}`);
76773
+ if (recurrence === "until" && endsAt === "") throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$38}`);
76603
76774
  return {
76604
76775
  sourceUsername,
76605
76776
  mailboxUuid,
@@ -76615,7 +76786,7 @@ function recurrenceFlag(context) {
76615
76786
  return raw;
76616
76787
  }
76617
76788
  // src/commands/email-text.ts
76618
- var USAGE$34 = [
76789
+ var USAGE$37 = [
76619
76790
  "Usage: hostingctl email <show|names> --company <slug>",
76620
76791
  " hostingctl email <mailboxes|aliases> <email-domain-uuid> --company <slug>",
76621
76792
  " hostingctl email mailbox <email-domain-uuid> <mailbox-uuid> --company <slug>",
@@ -76697,7 +76868,7 @@ function count$1(shown, total) {
76697
76868
  var EMAIL_METADATA = {
76698
76869
  name: "email",
76699
76870
  summary: "A company's email service, its attached names, their mailboxes and aliases.",
76700
- usage: USAGE$34,
76871
+ usage: USAGE$37,
76701
76872
  flags: [
76702
76873
  {
76703
76874
  name: "--address",
@@ -76877,75 +77048,75 @@ var EMAIL_METADATA = {
76877
77048
  var EMAIL_TOPICS = [
76878
77049
  {
76879
77050
  path: ["alias"],
76880
- usage: USAGE$42
77051
+ usage: USAGE$45
76881
77052
  },
76882
77053
  {
76883
77054
  path: ["app-token"],
76884
- usage: USAGE$41
77055
+ usage: USAGE$44
76885
77056
  },
76886
77057
  {
76887
77058
  path: ["send-as"],
76888
- usage: USAGE$41
77059
+ usage: USAGE$44
76889
77060
  },
76890
77061
  {
76891
77062
  path: ["offer"],
76892
- usage: USAGE$40
77063
+ usage: USAGE$43
76893
77064
  },
76894
77065
  {
76895
77066
  path: ["enroll"],
76896
- usage: USAGE$40
77067
+ usage: USAGE$43
76897
77068
  },
76898
77069
  {
76899
77070
  path: ["agree"],
76900
- usage: USAGE$40
77071
+ usage: USAGE$43
76901
77072
  },
76902
77073
  {
76903
77074
  path: ["provision"],
76904
- usage: USAGE$40
77075
+ usage: USAGE$43
76905
77076
  },
76906
77077
  {
76907
77078
  path: ["domain"],
76908
- usage: USAGE$40
77079
+ usage: USAGE$43
76909
77080
  },
76910
77081
  {
76911
77082
  path: ["catch-all"],
76912
- usage: USAGE$40
77083
+ usage: USAGE$43
76913
77084
  },
76914
77085
  {
76915
77086
  path: ["service"],
76916
- usage: USAGE$37
77087
+ usage: USAGE$40
76917
77088
  },
76918
77089
  {
76919
77090
  path: ["dmarc"],
76920
- usage: USAGE$37
77091
+ usage: USAGE$40
76921
77092
  },
76922
77093
  {
76923
77094
  path: ["dmarc-set"],
76924
- usage: USAGE$37
77095
+ usage: USAGE$40
76925
77096
  },
76926
77097
  {
76927
77098
  path: ["blocklist"],
76928
- usage: USAGE$37
77099
+ usage: USAGE$40
76929
77100
  },
76930
77101
  {
76931
77102
  path: ["blocklist-set"],
76932
- usage: USAGE$37
77103
+ usage: USAGE$40
76933
77104
  },
76934
77105
  {
76935
77106
  path: ["import-schema"],
76936
- usage: USAGE$37
77107
+ usage: USAGE$40
76937
77108
  },
76938
77109
  {
76939
77110
  path: ["sync"],
76940
- usage: USAGE$35
77111
+ usage: USAGE$38
76941
77112
  },
76942
77113
  {
76943
77114
  path: ["hold"],
76944
- usage: USAGE$39
77115
+ usage: USAGE$42
76945
77116
  },
76946
77117
  {
76947
77118
  path: ["mailbox"],
76948
- usage: USAGE$38
77119
+ usage: USAGE$41
76949
77120
  }
76950
77121
  ];
76951
77122
  // src/commands/email-sync-text.ts
@@ -76985,7 +77156,7 @@ async function companyRead(context, subcommand, rest) {
76985
77156
  if (subcommand === "mailboxes") return await mailboxes(company, rest);
76986
77157
  if (subcommand === "mailbox") return await mailbox(company, rest);
76987
77158
  if (subcommand === "aliases") return await aliases(company, rest);
76988
- throw new UsageError(USAGE$34);
77159
+ throw new UsageError(USAGE$37);
76989
77160
  }
76990
77161
  /** The renderer for a tagged feature read, or null when this command renders the answer itself. */
76991
77162
  function taggedText(report) {
@@ -77070,7 +77241,7 @@ var email = {
77070
77241
  ...EMAIL_METADATA,
77071
77242
  async run(context) {
77072
77243
  const [subcommand, ...rest] = context.positional;
77073
- if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$34);
77244
+ if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$37);
77074
77245
  const feature = dispatched$1(context, subcommand, rest);
77075
77246
  if (feature !== null) return await feature;
77076
77247
  return await companyRead(context, subcommand, rest);
@@ -77155,7 +77326,7 @@ async function aliases(company, rest) {
77155
77326
  /** `mailbox <email-domain-uuid> <mailbox-uuid>`: one record, independent of index pagination. */
77156
77327
  async function mailbox(company, rest) {
77157
77328
  const [emailDomainUuid, mailboxUuid, ...extra] = rest;
77158
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
77329
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$37);
77159
77330
  return (await emailMailboxesShow({ path: {
77160
77331
  company,
77161
77332
  emailDomainUuid,
@@ -77165,12 +77336,12 @@ async function mailbox(company, rest) {
77165
77336
  /** The one uuid a collection read names, or a usage refusal. */
77166
77337
  function oneUuid$4(rest) {
77167
77338
  const [uuid, ...extra] = rest;
77168
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
77339
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$37);
77169
77340
  return uuid;
77170
77341
  }
77171
77342
  /** A company-wide read takes no positional arguments. */
77172
77343
  function noExtra$12(rest) {
77173
- if (rest.length > 0) throw new UsageError(USAGE$34);
77344
+ if (rest.length > 0) throw new UsageError(USAGE$37);
77174
77345
  }
77175
77346
  // src/commands/environment-activation.ts
77176
77347
  async function environmentActivation(context, args) {
@@ -77185,7 +77356,7 @@ async function environmentActivation(context, args) {
77185
77356
  };
77186
77357
  }
77187
77358
  // src/commands/environment-admin.ts
77188
- var USAGE$33 = [
77359
+ var USAGE$36 = [
77189
77360
  "Usage: hostingctl environment retention <environment-uuid> --company <slug>",
77190
77361
  " hostingctl environment retention-set <environment-uuid> --company <slug> --extra-days <n> --effective-at <iso> --agreement <uuid> [--package <key>]",
77191
77362
  " hostingctl environment database-show <environment-uuid> <database-uuid> --company <slug>",
@@ -77209,9 +77380,9 @@ async function environmentAdmin(context, subcommand, rest) {
77209
77380
  if (subcommand === "retention") return await retention(context, first);
77210
77381
  if (subcommand === "retention-set") return await retentionSet(context, first);
77211
77382
  if (subcommand === "database-show" || subcommand === "database-reveal") {
77212
- if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$33);
77383
+ if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$36);
77213
77384
  const path = {
77214
- ...await environmentPath$1(context, first, USAGE$33),
77385
+ ...await environmentPath$1(context, first, USAGE$36),
77215
77386
  databaseUuid: tail[0] ?? ""
77216
77387
  };
77217
77388
  if (subcommand === "database-show") return {
@@ -77221,24 +77392,24 @@ async function environmentAdmin(context, subcommand, rest) {
77221
77392
  return await revealDatabase(context, path);
77222
77393
  }
77223
77394
  if (subcommand === "tuning") return await tuning(context, first, tail);
77224
- throw new UsageError(USAGE$33);
77395
+ throw new UsageError(USAGE$36);
77225
77396
  }
77226
77397
  /** `retention <env>`. */
77227
77398
  async function retention(context, environmentUuid) {
77228
77399
  return {
77229
77400
  kind: "retention",
77230
- retention: (await hostingRetentionShow({ path: await environmentPath$1(context, environmentUuid, USAGE$33) })).data
77401
+ retention: (await hostingRetentionShow({ path: await environmentPath$1(context, environmentUuid, USAGE$36) })).data
77231
77402
  };
77232
77403
  }
77233
77404
  /** `retention-set <env> --extra-days … --effective-at … --agreement …`. */
77234
77405
  async function retentionSet(context, environmentUuid) {
77235
- const path = await environmentPath$1(context, environmentUuid, USAGE$33);
77406
+ const path = await environmentPath$1(context, environmentUuid, USAGE$36);
77236
77407
  const extraDays = Number(context.flags.get("--extra-days") ?? "");
77237
77408
  const effectiveAt = context.flags.get("--effective-at")?.trim() ?? "";
77238
77409
  const baselineAgreementUuid = context.flags.get("--agreement")?.trim() ?? "";
77239
- if (!Number.isInteger(extraDays) || extraDays < 1) throw new UsageError(`retention-set needs --extra-days as a whole number of at least 1.\n\n${USAGE$33}`);
77240
- if (effectiveAt === "" || Number.isNaN(Date.parse(effectiveAt))) throw new UsageError(`retention-set needs --effective-at as an ISO date.\n\n${USAGE$33}`);
77241
- if (baselineAgreementUuid === "") throw new UsageError(`retention-set needs --agreement.\n\n${USAGE$33}`);
77410
+ if (!Number.isInteger(extraDays) || extraDays < 1) throw new UsageError(`retention-set needs --extra-days as a whole number of at least 1.\n\n${USAGE$36}`);
77411
+ if (effectiveAt === "" || Number.isNaN(Date.parse(effectiveAt))) throw new UsageError(`retention-set needs --effective-at as an ISO date.\n\n${USAGE$36}`);
77412
+ if (baselineAgreementUuid === "") throw new UsageError(`retention-set needs --agreement.\n\n${USAGE$36}`);
77242
77413
  const packageKey = context.flags.get("--package")?.trim();
77243
77414
  return {
77244
77415
  kind: "write",
@@ -77265,7 +77436,7 @@ async function revealDatabase(context, path) {
77265
77436
  /** `tuning preview|restore <env>`. */
77266
77437
  async function tuning(context, action, rest) {
77267
77438
  const environmentUuid = rest[0];
77268
- const path = await environmentPath$1(context, environmentUuid, USAGE$33);
77439
+ const path = await environmentPath$1(context, environmentUuid, USAGE$36);
77269
77440
  if (action === "preview" && rest.length === 1) {
77270
77441
  const body = (await hostingEnvironmentShow({ path })).data;
77271
77442
  return {
@@ -77278,7 +77449,7 @@ async function tuning(context, action, rest) {
77278
77449
  }
77279
77450
  if (action === "restore" && rest.length === 1) {
77280
77451
  const generation = Number(context.flags.get("--generation") ?? "");
77281
- if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$33}`);
77452
+ if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$36}`);
77282
77453
  return {
77283
77454
  kind: "write",
77284
77455
  outcome: await confirmableWrite(context, `Restore the recorded tuning for generation ${String(generation)}.`, async () => (await hostingTuningRestore({
@@ -77287,7 +77458,7 @@ async function tuning(context, action, rest) {
77287
77458
  })).data)
77288
77459
  };
77289
77460
  }
77290
- throw new UsageError(USAGE$33);
77461
+ throw new UsageError(USAGE$36);
77291
77462
  }
77292
77463
  /** One retention window as one line, and the write receipt for it. */
77293
77464
  function retentionText(one) {
@@ -77330,6 +77501,27 @@ function environmentAdminText(report) {
77330
77501
  if (report.kind === "database") return databaseText$1(report.database);
77331
77502
  return tuningText(report.tuning);
77332
77503
  }
77504
+ // src/commands/environment-backup-password.ts
77505
+ var USAGE$35 = "environment backup-password <environment-uuid> [status|rotate] --company <slug> [--dry-run|--confirm]";
77506
+ async function environmentBackupPassword(context, rest) {
77507
+ const [environmentUuid, action = "status", ...extra] = rest;
77508
+ if (!["status", "rotate"].includes(action) || extra.length > 0) throw new UsageError(USAGE$35);
77509
+ const path = await environmentPath$1(context, environmentUuid, USAGE$35);
77510
+ if (action === "status") return {
77511
+ kind: "backup-password",
77512
+ rotation: (await hostingEnvironmentsFileBackupRotationShow({ path })).data
77513
+ };
77514
+ return {
77515
+ kind: "backup-password-write",
77516
+ outcome: await confirmableWrite(context, `Start or resume file-backup password rotation for environment ${path.environmentUuid} in company ${path.company}. Existing backups remain readable. The previous password is retired after active consumers finish.`, async () => (await hostingEnvironmentsFileBackupRotationStart({ path })).data)
77517
+ };
77518
+ }
77519
+ function backupPasswordText(rotation) {
77520
+ return rotation.message;
77521
+ }
77522
+ function environmentBackupPasswordText(report) {
77523
+ return report.kind === "backup-password" ? backupPasswordText(report.rotation) : renderWriteOutcome(report.outcome, backupPasswordText);
77524
+ }
77333
77525
  // src/commands/environment-budget.ts
77334
77526
  var BUDGET_USAGE = [
77335
77527
  "Usage: hostingctl environment budget <environment-uuid> --company <slug> [--json]",
@@ -77392,7 +77584,7 @@ async function cacheSet(context, path) {
77392
77584
  })).data);
77393
77585
  }
77394
77586
  // src/commands/environment-component-version.ts
77395
- var USAGE$32 = [
77587
+ var USAGE$34 = [
77396
77588
  "Usage: hostingctl environment component-version <environment-uuid> <workload-uuid> <version> --company <slug>",
77397
77589
  "",
77398
77590
  " component-version Move one curated component instance to another version this platform pins an image",
@@ -77410,7 +77602,7 @@ var USAGE$32 = [
77410
77602
  */
77411
77603
  async function environmentComponentVersion(context, rest) {
77412
77604
  const [uuid, workloadUuid, version, ...extra] = rest;
77413
- if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$32);
77605
+ if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
77414
77606
  const path = {
77415
77607
  company: await requireCompany(context.flags),
77416
77608
  environmentUuid: uuid,
@@ -77846,7 +78038,7 @@ function initialSelectionText(selection) {
77846
78038
  return `${selection.volumeType}: ${selection.storageClass ?? selection.storageClassUuid ?? ""}`;
77847
78039
  }
77848
78040
  // src/commands/environment-create.ts
77849
- var USAGE$31 = [
78041
+ var USAGE$33 = [
77850
78042
  "Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
77851
78043
  " hostingctl environment create --client <slug> --name <name> [--slug <slug>] [--package <key>]",
77852
78044
  " [--storage-classes <volume-type>=<class>[,<volume-type>=<class>...]] [--environment-mode <live|test>]",
@@ -77916,12 +78108,12 @@ var CREATE_FLAG_SPECS = [
77916
78108
  * not.
77917
78109
  */
77918
78110
  async function create$2(context, rest) {
77919
- if (rest.length > 0) throw new UsageError(USAGE$31);
78111
+ if (rest.length > 0) throw new UsageError(USAGE$33);
77920
78112
  const name = context.flags.get("--name")?.trim() ?? "";
77921
- if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$31}`);
77922
- const slug = slugFor(context.flags.get("--slug"), name, USAGE$31);
77923
- const slice = sliceFor(context.flags, USAGE$31);
77924
- const storageSelections = storageSelectionsFor(context.flags, USAGE$31);
78113
+ if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$33}`);
78114
+ const slug = slugFor(context.flags.get("--slug"), name, USAGE$33);
78115
+ const slice = sliceFor(context.flags, USAGE$33);
78116
+ const storageSelections = storageSelectionsFor(context.flags, USAGE$33);
77925
78117
  const mode = environmentModeFor(context.flags.get("--environment-mode"));
77926
78118
  const scope = await scopeFor(context.flags);
77927
78119
  const chosen = chosenPackage(await catalogFor(scope), context.flags.get("--package")?.trim() ?? "");
@@ -77939,18 +78131,18 @@ async function create$2(context, rest) {
77939
78131
  function environmentModeFor(value) {
77940
78132
  const mode = value?.trim() ?? "live";
77941
78133
  if (mode === "live" || mode === "test") return mode;
77942
- throw new UsageError(`--environment-mode must be live or test (got ${mode}).\n\n${USAGE$31}`);
78134
+ throw new UsageError(`--environment-mode must be live or test (got ${mode}).\n\n${USAGE$33}`);
77943
78135
  }
77944
78136
  /** Which company or client the create is for, from exactly one of `--company` and `--client`. */
77945
78137
  async function scopeFor(flags) {
77946
78138
  const client = flags.get("--client")?.trim() ?? "";
77947
78139
  const company = flags.get("--company")?.trim() ?? "";
77948
- if (client !== "" && company !== "") throw new UsageError(`Pass --company or --client, not both.\n\n${USAGE$31}`);
78140
+ if (client !== "" && company !== "") throw new UsageError(`Pass --company or --client, not both.\n\n${USAGE$33}`);
77949
78141
  if (client !== "") return {
77950
78142
  mode: "client",
77951
78143
  client
77952
78144
  };
77953
- if (company === "") throw new UsageError(`create needs --company <slug> or --client <slug>.\n\n${USAGE$31}`);
78145
+ if (company === "") throw new UsageError(`create needs --company <slug> or --client <slug>.\n\n${USAGE$33}`);
77954
78146
  return {
77955
78147
  mode: "company",
77956
78148
  company: await requireCompany(flags)
@@ -77964,7 +78156,7 @@ async function catalogFor(scope) {
77964
78156
  /** The package the create sends: the one named, or the catalog's first, refused when the catalog does not carry it. */
77965
78157
  function chosenPackage(packages, requested) {
77966
78158
  const chosen = requested === "" ? packages[0] : packages.find((one) => one.key === requested);
77967
- if (chosen === void 0) throw new UsageError(`--package must be one of ${packages.map((one) => one.key).join(", ")} (got ${requested}).\n\n${USAGE$31}`);
78159
+ if (chosen === void 0) throw new UsageError(`--package must be one of ${packages.map((one) => one.key).join(", ")} (got ${requested}).\n\n${USAGE$33}`);
77968
78160
  return chosen;
77969
78161
  }
77970
78162
  /** The create itself, through the route that addressee is reached by. */
@@ -78320,7 +78512,7 @@ function oneUuid$2(rest) {
78320
78512
  return uuid;
78321
78513
  }
78322
78514
  // src/commands/environment-domains.ts
78323
- var USAGE$30 = [
78515
+ var USAGE$32 = [
78324
78516
  "Usage: hostingctl environment domains <environment-uuid> --company <slug>",
78325
78517
  " hostingctl environment domain-add <environment-uuid> --company <slug> --hostname <host> --application <application-uuid> [--intended on|off]",
78326
78518
  " hostingctl environment domain-verify|domain-check-routing|domain-intended|domain-primary|domain-remove <environment-uuid> <domain-uuid> --company <slug>",
@@ -78353,7 +78545,7 @@ var DOMAIN_ACTIONS = {
78353
78545
  /** `environment domains|domain-add|domain-*|redirects|redirect-set|redirect-remove`. */
78354
78546
  async function environmentDomains(context, subcommand, rest) {
78355
78547
  const [environmentUuid, ...tail] = rest;
78356
- const path = await environmentPath$1(context, environmentUuid, USAGE$30);
78548
+ const path = await environmentPath$1(context, environmentUuid, USAGE$32);
78357
78549
  if (subcommand === "domains") return await domains(path, tail);
78358
78550
  if (subcommand === "redirects") return await redirects(path, tail);
78359
78551
  if (subcommand === "domain-add") return await add$7(context, path, tail);
@@ -78362,7 +78554,7 @@ async function environmentDomains(context, subcommand, rest) {
78362
78554
  if (subcommand === "domain-remove") return await removeDomain(context, path, tail);
78363
78555
  const action = DOMAIN_ACTIONS[subcommand];
78364
78556
  if (action !== void 0) return await domainAction(context, subcommand, action, path, tail);
78365
- throw new UsageError(USAGE$30);
78557
+ throw new UsageError(USAGE$32);
78366
78558
  }
78367
78559
  /** `domains <env>`. */
78368
78560
  async function domains(path, rest) {
@@ -78385,7 +78577,7 @@ async function add$7(context, path, rest) {
78385
78577
  noExtra$11(rest);
78386
78578
  const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
78387
78579
  const workloadUuid = context.flags.get("--application")?.trim() ?? "";
78388
- if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --application.\n\n${USAGE$30}`);
78580
+ if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --application.\n\n${USAGE$32}`);
78389
78581
  const intended = onOffFlag(context, "--intended") ?? false;
78390
78582
  return await written$2(confirmableWrite(context, `Serve ${hostname} from application ${workloadUuid}${intended ? " as an intended name" : ""}.`, async () => {
78391
78583
  return (await hostingDomainStore({
@@ -78401,7 +78593,7 @@ async function add$7(context, path, rest) {
78401
78593
  /** The five actions that take only the environment and the name. */
78402
78594
  async function domainAction(context, subcommand, action, path, rest) {
78403
78595
  const [domainUuid, ...extra] = rest;
78404
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
78596
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$32);
78405
78597
  const described = {
78406
78598
  "domain-verify": "Check this name's ownership TXT record now.",
78407
78599
  "domain-check-routing": "Check this name's routing now.",
@@ -78419,7 +78611,7 @@ async function domainAction(context, subcommand, action, path, rest) {
78419
78611
  /** `domain-remove <env> <domain>`: stop serving a name. */
78420
78612
  async function removeDomain(context, path, rest) {
78421
78613
  const [domainUuid, ...extra] = rest;
78422
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
78614
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$32);
78423
78615
  const fallBackToGenerated = onOffFlag(context, "--fall-back-to-generated") ?? true;
78424
78616
  return await written$2(confirmableWrite(context, "Stop serving this name. Its record stays readable, and the environment keeps its generated hostname.", async () => {
78425
78617
  const body = { fallBackToGenerated };
@@ -78435,13 +78627,13 @@ async function removeDomain(context, path, rest) {
78435
78627
  /** `redirect-set <env> <domain> --target … --mode … [--destination …]`. */
78436
78628
  async function setRedirect(context, path, rest) {
78437
78629
  const [domainUuid, ...extra] = rest;
78438
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
78630
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$32);
78439
78631
  const target = context.flags.get("--target")?.trim() ?? "";
78440
78632
  const mode = context.flags.get("--mode")?.trim() ?? "";
78441
78633
  const destinationUrl = context.flags.get("--destination")?.trim() ?? "";
78442
- if (!TARGETS.has(target)) throw new UsageError(`--target must be application or fixed.\n\n${USAGE$30}`);
78443
- if (!MODES$2.has(mode)) throw new UsageError(`--mode must be temporary or permanent.\n\n${USAGE$30}`);
78444
- if (target === "fixed" && destinationUrl === "") throw new UsageError(`--target fixed needs --destination <url>.\n\n${USAGE$30}`);
78634
+ if (!TARGETS.has(target)) throw new UsageError(`--target must be application or fixed.\n\n${USAGE$32}`);
78635
+ if (!MODES$2.has(mode)) throw new UsageError(`--mode must be temporary or permanent.\n\n${USAGE$32}`);
78636
+ if (target === "fixed" && destinationUrl === "") throw new UsageError(`--target fixed needs --destination <url>.\n\n${USAGE$32}`);
78445
78637
  return await written$2(confirmableWrite(context, [`Redirect this name ${mode} to ${target === "fixed" ? destinationUrl : "its application"}.`, " The redirect activates once the source name's DNS resolves."].join("\n"), async () => {
78446
78638
  const body = {
78447
78639
  target,
@@ -78461,7 +78653,7 @@ async function setRedirect(context, path, rest) {
78461
78653
  /** `redirect-remove <env> <redirect-uuid>`. */
78462
78654
  async function removeRedirect(context, path, rest) {
78463
78655
  const [redirectUuid, ...extra] = rest;
78464
- if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
78656
+ if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$32);
78465
78657
  return await written$2(confirmableWrite(context, `Remove redirect ${redirectUuid}.`, async () => {
78466
78658
  return (await hostingDomainRedirectDestroy({ path: {
78467
78659
  ...path,
@@ -78478,7 +78670,7 @@ async function written$2(pending) {
78478
78670
  }
78479
78671
  /** No positional arguments, or a usage refusal. */
78480
78672
  function noExtra$11(rest) {
78481
- if (rest.length > 0) throw new UsageError(USAGE$30);
78673
+ if (rest.length > 0) throw new UsageError(USAGE$32);
78482
78674
  }
78483
78675
  // src/commands/schedule-flags.ts
78484
78676
  /** The API's own bound on patterns in one schedule. */
@@ -78688,7 +78880,7 @@ async function releaseBundle(context, args) {
78688
78880
  };
78689
78881
  }
78690
78882
  // src/commands/environment-exports.ts
78691
- var USAGE$29 = [
78883
+ var USAGE$31 = [
78692
78884
  "Usage: hostingctl environment export-sources <environment-uuid> --company <slug>",
78693
78885
  " hostingctl environment export-sources-refresh <environment-uuid> --company <slug>",
78694
78886
  " hostingctl environment export-create <environment-uuid> <source-id> --company <slug>",
@@ -78726,7 +78918,7 @@ var USAGE$29 = [
78726
78918
  async function environmentExports(context, subcommand, rest) {
78727
78919
  if (subcommand === "release-bundle") return await releaseBundle(context, rest);
78728
78920
  const [environmentUuid, ...tail] = rest;
78729
- const path = await environmentPath$1(context, environmentUuid, USAGE$29);
78921
+ const path = await environmentPath$1(context, environmentUuid, USAGE$31);
78730
78922
  if (subcommand === "export-sources" || subcommand === "export-sources-refresh") {
78731
78923
  noExtra$10(tail);
78732
78924
  return await environmentExportSources(context, path, subcommand);
@@ -78745,15 +78937,15 @@ async function environmentExports(context, subcommand, rest) {
78745
78937
  noExtra$10(tail);
78746
78938
  return await listBackupSchedules(path);
78747
78939
  }
78748
- if (subcommand === "database-backup-schedule-stop") return await stopBackupSchedule(context, path, tail, USAGE$29);
78749
- if (subcommand === "database-import" || subcommand === "database-import-confirm") return await databaseImport(context, path, subcommand, tail, USAGE$29);
78940
+ if (subcommand === "database-backup-schedule-stop") return await stopBackupSchedule(context, path, tail, USAGE$31);
78941
+ if (subcommand === "database-import" || subcommand === "database-import-confirm") return await databaseImport(context, path, subcommand, tail, USAGE$31);
78750
78942
  if (subcommand === "database-export-download") return await download(path, tail);
78751
78943
  if (subcommand === "database-export-remove") return await remove$2(context, path, tail);
78752
- throw new UsageError(USAGE$29);
78944
+ throw new UsageError(USAGE$31);
78753
78945
  }
78754
78946
  async function createRetained(context, path, rest) {
78755
78947
  const [sourceId, ...extra] = rest;
78756
- if (!sourceId || extra.length > 0) throw new UsageError(USAGE$29);
78948
+ if (!sourceId || extra.length > 0) throw new UsageError(USAGE$31);
78757
78949
  return {
78758
78950
  kind: "export-write",
78759
78951
  outcome: await confirmableWrite(context, `Prepare a download from retained source ${sourceId}. Its capture, scope and expiry remain those recorded by the platform.`, async () => (await hostingExportStore({
@@ -78763,7 +78955,7 @@ async function createRetained(context, path, rest) {
78763
78955
  };
78764
78956
  }
78765
78957
  async function create(context, path, rest) {
78766
- const databaseUuid = oneUuid$7(rest, USAGE$29);
78958
+ const databaseUuid = oneUuid$7(rest, USAGE$31);
78767
78959
  return {
78768
78960
  kind: "export-write",
78769
78961
  outcome: await confirmableWrite(context, "Take a portable export of this database now. It is downloadable until its expiry.", async () => {
@@ -78779,7 +78971,7 @@ async function create(context, path, rest) {
78779
78971
  }
78780
78972
  /** `database-backup <env> <connection>`: back up a database on another host into an export of this environment. */
78781
78973
  async function backup(context, path, rest) {
78782
- const connection = oneUuid$7(rest, USAGE$29);
78974
+ const connection = oneUuid$7(rest, USAGE$31);
78783
78975
  if ([
78784
78976
  "--schedule",
78785
78977
  "--timezone",
@@ -78800,7 +78992,7 @@ async function backup(context, path, rest) {
78800
78992
  }
78801
78993
  /** `database-export-download <env> <export>`: a time-limited URL, which is the customer's copy. */
78802
78994
  async function download(path, rest) {
78803
- const exportUuid = oneUuid$7(rest, USAGE$29);
78995
+ const exportUuid = oneUuid$7(rest, USAGE$31);
78804
78996
  return {
78805
78997
  kind: "download",
78806
78998
  download: (await hostingDatabaseExportDownload({ path: {
@@ -78810,7 +79002,7 @@ async function download(path, rest) {
78810
79002
  };
78811
79003
  }
78812
79004
  async function remove$2(context, path, rest) {
78813
- const exportUuid = oneUuid$7(rest, USAGE$29);
79005
+ const exportUuid = oneUuid$7(rest, USAGE$31);
78814
79006
  return {
78815
79007
  kind: "export-write",
78816
79008
  outcome: await confirmableWrite(context, `Retire export ${exportUuid}. Its URL stops working once it is gone.`, async () => (await hostingDatabaseExportDestroy({ path: {
@@ -78820,7 +79012,7 @@ async function remove$2(context, path, rest) {
78820
79012
  };
78821
79013
  }
78822
79014
  function noExtra$10(rest) {
78823
- if (rest.length > 0) throw new UsageError(USAGE$29);
79015
+ if (rest.length > 0) throw new UsageError(USAGE$31);
78824
79016
  }
78825
79017
  function exportLine(one) {
78826
79018
  const size = one.sizeBytes === null ? "" : ` ${String(Math.round(one.sizeBytes / 1024))} KiB`;
@@ -78911,7 +79103,7 @@ function environmentMailRelayText(report) {
78911
79103
  return renderWriteOutcome(report.outcome, diagnosisText);
78912
79104
  }
78913
79105
  // src/commands/environment-mode.ts
78914
- var USAGE$28 = [
79106
+ var USAGE$30 = [
78915
79107
  "Usage: hostingctl environment mode review <environment-uuid> --company <slug> --to <live|test>",
78916
79108
  " hostingctl environment mode set <environment-uuid> --company <slug> --to live --data-handover <handover>",
78917
79109
  " hostingctl environment mode set <environment-uuid> --company <slug> --to test",
@@ -78938,8 +79130,8 @@ var MODE_FLAG_SPECS = [{
78938
79130
  /** `environment mode review|set`. */
78939
79131
  async function environmentMode(context, rest) {
78940
79132
  const [action, environmentUuid, ...extra] = rest;
78941
- if (action === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
78942
- const path = await environmentPath$1(context, environmentUuid, USAGE$28);
79133
+ if (action === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
79134
+ const path = await environmentPath$1(context, environmentUuid, USAGE$30);
78943
79135
  const target = oneOf(context.flags.get("--to"), MODES$1, "--to");
78944
79136
  if (action === "review") return {
78945
79137
  kind: "mode-review",
@@ -78949,7 +79141,7 @@ async function environmentMode(context, rest) {
78949
79141
  })).data
78950
79142
  };
78951
79143
  if (action === "set") return await set$1(context, path, target);
78952
- throw new UsageError(USAGE$28);
79144
+ throw new UsageError(USAGE$30);
78953
79145
  }
78954
79146
  async function set$1(context, path, target) {
78955
79147
  const handover = target === "live" ? oneOf(context.flags.get("--data-handover"), HANDOVERS, "--data-handover") : null;
@@ -78973,7 +79165,7 @@ async function set$1(context, path, target) {
78973
79165
  }
78974
79166
  function oneOf(value, allowed, flag) {
78975
79167
  const chosen = allowed.find((one) => one === value?.trim());
78976
- if (chosen === void 0) throw new UsageError(`${flag} must be one of ${allowed.join(", ")}.\n\n${USAGE$28}`);
79168
+ if (chosen === void 0) throw new UsageError(`${flag} must be one of ${allowed.join(", ")}.\n\n${USAGE$30}`);
78977
79169
  return chosen;
78978
79170
  }
78979
79171
  /** The `environment mode …` renderer. */
@@ -78994,7 +79186,7 @@ function environmentModeText(report) {
78994
79186
  ].join("\n");
78995
79187
  }
78996
79188
  // src/commands/environment-outbound-rules.ts
78997
- var USAGE$27 = [
79189
+ var USAGE$29 = [
78998
79190
  "Usage: hostingctl environment outbound-rules show <environment-uuid> --company <slug>",
78999
79191
  " hostingctl environment outbound-rules set <environment-uuid> --company <slug> --rules <json|null>",
79000
79192
  "",
@@ -79014,8 +79206,8 @@ var DESCRIPTION = "Change public outbound ports for the whole environment, inclu
79014
79206
  /** `environment outbound-rules show|set`. */
79015
79207
  async function environmentOutboundRules(context, rest) {
79016
79208
  const [action, environmentUuid, ...extra] = rest;
79017
- if (action !== "show" && action !== "set" || extra.length > 0) throw new UsageError(USAGE$27);
79018
- const path = await environmentPath$1(context, environmentUuid, USAGE$27);
79209
+ if (action !== "show" && action !== "set" || extra.length > 0) throw new UsageError(USAGE$29);
79210
+ const path = await environmentPath$1(context, environmentUuid, USAGE$29);
79019
79211
  if (action === "show") return {
79020
79212
  kind: "outbound-rules",
79021
79213
  rules: await read(path)
@@ -79044,7 +79236,7 @@ function parsedRules(value) {
79044
79236
  const rules = JSON.parse(value ?? "");
79045
79237
  if (rules === null || Array.isArray(rules)) return rules;
79046
79238
  } catch {}
79047
- throw new UsageError(`--rules must be null or a JSON array of protocol, port and optional end_port.\n\n${USAGE$27}`);
79239
+ throw new UsageError(`--rules must be null or a JSON array of protocol, port and optional end_port.\n\n${USAGE$29}`);
79048
79240
  }
79049
79241
  /** The `environment outbound-rules …` renderer: the rules as the API states them. */
79050
79242
  function environmentOutboundRulesText(report) {
@@ -79095,7 +79287,7 @@ var RUNTIME_VERSION_GRANT_FLAG_SPECS = [
79095
79287
  description: "The grant UUID to revoke."
79096
79288
  }
79097
79289
  ];
79098
- var USAGE$26 = [
79290
+ var USAGE$28 = [
79099
79291
  "Usage:",
79100
79292
  " hostingctl environment runtime-version-grants --company <slug>",
79101
79293
  " hostingctl environment runtime-version-grants grant --company <slug> --type <type> --line <line>",
@@ -79123,18 +79315,18 @@ async function environmentRuntimeVersionGrants(context, rest) {
79123
79315
  kind: "runtime-version-grants",
79124
79316
  grants: (await hostingRuntimeVersionGrantsIndex({ path: { company } })).data
79125
79317
  };
79126
- if (tail.length > 0) throw new UsageError(USAGE$26);
79318
+ if (tail.length > 0) throw new UsageError(USAGE$28);
79127
79319
  if (action === "grant") return grant(context, company);
79128
79320
  if (action === "revoke") return revoke$3(context, company);
79129
- throw new UsageError(USAGE$26);
79321
+ throw new UsageError(USAGE$28);
79130
79322
  }
79131
79323
  async function grant(context, company) {
79132
79324
  const type = required$4(context, "--type");
79133
79325
  const line = required$4(context, "--line");
79134
79326
  const scope = required$4(context, "--scope");
79135
- if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$26}`);
79327
+ if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$28}`);
79136
79328
  const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
79137
- if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$26}`);
79329
+ if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$28}`);
79138
79330
  const reason = required$4(context, "--reason");
79139
79331
  const expiresAt = required$4(context, "--expires");
79140
79332
  return {
@@ -79167,7 +79359,7 @@ async function revoke$3(context, company) {
79167
79359
  /** One flag's value, refused by name when it was not given. */
79168
79360
  function required$4(context, flag) {
79169
79361
  const value = context.flags.get(flag)?.trim() ?? "";
79170
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$26}`);
79362
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$28}`);
79171
79363
  return value;
79172
79364
  }
79173
79365
  /** One line per grant: the line it names, who it covers, why, and when it ends. */
@@ -79316,6 +79508,9 @@ var ENVIRONMENT_USAGE = [
79316
79508
  " hostingctl environment reconcile <uuid> --company <slug>",
79317
79509
  " hostingctl environment scale <uuid> --company <slug> [--cpu <millicores>] [--memory <mib>]",
79318
79510
  " hostingctl environment cache-set <uuid> --company <slug> [--template <name>]",
79511
+ " hostingctl environment tool-credentials <uuid> [status|rotate] --company <slug>",
79512
+ " hostingctl environment redis-password <uuid> <workload-uuid> [status|rotate] --company <slug>",
79513
+ " hostingctl environment backup-password <uuid> [status|rotate] --company <slug>",
79319
79514
  " hostingctl environment purge-tokens <uuid> [status|rotate] --company <slug>",
79320
79515
  " hostingctl environment object-cache <uuid> --company <slug>",
79321
79516
  " hostingctl environment object-cache-set <uuid> --company <slug> --enabled <true|false> --generation <n>",
@@ -79350,6 +79545,9 @@ var ENVIRONMENT_USAGE = [
79350
79545
  " reconcile Ask the platform to apply this environment's recorded desired state again.",
79351
79546
  " scale Set what every application reserves in CPU and memory; how far each may burst above it is kept.",
79352
79547
  " cache-set Turn on the HTTP cache for every application that can carry it, using a starting pattern.",
79548
+ " tool-credentials Rotate tool credentials; sessions close and applications restart.",
79549
+ " redis-password Read status, or rotate a Redis service password; applications restart.",
79550
+ " backup-password Read status, or start/resume file-backup repository password rotation.",
79353
79551
  " purge-tokens Read rotation status, or rotate every cache purge token without restarting applications.",
79354
79552
  " object-cache This environment's recorded WordPress object-cache choice, whether it can serve it, and",
79355
79553
  " what the platform has applied.",
@@ -79391,7 +79589,7 @@ var ENVIRONMENT_USAGE = [
79391
79589
  "to standard output, and it changes nothing on the platform, so it needs no --confirm."
79392
79590
  ].join("\n");
79393
79591
  // src/commands/environment-runtime-versions.ts
79394
- var USAGE$25 = [
79592
+ var USAGE$27 = [
79395
79593
  "Usage: hostingctl environment runtime-versions --company <slug>",
79396
79594
  "",
79397
79595
  " runtime-versions The version lines each application type offers, which may be chosen now, and why the",
@@ -79408,7 +79606,7 @@ var USAGE$25 = [
79408
79606
  * will accept, and one reported as unavailable says which image is missing.
79409
79607
  */
79410
79608
  async function environmentRuntimeVersions(context, rest) {
79411
- if (rest.length > 0) throw new UsageError(USAGE$25);
79609
+ if (rest.length > 0) throw new UsageError(USAGE$27);
79412
79610
  return {
79413
79611
  kind: "runtime-versions",
79414
79612
  types: (await hostingRuntimeVersionsIndex({ path: { company: await requireCompany(context.flags) } })).data
@@ -79722,7 +79920,7 @@ function oneUuid$1(rest) {
79722
79920
  return uuid;
79723
79921
  }
79724
79922
  // src/commands/environment-services.ts
79725
- var USAGE$24 = [
79923
+ var USAGE$26 = [
79726
79924
  "Usage: hostingctl environment service-add-review <environment-uuid> <type> --company <slug> [--name <n>] [--replicas <n>]",
79727
79925
  " hostingctl environment service-add <environment-uuid> <type> --company <slug> --name <n> [--replicas <n>]",
79728
79926
  " hostingctl environment service-runtime <environment-uuid> <type> --company <slug> --running <on|off>",
@@ -79751,8 +79949,8 @@ var SERVICE_TYPES = /* @__PURE__ */ new Set([
79751
79949
  /** `environment service-*`, from the `environment` command. */
79752
79950
  async function environmentServices(context, subcommand, rest) {
79753
79951
  const [environmentUuid, type, ...tail] = rest;
79754
- const path = await environmentPath$1(context, environmentUuid, USAGE$24);
79755
- if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$24);
79952
+ const path = await environmentPath$1(context, environmentUuid, USAGE$26);
79953
+ if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$26);
79756
79954
  if (subcommand === "service-add-review") return await reviewAddition(context, path, type);
79757
79955
  if (subcommand === "service-retirement") return {
79758
79956
  kind: "service-retirement",
@@ -79765,7 +79963,7 @@ async function environmentServices(context, subcommand, rest) {
79765
79963
  if (subcommand === "service-runtime") return await runtime(context, path, type);
79766
79964
  if (subcommand === "service-protect") return await protect(context, path, type);
79767
79965
  if (subcommand === "service-retire") return await retire$1(context, path, type);
79768
- throw new UsageError(USAGE$24);
79966
+ throw new UsageError(USAGE$26);
79769
79967
  }
79770
79968
  /** `service-add-review <type> [--name …] [--replicas …]`. */
79771
79969
  async function reviewAddition(context, path, type) {
@@ -79788,9 +79986,9 @@ async function reviewAddition(context, path, type) {
79788
79986
  /** `service-add <type> --name … [--replicas …]`. */
79789
79987
  async function add$6(context, path, type) {
79790
79988
  const name = context.flags.get("--name")?.trim() ?? "";
79791
- if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$24}`);
79989
+ if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$26}`);
79792
79990
  const replicas = wholeNumber(context, "--replicas") ?? 1;
79793
- if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$24}`);
79991
+ if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$26}`);
79794
79992
  const serviceType = type;
79795
79993
  return await written$1(confirmableWrite(context, `Add the ${type} service "${name}" with ${String(replicas)} replica(s).`, async () => {
79796
79994
  const desiredGeneration = await environmentGeneration(path);
@@ -79807,7 +80005,7 @@ async function add$6(context, path, type) {
79807
80005
  }
79808
80006
  /** `service-runtime <type> --running …`. */
79809
80007
  async function runtime(context, path, type) {
79810
- const running = onOff$5(context, "--running", USAGE$24);
80008
+ const running = onOff$5(context, "--running", USAGE$26);
79811
80009
  return await written$1(confirmableWrite(context, `${running ? "Start" : "Stop"} the ${type} service. Its data is kept either way.`, async () => {
79812
80010
  const desiredGeneration = await environmentGeneration(path);
79813
80011
  const body = {
@@ -79825,7 +80023,7 @@ async function runtime(context, path, type) {
79825
80023
  }
79826
80024
  /** `service-protect <type> --locked …`. */
79827
80025
  async function protect(context, path, type) {
79828
- const locked = onOff$5(context, "--locked", USAGE$24);
80026
+ const locked = onOff$5(context, "--locked", USAGE$26);
79829
80027
  return await written$1(confirmableWrite(context, locked ? `Lock the ${type} service, so no removal path may delete it.` : `Unlock the ${type} service.`, async () => {
79830
80028
  const desiredGeneration = await environmentGeneration(path);
79831
80029
  const body = {
@@ -79844,7 +80042,7 @@ async function protect(context, path, type) {
79844
80042
  /** Retire against a reviewed digest and the client's explicit data disposition. */
79845
80043
  async function retire$1(context, path, type) {
79846
80044
  const digest = context.flags.get("--digest")?.trim() ?? "";
79847
- if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$24}`);
80045
+ if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$26}`);
79848
80046
  const confirmation = context.flags.get("--confirmation");
79849
80047
  const disposition = context.flags.get("--data-disposition");
79850
80048
  if (disposition !== void 0 && disposition !== "copy-taken" && disposition !== "accepted-loss") throw new UsageError("--data-disposition must be copy-taken or accepted-loss.");
@@ -79883,7 +80081,7 @@ function wholeNumber(context, flag) {
79883
80081
  const raw = context.flags.get(flag)?.trim() ?? "";
79884
80082
  if (raw === "") return null;
79885
80083
  const value = Number(raw);
79886
- if (!Number.isInteger(value) || value < 1) throw new UsageError(`${flag} must be a whole number of at least 1 (got ${raw}).\n\n${USAGE$24}`);
80084
+ if (!Number.isInteger(value) || value < 1) throw new UsageError(`${flag} must be a whole number of at least 1 (got ${raw}).\n\n${USAGE$26}`);
79887
80085
  return value;
79888
80086
  }
79889
80087
  /** The write receipt, by the shape the API answered with. */
@@ -79920,12 +80118,12 @@ function environmentServicesText(report) {
79920
80118
  return retirementText(report.review);
79921
80119
  }
79922
80120
  // src/commands/environment-site-access.ts
79923
- var USAGE$23 = [
80121
+ var USAGE$25 = [
79924
80122
  "Usage: hostingctl environment site-access <environment-uuid> --company <slug>",
79925
80123
  " hostingctl environment site-access-set <environment-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
79926
80124
  " hostingctl environment site-users <environment-uuid> --company <slug>",
79927
- " hostingctl environment site-user invite <environment-uuid> --company <slug> --email <address>",
79928
- " hostingctl environment site-user <resend|refresh|remove> <environment-uuid> <assignment-uuid> --company <slug>",
80125
+ " hostingctl environment site-user <environment-uuid> invite --company <slug> --email <address>",
80126
+ " hostingctl environment site-user <environment-uuid> <resend|refresh|remove> <assignment-uuid> --company <slug>",
79929
80127
  "",
79930
80128
  " site-access Whether the sites require sign-in, and the identity audience they trust.",
79931
80129
  " site-access-set Turn the requirement on or off, and name the audience.",
@@ -79966,15 +80164,15 @@ var flow = siteAccessFlow({
79966
80164
  refresh: async (path) => (await hostingSiteAccessUsersRefresh({ path })).data,
79967
80165
  destroy: async (path) => (await hostingSiteAccessUsersDestroy({ path })).data,
79968
80166
  rotate: null
79969
- }, USAGE$23);
80167
+ }, USAGE$25);
79970
80168
  /** `environment site-access*|site-user*`: resolve the environment, then run the shared flow. */
79971
80169
  async function environmentSiteAccess(context, action, rest) {
79972
80170
  const [environmentUuid, ...tail] = rest;
79973
- if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$23);
79974
- return await flow(context, action, await environmentPath$1(context, environmentUuid, USAGE$23), tail);
80171
+ if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$25);
80172
+ return await flow(context, action, await environmentPath$1(context, environmentUuid, USAGE$25), tail);
79975
80173
  }
79976
80174
  // src/commands/environment-tools.ts
79977
- var USAGE$22 = [
80175
+ var USAGE$24 = [
79978
80176
  "Usage: hostingctl environment tools verify <environment-uuid> <tool> --company <slug>",
79979
80177
  " hostingctl environment tools select <environment-uuid> <tool> --company <slug> --enabled <on|off>",
79980
80178
  "",
@@ -79988,8 +80186,8 @@ var USAGE$22 = [
79988
80186
  /** `environment tools verify|select`. */
79989
80187
  async function environmentTools(context, rest) {
79990
80188
  const [action, environmentUuid, tool, ...extra] = rest;
79991
- if (action === void 0 || tool === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
79992
- const path = await environmentPath$1(context, environmentUuid, USAGE$22);
80189
+ if (action === void 0 || tool === void 0 || extra.length > 0) throw new UsageError(USAGE$24);
80190
+ const path = await environmentPath$1(context, environmentUuid, USAGE$24);
79993
80191
  if (action === "verify") return {
79994
80192
  kind: "tool",
79995
80193
  tool,
@@ -79999,11 +80197,11 @@ async function environmentTools(context, rest) {
79999
80197
  } })).data
80000
80198
  };
80001
80199
  if (action === "select") return await select$1(context, path, tool);
80002
- throw new UsageError(USAGE$22);
80200
+ throw new UsageError(USAGE$24);
80003
80201
  }
80004
80202
  /** `select --enabled …`: one tool's presence, echoed with the environment's generation. */
80005
80203
  async function select$1(context, path, tool) {
80006
- const enabled = onOff$5(context, "--enabled", USAGE$22);
80204
+ const enabled = onOff$5(context, "--enabled", USAGE$24);
80007
80205
  return {
80008
80206
  kind: "tools-write",
80009
80207
  outcome: await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} the ${tool} tool for this environment.`, async () => {
@@ -80121,23 +80319,23 @@ function list$5(values) {
80121
80319
  var ENVIRONMENT_TOPICS = [
80122
80320
  {
80123
80321
  path: ["retention"],
80124
- usage: USAGE$33
80322
+ usage: USAGE$36
80125
80323
  },
80126
80324
  {
80127
80325
  path: ["retention-set"],
80128
- usage: USAGE$33
80326
+ usage: USAGE$36
80129
80327
  },
80130
80328
  {
80131
80329
  path: ["database-show"],
80132
- usage: USAGE$33
80330
+ usage: USAGE$36
80133
80331
  },
80134
80332
  {
80135
80333
  path: ["database-reveal"],
80136
- usage: USAGE$33
80334
+ usage: USAGE$36
80137
80335
  },
80138
80336
  {
80139
80337
  path: ["tuning"],
80140
- usage: USAGE$33
80338
+ usage: USAGE$36
80141
80339
  },
80142
80340
  {
80143
80341
  path: ["configuration"],
@@ -80165,155 +80363,155 @@ var ENVIRONMENT_TOPICS = [
80165
80363
  },
80166
80364
  {
80167
80365
  path: ["domains"],
80168
- usage: USAGE$30
80366
+ usage: USAGE$32
80169
80367
  },
80170
80368
  {
80171
80369
  path: ["domain-add"],
80172
- usage: USAGE$30
80370
+ usage: USAGE$32
80173
80371
  },
80174
80372
  {
80175
80373
  path: ["domain-verify"],
80176
- usage: USAGE$30
80374
+ usage: USAGE$32
80177
80375
  },
80178
80376
  {
80179
80377
  path: ["domain-check-routing"],
80180
- usage: USAGE$30
80378
+ usage: USAGE$32
80181
80379
  },
80182
80380
  {
80183
80381
  path: ["domain-intended"],
80184
- usage: USAGE$30
80382
+ usage: USAGE$32
80185
80383
  },
80186
80384
  {
80187
80385
  path: ["domain-primary"],
80188
- usage: USAGE$30
80386
+ usage: USAGE$32
80189
80387
  },
80190
80388
  {
80191
80389
  path: ["domain-remove"],
80192
- usage: USAGE$30
80390
+ usage: USAGE$32
80193
80391
  },
80194
80392
  {
80195
80393
  path: ["redirects"],
80196
- usage: USAGE$30
80394
+ usage: USAGE$32
80197
80395
  },
80198
80396
  {
80199
80397
  path: ["redirect-set"],
80200
- usage: USAGE$30
80398
+ usage: USAGE$32
80201
80399
  },
80202
80400
  {
80203
80401
  path: ["redirect-remove"],
80204
- usage: USAGE$30
80402
+ usage: USAGE$32
80205
80403
  },
80206
80404
  {
80207
80405
  path: ["export-sources"],
80208
- usage: USAGE$29
80406
+ usage: USAGE$31
80209
80407
  },
80210
80408
  {
80211
80409
  path: ["export-sources-refresh"],
80212
- usage: USAGE$29
80410
+ usage: USAGE$31
80213
80411
  },
80214
80412
  {
80215
80413
  path: ["export-create"],
80216
- usage: USAGE$29
80414
+ usage: USAGE$31
80217
80415
  },
80218
80416
  {
80219
80417
  path: ["database-exports"],
80220
- usage: USAGE$29
80418
+ usage: USAGE$31
80221
80419
  },
80222
80420
  {
80223
80421
  path: ["database-export-create"],
80224
- usage: USAGE$29
80422
+ usage: USAGE$31
80225
80423
  },
80226
80424
  {
80227
80425
  path: ["database-backup"],
80228
- usage: USAGE$29
80426
+ usage: USAGE$31
80229
80427
  },
80230
80428
  {
80231
80429
  path: ["database-backup-schedules"],
80232
- usage: USAGE$29
80430
+ usage: USAGE$31
80233
80431
  },
80234
80432
  {
80235
80433
  path: ["database-backup-schedule-stop"],
80236
- usage: USAGE$29
80434
+ usage: USAGE$31
80237
80435
  },
80238
80436
  {
80239
80437
  path: ["database-export-download"],
80240
- usage: USAGE$29
80438
+ usage: USAGE$31
80241
80439
  },
80242
80440
  {
80243
80441
  path: ["database-export-remove"],
80244
- usage: USAGE$29
80442
+ usage: USAGE$31
80245
80443
  },
80246
80444
  {
80247
80445
  path: ["database-import"],
80248
- usage: USAGE$29
80446
+ usage: USAGE$31
80249
80447
  },
80250
80448
  {
80251
80449
  path: ["database-import-confirm"],
80252
- usage: USAGE$29
80450
+ usage: USAGE$31
80253
80451
  },
80254
80452
  {
80255
80453
  path: ["release-bundle"],
80256
- usage: USAGE$29
80454
+ usage: USAGE$31
80257
80455
  },
80258
80456
  {
80259
80457
  path: ["service-add-review"],
80260
- usage: USAGE$24
80458
+ usage: USAGE$26
80261
80459
  },
80262
80460
  {
80263
80461
  path: ["service-add"],
80264
- usage: USAGE$24
80462
+ usage: USAGE$26
80265
80463
  },
80266
80464
  {
80267
80465
  path: ["service-runtime"],
80268
- usage: USAGE$24
80466
+ usage: USAGE$26
80269
80467
  },
80270
80468
  {
80271
80469
  path: ["service-protect"],
80272
- usage: USAGE$24
80470
+ usage: USAGE$26
80273
80471
  },
80274
80472
  {
80275
80473
  path: ["service-retirement"],
80276
- usage: USAGE$24
80474
+ usage: USAGE$26
80277
80475
  },
80278
80476
  {
80279
80477
  path: ["service-retire"],
80280
- usage: USAGE$24
80478
+ usage: USAGE$26
80281
80479
  },
80282
80480
  {
80283
80481
  path: ["site-access"],
80284
- usage: USAGE$23
80482
+ usage: USAGE$25
80285
80483
  },
80286
80484
  {
80287
80485
  path: ["site-access-set"],
80288
- usage: USAGE$23
80486
+ usage: USAGE$25
80289
80487
  },
80290
80488
  {
80291
80489
  path: ["site-users"],
80292
- usage: USAGE$23
80490
+ usage: USAGE$25
80293
80491
  },
80294
80492
  {
80295
80493
  path: ["site-user"],
80296
- usage: USAGE$23
80494
+ usage: USAGE$25
80297
80495
  },
80298
80496
  {
80299
80497
  path: ["tools"],
80300
- usage: USAGE$22
80498
+ usage: USAGE$24
80301
80499
  },
80302
80500
  {
80303
80501
  path: ["mode"],
80304
- usage: USAGE$28
80502
+ usage: USAGE$30
80305
80503
  },
80306
80504
  {
80307
80505
  path: ["outbound-rules"],
80308
- usage: USAGE$27
80506
+ usage: USAGE$29
80309
80507
  },
80310
80508
  {
80311
80509
  path: ["runtime-versions"],
80312
- usage: USAGE$25
80510
+ usage: USAGE$27
80313
80511
  },
80314
80512
  {
80315
80513
  path: ["runtime-version-grants"],
80316
- usage: USAGE$26
80514
+ usage: USAGE$28
80317
80515
  }
80318
80516
  ];
80319
80517
  // src/commands/environment-metadata.ts
@@ -80640,11 +80838,11 @@ async function objectCacheSet(context, path, usage) {
80640
80838
  };
80641
80839
  }
80642
80840
  // src/commands/environment-purge-tokens.ts
80643
- var USAGE$21 = "environment purge-tokens <environment-uuid> [status|rotate] --company <slug> [--dry-run|--confirm]";
80841
+ var USAGE$23 = "environment purge-tokens <environment-uuid> [status|rotate] --company <slug> [--dry-run|--confirm]";
80644
80842
  async function environmentPurgeTokens(context, rest) {
80645
80843
  const [environmentUuid, action = "status", ...extra] = rest;
80646
- if (!["status", "rotate"].includes(action) || extra.length > 0) throw new UsageError(USAGE$21);
80647
- const path = await environmentPath$1(context, environmentUuid, USAGE$21);
80844
+ if (!["status", "rotate"].includes(action) || extra.length > 0) throw new UsageError(USAGE$23);
80845
+ const path = await environmentPath$1(context, environmentUuid, USAGE$23);
80648
80846
  if (action === "status") return {
80649
80847
  kind: "purge-tokens",
80650
80848
  rotation: (await hostingEnvironmentsCachePurgeRotationShow({ path })).data
@@ -80660,8 +80858,29 @@ function purgeTokensText(rotation) {
80660
80858
  function environmentPurgeTokensText(report) {
80661
80859
  return report.kind === "purge-tokens" ? purgeTokensText(report.rotation) : renderWriteOutcome(report.outcome, purgeTokensText);
80662
80860
  }
80861
+ // src/commands/environment-redis-password.ts
80862
+ var USAGE$22 = "environment redis-password <environment-uuid> <workload-uuid> [status|rotate] --company <slug> [--dry-run|--confirm]";
80863
+ async function environmentRedisPassword(context, rest) {
80864
+ const [environmentUuid, workloadUuid, action = "status", ...extra] = rest;
80865
+ if (!workloadUuid || !["status", "rotate"].includes(action) || extra.length) throw new UsageError(USAGE$22);
80866
+ const path = {
80867
+ ...await environmentPath$1(context, environmentUuid, USAGE$22),
80868
+ workloadUuid
80869
+ };
80870
+ if (action === "status") return {
80871
+ kind: "redis-password",
80872
+ rotation: (await hostingEnvironmentsRedisRotationShow({ path })).data
80873
+ };
80874
+ return {
80875
+ kind: "redis-password-write",
80876
+ outcome: await confirmableWrite(context, `Start or resume Redis password rotation for service ${workloadUuid} in environment ${path.environmentUuid}, company ${path.company}. Redis and managed applications restart. Data is retained; the previous password is retired after replacement readiness.`, async () => (await hostingEnvironmentsRedisRotationStart({ path })).data)
80877
+ };
80878
+ }
80879
+ function environmentRedisPasswordText(report) {
80880
+ return report.kind === "redis-password" ? report.rotation.message : renderWriteOutcome(report.outcome, (rotation) => rotation.message);
80881
+ }
80663
80882
  // src/commands/environment-references.ts
80664
- var USAGE$20 = [
80883
+ var USAGE$21 = [
80665
80884
  "Usage: hostingctl environment references <environment-uuid> --company <slug>",
80666
80885
  "",
80667
80886
  " references Every producer a configuration document for this environment may reference, the kind",
@@ -80680,7 +80899,7 @@ var USAGE$20 = [
80680
80899
  */
80681
80900
  async function environmentReferences(context, rest) {
80682
80901
  const [uuid, ...extra] = rest;
80683
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$20);
80902
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$21);
80684
80903
  return (await hostingEnvironmentsReferences({ path: {
80685
80904
  company: await requireCompany(context.flags),
80686
80905
  environmentUuid: uuid
@@ -81227,6 +81446,27 @@ function storageJournalText(journal) {
81227
81446
  "Recorded rows only: what the disposal protocol wrote down, never a live reading of any volume."
81228
81447
  ].join("\n");
81229
81448
  }
81449
+ // src/commands/environment-tool-credentials.ts
81450
+ var USAGE$20 = "environment tool-credentials <environment-uuid> [status|rotate] --company <slug> [--dry-run|--confirm]";
81451
+ async function environmentToolCredentials(context, rest) {
81452
+ const [environmentUuid, action = "status", ...extra] = rest;
81453
+ if (!["status", "rotate"].includes(action) || extra.length > 0) throw new UsageError(USAGE$20);
81454
+ const path = await environmentPath$1(context, environmentUuid, USAGE$20);
81455
+ if (action === "status") return {
81456
+ kind: "tool-credentials",
81457
+ rotation: (await hostingEnvironmentsToolCredentialRotationShow({ path })).data
81458
+ };
81459
+ return {
81460
+ kind: "tool-credentials-write",
81461
+ outcome: await confirmableWrite(context, `Start or resume tool credential rotation for environment ${path.environmentUuid} in company ${path.company}. Tool sessions close, SSH host fingerprints change and managed applications restart. Customer-owned SFTP keys are unchanged.`, async () => (await hostingEnvironmentsToolCredentialRotationStart({ path })).data)
81462
+ };
81463
+ }
81464
+ function toolCredentialsText(rotation) {
81465
+ return rotation.message;
81466
+ }
81467
+ function environmentToolCredentialsText(report) {
81468
+ return report.kind === "tool-credentials" ? toolCredentialsText(report.rotation) : renderWriteOutcome(report.outcome, toolCredentialsText);
81469
+ }
81230
81470
  // src/commands/environment-tagged-text.ts
81231
81471
  /**
81232
81472
  * The renderer for a group-tagged answer.
@@ -81240,6 +81480,9 @@ function environmentTaggedText(report) {
81240
81480
  if (report.kind === "mode-review" || report.kind === "mode-write") return environmentModeText(report);
81241
81481
  if (report.kind === "outbound-rules" || report.kind === "outbound-rules-write") return environmentOutboundRulesText(report);
81242
81482
  if (report.kind === "purge-tokens" || report.kind === "purge-tokens-write") return environmentPurgeTokensText(report);
81483
+ if (report.kind === "backup-password" || report.kind === "backup-password-write") return environmentBackupPasswordText(report);
81484
+ if (report.kind === "redis-password" || report.kind === "redis-password-write") return environmentRedisPasswordText(report);
81485
+ if (report.kind === "tool-credentials" || report.kind === "tool-credentials-write") return environmentToolCredentialsText(report);
81243
81486
  return featureText(report);
81244
81487
  }
81245
81488
  function featureText(report) {
@@ -81820,6 +82063,9 @@ var SIMPLE_SUBCOMMANDS = {
81820
82063
  mode: environmentMode,
81821
82064
  "outbound-rules": environmentOutboundRules,
81822
82065
  "purge-tokens": environmentPurgeTokens,
82066
+ "backup-password": environmentBackupPassword,
82067
+ "redis-password": environmentRedisPassword,
82068
+ "tool-credentials": environmentToolCredentials,
81823
82069
  activate: environmentActivation,
81824
82070
  create: create$2,
81825
82071
  setup,
@@ -92446,7 +92692,7 @@ function writeUpdateState(state, env = process.env) {
92446
92692
  } catch {}
92447
92693
  }
92448
92694
  // src/version.ts
92449
- var VERSION = "1.0.855";
92695
+ var VERSION = "1.0.862";
92450
92696
  // src/commands/update.ts
92451
92697
  /**
92452
92698
  * `update` — bring this copy of the CLI up to the published version.
@@ -92520,7 +92766,7 @@ var update = {
92520
92766
  }, process.env);
92521
92767
  return {
92522
92768
  ...known,
92523
- current: after ?? "1.0.855",
92769
+ current: after ?? "1.0.862",
92524
92770
  latest: after ?? latest,
92525
92771
  upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
92526
92772
  action: "run",
@@ -92806,7 +93052,7 @@ async function printUpdateNotice(options) {
92806
93052
  }, env, { waitMs: NOTICE_LOCK_WAIT_MS });
92807
93053
  } catch {}
92808
93054
  if (latest === null) return;
92809
- if (!isNewerVersion(latest, "1.0.855")) return;
93055
+ if (!isNewerVersion(latest, "1.0.862")) return;
92810
93056
  process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
92811
93057
  }
92812
93058
  /** Whether an environment variable is set to something, which is how CI and the opt-out are read. */