@haakco/hostingctl 1.0.851 → 1.0.854

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
@@ -33774,6 +33774,38 @@ function hostingDeploymentCancel(options) {
33774
33774
  }));
33775
33775
  }
33776
33776
  /**
33777
+ * {@link /c/:company/hosting/environments/:environmentUuid/cache-purge-rotation}
33778
+ */
33779
+ function hostingEnvironmentsCachePurgeRotationShow(options) {
33780
+ const { client: request = client, ...config } = options;
33781
+ return withUnwrap(request({
33782
+ method: "GET",
33783
+ url: "/c/{company}/hosting/environments/{environmentUuid}/cache-purge-rotation",
33784
+ security: [{
33785
+ type: "http",
33786
+ scheme: "bearer"
33787
+ }],
33788
+ ...config,
33789
+ throwOnError: config.throwOnError ?? true
33790
+ }));
33791
+ }
33792
+ /**
33793
+ * {@link /c/:company/hosting/environments/:environmentUuid/cache-purge-rotation}
33794
+ */
33795
+ function hostingEnvironmentsCachePurgeRotationStart(options) {
33796
+ const { client: request = client, ...config } = options;
33797
+ return withUnwrap(request({
33798
+ method: "POST",
33799
+ url: "/c/{company}/hosting/environments/{environmentUuid}/cache-purge-rotation",
33800
+ security: [{
33801
+ type: "http",
33802
+ scheme: "bearer"
33803
+ }],
33804
+ ...config,
33805
+ throwOnError: config.throwOnError ?? true
33806
+ }));
33807
+ }
33808
+ /**
33777
33809
  * @description `effectiveAt` lets the review screen ask what a specific service-end date would
33778
33810
  * mean — in particular which date the retained data stops being recoverable —
33779
33811
  * without committing to it. It is a preview of the same computation the request
@@ -41246,7 +41278,7 @@ function emailText(email) {
41246
41278
  ].join("\n");
41247
41279
  }
41248
41280
  // src/commands/auth-account.ts
41249
- var USAGE$66 = [
41281
+ var USAGE$67 = [
41250
41282
  "Usage: hostingctl auth closure show",
41251
41283
  " hostingctl auth closure request --reason <text> (--current-password-file <path>|--current-password-stdin)",
41252
41284
  " hostingctl auth picture set --image-file <path>",
@@ -41272,26 +41304,26 @@ async function account$1(context, subcommand, rest) {
41272
41304
  if (subcommand === "picture") return await picture(context, action, tail);
41273
41305
  if (subcommand === "notifications") return await notifications(context, action, tail);
41274
41306
  if (subcommand === "sent-email" || subcommand === "sent-email-show") return await sentEmail(context, { kind: "auth" }, subcommand, rest);
41275
- throw new UsageError(USAGE$66);
41307
+ throw new UsageError(USAGE$67);
41276
41308
  }
41277
41309
  /** `auth closure show|request`. */
41278
41310
  async function closure(context, action, tail) {
41279
- if (tail.length > 0) throw new UsageError(USAGE$66);
41311
+ if (tail.length > 0) throw new UsageError(USAGE$67);
41280
41312
  if (action === "show") return (await accountClosureShow({})).data;
41281
41313
  if (action === "request") return await closeAccount(context);
41282
- throw new UsageError(USAGE$66);
41314
+ throw new UsageError(USAGE$67);
41283
41315
  }
41284
41316
  /** `auth picture set|remove`. */
41285
41317
  async function picture(context, action, tail) {
41286
- if (tail.length > 0) throw new UsageError(USAGE$66);
41318
+ if (tail.length > 0) throw new UsageError(USAGE$67);
41287
41319
  if (action === "set") return await setPicture(context);
41288
41320
  if (action === "remove") return await removePicture(context);
41289
- throw new UsageError(USAGE$66);
41321
+ throw new UsageError(USAGE$67);
41290
41322
  }
41291
41323
  /** `auth notifications`, `read <id>` or `read-all`. */
41292
41324
  async function notifications(context, action, tail) {
41293
41325
  if (action === void 0) {
41294
- if (tail.length > 0) throw new UsageError(USAGE$66);
41326
+ if (tail.length > 0) throw new UsageError(USAGE$67);
41295
41327
  return await allPages(async (page, perPage) => {
41296
41328
  const answer = await notificationIndex({ query: {
41297
41329
  page,
@@ -41307,7 +41339,7 @@ async function notifications(context, action, tail) {
41307
41339
  await notificationMarkAllRead({});
41308
41340
  return null;
41309
41341
  });
41310
- if (action !== "read" || tail.length !== 1) throw new UsageError(USAGE$66);
41342
+ if (action !== "read" || tail.length !== 1) throw new UsageError(USAGE$67);
41311
41343
  const notification = tail[0] ?? "";
41312
41344
  return await confirmableWrite(context, `Mark notification ${notification} read.`, async () => {
41313
41345
  await notificationMarkRead({ path: { notification } });
@@ -41323,11 +41355,11 @@ async function notifications(context, action, tail) {
41323
41355
  */
41324
41356
  async function closeAccount(context) {
41325
41357
  const reason = context.flags.get("--reason")?.trim() ?? "";
41326
- if (reason === "") throw new UsageError(`closure request needs --reason.\n\n${USAGE$66}`);
41358
+ if (reason === "") throw new UsageError(`closure request needs --reason.\n\n${USAGE$67}`);
41327
41359
  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 () => {
41328
41360
  const review = (await accountClosureShow({})).data;
41329
41361
  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"));
41330
- const currentPassword = readSecret(context, "current-password", 1024, USAGE$66);
41362
+ const currentPassword = readSecret(context, "current-password", 1024, USAGE$67);
41331
41363
  return (await accountClosureStore({ body: {
41332
41364
  reason,
41333
41365
  reviewedDigest: review.digest,
@@ -41339,7 +41371,7 @@ async function closeAccount(context) {
41339
41371
  async function setPicture(context) {
41340
41372
  const file = context.flags.get("--image-file") ?? "";
41341
41373
  return await confirmableWrite(context, file === "" ? "Set the profile picture." : `Set the profile picture to ${file}.`, async () => {
41342
- return (await profilePictureStore({ body: await imageUpload(file, USAGE$66) })).data;
41374
+ return (await profilePictureStore({ body: await imageUpload(file, USAGE$67) })).data;
41343
41375
  });
41344
41376
  }
41345
41377
  /** `auth picture remove`. */
@@ -41349,7 +41381,7 @@ async function removePicture(context) {
41349
41381
  });
41350
41382
  }
41351
41383
  // src/commands/auth-identity.ts
41352
- var USAGE$65 = [
41384
+ var USAGE$66 = [
41353
41385
  "Usage: hostingctl auth profile [--name <name>] [--email <email>] [--current-password-file <path>]",
41354
41386
  " hostingctl auth password (--current-password-file <path>|--current-password-stdin) (--new-password-file <path>|--new-password-stdin)",
41355
41387
  " hostingctl auth register --name <name> --email <email> (--password-file <path>|--password-stdin)",
@@ -41374,12 +41406,12 @@ var MAX_TOKEN_BYTES = 4096;
41374
41406
  /** One required flag's value, or a refusal naming the flag. */
41375
41407
  function required$8(context, flag) {
41376
41408
  const value = context.flags.get(flag)?.trim() ?? "";
41377
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$65}`);
41409
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$66}`);
41378
41410
  return value;
41379
41411
  }
41380
41412
  /** No positional arguments: every input here is a flag or a secret source. */
41381
41413
  function noPositional(rest) {
41382
- if (rest.length > 0) throw new UsageError(USAGE$65);
41414
+ if (rest.length > 0) throw new UsageError(USAGE$66);
41383
41415
  }
41384
41416
  /** The API's password contract takes a confirmation; the CLI's one input is the new password itself. */
41385
41417
  function passwordBody(password) {
@@ -41402,16 +41434,16 @@ async function identity(context, subcommand, rest) {
41402
41434
  if (subcommand === "forgot-password") return await forgotPassword(context);
41403
41435
  if (subcommand === "reset-password") return await resetPassword(context);
41404
41436
  if (subcommand === "verify-email") return await verifyEmail(context);
41405
- throw new UsageError(USAGE$65);
41437
+ throw new UsageError(USAGE$66);
41406
41438
  }
41407
41439
  /** `auth profile`: the account's own name and email, with the current password only when the email changes. */
41408
41440
  async function profile$2(context) {
41409
41441
  const name = context.flags.get("--name")?.trim() ?? "";
41410
41442
  const email = context.flags.get("--email")?.trim() ?? "";
41411
- 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$65}`);
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}`);
41412
41444
  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 () => {
41413
41445
  const current = (await authMe({})).data;
41414
- const currentPassword = hasSecret(context, "current-password") ? readSecret(context, "current-password", MAX_PASSWORD_BYTES$1, USAGE$65) : void 0;
41446
+ const currentPassword = hasSecret(context, "current-password") ? readSecret(context, "current-password", MAX_PASSWORD_BYTES$1, USAGE$66) : void 0;
41415
41447
  return (await authUpdateProfile({ body: {
41416
41448
  name: name === "" ? current.name ?? "" : name,
41417
41449
  email: email === "" ? current.email ?? "" : email,
@@ -41427,8 +41459,8 @@ function hasSecret(context, name) {
41427
41459
  async function password$1(context) {
41428
41460
  return await confirmableWrite(context, "Change the account's password.", async () => {
41429
41461
  return (await authChangePassword({ body: {
41430
- currentPassword: readSecret(context, "current-password", MAX_PASSWORD_BYTES$1, USAGE$65),
41431
- ...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES$1, USAGE$65))
41462
+ currentPassword: readSecret(context, "current-password", MAX_PASSWORD_BYTES$1, USAGE$66),
41463
+ ...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES$1, USAGE$66))
41432
41464
  } })).data;
41433
41465
  });
41434
41466
  }
@@ -41440,7 +41472,7 @@ async function register$1(context) {
41440
41472
  return (await authRegister({ body: {
41441
41473
  name,
41442
41474
  email,
41443
- ...passwordBody(readSecret(context, "password", MAX_PASSWORD_BYTES$1, USAGE$65))
41475
+ ...passwordBody(readSecret(context, "password", MAX_PASSWORD_BYTES$1, USAGE$66))
41444
41476
  } })).data;
41445
41477
  });
41446
41478
  }
@@ -41455,8 +41487,8 @@ async function forgotPassword(context) {
41455
41487
  async function resetPassword(context) {
41456
41488
  const email = required$8(context, "--email");
41457
41489
  return await confirmableWrite(context, `Reset the password for ${email}.`, async () => {
41458
- const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$65);
41459
- const password = readSecret(context, "password", MAX_PASSWORD_BYTES$1, USAGE$65);
41490
+ const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$66);
41491
+ const password = readSecret(context, "password", MAX_PASSWORD_BYTES$1, USAGE$66);
41460
41492
  return (await authResetPassword({ body: {
41461
41493
  token,
41462
41494
  email,
@@ -41471,7 +41503,7 @@ async function verifyEmail(context) {
41471
41503
  });
41472
41504
  }
41473
41505
  // src/commands/auth-impersonation.ts
41474
- var USAGE$64 = [
41506
+ var USAGE$65 = [
41475
41507
  "Usage: hostingctl auth impersonate start --target <user-uuid> --company <slug> --reason <text> [--minutes <n>] --store-as <profile>",
41476
41508
  " hostingctl auth impersonate status",
41477
41509
  " hostingctl auth impersonate stop",
@@ -41504,7 +41536,7 @@ async function impersonation(context, rest) {
41504
41536
  if (action === "stop" && tail.length === 0) return await stop(context);
41505
41537
  if (action === "list" && tail.length === 0) return await list$7();
41506
41538
  if (action === "end" && tail.length === 1) return await end(context, tail[0] ?? "");
41507
- throw new UsageError(USAGE$64);
41539
+ throw new UsageError(USAGE$65);
41508
41540
  }
41509
41541
  /** `start`: mint a token for another user, and keep it in a profile of its own. */
41510
41542
  async function start$2(context) {
@@ -41512,8 +41544,8 @@ async function start$2(context) {
41512
41544
  const company = context.flags.get("--company")?.trim() ?? "";
41513
41545
  const reason = context.flags.get("--reason")?.trim() ?? "";
41514
41546
  const storeAs = context.flags.get("--store-as")?.trim() ?? "";
41515
- if (target === "" || company === "" || reason === "") throw new UsageError(`start needs --target, --company and --reason.\n\n${USAGE$64}`);
41516
- if (storeAs === "") throw new UsageError(`start needs --store-as <profile>.\n\n${USAGE$64}`);
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}`);
41517
41549
  const minutes = wholeNumberFlag(context.flags, "--minutes") ?? DEFAULT_MINUTES;
41518
41550
  const document = await readProfiles();
41519
41551
  const operator = namedProfile(context.flags, document);
@@ -41607,7 +41639,7 @@ async function list$7() {
41607
41639
  }
41608
41640
  /** `end <uuid>`: end one recorded session by its uuid. */
41609
41641
  async function end(context, uuid) {
41610
- if (uuid === "") throw new UsageError(USAGE$64);
41642
+ if (uuid === "") throw new UsageError(USAGE$65);
41611
41643
  return await confirmableWrite(context, `End impersonation session ${uuid}.`, async () => ({
41612
41644
  ...EMPTY,
41613
41645
  action: "end",
@@ -41615,7 +41647,7 @@ async function end(context, uuid) {
41615
41647
  }));
41616
41648
  }
41617
41649
  // src/commands/auth-push.ts
41618
- var USAGE$63 = [
41650
+ var USAGE$64 = [
41619
41651
  "Usage: hostingctl auth push-token set (--token-file <path>|--token-stdin)",
41620
41652
  " hostingctl auth push-token remove (--token-file <path>|--token-stdin)",
41621
41653
  "",
@@ -41626,12 +41658,12 @@ var USAGE$63 = [
41626
41658
  /** `auth push-token set|remove`: this account's mobile push registration. */
41627
41659
  async function authPush(context, rest) {
41628
41660
  const [action, ...tail] = rest;
41629
- if (tail.length > 0) throw new UsageError(USAGE$63);
41661
+ if (tail.length > 0) throw new UsageError(USAGE$64);
41630
41662
  if (action === "set") return {
41631
41663
  kind: "push-token",
41632
41664
  action: "set",
41633
41665
  sent: (await confirmableWrite(context, "Register this device's push token.", async () => {
41634
- await expoTokenStore({ body: { token: readSecret(context, "token", 4096, USAGE$63) } });
41666
+ await expoTokenStore({ body: { token: readSecret(context, "token", 4096, USAGE$64) } });
41635
41667
  return null;
41636
41668
  })).sent
41637
41669
  };
@@ -41639,11 +41671,11 @@ async function authPush(context, rest) {
41639
41671
  kind: "push-token",
41640
41672
  action: "remove",
41641
41673
  sent: (await confirmableWrite(context, "Remove this device's push token.", async () => {
41642
- await expoTokenDestroy({ query: { token: readSecret(context, "token", 4096, USAGE$63) } });
41674
+ await expoTokenDestroy({ query: { token: readSecret(context, "token", 4096, USAGE$64) } });
41643
41675
  return null;
41644
41676
  })).sent
41645
41677
  };
41646
- throw new UsageError(USAGE$63);
41678
+ throw new UsageError(USAGE$64);
41647
41679
  }
41648
41680
  /** The `auth push-token` renderer. */
41649
41681
  function authPushText(report) {
@@ -41871,51 +41903,51 @@ var AUTH_TOPICS = [
41871
41903
  },
41872
41904
  {
41873
41905
  path: ["profile"],
41874
- usage: USAGE$65
41906
+ usage: USAGE$66
41875
41907
  },
41876
41908
  {
41877
41909
  path: ["password"],
41878
- usage: USAGE$65
41910
+ usage: USAGE$66
41879
41911
  },
41880
41912
  {
41881
41913
  path: ["register"],
41882
- usage: USAGE$65
41914
+ usage: USAGE$66
41883
41915
  },
41884
41916
  {
41885
41917
  path: ["forgot-password"],
41886
- usage: USAGE$65
41918
+ usage: USAGE$66
41887
41919
  },
41888
41920
  {
41889
41921
  path: ["reset-password"],
41890
- usage: USAGE$65
41922
+ usage: USAGE$66
41891
41923
  },
41892
41924
  {
41893
41925
  path: ["verify-email"],
41894
- usage: USAGE$65
41926
+ usage: USAGE$66
41895
41927
  },
41896
41928
  {
41897
41929
  path: ["closure"],
41898
- usage: USAGE$66
41930
+ usage: USAGE$67
41899
41931
  },
41900
41932
  {
41901
41933
  path: ["picture"],
41902
- usage: USAGE$66
41934
+ usage: USAGE$67
41903
41935
  },
41904
41936
  {
41905
41937
  path: ["notifications"],
41906
- usage: USAGE$66
41938
+ usage: USAGE$67
41907
41939
  },
41908
41940
  {
41909
41941
  path: ["push-token"],
41910
- usage: USAGE$63
41942
+ usage: USAGE$64
41911
41943
  },
41912
41944
  {
41913
41945
  path: ["impersonate"],
41914
- usage: USAGE$64
41946
+ usage: USAGE$65
41915
41947
  }
41916
41948
  ];
41917
41949
  // src/commands/auth-sessions.ts
41918
- var USAGE$62 = [
41950
+ var USAGE$63 = [
41919
41951
  "Usage: hostingctl auth profiles",
41920
41952
  "",
41921
41953
  "Lists every session this machine holds: the profile name, the API it signs in to, when its access token",
@@ -41933,7 +41965,7 @@ var USAGE$62 = [
41933
41965
  * made a machine signed in to two accounts look like a machine signed in to none.
41934
41966
  */
41935
41967
  async function authSessions(context, rest) {
41936
- if (rest.length > 0) throw new UsageError(USAGE$62);
41968
+ if (rest.length > 0) throw new UsageError(USAGE$63);
41937
41969
  const document = await readProfiles();
41938
41970
  const selected = namedProfile(context.flags, document);
41939
41971
  const profiles = Object.entries(document.profiles).map(([name, stored]) => ({
@@ -42681,7 +42713,7 @@ var MAILBOX_TOPICS = [{
42681
42713
  usage: MAILBOX_IMPORT_USAGE
42682
42714
  }];
42683
42715
  // src/commands/mailbox-recovery.ts
42684
- var USAGE$61 = [
42716
+ var USAGE$62 = [
42685
42717
  "Usage: hostingctl mailbox recovery <request|verify|reset> [options]",
42686
42718
  "",
42687
42719
  " request --address <address> Ask for a self-service reset link for a mailbox address.",
@@ -42709,16 +42741,16 @@ function isSessionlessMailboxCommand(argv) {
42709
42741
  /** `mailbox recovery request|verify|reset`: the unauthenticated, token-authorized recovery journey. */
42710
42742
  async function runMailboxRecovery(context, rest) {
42711
42743
  const [action, extra] = rest;
42712
- if (extra !== void 0) throw new UsageError(USAGE$61);
42744
+ if (extra !== void 0) throw new UsageError(USAGE$62);
42713
42745
  if (action === "request") return await request$3(context);
42714
42746
  if (action === "verify") return await verify$2(context);
42715
42747
  if (action === "reset") return await reset(context);
42716
- throw new UsageError(USAGE$61);
42748
+ throw new UsageError(USAGE$62);
42717
42749
  }
42718
42750
  /** `request`: the answer is deliberately identical whether or not an eligible mailbox exists. */
42719
42751
  async function request$3(context) {
42720
42752
  const address = context.flags.get("--address");
42721
- if (address === void 0 || address === "") throw new UsageError(USAGE$61);
42753
+ if (address === void 0 || address === "") throw new UsageError(USAGE$62);
42722
42754
  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);
42723
42755
  }
42724
42756
  /** `verify`: the token is read only when the send actually happens, so a dry run never touches a secret. */
@@ -42739,7 +42771,7 @@ async function reset(context) {
42739
42771
  }
42740
42772
  /** One recovery token or new password, read from a private file or stdin under the recovery bound. */
42741
42773
  function recoverySecret(context, name) {
42742
- return readSecret(context, name, MAX_RECOVERY_SECRET_BYTES, USAGE$61);
42774
+ return readSecret(context, name, MAX_RECOVERY_SECRET_BYTES, USAGE$62);
42743
42775
  }
42744
42776
  // src/commands/mailbox.ts
42745
42777
  /**
@@ -42872,7 +42904,7 @@ async function environmentGeneration(path) {
42872
42904
  }
42873
42905
  // src/commands/access-credentials.ts
42874
42906
  /** The usage this module refuses with, owned by the commands it implements. */
42875
- var USAGE$60 = [
42907
+ var USAGE$61 = [
42876
42908
  "Usage: hostingctl access key add <environment-uuid> --company <slug> --access-user <uuid> --name <n> --public-key-file <path>",
42877
42909
  " hostingctl access key remove <environment-uuid> --company <slug> --access-user <uuid> <key-uuid>",
42878
42910
  " hostingctl access password set <environment-uuid> --company <slug> --access-user <uuid> (--password-file <path>|--password-stdin)",
@@ -42890,12 +42922,12 @@ var USAGE$60 = [
42890
42922
  /** `key add|remove`. */
42891
42923
  async function key(context, path, action, tail) {
42892
42924
  const accessUserUuid = context.flags.get("--access-user") ?? "";
42893
- if (accessUserUuid === "") throw new UsageError(`key needs --access-user.\\n\\n${USAGE$60}`);
42925
+ if (accessUserUuid === "") throw new UsageError(`key needs --access-user.\\n\\n${USAGE$61}`);
42894
42926
  if (action === "add") {
42895
- if (tail.length > 0) throw new UsageError(USAGE$60);
42927
+ if (tail.length > 0) throw new UsageError(USAGE$61);
42896
42928
  const name = context.flags.get("--name")?.trim() ?? "";
42897
42929
  const file = context.flags.get("--public-key-file") ?? "";
42898
- if (name === "" || file === "") throw new UsageError(`key add needs --name and --public-key-file.\\n\\n${USAGE$60}`);
42930
+ if (name === "" || file === "") throw new UsageError(`key add needs --name and --public-key-file.\\n\\n${USAGE$61}`);
42899
42931
  const publicKey = readPrivateFile(file, "public key", 8192).trim();
42900
42932
  return await confirmableWrite(context, `Add key "${name}" to login ${accessUserUuid}.`, async () => {
42901
42933
  const body = {
@@ -42914,7 +42946,7 @@ async function key(context, path, action, tail) {
42914
42946
  }
42915
42947
  if (action === "remove") {
42916
42948
  const [keyUuid, ...extra] = tail;
42917
- if (keyUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$60);
42949
+ if (keyUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$61);
42918
42950
  return await confirmableWrite(context, `Remove key ${keyUuid} from login ${accessUserUuid}.`, async () => {
42919
42951
  return (await hostingAccessDestroyKey({
42920
42952
  path: {
@@ -42926,18 +42958,18 @@ async function key(context, path, action, tail) {
42926
42958
  })).data;
42927
42959
  });
42928
42960
  }
42929
- throw new UsageError(USAGE$60);
42961
+ throw new UsageError(USAGE$61);
42930
42962
  }
42931
42963
  /** `password set|clear`. */
42932
42964
  async function password(context, path, action, tail) {
42933
42965
  const accessUserUuid = context.flags.get("--access-user") ?? "";
42934
- if (accessUserUuid === "" || tail.length > 0) throw new UsageError(`password needs --access-user.\\n\\n${USAGE$60}`);
42966
+ if (accessUserUuid === "" || tail.length > 0) throw new UsageError(`password needs --access-user.\\n\\n${USAGE$61}`);
42935
42967
  const userPath = {
42936
42968
  ...path,
42937
42969
  accessUserUuid
42938
42970
  };
42939
42971
  if (action === "set") return await confirmableWrite(context, "Set this login's password. The previous password stops working when the change is applied.", async () => {
42940
- const password = readSecret(context, "password", 1024, USAGE$60);
42972
+ const password = readSecret(context, "password", 1024, USAGE$61);
42941
42973
  const body = {
42942
42974
  desiredGeneration: await environmentGeneration(path),
42943
42975
  password,
@@ -42955,7 +42987,7 @@ async function password(context, path, action, tail) {
42955
42987
  query
42956
42988
  })).data;
42957
42989
  });
42958
- throw new UsageError(USAGE$60);
42990
+ throw new UsageError(USAGE$61);
42959
42991
  }
42960
42992
  // src/commands/booleans.ts
42961
42993
  /**
@@ -42978,7 +43010,7 @@ function onOff$5(context, flag, usage) {
42978
43010
  return value;
42979
43011
  }
42980
43012
  // src/commands/access-admin.ts
42981
- var USAGE$59 = [
43013
+ var USAGE$60 = [
42982
43014
  "Usage: hostingctl access settings <environment-uuid> --company <slug>",
42983
43015
  " hostingctl access settings-set <environment-uuid> --company <slug> --password <on|off> --sftp-only <on|off>",
42984
43016
  " hostingctl access grants <environment-uuid> --company <slug>",
@@ -43006,7 +43038,7 @@ var USAGE$59 = [
43006
43038
  /** `access settings|settings-set|grants|grant|un-grant|key|password|user-show|user-set|received`. */
43007
43039
  async function accessAdmin(context, subcommand, rest) {
43008
43040
  if (subcommand === "received") {
43009
- if (rest.length > 0) throw new UsageError(USAGE$59);
43041
+ if (rest.length > 0) throw new UsageError(USAGE$60);
43010
43042
  return {
43011
43043
  kind: "received",
43012
43044
  grants: (await hostingAccessReceivedIndex({})).data.items
@@ -43014,7 +43046,7 @@ async function accessAdmin(context, subcommand, rest) {
43014
43046
  }
43015
43047
  const [first, ...after] = rest;
43016
43048
  const takesAction = subcommand === "key" || subcommand === "password";
43017
- const path = await environmentPath$1(context, takesAction ? after[0] : first, USAGE$59);
43049
+ const path = await environmentPath$1(context, takesAction ? after[0] : first, USAGE$60);
43018
43050
  const tail = takesAction ? after.slice(1) : after;
43019
43051
  return await routed(context, subcommand, path, first ?? "", tail);
43020
43052
  }
@@ -43029,7 +43061,7 @@ async function routed(context, subcommand, path, action, tail) {
43029
43061
  if (subcommand === "password") return await written$9(password(context, path, action, tail));
43030
43062
  if (subcommand === "user-show") return await userShow(path, tail);
43031
43063
  if (subcommand === "user-set") return await written$9(userSet(context, path, tail));
43032
- throw new UsageError(USAGE$59);
43064
+ throw new UsageError(USAGE$60);
43033
43065
  }
43034
43066
  /** Tag one write's outcome with the group that produced it. */
43035
43067
  async function written$9(pending) {
@@ -43040,7 +43072,7 @@ async function written$9(pending) {
43040
43072
  }
43041
43073
  /** A company-wide read takes no positionals. */
43042
43074
  function noExtra$22(rest) {
43043
- if (rest.length > 0) throw new UsageError(USAGE$59);
43075
+ if (rest.length > 0) throw new UsageError(USAGE$60);
43044
43076
  }
43045
43077
  /** `settings`. */
43046
43078
  async function settings$1(path, rest) {
@@ -43053,8 +43085,8 @@ async function settings$1(path, rest) {
43053
43085
  /** `settings-set --password … --sftp-only …`. */
43054
43086
  async function settingsSet(context, path, rest) {
43055
43087
  noExtra$22(rest);
43056
- const passwordEnabled = onOff$5(context, "--password", USAGE$59);
43057
- const sftpOnly = onOff$5(context, "--sftp-only", USAGE$59);
43088
+ const passwordEnabled = onOff$5(context, "--password", USAGE$60);
43089
+ const sftpOnly = onOff$5(context, "--sftp-only", USAGE$60);
43058
43090
  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 () => {
43059
43091
  return (await hostingAccessUpdate({
43060
43092
  path,
@@ -43079,7 +43111,7 @@ async function grant$1(context, path, rest) {
43079
43111
  noExtra$22(rest);
43080
43112
  const userUuid = context.flags.get("--user") ?? "";
43081
43113
  const accessUserUuid = context.flags.get("--access-user") ?? "";
43082
- if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$59}`);
43114
+ if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$60}`);
43083
43115
  return await confirmableWrite(context, `Grant user ${userUuid} the login ${accessUserUuid} on this environment.`, async () => {
43084
43116
  return (await hostingAccessGrantStore({
43085
43117
  path,
@@ -43094,7 +43126,7 @@ async function grant$1(context, path, rest) {
43094
43126
  /** `un-grant <grant-uuid>`. */
43095
43127
  async function unGrant(context, path, rest) {
43096
43128
  const [grantUuid, ...extra] = rest;
43097
- if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$59);
43129
+ if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$60);
43098
43130
  return await confirmableWrite(context, `Withdraw grant ${grantUuid}. The login stays; only this account's access to it ends.`, async () => {
43099
43131
  const query = { desiredGeneration: await environmentGeneration(path) };
43100
43132
  return (await hostingAccessGrantDestroy({
@@ -43109,7 +43141,7 @@ async function unGrant(context, path, rest) {
43109
43141
  /** `user-show <access-user-uuid>`. */
43110
43142
  async function userShow(path, rest) {
43111
43143
  const [accessUserUuid, ...extra] = rest;
43112
- if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$59);
43144
+ if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$60);
43113
43145
  return {
43114
43146
  kind: "user",
43115
43147
  user: (await hostingAccessShowUser({ path: {
@@ -43121,7 +43153,7 @@ async function userShow(path, rest) {
43121
43153
  /** `user-set <access-user-uuid> [--name] [--enabled] [--read-only]`. */
43122
43154
  async function userSet(context, path, rest) {
43123
43155
  const [accessUserUuid, ...extra] = rest;
43124
- if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$59);
43156
+ if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$60);
43125
43157
  const userPath = {
43126
43158
  ...path,
43127
43159
  accessUserUuid
@@ -43130,7 +43162,7 @@ async function userSet(context, path, rest) {
43130
43162
  const name = context.flags.get("--name")?.trim();
43131
43163
  const enabled = onOffFlag(context, "--enabled");
43132
43164
  const readOnly = onOffFlag(context, "--read-only");
43133
- if (name === void 0 && enabled === null && readOnly === null) throw new UsageError(`user-set needs --name, --enabled, --read-only or a combination.\\n\\n${USAGE$59}`);
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}`);
43134
43166
  const body = {
43135
43167
  desiredGeneration: await environmentGeneration(path),
43136
43168
  name: name === void 0 || name === "" ? current.name : name,
@@ -43280,43 +43312,43 @@ var ACCESS_METADATA = {
43280
43312
  var ACCESS_TOPICS = [
43281
43313
  {
43282
43314
  path: ["settings"],
43283
- usage: USAGE$59
43315
+ usage: USAGE$60
43284
43316
  },
43285
43317
  {
43286
43318
  path: ["settings-set"],
43287
- usage: USAGE$59
43319
+ usage: USAGE$60
43288
43320
  },
43289
43321
  {
43290
43322
  path: ["grants"],
43291
- usage: USAGE$59
43323
+ usage: USAGE$60
43292
43324
  },
43293
43325
  {
43294
43326
  path: ["grant"],
43295
- usage: USAGE$59
43327
+ usage: USAGE$60
43296
43328
  },
43297
43329
  {
43298
43330
  path: ["un-grant"],
43299
- usage: USAGE$59
43331
+ usage: USAGE$60
43300
43332
  },
43301
43333
  {
43302
43334
  path: ["user-show"],
43303
- usage: USAGE$59
43335
+ usage: USAGE$60
43304
43336
  },
43305
43337
  {
43306
43338
  path: ["user-set"],
43307
- usage: USAGE$59
43339
+ usage: USAGE$60
43308
43340
  },
43309
43341
  {
43310
43342
  path: ["received"],
43311
- usage: USAGE$59
43343
+ usage: USAGE$60
43312
43344
  },
43313
43345
  {
43314
43346
  path: ["key"],
43315
- usage: USAGE$60
43347
+ usage: USAGE$61
43316
43348
  },
43317
43349
  {
43318
43350
  path: ["password"],
43319
- usage: USAGE$60
43351
+ usage: USAGE$61
43320
43352
  }
43321
43353
  ];
43322
43354
  // src/commands/access.ts
@@ -43681,7 +43713,7 @@ function notAMember(unknown, eligible) {
43681
43713
  ].join("\n");
43682
43714
  }
43683
43715
  // src/commands/environment-storage-usage.ts
43684
- var USAGE$58 = [
43716
+ var USAGE$59 = [
43685
43717
  "Usage: hostingctl environment storage-usage <environment-uuid> --company <slug>",
43686
43718
  "",
43687
43719
  " storage-usage What each volume was allocated, what it has written and what is left, from the",
@@ -43700,7 +43732,7 @@ var USAGE$58 = [
43700
43732
  */
43701
43733
  async function environmentStorageUsage(context, rest) {
43702
43734
  const [uuid, ...extra] = rest;
43703
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$58);
43735
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$59);
43704
43736
  return (await hostingEnvironmentsStorageUsage({ path: {
43705
43737
  company: await requireCompany(context.flags),
43706
43738
  environmentUuid: uuid
@@ -44148,7 +44180,7 @@ var ADMIN_ACTIONS = /* @__PURE__ */ new Set([
44148
44180
  "recovery-cancel"
44149
44181
  ]);
44150
44182
  // src/commands/application-admin.ts
44151
- var USAGE$57 = [
44183
+ var USAGE$58 = [
44152
44184
  "Usage: hostingctl application administrator <environment-uuid> <application-uuid> --company <slug>",
44153
44185
  " hostingctl application administrator-reset|administrator-reveal <environment-uuid> <application-uuid> --company <slug>",
44154
44186
  " hostingctl application recovery-status|recovery-retry|recovery-cancel <environment-uuid> <application-uuid> <recovery-uuid> --company <slug>",
@@ -44175,7 +44207,7 @@ async function applicationAdmin(context, action, path, rest) {
44175
44207
  if (action === "administrator-reset") return await credential(context, path, rest, "reset");
44176
44208
  if (action === "administrator-reveal") return await credential(context, path, rest, "reveal");
44177
44209
  const [recoveryUuid, ...extra] = rest;
44178
- if (recoveryUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$57);
44210
+ if (recoveryUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$58);
44179
44211
  const recoveryPath = {
44180
44212
  ...path,
44181
44213
  recoveryUuid
@@ -44188,7 +44220,7 @@ async function applicationAdmin(context, action, path, rest) {
44188
44220
  return (await hostingApplicationRecoveryRetry({ path: recoveryPath })).data;
44189
44221
  }));
44190
44222
  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));
44191
- throw new UsageError(USAGE$57);
44223
+ throw new UsageError(USAGE$58);
44192
44224
  }
44193
44225
  /** `administrator-reset|reveal`: the one place the application's own password is printed. */
44194
44226
  async function credential(context, path, rest, kind) {
@@ -44209,7 +44241,7 @@ async function written$8(pending) {
44209
44241
  }
44210
44242
  /** No positional arguments, or a usage refusal. */
44211
44243
  function noExtra$21(rest) {
44212
- if (rest.length > 0) throw new UsageError(USAGE$57);
44244
+ if (rest.length > 0) throw new UsageError(USAGE$58);
44213
44245
  }
44214
44246
  /** One recovery as one line: what it is doing, how far, and what it holds. */
44215
44247
  function recoveryLines$1(one) {
@@ -44608,7 +44640,7 @@ async function requireSelectionBranch(company, selectionUuid, branch) {
44608
44640
  throw new UsageError(`Branch "${branch}" is not a branch of ${found.selection.owner}/${found.selection.name}. Its branches: ${offered.branches.join(", ")}.`);
44609
44641
  }
44610
44642
  // src/commands/application-builds.ts
44611
- var USAGE$56 = [
44643
+ var USAGE$57 = [
44612
44644
  "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>]]",
44613
44645
  " hostingctl application build-log <environment-uuid> <application-uuid> <build-uuid> --company <slug>",
44614
44646
  " hostingctl application build-retry|build-cancel <environment-uuid> <application-uuid> <build-uuid> --company <slug>",
@@ -44638,7 +44670,7 @@ async function applicationBuilds(context, action, path, rest) {
44638
44670
  }
44639
44671
  if (action === "source-bind") return await bind$2(context, path, rest);
44640
44672
  const [buildUuid, ...extra] = rest;
44641
- if (buildUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$56);
44673
+ if (buildUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$57);
44642
44674
  const buildPath = {
44643
44675
  ...path,
44644
44676
  buildUuid
@@ -44653,7 +44685,7 @@ async function applicationBuilds(context, action, path, rest) {
44653
44685
  if (action === "build-cancel") return await written$7(confirmableWrite(context, "Stop this build. A running build stops where it is.", async () => {
44654
44686
  return (await hostingDeploymentCancel({ path: buildPath })).data;
44655
44687
  }));
44656
- throw new UsageError(USAGE$56);
44688
+ throw new UsageError(USAGE$57);
44657
44689
  }
44658
44690
  /**
44659
44691
  * `source-bind --selection … | --ssh-source … [--source-kind …] [--branch …] [--tag …] [--auto-deploy …]`.
@@ -44665,7 +44697,7 @@ async function bind$2(context, path, rest) {
44665
44697
  noExtra$20(rest);
44666
44698
  const repositorySelectionUuid = context.flags.get("--selection")?.trim() ?? "";
44667
44699
  const sshSourceUuid = context.flags.get("--ssh-source")?.trim() ?? "";
44668
- if (repositorySelectionUuid === "" === (sshSourceUuid === "")) throw new UsageError(`source-bind needs exactly one of --selection or --ssh-source.\n\n${USAGE$56}`);
44700
+ if (repositorySelectionUuid === "" === (sshSourceUuid === "")) throw new UsageError(`source-bind needs exactly one of --selection or --ssh-source.\n\n${USAGE$57}`);
44669
44701
  const sourceKind = sourceKindFlag(context, sshSourceUuid === "" ? "github" : "ssh");
44670
44702
  const branch = context.flags.get("--branch")?.trim();
44671
44703
  const tag = context.flags.get("--tag")?.trim();
@@ -44690,8 +44722,8 @@ async function bind$2(context, path, rest) {
44690
44722
  function sourceKindFlag(context, implied) {
44691
44723
  const value = context.flags.get("--source-kind")?.trim() ?? "";
44692
44724
  if (value === "") return implied;
44693
- if (value !== "github" && value !== "ssh") throw new UsageError(`--source-kind must be github or ssh (got "${value}").\n\n${USAGE$56}`);
44694
- if (value !== implied) throw new UsageError(`--source-kind ${value} does not match the ${implied} reference named.\n\n${USAGE$56}`);
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}`);
44695
44727
  return value;
44696
44728
  }
44697
44729
  /** Tag one write's outcome with the group that produced it. */
@@ -44703,7 +44735,7 @@ async function written$7(pending) {
44703
44735
  }
44704
44736
  /** No positional arguments, or a usage refusal. */
44705
44737
  function noExtra$20(rest) {
44706
- if (rest.length > 0) throw new UsageError(USAGE$56);
44738
+ if (rest.length > 0) throw new UsageError(USAGE$57);
44707
44739
  }
44708
44740
  /**
44709
44741
  * `build <env> <workload> [--source …|--source-upload …|--ssh-source …] [--idempotency-key …]`: queue a build.
@@ -44830,7 +44862,7 @@ function overCurrent(current, named) {
44830
44862
  };
44831
44863
  }
44832
44864
  // src/commands/application-cache.ts
44833
- var USAGE$55 = [
44865
+ var USAGE$56 = [
44834
44866
  "Usage: hostingctl application cache <environment-uuid> <application-uuid> --company <slug>",
44835
44867
  " 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>]",
44836
44868
  " hostingctl application cache-purge <environment-uuid> <application-uuid> --company <slug>",
@@ -44873,7 +44905,7 @@ async function applicationCache(context, action, path, rest) {
44873
44905
  }
44874
44906
  if (action === "canonical") {
44875
44907
  const routeUuid = context.flags.get("--route") ?? "";
44876
- if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$55}`);
44908
+ if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$56}`);
44877
44909
  return await written$6(confirmableWrite(context, `Make route ${routeUuid} this application's canonical address.`, async () => {
44878
44910
  const desiredGeneration = await generation$1(path);
44879
44911
  return (await hostingApplicationRouteSelectCanonical({
@@ -44885,7 +44917,7 @@ async function applicationCache(context, action, path, rest) {
44885
44917
  })).data;
44886
44918
  }));
44887
44919
  }
44888
- throw new UsageError(USAGE$55);
44920
+ throw new UsageError(USAGE$56);
44889
44921
  }
44890
44922
  /** `application routes|route-add|route-remove`, which are environment-scoped. */
44891
44923
  async function applicationRoutes(context, action, path, rest) {
@@ -44899,7 +44931,7 @@ async function applicationRoutes(context, action, path, rest) {
44899
44931
  if (action === "route-add") return await addRoute(context, path, rest);
44900
44932
  if (action === "route-remove") {
44901
44933
  const [routeUuid, ...extra] = rest;
44902
- if (routeUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$55);
44934
+ if (routeUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$56);
44903
44935
  return await written$6(confirmableWrite(context, `Remove route ${routeUuid}.`, async () => {
44904
44936
  const body = { desiredGeneration: await generation$1(path) };
44905
44937
  return (await hostingApplicationRouteRemove({
@@ -44911,7 +44943,7 @@ async function applicationRoutes(context, action, path, rest) {
44911
44943
  })).data;
44912
44944
  }));
44913
44945
  }
44914
- throw new UsageError(USAGE$55);
44946
+ throw new UsageError(USAGE$56);
44915
44947
  }
44916
44948
  /** `route-add --source … --target … --path …`. */
44917
44949
  async function addRoute(context, path, rest) {
@@ -44919,7 +44951,7 @@ async function addRoute(context, path, rest) {
44919
44951
  const sourceWorkloadUuid = context.flags.get("--source") ?? "";
44920
44952
  const targetWorkloadUuid = context.flags.get("--target") ?? "";
44921
44953
  const routePath = context.flags.get("--path") ?? "";
44922
- if (sourceWorkloadUuid === "" || targetWorkloadUuid === "" || routePath === "") throw new UsageError(`route-add needs --source, --target and --path.\n\n${USAGE$55}`);
44954
+ if (sourceWorkloadUuid === "" || targetWorkloadUuid === "" || routePath === "") throw new UsageError(`route-add needs --source, --target and --path.\n\n${USAGE$56}`);
44923
44955
  const domainUuid = context.flags.get("--domain")?.trim();
44924
44956
  const canonical = onOffFlag(context, "--canonical") ?? false;
44925
44957
  return await written$6(confirmableWrite(context, `Route ${routePath} from ${sourceWorkloadUuid} to ${targetWorkloadUuid}${canonical ? " as canonical" : ""}.`, async () => {
@@ -44952,11 +44984,11 @@ function cacheBody(context) {
44952
44984
  const raw = context.flags.get(flag)?.trim() ?? "";
44953
44985
  if (raw === "") continue;
44954
44986
  const value = Number(raw);
44955
- if (!Number.isInteger(value) || value < 0) throw new UsageError(`${flag} must be a whole number of seconds.\n\n${USAGE$55}`);
44987
+ if (!Number.isInteger(value) || value < 0) throw new UsageError(`${flag} must be a whole number of seconds.\n\n${USAGE$56}`);
44956
44988
  body[field] = value;
44957
44989
  }
44958
- addCacheRules(context, body, USAGE$55);
44959
- if (Object.keys(body).length === 0) throw new UsageError(`cache-set needs at least one field.\n\n${USAGE$55}`);
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}`);
44960
44992
  return body;
44961
44993
  }
44962
44994
  /** The environment's generation, which every write here must name. */
@@ -44972,7 +45004,7 @@ async function written$6(pending) {
44972
45004
  }
44973
45005
  /** No positional arguments, or a usage refusal. */
44974
45006
  function noExtra$19(rest) {
44975
- if (rest.length > 0) throw new UsageError(USAGE$55);
45007
+ if (rest.length > 0) throw new UsageError(USAGE$56);
44976
45008
  }
44977
45009
  /** The `application cache*|routes|route-*` renderer. */
44978
45010
  function applicationCacheText(report) {
@@ -45132,7 +45164,7 @@ function describeAuth(workloadUuid, auth) {
45132
45164
  ].join("\n");
45133
45165
  }
45134
45166
  // src/commands/application-create.ts
45135
- var USAGE$54 = [
45167
+ var USAGE$55 = [
45136
45168
  "Usage: hostingctl application create <environment-uuid> --company <slug> --type <type> --name <name>",
45137
45169
  " --cpu-request <millicores> --memory-request <MiB>",
45138
45170
  " [--cpu-limit <millicores>] [--memory-limit <MiB>] [--label <text>] [--hostname <host>]",
@@ -45169,11 +45201,11 @@ var CREATE_FLAGS = [{
45169
45201
  }];
45170
45202
  /** `application create <env> …`, from the `application` command. */
45171
45203
  async function applicationCreate(context, path, rest) {
45172
- if (rest.length > 0) throw new UsageError(USAGE$54);
45204
+ if (rest.length > 0) throw new UsageError(USAGE$55);
45173
45205
  const type = context.flags.get("--type")?.trim().toLowerCase() ?? "";
45174
- if (!TYPES.has(type)) throw new UsageError(`create needs --type wordpress, moodle, infisical, supabase-auth, supabase-rest or supabase-realtime.\n\n${USAGE$54}`);
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}`);
45175
45207
  const name = context.flags.get("--name")?.trim() ?? "";
45176
- if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$54}`);
45208
+ if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$55}`);
45177
45209
  const resources = requestedResources(context);
45178
45210
  const label = context.flags.get("--label")?.trim() ?? "";
45179
45211
  const intendedHostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
@@ -45218,7 +45250,7 @@ function requestedResources(context) {
45218
45250
  /** One required whole-number flag, or a usage refusal naming the flag. */
45219
45251
  function required$7(context, flag) {
45220
45252
  const value = wholeNumberFlag(context.flags, flag);
45221
- if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$54}`);
45253
+ if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$55}`);
45222
45254
  return value;
45223
45255
  }
45224
45256
  // src/commands/application-import-fetch.ts
@@ -45285,7 +45317,7 @@ async function fetchImport(context, action, path, rest) {
45285
45317
  })).data);
45286
45318
  }
45287
45319
  // src/commands/application-upload.ts
45288
- var USAGE$53 = [
45320
+ var USAGE$54 = [
45289
45321
  "Usage: hostingctl application import-upload <environment-uuid> <application-uuid> --company <slug>",
45290
45322
  " --database <path-to.sql> --archive <path-to.zip|path-to.jpa> | --directory <dir>",
45291
45323
  "",
@@ -45314,12 +45346,12 @@ var STAGING_WAIT_MS = 9e5;
45314
45346
  /** How often the staged import is asked for its state while the queue works. */
45315
45347
  var STAGING_POLL_MS = 3e3;
45316
45348
  async function applicationUpload(context, path, rest) {
45317
- if (rest.length > 0) throw new UsageError(USAGE$53);
45349
+ if (rest.length > 0) throw new UsageError(USAGE$54);
45318
45350
  const database = context.flags.get("--database")?.trim() ?? "";
45319
45351
  const archive = context.flags.get("--archive")?.trim() ?? "";
45320
45352
  const directory = context.flags.get("--directory")?.trim() ?? "";
45321
- if (archive !== "" && directory !== "") throw new UsageError(`Send the site files as either --archive or --directory, not both.\n\n${USAGE$53}`);
45322
- 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$53}`);
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}`);
45323
45355
  const databaseBytes = database === "" ? 0 : await sizeOf(database, "database");
45324
45356
  const files = directory === "" ? [] : await manifestOf(directory);
45325
45357
  const fileBytes = directory === "" ? 0 : await totalSize(files);
@@ -45428,7 +45460,7 @@ function describe$2(bytes) {
45428
45460
  return `${(bytes / 1048576).toFixed(1)} MiB`;
45429
45461
  }
45430
45462
  // src/commands/application-import.ts
45431
- var USAGE$52 = [
45463
+ var USAGE$53 = [
45432
45464
  "Usage: hostingctl application import <environment-uuid> <application-uuid> <import-uuid> --company <slug>",
45433
45465
  " hostingctl application import-upload <environment-uuid> <application-uuid> --company <slug>",
45434
45466
  " --database <path-to.sql> [--archive <path-to.zip> | --directory <dir>]",
@@ -45454,7 +45486,7 @@ async function applicationImport(context, action, path, rest) {
45454
45486
  outcome: await fetchImport(context, action, path, rest)
45455
45487
  };
45456
45488
  const [importUuid, ...extra] = rest;
45457
- if (importUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$52);
45489
+ if (importUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$53);
45458
45490
  if (action === "import") return {
45459
45491
  kind: "import",
45460
45492
  staged: (await hostingWordpressImportShowImport({ path: {
@@ -45467,13 +45499,13 @@ async function applicationImport(context, action, path, rest) {
45467
45499
  importUuid
45468
45500
  } })).data));
45469
45501
  if (action === "url-repair-confirm") return await confirmRepair(context, path, importUuid);
45470
- throw new UsageError(USAGE$52);
45502
+ throw new UsageError(USAGE$53);
45471
45503
  }
45472
45504
  /** `url-repair-preview --source-url …`: the review a confirmation is made against. */
45473
45505
  async function previewRepair(context, path, rest) {
45474
- if (rest.length > 0) throw new UsageError(USAGE$52);
45506
+ if (rest.length > 0) throw new UsageError(USAGE$53);
45475
45507
  const sourceUrl = context.flags.get("--source-url")?.trim() ?? "";
45476
- if (sourceUrl === "") throw new UsageError(`url-repair-preview needs --source-url.\n\n${USAGE$52}`);
45508
+ if (sourceUrl === "") throw new UsageError(`url-repair-preview needs --source-url.\n\n${USAGE$53}`);
45477
45509
  return {
45478
45510
  kind: "url-repair",
45479
45511
  recovery: (await hostingWordpressUrlRepairPreview({
@@ -45485,7 +45517,7 @@ async function previewRepair(context, path, rest) {
45485
45517
  /** `url-repair-confirm <recovery> --confirmation …`: the typed text the review asked for. */
45486
45518
  async function confirmRepair(context, path, recoveryUuid) {
45487
45519
  const confirmation = context.flags.get("--confirmation")?.trim() ?? "";
45488
- if (confirmation === "") throw new UsageError(`url-repair-confirm needs --confirmation.\n\n${USAGE$52}`);
45520
+ if (confirmation === "") throw new UsageError(`url-repair-confirm needs --confirmation.\n\n${USAGE$53}`);
45489
45521
  return await written$5(confirmableWrite(context, `Confirm the URL repair by typing its confirmation ("${confirmation}").`, async () => {
45490
45522
  const desiredGeneration = (await hostingEnvironmentShow({ path })).data.desiredGeneration;
45491
45523
  const body = {
@@ -45629,7 +45661,7 @@ function recoveryWaitText(report) {
45629
45661
  return `Recovery ${report.recovery.uuid} ${report.recovery.statusName}: ${report.recovery.actionName} of ${report.recovery.workloadName} is done.`;
45630
45662
  }
45631
45663
  // src/commands/application-recovery.ts
45632
- var USAGE$51 = [
45664
+ var USAGE$52 = [
45633
45665
  "Usage: hostingctl application recovery-review <environment-uuid> <application-uuid> --company <slug> [--import <uuid>]",
45634
45666
  " hostingctl application recovery-confirm <environment-uuid> <application-uuid> --company <slug> --confirmation <text> [--import <uuid>] [--wait [--timeout <seconds>]]",
45635
45667
  "",
@@ -45649,9 +45681,9 @@ var USAGE$51 = [
45649
45681
  ].join("\n");
45650
45682
  /** `application recovery-review|recovery-confirm`. */
45651
45683
  async function applicationRecovery(context, action, path, rest) {
45652
- if (rest.length > 0) throw new UsageError(USAGE$51);
45684
+ if (rest.length > 0) throw new UsageError(USAGE$52);
45653
45685
  const importUuid = context.flags.get("--import")?.trim();
45654
- if (importUuid === "") throw new UsageError(`--import needs the staged import's id.\n\n${USAGE$51}`);
45686
+ if (importUuid === "") throw new UsageError(`--import needs the staged import's id.\n\n${USAGE$52}`);
45655
45687
  const review = (await hostingApplicationRecoveryShow({
45656
45688
  path,
45657
45689
  ...importUuid === void 0 ? {} : { query: { importUuid } }
@@ -45660,10 +45692,10 @@ async function applicationRecovery(context, action, path, rest) {
45660
45692
  kind: "recovery-review",
45661
45693
  review
45662
45694
  };
45663
- if (action !== "recovery-confirm") throw new UsageError(USAGE$51);
45695
+ if (action !== "recovery-confirm") throw new UsageError(USAGE$52);
45664
45696
  if (review.blockedReason !== null) throw new UsageError(`This restore is blocked: ${review.blockedReason}`);
45665
45697
  const confirmation = context.flags.get("--confirmation")?.trim() ?? "";
45666
- if (confirmation === "") throw new UsageError(`recovery-confirm needs --confirmation.\n\n${USAGE$51}`);
45698
+ if (confirmation === "") throw new UsageError(`recovery-confirm needs --confirmation.\n\n${USAGE$52}`);
45667
45699
  const wait = context.flags.has("--wait");
45668
45700
  const deadline = wait ? commandDeadline(context.flags) : 0;
45669
45701
  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 () => {
@@ -45865,7 +45897,7 @@ function siteAccessText(report) {
45865
45897
  return report.assignments.length === 0 ? "Nobody has been invited to sign in." : report.assignments.map(assignmentLine).join("\n");
45866
45898
  }
45867
45899
  // src/commands/application-site-access.ts
45868
- var USAGE$50 = [
45900
+ var USAGE$51 = [
45869
45901
  "Usage: hostingctl application site-access <environment-uuid> <application-uuid> --company <slug>",
45870
45902
  " hostingctl application site-access-set <environment-uuid> <application-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
45871
45903
  " hostingctl application site-access-rotate <environment-uuid> <application-uuid> --company <slug>",
@@ -45908,14 +45940,14 @@ var flow$1 = siteAccessFlow({
45908
45940
  refresh: async (path) => (await hostingApplicationSiteAccessUsersRefresh({ path })).data,
45909
45941
  destroy: async (path) => (await hostingApplicationSiteAccessUsersDestroy({ path })).data,
45910
45942
  rotate: async (path) => (await hostingApplicationSiteAccessRotate({ path })).data
45911
- }, USAGE$50);
45943
+ }, USAGE$51);
45912
45944
  /** `application site-access*|site-user*`, which the application dispatcher calls with its resolved path. */
45913
45945
  async function applicationSiteAccess(context, action, path, rest) {
45914
- if (rest.some((one) => one === "")) throw new UsageError(USAGE$50);
45946
+ if (rest.some((one) => one === "")) throw new UsageError(USAGE$51);
45915
45947
  return await flow$1(context, action, path, rest);
45916
45948
  }
45917
45949
  // src/commands/application-source-ssh.ts
45918
- var USAGE$49 = [
45950
+ var USAGE$50 = [
45919
45951
  "Usage: hostingctl application source-ssh-list --company <slug>",
45920
45952
  " hostingctl application source-ssh-show <connection-uuid> --company <slug>",
45921
45953
  " hostingctl application source-ssh-create --company <slug> --name <label> --repo <url> --ref <name> [--ref-kind branch|tag]",
@@ -45967,7 +45999,7 @@ async function applicationSshSources(context, action, company, rest) {
45967
45999
  }
45968
46000
  if (action === "source-ssh-create") return await create$5(context, company, rest);
45969
46001
  const [connectionUuid, ...extra] = rest;
45970
- if (connectionUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$49);
46002
+ if (connectionUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$50);
45971
46003
  const path = {
45972
46004
  company,
45973
46005
  connectionUuid
@@ -45989,7 +46021,7 @@ async function applicationSshSources(context, action, company, rest) {
45989
46021
  "to be installed on the Git server before access can be proved again."
45990
46022
  ].join("\n"), async () => (await hostingSshSourcesRotateKey({ path })).data));
45991
46023
  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));
45992
- throw new UsageError(USAGE$49);
46024
+ throw new UsageError(USAGE$50);
45993
46025
  }
45994
46026
  /** `source-ssh-create --name … --repo … --ref … [--ref-kind …]`: one repository and the ref it reads. */
45995
46027
  async function create$5(context, company, rest) {
@@ -46019,7 +46051,7 @@ async function update$5(context, path) {
46019
46051
  const name = optionalFlag(context, "--name");
46020
46052
  const ref = optionalFlag(context, "--ref");
46021
46053
  const refKind = refKindFlag(context);
46022
- if (name === null && ref === null && refKind === null) throw new UsageError(`source-ssh-update needs --name, --ref or --ref-kind.\n\n${USAGE$49}`);
46054
+ if (name === null && ref === null && refKind === null) throw new UsageError(`source-ssh-update needs --name, --ref or --ref-kind.\n\n${USAGE$50}`);
46023
46055
  const described = [name === null ? "" : `label ${name}`, ref === null ? "" : `ref ${ref}`].filter((one) => one !== "").join(", ");
46024
46056
  return await written$4(confirmableWrite(context, [
46025
46057
  `Edit the SSH source ${path.connectionUuid}${described === "" ? "" : `: ${described}`}.`,
@@ -46051,7 +46083,7 @@ async function confirmHostKey(context, path) {
46051
46083
  /** A required flag's value, or a refusal naming the flag. */
46052
46084
  function required$6(context, flag) {
46053
46085
  const value = context.flags.get(flag)?.trim() ?? "";
46054
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$49}`);
46086
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$50}`);
46055
46087
  return value;
46056
46088
  }
46057
46089
  /** An optional flag's value, or null when it was not given. */
@@ -46064,7 +46096,7 @@ function refKindFlag(context) {
46064
46096
  const value = context.flags.get("--ref-kind")?.trim() ?? "";
46065
46097
  if (value === "") return null;
46066
46098
  if (value === "branch" || value === "tag") return value;
46067
- throw new UsageError(`--ref-kind must be branch or tag (got "${value}").\n\n${USAGE$49}`);
46099
+ throw new UsageError(`--ref-kind must be branch or tag (got "${value}").\n\n${USAGE$50}`);
46068
46100
  }
46069
46101
  /** Tag one write's outcome with the group that produced it. */
46070
46102
  async function written$4(pending) {
@@ -46075,10 +46107,10 @@ async function written$4(pending) {
46075
46107
  }
46076
46108
  /** No positional arguments, or a usage refusal. */
46077
46109
  function noExtra$17(rest) {
46078
- if (rest.length > 0) throw new UsageError(USAGE$49);
46110
+ if (rest.length > 0) throw new UsageError(USAGE$50);
46079
46111
  }
46080
46112
  // src/commands/application-source-upload.ts
46081
- var USAGE$48 = [
46113
+ var USAGE$49 = [
46082
46114
  "Usage: hostingctl application source-upload <environment-uuid> <application-uuid> --company <slug> --file <path-to.zip>",
46083
46115
  " hostingctl application source-uploads <environment-uuid> <application-uuid> --company <slug>",
46084
46116
  " hostingctl application source-upload-show <environment-uuid> <application-uuid> <upload-uuid> --company <slug>",
@@ -46117,7 +46149,7 @@ async function applicationSourceUploads(context, action, path, rest) {
46117
46149
  };
46118
46150
  }
46119
46151
  const [uploadUuid, ...extra] = rest;
46120
- if (uploadUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$48);
46152
+ if (uploadUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$49);
46121
46153
  const uploadPath = {
46122
46154
  ...path,
46123
46155
  uploadUuid
@@ -46129,7 +46161,7 @@ async function applicationSourceUploads(context, action, path, rest) {
46129
46161
  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 () => {
46130
46162
  await hostingSourceUploadsDestroy({ path: uploadPath });
46131
46163
  }));
46132
- throw new UsageError(USAGE$48);
46164
+ throw new UsageError(USAGE$49);
46133
46165
  }
46134
46166
  /**
46135
46167
  * `source-upload --file …`: stage one ZIP as the application's source.
@@ -46141,7 +46173,7 @@ async function applicationSourceUploads(context, action, path, rest) {
46141
46173
  async function store(context, path, rest) {
46142
46174
  noExtra$16(rest);
46143
46175
  const file = context.flags.get("--file")?.trim() ?? "";
46144
- if (file === "") throw new UsageError(`source-upload needs --file.\n\n${USAGE$48}`);
46176
+ if (file === "") throw new UsageError(`source-upload needs --file.\n\n${USAGE$49}`);
46145
46177
  return await written$3(confirmableWrite(context, [
46146
46178
  `Upload ${file} as the staged source for application ${path.workloadUuid}.`,
46147
46179
  "The platform normalizes the archive, measures it and reviews it; installing dependencies and changing anything",
@@ -46181,7 +46213,7 @@ async function written$3(pending) {
46181
46213
  }
46182
46214
  /** No positional arguments, or a usage refusal. */
46183
46215
  function noExtra$16(rest) {
46184
- if (rest.length > 0) throw new UsageError(USAGE$48);
46216
+ if (rest.length > 0) throw new UsageError(USAGE$49);
46185
46217
  }
46186
46218
  /** One staged upload: what the platform measured, what the review found, and when staging expires. */
46187
46219
  function uploadLines(upload) {
@@ -46308,51 +46340,51 @@ var SOURCE_SUBCOMMANDS = [
46308
46340
  var SOURCE_TOPICS = [
46309
46341
  {
46310
46342
  path: ["source-upload"],
46311
- usage: USAGE$48
46343
+ usage: USAGE$49
46312
46344
  },
46313
46345
  {
46314
46346
  path: ["source-uploads"],
46315
- usage: USAGE$48
46347
+ usage: USAGE$49
46316
46348
  },
46317
46349
  {
46318
46350
  path: ["source-upload-show"],
46319
- usage: USAGE$48
46351
+ usage: USAGE$49
46320
46352
  },
46321
46353
  {
46322
46354
  path: ["source-upload-discard"],
46323
- usage: USAGE$48
46355
+ usage: USAGE$49
46324
46356
  },
46325
46357
  {
46326
46358
  path: ["source-ssh-list"],
46327
- usage: USAGE$49
46359
+ usage: USAGE$50
46328
46360
  },
46329
46361
  {
46330
46362
  path: ["source-ssh-show"],
46331
- usage: USAGE$49
46363
+ usage: USAGE$50
46332
46364
  },
46333
46365
  {
46334
46366
  path: ["source-ssh-create"],
46335
- usage: USAGE$49
46367
+ usage: USAGE$50
46336
46368
  },
46337
46369
  {
46338
46370
  path: ["source-ssh-update"],
46339
- usage: USAGE$49
46371
+ usage: USAGE$50
46340
46372
  },
46341
46373
  {
46342
46374
  path: ["source-ssh-confirm-host-key"],
46343
- usage: USAGE$49
46375
+ usage: USAGE$50
46344
46376
  },
46345
46377
  {
46346
46378
  path: ["source-ssh-verify"],
46347
- usage: USAGE$49
46379
+ usage: USAGE$50
46348
46380
  },
46349
46381
  {
46350
46382
  path: ["source-ssh-rotate-key"],
46351
- usage: USAGE$49
46383
+ usage: USAGE$50
46352
46384
  },
46353
46385
  {
46354
46386
  path: ["source-ssh-revoke"],
46355
- usage: USAGE$49
46387
+ usage: USAGE$50
46356
46388
  }
46357
46389
  ];
46358
46390
  // src/commands/application-speed.ts
@@ -46382,7 +46414,7 @@ function applicationSpeedText(check) {
46382
46414
  * paused. It starts no build and promotes nothing. The pause is the customer's own control: while it holds, a push to
46383
46415
  * the bound ref is read and matched but builds nothing, and the release that is serving is untouched either way.
46384
46416
  */
46385
- var USAGE$47 = [
46417
+ var USAGE$48 = [
46386
46418
  "Usage: hostingctl application updates <environment-uuid> <application-uuid> --company <slug>",
46387
46419
  " hostingctl application updates-pause <environment-uuid> <application-uuid> --company <slug>",
46388
46420
  " hostingctl application updates-resume <environment-uuid> <application-uuid> --company <slug>",
@@ -46395,7 +46427,7 @@ var USAGE$47 = [
46395
46427
  "Both writes need --confirm; --dry-run describes the change without sending it."
46396
46428
  ].join("\n");
46397
46429
  async function applicationUpdates(context, action, path, rest) {
46398
- if (rest.length > 0) throw new UsageError(USAGE$47);
46430
+ if (rest.length > 0) throw new UsageError(USAGE$48);
46399
46431
  if (action === "updates") return {
46400
46432
  kind: "updates",
46401
46433
  surface: (await hostingApplicationUpdatesShow({ path })).data
@@ -46407,7 +46439,7 @@ async function applicationUpdates(context, action, path, rest) {
46407
46439
  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)
46408
46440
  };
46409
46441
  }
46410
- throw new UsageError(USAGE$47);
46442
+ throw new UsageError(USAGE$48);
46411
46443
  }
46412
46444
  /**
46413
46445
  * The update state in words.
@@ -46659,64 +46691,64 @@ var APPLICATION_TOPICS = [
46659
46691
  },
46660
46692
  {
46661
46693
  path: ["create"],
46662
- usage: USAGE$54
46694
+ usage: USAGE$55
46663
46695
  },
46664
46696
  {
46665
46697
  path: ["build-log"],
46666
- usage: USAGE$56
46698
+ usage: USAGE$57
46667
46699
  },
46668
46700
  {
46669
46701
  path: ["build-retry"],
46670
- usage: USAGE$56
46702
+ usage: USAGE$57
46671
46703
  },
46672
46704
  {
46673
46705
  path: ["build-cancel"],
46674
- usage: USAGE$56
46706
+ usage: USAGE$57
46675
46707
  },
46676
46708
  {
46677
46709
  path: ["source-bind"],
46678
- usage: USAGE$56
46710
+ usage: USAGE$57
46679
46711
  },
46680
46712
  {
46681
46713
  path: ["source-unbind"],
46682
- usage: USAGE$56
46714
+ usage: USAGE$57
46683
46715
  },
46684
46716
  ...SOURCE_TOPICS,
46685
46717
  {
46686
46718
  path: ["cache"],
46687
- usage: USAGE$55
46719
+ usage: USAGE$56
46688
46720
  },
46689
46721
  {
46690
46722
  path: ["cache-set"],
46691
- usage: USAGE$55
46723
+ usage: USAGE$56
46692
46724
  },
46693
46725
  {
46694
46726
  path: ["cache-purge"],
46695
- usage: USAGE$55
46727
+ usage: USAGE$56
46696
46728
  },
46697
46729
  {
46698
46730
  path: ["routes"],
46699
- usage: USAGE$55
46731
+ usage: USAGE$56
46700
46732
  },
46701
46733
  {
46702
46734
  path: ["route-add"],
46703
- usage: USAGE$55
46735
+ usage: USAGE$56
46704
46736
  },
46705
46737
  {
46706
46738
  path: ["route-remove"],
46707
- usage: USAGE$55
46739
+ usage: USAGE$56
46708
46740
  },
46709
46741
  {
46710
46742
  path: ["canonical"],
46711
- usage: USAGE$55
46743
+ usage: USAGE$56
46712
46744
  },
46713
46745
  {
46714
46746
  path: ["import"],
46715
- usage: USAGE$52
46747
+ usage: USAGE$53
46716
46748
  },
46717
46749
  {
46718
46750
  path: ["import-upload"],
46719
- usage: USAGE$53
46751
+ usage: USAGE$54
46720
46752
  },
46721
46753
  ...[
46722
46754
  "import-discard",
@@ -46724,16 +46756,16 @@ var APPLICATION_TOPICS = [
46724
46756
  "url-repair-confirm"
46725
46757
  ].map((one) => ({
46726
46758
  path: [one],
46727
- usage: USAGE$52
46759
+ usage: USAGE$53
46728
46760
  })),
46729
46761
  ...FETCH_TOPICS,
46730
46762
  {
46731
46763
  path: ["recovery-review"],
46732
- usage: USAGE$51
46764
+ usage: USAGE$52
46733
46765
  },
46734
46766
  {
46735
46767
  path: ["recovery-confirm"],
46736
- usage: USAGE$51
46768
+ usage: USAGE$52
46737
46769
  },
46738
46770
  {
46739
46771
  path: ["runtime"],
@@ -46745,59 +46777,59 @@ var APPLICATION_TOPICS = [
46745
46777
  },
46746
46778
  {
46747
46779
  path: ["site-access"],
46748
- usage: USAGE$50
46780
+ usage: USAGE$51
46749
46781
  },
46750
46782
  {
46751
46783
  path: ["site-access-set"],
46752
- usage: USAGE$50
46784
+ usage: USAGE$51
46753
46785
  },
46754
46786
  {
46755
46787
  path: ["site-access-rotate"],
46756
- usage: USAGE$50
46788
+ usage: USAGE$51
46757
46789
  },
46758
46790
  {
46759
46791
  path: ["site-users"],
46760
- usage: USAGE$50
46792
+ usage: USAGE$51
46761
46793
  },
46762
46794
  {
46763
46795
  path: ["site-user"],
46764
- usage: USAGE$50
46796
+ usage: USAGE$51
46765
46797
  },
46766
46798
  {
46767
46799
  path: ["updates"],
46768
- usage: USAGE$47
46800
+ usage: USAGE$48
46769
46801
  },
46770
46802
  {
46771
46803
  path: ["updates-pause"],
46772
- usage: USAGE$47
46804
+ usage: USAGE$48
46773
46805
  },
46774
46806
  {
46775
46807
  path: ["updates-resume"],
46776
- usage: USAGE$47
46808
+ usage: USAGE$48
46777
46809
  },
46778
46810
  {
46779
46811
  path: ["administrator"],
46780
- usage: USAGE$57
46812
+ usage: USAGE$58
46781
46813
  },
46782
46814
  {
46783
46815
  path: ["administrator-reset"],
46784
- usage: USAGE$57
46816
+ usage: USAGE$58
46785
46817
  },
46786
46818
  {
46787
46819
  path: ["administrator-reveal"],
46788
- usage: USAGE$57
46820
+ usage: USAGE$58
46789
46821
  },
46790
46822
  {
46791
46823
  path: ["recovery-status"],
46792
- usage: USAGE$57
46824
+ usage: USAGE$58
46793
46825
  },
46794
46826
  {
46795
46827
  path: ["recovery-retry"],
46796
- usage: USAGE$57
46828
+ usage: USAGE$58
46797
46829
  },
46798
46830
  {
46799
46831
  path: ["recovery-cancel"],
46800
- usage: USAGE$57
46832
+ usage: USAGE$58
46801
46833
  }
46802
46834
  ];
46803
46835
  // src/commands/application-lifecycle.ts
@@ -58761,6 +58793,13 @@ object({
58761
58793
  message: string(),
58762
58794
  completedAt: string().nullable()
58763
58795
  });
58796
+ object({
58797
+ version: int(),
58798
+ appliedVersion: int(),
58799
+ pending: boolean(),
58800
+ canRotate: boolean(),
58801
+ message: string()
58802
+ });
58764
58803
  var hostingCacheRuleActionEnumSchema = _enum([
58765
58804
  "bypass",
58766
58805
  "respect_origin",
@@ -66184,6 +66223,25 @@ object({
66184
66223
  workloadUuid: string(),
66185
66224
  buildUuid: string()
66186
66225
  });
66226
+ union([
66227
+ object({ message: string().describe("Error overview.") }),
66228
+ object({ message: string().describe("Error overview.") }),
66229
+ messageDataSchema
66230
+ ]);
66231
+ object({
66232
+ company: string(),
66233
+ environmentUuid: string()
66234
+ });
66235
+ union([
66236
+ object({ message: string().describe("Error overview.") }),
66237
+ object({ message: string().describe("Error overview.") }),
66238
+ messageDataSchema,
66239
+ validationErrorDataSchema
66240
+ ]);
66241
+ object({
66242
+ company: string(),
66243
+ environmentUuid: string()
66244
+ });
66187
66245
  string().optional().describe("A proposed service-end date to price the review against; ISO-8601 date or date-time.");
66188
66246
  union([
66189
66247
  object({ message: string().describe("Error overview.") }),
@@ -71860,7 +71918,7 @@ function episode(rest) {
71860
71918
  };
71861
71919
  }
71862
71920
  // src/commands/company-assets.ts
71863
- var USAGE$46 = [
71921
+ var USAGE$47 = [
71864
71922
  "Usage: hostingctl company logo|favicon set --image-file <path> --company <slug>",
71865
71923
  " hostingctl company logo|favicon remove --company <slug>",
71866
71924
  "",
@@ -71875,17 +71933,17 @@ var USAGE$46 = [
71875
71933
  */
71876
71934
  async function companyAssets(context, asset, rest) {
71877
71935
  const [action, ...tail] = rest;
71878
- if (tail.length > 0) throw new UsageError(USAGE$46);
71936
+ if (tail.length > 0) throw new UsageError(USAGE$47);
71879
71937
  const company = await requireCompany(context.flags);
71880
71938
  if (action === "set") return await set$2(context, asset, company);
71881
71939
  if (action === "remove") return await remove$4(context, asset, company);
71882
- throw new UsageError(USAGE$46);
71940
+ throw new UsageError(USAGE$47);
71883
71941
  }
71884
71942
  /** `set --image-file …`: one multipart upload of the asset. */
71885
71943
  async function set$2(context, asset, company) {
71886
71944
  const file = context.flags.get("--image-file") ?? "";
71887
71945
  return await confirmableWrite(context, file === "" ? `Set ${company}'s ${asset}.` : `Set ${company}'s ${asset} to ${file}.`, async () => {
71888
- const body = await imageUpload(file, USAGE$46);
71946
+ const body = await imageUpload(file, USAGE$47);
71889
71947
  return asset === "logo" ? (await companyAssetStoreLogo({
71890
71948
  path: { company },
71891
71949
  body
@@ -71921,7 +71979,7 @@ function companyRole(raw, usage) {
71921
71979
  return named;
71922
71980
  }
71923
71981
  // src/commands/company-invitations.ts
71924
- var USAGE$45 = [
71982
+ var USAGE$46 = [
71925
71983
  "Usage: hostingctl company invitations --company <slug>",
71926
71984
  " hostingctl company invite --company <slug> --email <email> --name <name> --role <admin|member>",
71927
71985
  " hostingctl company cancel-invitation <invitation-uuid> --company <slug>",
@@ -71945,7 +72003,7 @@ var MAX_INVITATION_TOKEN_BYTES = 4096;
71945
72003
  */
71946
72004
  async function companyInvitations(context, subcommand, rest) {
71947
72005
  if (subcommand === "invitations") {
71948
- if (rest.length > 0) throw new UsageError(USAGE$45);
72006
+ if (rest.length > 0) throw new UsageError(USAGE$46);
71949
72007
  const company = await requireCompany(context.flags);
71950
72008
  return {
71951
72009
  kind: "invitations",
@@ -71956,20 +72014,20 @@ async function companyInvitations(context, subcommand, rest) {
71956
72014
  if (subcommand === "invite") return await invite(context, rest);
71957
72015
  if (subcommand === "cancel-invitation") return await cancel$1(context, rest);
71958
72016
  if (subcommand === "invitation-preview") return (await companyInvitationPreview({
71959
- path: { invitationUuid: oneUuid$7(rest, USAGE$45) },
71960
- body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$45) }
72017
+ path: { invitationUuid: oneUuid$7(rest, USAGE$46) },
72018
+ body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$46) }
71961
72019
  })).data;
71962
72020
  if (subcommand === "invitation-accept") return await accept(context, rest);
71963
- throw new UsageError(USAGE$45);
72021
+ throw new UsageError(USAGE$46);
71964
72022
  }
71965
72023
  /** `invite --email … --name … --role …`. */
71966
72024
  async function invite(context, rest) {
71967
- if (rest.length > 0) throw new UsageError(USAGE$45);
72025
+ if (rest.length > 0) throw new UsageError(USAGE$46);
71968
72026
  const company = await requireCompany(context.flags);
71969
72027
  const email = context.flags.get("--email")?.trim() ?? "";
71970
72028
  const name = context.flags.get("--name")?.trim() ?? "";
71971
- const role = companyRole(context.flags.get("--role"), USAGE$45);
71972
- if (email === "" || name === "") throw new UsageError(`invite needs --email and --name.\n\n${USAGE$45}`);
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}`);
71973
72031
  return await confirmableWrite(context, `Invite ${name} <${email}> into ${company} as ${role}.`, async () => (await companyInvitationStore({
71974
72032
  path: { company },
71975
72033
  body: {
@@ -71981,7 +72039,7 @@ async function invite(context, rest) {
71981
72039
  }
71982
72040
  /** `cancel-invitation <uuid> --company …`. */
71983
72041
  async function cancel$1(context, rest) {
71984
- const invitationUuid = oneUuid$7(rest, USAGE$45);
72042
+ const invitationUuid = oneUuid$7(rest, USAGE$46);
71985
72043
  const company = await requireCompany(context.flags);
71986
72044
  return await confirmableWrite(context, `Cancel invitation ${invitationUuid}.`, async () => {
71987
72045
  return (await companyInvitationDestroy({ path: {
@@ -71992,11 +72050,11 @@ async function cancel$1(context, rest) {
71992
72050
  }
71993
72051
  /** `invitation-accept <uuid>`: join the company the invitation names. */
71994
72052
  async function accept(context, rest) {
71995
- const invitationUuid = oneUuid$7(rest, USAGE$45);
72053
+ const invitationUuid = oneUuid$7(rest, USAGE$46);
71996
72054
  return await confirmableWrite(context, `Accept invitation ${invitationUuid}.`, async () => {
71997
72055
  return (await companyInvitationAccept({
71998
72056
  path: { invitationUuid },
71999
- body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$45) }
72057
+ body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$46) }
72000
72058
  })).data;
72001
72059
  });
72002
72060
  }
@@ -72115,31 +72173,31 @@ var COMPANY_TOPICS = [
72115
72173
  },
72116
72174
  {
72117
72175
  path: ["logo"],
72118
- usage: USAGE$46
72176
+ usage: USAGE$47
72119
72177
  },
72120
72178
  {
72121
72179
  path: ["favicon"],
72122
- usage: USAGE$46
72180
+ usage: USAGE$47
72123
72181
  },
72124
72182
  {
72125
72183
  path: ["invitations"],
72126
- usage: USAGE$45
72184
+ usage: USAGE$46
72127
72185
  },
72128
72186
  {
72129
72187
  path: ["invite"],
72130
- usage: USAGE$45
72188
+ usage: USAGE$46
72131
72189
  },
72132
72190
  {
72133
72191
  path: ["cancel-invitation"],
72134
- usage: USAGE$45
72192
+ usage: USAGE$46
72135
72193
  },
72136
72194
  {
72137
72195
  path: ["invitation-preview"],
72138
- usage: USAGE$45
72196
+ usage: USAGE$46
72139
72197
  },
72140
72198
  {
72141
72199
  path: ["invitation-accept"],
72142
- usage: USAGE$45
72200
+ usage: USAGE$46
72143
72201
  }
72144
72202
  ];
72145
72203
  // src/commands/company-text.ts
@@ -74673,7 +74731,7 @@ var diagnostics = {
74673
74731
  }
74674
74732
  };
74675
74733
  // src/commands/dns-records.ts
74676
- var USAGE$44 = [
74734
+ var USAGE$45 = [
74677
74735
  "Usage: hostingctl dns enable <domain-uuid> --company <slug>",
74678
74736
  " hostingctl dns record set <domain-uuid> --company <slug> --file <set.json>",
74679
74737
  " hostingctl dns record remove <domain-uuid> --company <slug> --name <relative> --type <type>",
@@ -74712,7 +74770,7 @@ async function dnsWrites(context, subcommand, rest) {
74712
74770
  if (subcommand === "record") return await record$2(context, rest);
74713
74771
  if (subcommand === "dnssec") return await changeDnssec(context, rest);
74714
74772
  if (subcommand === "handover") return await handover(context, rest);
74715
- throw new UsageError(USAGE$44);
74773
+ throw new UsageError(USAGE$45);
74716
74774
  }
74717
74775
  /** The zone's current desired generation, which every write must name. */
74718
74776
  async function generation(company, domainUuid) {
@@ -74723,7 +74781,7 @@ async function generation(company, domainUuid) {
74723
74781
  }
74724
74782
  /** `dns enable <uuid>`: take the zone over into managed DNS. */
74725
74783
  async function enable(context, rest) {
74726
- const domainUuid = oneUuid$7(rest, USAGE$44);
74784
+ const domainUuid = oneUuid$7(rest, USAGE$45);
74727
74785
  const company = await requireCompany(context.flags);
74728
74786
  return await confirmableWrite(context, "Publish this name's zone in managed DNS.", async () => (await domainsDnsStore({ path: {
74729
74787
  company,
@@ -74733,16 +74791,16 @@ async function enable(context, rest) {
74733
74791
  /** `dns record set|remove`. */
74734
74792
  async function record$2(context, rest) {
74735
74793
  const [action, ...tail] = rest;
74736
- const domainUuid = oneUuid$7(tail, USAGE$44);
74794
+ const domainUuid = oneUuid$7(tail, USAGE$45);
74737
74795
  const company = await requireCompany(context.flags);
74738
74796
  if (action === "set") return await setRecord(context, company, domainUuid);
74739
74797
  if (action === "remove") return await removeRecord(context, company, domainUuid);
74740
- throw new UsageError(USAGE$44);
74798
+ throw new UsageError(USAGE$45);
74741
74799
  }
74742
74800
  /** `record set --file`: replace one set with the file's own values. */
74743
74801
  async function setRecord(context, company, domainUuid) {
74744
74802
  const file = context.flags.get("--file") ?? "";
74745
- if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$44}`);
74803
+ if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$45}`);
74746
74804
  const set = recordSetFromFile(file);
74747
74805
  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 () => {
74748
74806
  const body = {
@@ -74762,7 +74820,7 @@ async function setRecord(context, company, domainUuid) {
74762
74820
  async function removeRecord(context, company, domainUuid) {
74763
74821
  const relativeName = context.flags.get("--name") ?? "";
74764
74822
  const recordType = recordTypeFlag(context);
74765
- if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$44}`);
74823
+ if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$45}`);
74766
74824
  return await confirmableWrite(context, `Remove the ${recordType.toUpperCase()} set "${relativeName}".`, async () => {
74767
74825
  const query = {
74768
74826
  relativeName,
@@ -74781,8 +74839,8 @@ async function removeRecord(context, company, domainUuid) {
74781
74839
  /** `dns dnssec <signed|unsigned> <uuid>`: the signing mode, with the confirmation the API requires. */
74782
74840
  async function changeDnssec(context, rest) {
74783
74841
  const [mode, uuid, ...extra] = rest;
74784
- if (mode === void 0 || mode !== "signed" && mode !== "unsigned" || extra.length > 0) throw new UsageError(USAGE$44);
74785
- const domainUuid = oneUuid$7(uuid === void 0 ? [] : [uuid], USAGE$44);
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);
74786
74844
  const company = await requireCompany(context.flags);
74787
74845
  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 () => {
74788
74846
  const body = {
@@ -74801,7 +74859,7 @@ async function changeDnssec(context, rest) {
74801
74859
  }
74802
74860
  /** `dns handover <uuid>`: hand the zone back, dropping what this platform publishes. */
74803
74861
  async function handover(context, rest) {
74804
- const domainUuid = oneUuid$7(rest, USAGE$44);
74862
+ const domainUuid = oneUuid$7(rest, USAGE$45);
74805
74863
  const company = await requireCompany(context.flags);
74806
74864
  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 () => {
74807
74865
  const body = {
@@ -74820,7 +74878,7 @@ async function handover(context, rest) {
74820
74878
  /** A record type flag, refused when it is not one of the API's own values. */
74821
74879
  function recordTypeFlag(context) {
74822
74880
  const raw = (context.flags.get("--type") ?? "").trim().toLowerCase();
74823
- if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$44}`);
74881
+ if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$45}`);
74824
74882
  return raw;
74825
74883
  }
74826
74884
  /**
@@ -74853,7 +74911,7 @@ function recordSetFromValue(value, subject) {
74853
74911
  };
74854
74912
  }
74855
74913
  // src/commands/dns-templates.ts
74856
- var USAGE$43 = [
74914
+ var USAGE$44 = [
74857
74915
  "Usage: hostingctl dns template list --company <slug>",
74858
74916
  " hostingctl dns template show <template-uuid> --company <slug>",
74859
74917
  " hostingctl dns template save [<template-uuid>] --company <slug> --file <template.json>",
@@ -74875,24 +74933,24 @@ var USAGE$43 = [
74875
74933
  async function dnsTemplates(context, rest) {
74876
74934
  const [action, ...tail] = rest;
74877
74935
  if (action === "list") {
74878
- if (tail.length > 0) throw new UsageError(USAGE$43);
74936
+ if (tail.length > 0) throw new UsageError(USAGE$44);
74879
74937
  return {
74880
74938
  kind: "templates",
74881
74939
  templates: (await dnsTemplatesIndex({ path: { company: await requireCompany(context.flags) } })).data.templates
74882
74940
  };
74883
74941
  }
74884
- if (action === "show") return await show$5(context, oneUuid$7(tail, USAGE$43));
74942
+ if (action === "show") return await show$5(context, oneUuid$7(tail, USAGE$44));
74885
74943
  if (action === "save") return await save$1(context, tail[0]);
74886
- if (action === "delete") return await destroy$1(context, oneUuid$7(tail, USAGE$43));
74887
- if (action === "from-zone") return await fromZone(context, oneUuid$7(tail, USAGE$43));
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));
74888
74946
  if (action === "preview") return await preview$2(context, tail);
74889
74947
  if (action === "apply") return await apply(context, tail);
74890
- throw new UsageError(USAGE$43);
74948
+ throw new UsageError(USAGE$44);
74891
74949
  }
74892
74950
  /** Two uuids: the template, then the zone it applies to. */
74893
74951
  function templateAndZone(rest) {
74894
74952
  const [templateUuid, domainUuid, ...extra] = rest;
74895
- if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$43);
74953
+ if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$44);
74896
74954
  return {
74897
74955
  templateUuid,
74898
74956
  domainUuid
@@ -74911,7 +74969,7 @@ async function show$5(context, templateUuid) {
74911
74969
  /** `save [<uuid>] --file …`: record a new template, or replace the one named. */
74912
74970
  async function save$1(context, templateUuid) {
74913
74971
  const file = context.flags.get("--file") ?? "";
74914
- if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$43}`);
74972
+ if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$44}`);
74915
74973
  const company = await requireCompany(context.flags);
74916
74974
  const document = readJsonObject(file, "template");
74917
74975
  const name = typeof document.name === "string" ? document.name.trim() : "";
@@ -74947,7 +75005,7 @@ async function destroy$1(context, templateUuid) {
74947
75005
  async function fromZone(context, domainUuid) {
74948
75006
  const company = await requireCompany(context.flags);
74949
75007
  const name = context.flags.get("--name")?.trim() ?? "";
74950
- if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$43}`);
75008
+ if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$44}`);
74951
75009
  const zone = (await domainsDnsShow({ path: {
74952
75010
  company,
74953
75011
  domainUuid
@@ -75016,7 +75074,7 @@ function recordSetsFromFile$1(document, subject) {
75016
75074
  });
75017
75075
  }
75018
75076
  // src/commands/dns-text.ts
75019
- var USAGE$42 = [
75077
+ var USAGE$43 = [
75020
75078
  "Usage: hostingctl dns <zone|export> <domain-uuid> --company <slug>",
75021
75079
  " hostingctl dns import <preview|apply> <domain-uuid> --company <slug> --file <path> [--confirm]",
75022
75080
  " hostingctl dns enable <domain-uuid> --company <slug>",
@@ -75086,7 +75144,7 @@ function applyText(result) {
75086
75144
  var DNS_METADATA = {
75087
75145
  name: "dns",
75088
75146
  summary: "A managed name's zone, its zone-file export, and the reviewed import write.",
75089
- usage: USAGE$42,
75147
+ usage: USAGE$43,
75090
75148
  flags: [
75091
75149
  {
75092
75150
  name: "--file",
@@ -75124,23 +75182,23 @@ var DNS_METADATA = {
75124
75182
  var DNS_TOPICS = [
75125
75183
  {
75126
75184
  path: ["enable"],
75127
- usage: USAGE$44
75185
+ usage: USAGE$45
75128
75186
  },
75129
75187
  {
75130
75188
  path: ["record"],
75131
- usage: USAGE$44
75189
+ usage: USAGE$45
75132
75190
  },
75133
75191
  {
75134
75192
  path: ["dnssec"],
75135
- usage: USAGE$44
75193
+ usage: USAGE$45
75136
75194
  },
75137
75195
  {
75138
75196
  path: ["handover"],
75139
- usage: USAGE$44
75197
+ usage: USAGE$45
75140
75198
  },
75141
75199
  {
75142
75200
  path: ["template"],
75143
- usage: USAGE$43
75201
+ usage: USAGE$44
75144
75202
  }
75145
75203
  ];
75146
75204
  // src/commands/dns-import.ts
@@ -75157,7 +75215,7 @@ var IMPORT_LINE = /^(\S+)\s+(\d+)\s+(\S+)\s+(.+)$/;
75157
75215
  * hold customer DNS data, so its contents are never printed; only the API's own answer is shown.
75158
75216
  */
75159
75217
  function recordSetsFromFile(file) {
75160
- if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$42}`);
75218
+ if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$43}`);
75161
75219
  const sets = /* @__PURE__ */ new Map();
75162
75220
  for (const [index, raw] of readBoundedImportFile(file, "import").split("\n").entries()) addLine(sets, raw.trim(), index + 1);
75163
75221
  if (sets.size === 0) throw new UsageError(`The import file [${file}] holds no record sets.`);
@@ -75249,7 +75307,7 @@ var dns = {
75249
75307
  if (subcommand === "import") return await importRecords(context, rest);
75250
75308
  if (subcommand === "template") return await dnsTemplates(context, rest);
75251
75309
  if (WRITE_SUBCOMMANDS$1.has(subcommand ?? "")) return await dnsWrites(context, subcommand ?? "", rest);
75252
- throw new UsageError(USAGE$42);
75310
+ throw new UsageError(USAGE$43);
75253
75311
  },
75254
75312
  human(report) {
75255
75313
  if ("sent" in report) return renderWriteOutcome(report, dnsWriteText);
@@ -75268,7 +75326,7 @@ async function readZone(context, rest, which) {
75268
75326
  /** `import preview|apply <uuid> --file <path>`: the review, or the reviewed write. */
75269
75327
  async function importRecords(context, rest) {
75270
75328
  const [action, ...tail] = rest;
75271
- if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$42);
75329
+ if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$43);
75272
75330
  const path = await domainPath$1(context, tail);
75273
75331
  const recordSets = recordSetsFromFile(context.flags.get("--file"));
75274
75332
  if (action === "preview") return (await domainsDnsImportPreview({
@@ -75305,7 +75363,7 @@ async function applyImport(context, path, recordSets) {
75305
75363
  /** The company and the one domain uuid a DNS subcommand needs, or a usage refusal. */
75306
75364
  async function domainPath$1(context, rest) {
75307
75365
  const [domainUuid, ...extra] = rest;
75308
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75366
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$43);
75309
75367
  return {
75310
75368
  company: await requireCompany(context.flags),
75311
75369
  domainUuid
@@ -75471,7 +75529,7 @@ function checkText(check) {
75471
75529
  }
75472
75530
  // src/commands/email-alias.ts
75473
75531
  /** The one usage string this group refuses with, owned by the group it belongs to. */
75474
- var USAGE$41 = [
75532
+ var USAGE$42 = [
75475
75533
  "Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
75476
75534
  " hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
75477
75535
  " hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
@@ -75495,16 +75553,16 @@ async function aliasGroup(context, action, tail) {
75495
75553
  if (action === "set") return await aliasSet(context, tail);
75496
75554
  if (action === "remove") return await aliasRemove(context, tail);
75497
75555
  if (action === "unroute") return await aliasUnroute(context, tail);
75498
- throw new UsageError(USAGE$41);
75556
+ throw new UsageError(USAGE$42);
75499
75557
  }
75500
75558
  /** `alias add <domain> --local … --destinations …`: a new forwarding address. */
75501
75559
  async function aliasAdd(context, tail) {
75502
75560
  const [emailDomainUuid, ...extra] = tail;
75503
- if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75561
+ if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75504
75562
  const company = await requireCompany(context.flags);
75505
75563
  const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
75506
75564
  const list = destinations$1(context);
75507
- if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$41}`);
75565
+ if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$42}`);
75508
75566
  return await confirmableWrite(context, [`Create ${localPart}@… forwarding to:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
75509
75567
  return (await emailAliasesStore({
75510
75568
  path: {
@@ -75521,10 +75579,10 @@ async function aliasAdd(context, tail) {
75521
75579
  /** `alias set <domain> <alias> --destinations …`: replace the complete recipient list. */
75522
75580
  async function aliasSet(context, tail) {
75523
75581
  const [emailDomainUuid, aliasUuid, ...extra] = tail;
75524
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75582
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75525
75583
  const company = await requireCompany(context.flags);
75526
75584
  const list = destinations$1(context);
75527
- if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$41}`);
75585
+ if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$42}`);
75528
75586
  return await confirmableWrite(context, [`Replace ${aliasUuid}'s destinations with:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
75529
75587
  return (await emailAliasesUpdate({
75530
75588
  path: {
@@ -75539,7 +75597,7 @@ async function aliasSet(context, tail) {
75539
75597
  /** `alias remove <domain> <alias>`. */
75540
75598
  async function aliasRemove(context, tail) {
75541
75599
  const [emailDomainUuid, aliasUuid, ...extra] = tail;
75542
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75600
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75543
75601
  const company = await requireCompany(context.flags);
75544
75602
  return await confirmableWrite(context, `Remove alias ${aliasUuid}.`, async () => {
75545
75603
  return (await emailAliasesDestroy({ path: {
@@ -75552,7 +75610,7 @@ async function aliasRemove(context, tail) {
75552
75610
  /** `alias unroute <domain> <alias> <mailbox>`: drop one destination. */
75553
75611
  async function aliasUnroute(context, tail) {
75554
75612
  const [emailDomainUuid, aliasUuid, mailboxUuid, ...extra] = tail;
75555
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75613
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
75556
75614
  const company = await requireCompany(context.flags);
75557
75615
  return await confirmableWrite(context, `Stop forwarding ${aliasUuid} to mailbox ${mailboxUuid}.`, async () => {
75558
75616
  return (await emailAliasesDestinationsDestroy({ path: {
@@ -75564,7 +75622,7 @@ async function aliasUnroute(context, tail) {
75564
75622
  });
75565
75623
  }
75566
75624
  // src/commands/email-address.ts
75567
- var USAGE$40 = [
75625
+ var USAGE$41 = [
75568
75626
  "Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
75569
75627
  " hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
75570
75628
  " hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
@@ -75590,13 +75648,13 @@ async function emailAddresses(context, subcommand, rest) {
75590
75648
  if (subcommand === "alias") return await aliasGroup(context, action, tail);
75591
75649
  if (subcommand === "app-token") return await appToken(context, action, tail);
75592
75650
  if (subcommand === "send-as") return await sendAs(context, action, tail);
75593
- throw new UsageError(USAGE$40);
75651
+ throw new UsageError(USAGE$41);
75594
75652
  }
75595
75653
  /** `app-token list|issue|revoke|deliver`. */
75596
75654
  async function appToken(context, action, tail) {
75597
75655
  const company = await requireCompany(context.flags);
75598
75656
  const [emailDomainUuid, mailboxUuid, third, ...extra] = tail;
75599
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$40);
75657
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75600
75658
  const path = {
75601
75659
  company,
75602
75660
  emailDomainUuid,
@@ -75624,7 +75682,7 @@ async function appToken(context, action, tail) {
75624
75682
  }
75625
75683
  if (action === "issue" && third === void 0) {
75626
75684
  const label = context.flags.get("--label")?.trim() ?? "";
75627
- if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$40}`);
75685
+ if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$41}`);
75628
75686
  return await confirmableWrite(context, `Create an application password labelled "${label}".`, async () => {
75629
75687
  return (await emailAppTokensStore({
75630
75688
  path,
@@ -75632,7 +75690,7 @@ async function appToken(context, action, tail) {
75632
75690
  })).data;
75633
75691
  });
75634
75692
  }
75635
- if (third === void 0) throw new UsageError(USAGE$40);
75693
+ if (third === void 0) throw new UsageError(USAGE$41);
75636
75694
  const tokenPath = {
75637
75695
  ...path,
75638
75696
  tokenUuid: third
@@ -75641,14 +75699,14 @@ async function appToken(context, action, tail) {
75641
75699
  return (await emailAppTokensRevoke({ path: tokenPath })).data;
75642
75700
  });
75643
75701
  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);
75644
- throw new UsageError(USAGE$40);
75702
+ throw new UsageError(USAGE$41);
75645
75703
  }
75646
75704
  /** `send-as list|grant|revoke`. */
75647
75705
  async function sendAs(context, action, tail) {
75648
75706
  const company = await requireCompany(context.flags);
75649
75707
  if (action === "revoke") {
75650
75708
  const [grantUuid, ...extra] = tail;
75651
- if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$40);
75709
+ if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75652
75710
  return await confirmableWrite(context, `Revoke send-as grant ${grantUuid}.`, async () => {
75653
75711
  return (await emailSendAsGrantsDestroy({ path: {
75654
75712
  company,
@@ -75657,7 +75715,7 @@ async function sendAs(context, action, tail) {
75657
75715
  });
75658
75716
  }
75659
75717
  const [emailDomainUuid, mailboxUuid, ...extra] = tail;
75660
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$40);
75718
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
75661
75719
  const path = {
75662
75720
  company,
75663
75721
  emailDomainUuid,
@@ -75684,7 +75742,7 @@ async function sendAs(context, action, tail) {
75684
75742
  }
75685
75743
  if (action === "grant") {
75686
75744
  const grantedAddressUuid = context.flags.get("--address") ?? "";
75687
- if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$40}`);
75745
+ if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$41}`);
75688
75746
  return await confirmableWrite(context, `Allow this mailbox to send as address ${grantedAddressUuid}.`, async () => {
75689
75747
  return (await emailSendAsGrantsStore({
75690
75748
  path,
@@ -75692,7 +75750,7 @@ async function sendAs(context, action, tail) {
75692
75750
  })).data;
75693
75751
  });
75694
75752
  }
75695
- throw new UsageError(USAGE$40);
75753
+ throw new UsageError(USAGE$41);
75696
75754
  }
75697
75755
  // src/commands/email-write-text.ts
75698
75756
  /**
@@ -75758,7 +75816,7 @@ function emailAddressText(report) {
75758
75816
  return "Done.";
75759
75817
  }
75760
75818
  // src/commands/email-domain.ts
75761
- var USAGE$39 = [
75819
+ var USAGE$40 = [
75762
75820
  "Usage: hostingctl email offer",
75763
75821
  " hostingctl email enroll --company <slug>",
75764
75822
  " hostingctl email agree --company <slug> --term <package-term-uuid>",
@@ -75779,7 +75837,7 @@ var USAGE$39 = [
75779
75837
  /** `email offer|agree|provision|domain|catch-all`, dispatched from the `email` command. */
75780
75838
  async function emailDomains(context, subcommand, rest) {
75781
75839
  if (subcommand === "offer") {
75782
- if (rest.length > 0) throw new UsageError(USAGE$39);
75840
+ if (rest.length > 0) throw new UsageError(USAGE$40);
75783
75841
  return {
75784
75842
  kind: "offers",
75785
75843
  offers: (await emailOffers({ path: { company: await requireCompany(context.flags) } })).data
@@ -75790,11 +75848,11 @@ async function emailDomains(context, subcommand, rest) {
75790
75848
  if (subcommand === "provision") return await provision(context, rest);
75791
75849
  if (subcommand === "domain") return await domain(context, rest);
75792
75850
  if (subcommand === "catch-all") return await catchAll(context, rest);
75793
- throw new UsageError(USAGE$39);
75851
+ throw new UsageError(USAGE$40);
75794
75852
  }
75795
75853
  /** A company-wide command takes no positionals. */
75796
75854
  function noExtra$14(rest) {
75797
- if (rest.length > 0) throw new UsageError(USAGE$39);
75855
+ if (rest.length > 0) throw new UsageError(USAGE$40);
75798
75856
  }
75799
75857
  /** `enroll`: create the service record and start provisioning, which is the API's own create. */
75800
75858
  async function enroll(context, rest) {
@@ -75807,7 +75865,7 @@ async function agree(context, rest) {
75807
75865
  noExtra$14(rest);
75808
75866
  const company = await requireCompany(context.flags);
75809
75867
  const packageTermUuid = context.flags.get("--term") ?? "";
75810
- if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$39}`);
75868
+ if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$40}`);
75811
75869
  return await confirmableWrite(context, `Accept email package term ${packageTermUuid} for ${company}.`, async () => (await emailAgreement({
75812
75870
  path: { company },
75813
75871
  body: { packageTermUuid }
@@ -75826,7 +75884,7 @@ async function domain(context, rest) {
75826
75884
  if (action === "add") {
75827
75885
  noExtra$14(tail);
75828
75886
  const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
75829
- if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$39}`);
75887
+ if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$40}`);
75830
75888
  return await confirmableWrite(context, `Attach ${hostname} to ${company}'s mail service.`, async () => {
75831
75889
  return (await emailDomainsStore({
75832
75890
  path: { company },
@@ -75836,7 +75894,7 @@ async function domain(context, rest) {
75836
75894
  }
75837
75895
  const path = {
75838
75896
  company,
75839
- emailDomainUuid: oneUuid$7(tail, USAGE$39)
75897
+ emailDomainUuid: oneUuid$7(tail, USAGE$40)
75840
75898
  };
75841
75899
  if (action === "recheck") return await confirmableWrite(context, "Re-observe this name's DNS now.", async () => {
75842
75900
  return (await emailDomainsRecheck({ path })).data;
@@ -75856,14 +75914,14 @@ async function domain(context, rest) {
75856
75914
  body
75857
75915
  })).data;
75858
75916
  });
75859
- throw new UsageError(USAGE$39);
75917
+ throw new UsageError(USAGE$40);
75860
75918
  }
75861
75919
  /** `catch-all show|set|clear`. */
75862
75920
  async function catchAll(context, rest) {
75863
75921
  const [action, ...tail] = rest;
75864
75922
  const path = {
75865
75923
  company: await requireCompany(context.flags),
75866
- emailDomainUuid: oneUuid$7(tail, USAGE$39)
75924
+ emailDomainUuid: oneUuid$7(tail, USAGE$40)
75867
75925
  };
75868
75926
  if (action === "show") return {
75869
75927
  kind: "catch-all",
@@ -75871,7 +75929,7 @@ async function catchAll(context, rest) {
75871
75929
  };
75872
75930
  if (action === "set") {
75873
75931
  const destinations = destinationList(context);
75874
- if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$39}`);
75932
+ if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$40}`);
75875
75933
  return await confirmableWrite(context, [`Enable the catch-all for this name, forwarding to:`, ...destinations.map((one) => ` ${one}`)].join("\n"), async () => {
75876
75934
  return (await emailCatchAllUpdate({
75877
75935
  path,
@@ -75883,7 +75941,7 @@ async function catchAll(context, rest) {
75883
75941
  });
75884
75942
  }
75885
75943
  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);
75886
- throw new UsageError(USAGE$39);
75944
+ throw new UsageError(USAGE$40);
75887
75945
  }
75888
75946
  /**
75889
75947
  * The comma-separated `--destinations`.
@@ -75914,7 +75972,7 @@ function catchAllText(one) {
75914
75972
  return ` the catch-all forwards to ${one.destinations.join(", ") || "nobody"}`;
75915
75973
  }
75916
75974
  // src/commands/email-holds.ts
75917
- var USAGE$38 = [
75975
+ var USAGE$39 = [
75918
75976
  "Usage: hostingctl email hold list --company <slug>",
75919
75977
  " hostingctl email hold create --company <slug> --reason <compromise|abuse|operator> [--mailbox <uuid>]",
75920
75978
  " hostingctl email hold release <hold-uuid> --company <slug>",
@@ -75937,21 +75995,21 @@ async function emailHolds(context, rest) {
75937
75995
  const [action, ...tail] = rest;
75938
75996
  const company = await requireCompany(context.flags);
75939
75997
  if (action === "list") {
75940
- if (tail.length > 0) throw new UsageError(USAGE$38);
75998
+ if (tail.length > 0) throw new UsageError(USAGE$39);
75941
75999
  return {
75942
76000
  kind: "holds",
75943
76001
  holds: (await emailHoldsIndex({ path: { company } })).data.holds
75944
76002
  };
75945
76003
  }
75946
76004
  if (action === "create") return await create$3(context, tail, company);
75947
- if (action === "release") return await release$1(context, oneUuid$7(tail, USAGE$38), company);
75948
- throw new UsageError(USAGE$38);
76005
+ if (action === "release") return await release$1(context, oneUuid$7(tail, USAGE$39), company);
76006
+ throw new UsageError(USAGE$39);
75949
76007
  }
75950
76008
  /** `create --reason … [--mailbox …]`. */
75951
76009
  async function create$3(context, tail, company) {
75952
- if (tail.length > 0) throw new UsageError(USAGE$38);
76010
+ if (tail.length > 0) throw new UsageError(USAGE$39);
75953
76011
  const raw = context.flags.get("--reason")?.trim() ?? "";
75954
- if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$38}`);
76012
+ if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$39}`);
75955
76013
  const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
75956
76014
  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 () => {
75957
76015
  return (await emailHoldsStore({
@@ -75986,7 +76044,7 @@ function emailHoldText(report) {
75986
76044
  return report.holds.length === 0 ? "No sending holds." : report.holds.map(holdLine).join("\n");
75987
76045
  }
75988
76046
  // src/commands/email-mailbox-admin.ts
75989
- var USAGE$37 = [
76047
+ var USAGE$38 = [
75990
76048
  "Usage: hostingctl email mailbox add <email-domain-uuid> --company <slug> --local <name> --quota <gb-5|gb-10|gb-20>",
75991
76049
  " hostingctl email mailbox change <email-domain-uuid> <mailbox-uuid> --company <slug> [--status enabled|suspended] [--quota <size>]",
75992
76050
  " hostingctl email mailbox remove <email-domain-uuid> <mailbox-uuid> --company <slug>",
@@ -76018,7 +76076,7 @@ var STATUSES = /* @__PURE__ */ new Set(["enabled", "suspended"]);
76018
76076
  async function emailMailboxAdmin(context, action, tail) {
76019
76077
  if (action === "add") return await add$8(context, tail);
76020
76078
  const [emailDomainUuid, mailboxUuid, ...extra] = tail;
76021
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$37);
76079
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$38);
76022
76080
  const path = {
76023
76081
  company: await requireCompany(context.flags),
76024
76082
  emailDomainUuid,
@@ -76036,7 +76094,7 @@ async function emailMailboxAdmin(context, action, tail) {
76036
76094
  if (action === "preferences-set") return await preferences(context, path);
76037
76095
  if (action === "credential") return await revealCredential(context, path, false);
76038
76096
  if (action === "reset-credential") return await revealCredential(context, path, true);
76039
- throw new UsageError(USAGE$37);
76097
+ throw new UsageError(USAGE$38);
76040
76098
  }
76041
76099
  /** A quota flag from the API's own values. */
76042
76100
  function quota(context) {
@@ -76052,11 +76110,11 @@ function destinations(context) {
76052
76110
  /** `add <domain> --local … --quota …`. */
76053
76111
  async function add$8(context, tail) {
76054
76112
  const [emailDomainUuid, ...extra] = tail;
76055
- if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$37);
76113
+ if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$38);
76056
76114
  const company = await requireCompany(context.flags);
76057
76115
  const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
76058
76116
  const size = quota(context);
76059
- if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$37}`);
76117
+ if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$38}`);
76060
76118
  return await confirmableWrite(context, `Create mailbox ${localPart}@… with a ${size} quota.`, async () => {
76061
76119
  return (await emailMailboxesStore({
76062
76120
  path: {
@@ -76081,7 +76139,7 @@ function statusFlag(context) {
76081
76139
  async function change$1(context, path) {
76082
76140
  const status = statusFlag(context);
76083
76141
  const size = quota(context);
76084
- if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$37}`);
76142
+ if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$38}`);
76085
76143
  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 () => {
76086
76144
  return (await emailMailboxesUpdate({
76087
76145
  path,
@@ -76109,7 +76167,7 @@ async function preferences(context, path) {
76109
76167
  const markRead = onOff$4(context, "--spam-mark-read");
76110
76168
  const threshold = context.flags.get("--spam-threshold");
76111
76169
  const summary = context.flags.get("--vacation-subject");
76112
- 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$37}`);
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}`);
76113
76171
  const body = {
76114
76172
  vacationEnabled: vacation ?? current.vacationEnabled,
76115
76173
  vacationSubject: context.flags.get("--vacation-subject") ?? current.vacationSubject,
@@ -76163,7 +76221,7 @@ function emailMailboxAdminText(report) {
76163
76221
  return preferencesText(report.preferences);
76164
76222
  }
76165
76223
  // src/commands/email-service.ts
76166
- var USAGE$36 = [
76224
+ var USAGE$37 = [
76167
76225
  "Usage: hostingctl email service <suspend|resume> --company <slug>",
76168
76226
  " hostingctl email service cancellation --company <slug>",
76169
76227
  " hostingctl email service cancel --company <slug> --ends-at <iso-date>",
@@ -76190,11 +76248,11 @@ async function emailService(context, subcommand, rest) {
76190
76248
  if (subcommand === "dmarc-set") return await dmarcSet$1(context, rest);
76191
76249
  if (subcommand === "blocklist-set") return await blocklistSet(context, rest);
76192
76250
  if (subcommand === "service") return await service(context, rest);
76193
- throw new UsageError(USAGE$36);
76251
+ throw new UsageError(USAGE$37);
76194
76252
  }
76195
76253
  /** A company-wide command takes no positionals. */
76196
76254
  function noExtra$13(rest) {
76197
- if (rest.length > 0) throw new UsageError(USAGE$36);
76255
+ if (rest.length > 0) throw new UsageError(USAGE$37);
76198
76256
  }
76199
76257
  /** `service suspend|resume|cancellation|cancel|cancel-withdraw`. */
76200
76258
  async function service(context, rest) {
@@ -76220,7 +76278,7 @@ async function service(context, rest) {
76220
76278
  if (action === "cancel") {
76221
76279
  noExtra$13(tail);
76222
76280
  const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
76223
- if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$36}`);
76281
+ if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$37}`);
76224
76282
  if (Number.isNaN(Date.parse(endsAt))) throw new UsageError(`--ends-at must be an ISO date (got "${endsAt}").`);
76225
76283
  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({
76226
76284
  path: { company },
@@ -76233,7 +76291,7 @@ async function service(context, rest) {
76233
76291
  return (await emailCancellationWithdraw({ path: { company } })).data;
76234
76292
  });
76235
76293
  }
76236
- throw new UsageError(USAGE$36);
76294
+ throw new UsageError(USAGE$37);
76237
76295
  }
76238
76296
  /** `dmarc`: DMARC reporting for every attached name. */
76239
76297
  async function dmarc$1(context, rest) {
@@ -76253,7 +76311,7 @@ async function blocklist$1(context, rest) {
76253
76311
  }
76254
76312
  /** `dmarc-set <name> --enabled on|off`. */
76255
76313
  async function dmarcSet$1(context, rest) {
76256
- const emailDomainUuid = oneUuid$7(rest, USAGE$36);
76314
+ const emailDomainUuid = oneUuid$7(rest, USAGE$37);
76257
76315
  const company = await requireCompany(context.flags);
76258
76316
  const enabled = onOff$3(context);
76259
76317
  return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} DMARC reporting for this name.`, async () => {
@@ -76268,7 +76326,7 @@ async function dmarcSet$1(context, rest) {
76268
76326
  }
76269
76327
  /** `blocklist-set <name> --enabled on|off`. */
76270
76328
  async function blocklistSet(context, rest) {
76271
- const emailDomainUuid = oneUuid$7(rest, USAGE$36);
76329
+ const emailDomainUuid = oneUuid$7(rest, USAGE$37);
76272
76330
  const company = await requireCompany(context.flags);
76273
76331
  const enabled = onOff$3(context);
76274
76332
  return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} blocklist monitoring for this name.`, async () => {
@@ -76285,7 +76343,7 @@ async function blocklistSet(context, rest) {
76285
76343
  async function importSchema(context, rest) {
76286
76344
  noExtra$13(rest);
76287
76345
  const version = context.flags.get("--version")?.trim() ?? "";
76288
- if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$36}`);
76346
+ if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$37}`);
76289
76347
  return {
76290
76348
  kind: "schema",
76291
76349
  version,
@@ -76297,7 +76355,7 @@ function onOff$3(context) {
76297
76355
  const raw = context.flags.get("--enabled")?.trim() ?? "";
76298
76356
  if (raw === "on" || raw === "true") return true;
76299
76357
  if (raw === "off" || raw === "false") return false;
76300
- throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$36}`);
76358
+ throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$37}`);
76301
76359
  }
76302
76360
  /** The `email service|dmarc|blocklist|import-schema` renderer. */
76303
76361
  function emailServiceText(report) {
@@ -76309,7 +76367,7 @@ function emailServiceText(report) {
76309
76367
  }
76310
76368
  // src/commands/email-sync-csv.ts
76311
76369
  /** The usage this group refuses with, owned by the command it belongs to. */
76312
- var USAGE$35 = [
76370
+ var USAGE$36 = [
76313
76371
  "Usage: hostingctl email sync csv <preview|commit> <email-domain-uuid> --company <slug> --file <path>",
76314
76372
  "",
76315
76373
  " preview What the file's rows would become. Writes nothing.",
@@ -76320,7 +76378,7 @@ var USAGE$35 = [
76320
76378
  /** One named uuid, or a usage refusal. */
76321
76379
  function one$2(rest) {
76322
76380
  const [uuid, ...extra] = rest;
76323
- if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$35);
76381
+ if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$36);
76324
76382
  return uuid;
76325
76383
  }
76326
76384
  /** `csv preview|commit <domain> --file <path>`: one multipart upload of the CSV itself. */
@@ -76328,7 +76386,7 @@ async function csv(context, tail) {
76328
76386
  const [action, ...args] = tail;
76329
76387
  const path = await domainPath(context, one$2(args));
76330
76388
  const file = context.flags.get("--file") ?? "";
76331
- if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$35}`);
76389
+ if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$36}`);
76332
76390
  if (action === "preview") return {
76333
76391
  kind: "csv-preview",
76334
76392
  rows: (await emailMailboxSyncCsvPreview({
@@ -76336,10 +76394,10 @@ async function csv(context, tail) {
76336
76394
  body: await csvPreviewBody(file)
76337
76395
  })).data.rows
76338
76396
  };
76339
- if (action !== "commit") throw new UsageError(USAGE$35);
76397
+ if (action !== "commit") throw new UsageError(USAGE$36);
76340
76398
  const recurrence = recurrenceFlag(context) ?? "once";
76341
76399
  const endsAt = context.flags.get("--ends-at")?.trim() || null;
76342
- if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$35}`);
76400
+ if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$36}`);
76343
76401
  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 () => {
76344
76402
  const accepted = (await emailMailboxSyncCsvPreview({
76345
76403
  path,
@@ -76387,7 +76445,7 @@ async function csvCommitBody(file, accepted, recurrence, endsAt) {
76387
76445
  return form;
76388
76446
  }
76389
76447
  // src/commands/email-sync.ts
76390
- var USAGE$34 = [
76448
+ var USAGE$35 = [
76391
76449
  "Usage: hostingctl email sync show <email-domain-uuid> --company <slug>",
76392
76450
  " hostingctl email sync server <email-domain-uuid> --company <slug> --host <host> --port <n> --encryption <tls|starttls>",
76393
76451
  " 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>]",
@@ -76412,12 +76470,12 @@ async function emailSync(context, rest) {
76412
76470
  if (action === "server") return await server(context, tail);
76413
76471
  if (action === "account") return await account(context, tail);
76414
76472
  if (action === "csv") return await csv(context, tail);
76415
- throw new UsageError(USAGE$34);
76473
+ throw new UsageError(USAGE$35);
76416
76474
  }
76417
76475
  /** One named uuid, or a usage refusal. */
76418
76476
  function one$1(rest) {
76419
76477
  const [uuid, ...extra] = rest;
76420
- if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$34);
76478
+ if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$35);
76421
76479
  return uuid;
76422
76480
  }
76423
76481
  /** `show`: the server and every account. */
@@ -76433,9 +76491,9 @@ async function server(context, tail) {
76433
76491
  const host = context.flags.get("--host")?.trim() ?? "";
76434
76492
  const port = Number(context.flags.get("--port") ?? "");
76435
76493
  const encryption = context.flags.get("--encryption")?.trim() ?? "";
76436
- if (host === "") throw new UsageError(`sync server needs --host.\n\n${USAGE$34}`);
76437
- if (!Number.isInteger(port) || port < 1 || port > 65535) throw new UsageError(`--port must be a whole number between 1 and 65535.\n\n${USAGE$34}`);
76438
- if (!ENCRYPTIONS.has(encryption)) throw new UsageError(`--encryption must be tls or starttls (got "${encryption}").\n\n${USAGE$34}`);
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}`);
76439
76497
  return await confirmableWrite(context, `Point the mailbox sync source at ${host}:${String(port)} over ${encryption}.`, async () => {
76440
76498
  return (await emailMailboxSyncServerUpdate({
76441
76499
  path,
@@ -76459,9 +76517,9 @@ async function account(context, tail) {
76459
76517
  const [action, ...args] = tail;
76460
76518
  if (action === "add") return await accountAdd(context, args);
76461
76519
  if (action === "change") return await accountChange(context, args);
76462
- if (action === void 0) throw new UsageError(USAGE$34);
76520
+ if (action === void 0) throw new UsageError(USAGE$35);
76463
76521
  const [emailDomainUuid, accountUuid, ...extra] = args;
76464
- if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
76522
+ if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
76465
76523
  return await accountAction(context, action, {
76466
76524
  ...await domainPath(context, emailDomainUuid),
76467
76525
  accountUuid
@@ -76480,13 +76538,13 @@ async function accountAction(context, action, path) {
76480
76538
  if (action === "start") return await startAccount(context, path);
76481
76539
  if (action === "stop") return await confirmableWrite(context, "Stop this account's scheduled sync. The source credential is kept.", async () => (await emailMailboxSyncAccountsStop({ path })).data);
76482
76540
  if (action === "forget") return await confirmableWrite(context, "Forget this account's source credential and stop future work.", async () => (await emailMailboxSyncAccountsForget({ path })).data);
76483
- throw new UsageError(USAGE$34);
76541
+ throw new UsageError(USAGE$35);
76484
76542
  }
76485
76543
  /** `start`: the schedule the account should run on from now. */
76486
76544
  async function startAccount(context, path) {
76487
76545
  const recurrence = recurrenceFlag(context) ?? "once";
76488
76546
  const endsAt = context.flags.get("--ends-at")?.trim() || null;
76489
- if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$34}`);
76547
+ if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$35}`);
76490
76548
  return await confirmableWrite(context, `Start this account's scheduled sync (${recurrence}${endsAt === null ? "" : ` until ${endsAt}`}).`, async () => (await emailMailboxSyncAccountsStart({
76491
76549
  path,
76492
76550
  body: {
@@ -76499,7 +76557,7 @@ async function startAccount(context, path) {
76499
76557
  async function accountAdd(context, args) {
76500
76558
  const path = await domainPath(context, one$1(args));
76501
76559
  const body = accountBody(context);
76502
- const sourcePassword = readSecret(context, "password", 4096, USAGE$34);
76560
+ const sourcePassword = readSecret(context, "password", 4096, USAGE$35);
76503
76561
  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({
76504
76562
  path,
76505
76563
  body: {
@@ -76511,7 +76569,7 @@ async function accountAdd(context, args) {
76511
76569
  /** `account change <domain> <account> [fields]`: only the fields named are sent. */
76512
76570
  async function accountChange(context, args) {
76513
76571
  const [emailDomainUuid, accountUuid, ...extra] = args;
76514
- if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
76572
+ if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
76515
76573
  const path = {
76516
76574
  ...await domainPath(context, emailDomainUuid),
76517
76575
  accountUuid
@@ -76525,8 +76583,8 @@ async function accountChange(context, args) {
76525
76583
  if (mailbox !== "") body.mailboxUuid = mailbox;
76526
76584
  if (recurrence !== null) body.recurrence = recurrence;
76527
76585
  if (endsAt !== "") body.endsAt = endsAt;
76528
- if (context.flags.has("--password-file") || context.flags.has("--password-stdin")) body.sourcePassword = readSecret(context, "password", 4096, USAGE$34);
76529
- if (Object.keys(body).length === 0) throw new UsageError(`account change needs at least one field.\n\n${USAGE$34}`);
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}`);
76530
76588
  return await confirmableWrite(context, "Change this sync account.", async () => {
76531
76589
  return (await emailMailboxSyncAccountsUpdate({
76532
76590
  path,
@@ -76540,8 +76598,8 @@ function accountBody(context) {
76540
76598
  const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
76541
76599
  const recurrence = recurrenceFlag(context) ?? "once";
76542
76600
  const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
76543
- if (sourceUsername === "" || mailboxUuid === "") throw new UsageError(`account add needs --username and --mailbox.\n\n${USAGE$34}`);
76544
- if (recurrence === "until" && endsAt === "") throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$34}`);
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}`);
76545
76603
  return {
76546
76604
  sourceUsername,
76547
76605
  mailboxUuid,
@@ -76557,7 +76615,7 @@ function recurrenceFlag(context) {
76557
76615
  return raw;
76558
76616
  }
76559
76617
  // src/commands/email-text.ts
76560
- var USAGE$33 = [
76618
+ var USAGE$34 = [
76561
76619
  "Usage: hostingctl email <show|names> --company <slug>",
76562
76620
  " hostingctl email <mailboxes|aliases> <email-domain-uuid> --company <slug>",
76563
76621
  " hostingctl email mailbox <email-domain-uuid> <mailbox-uuid> --company <slug>",
@@ -76639,7 +76697,7 @@ function count$1(shown, total) {
76639
76697
  var EMAIL_METADATA = {
76640
76698
  name: "email",
76641
76699
  summary: "A company's email service, its attached names, their mailboxes and aliases.",
76642
- usage: USAGE$33,
76700
+ usage: USAGE$34,
76643
76701
  flags: [
76644
76702
  {
76645
76703
  name: "--address",
@@ -76819,75 +76877,75 @@ var EMAIL_METADATA = {
76819
76877
  var EMAIL_TOPICS = [
76820
76878
  {
76821
76879
  path: ["alias"],
76822
- usage: USAGE$41
76880
+ usage: USAGE$42
76823
76881
  },
76824
76882
  {
76825
76883
  path: ["app-token"],
76826
- usage: USAGE$40
76884
+ usage: USAGE$41
76827
76885
  },
76828
76886
  {
76829
76887
  path: ["send-as"],
76830
- usage: USAGE$40
76888
+ usage: USAGE$41
76831
76889
  },
76832
76890
  {
76833
76891
  path: ["offer"],
76834
- usage: USAGE$39
76892
+ usage: USAGE$40
76835
76893
  },
76836
76894
  {
76837
76895
  path: ["enroll"],
76838
- usage: USAGE$39
76896
+ usage: USAGE$40
76839
76897
  },
76840
76898
  {
76841
76899
  path: ["agree"],
76842
- usage: USAGE$39
76900
+ usage: USAGE$40
76843
76901
  },
76844
76902
  {
76845
76903
  path: ["provision"],
76846
- usage: USAGE$39
76904
+ usage: USAGE$40
76847
76905
  },
76848
76906
  {
76849
76907
  path: ["domain"],
76850
- usage: USAGE$39
76908
+ usage: USAGE$40
76851
76909
  },
76852
76910
  {
76853
76911
  path: ["catch-all"],
76854
- usage: USAGE$39
76912
+ usage: USAGE$40
76855
76913
  },
76856
76914
  {
76857
76915
  path: ["service"],
76858
- usage: USAGE$36
76916
+ usage: USAGE$37
76859
76917
  },
76860
76918
  {
76861
76919
  path: ["dmarc"],
76862
- usage: USAGE$36
76920
+ usage: USAGE$37
76863
76921
  },
76864
76922
  {
76865
76923
  path: ["dmarc-set"],
76866
- usage: USAGE$36
76924
+ usage: USAGE$37
76867
76925
  },
76868
76926
  {
76869
76927
  path: ["blocklist"],
76870
- usage: USAGE$36
76928
+ usage: USAGE$37
76871
76929
  },
76872
76930
  {
76873
76931
  path: ["blocklist-set"],
76874
- usage: USAGE$36
76932
+ usage: USAGE$37
76875
76933
  },
76876
76934
  {
76877
76935
  path: ["import-schema"],
76878
- usage: USAGE$36
76936
+ usage: USAGE$37
76879
76937
  },
76880
76938
  {
76881
76939
  path: ["sync"],
76882
- usage: USAGE$34
76940
+ usage: USAGE$35
76883
76941
  },
76884
76942
  {
76885
76943
  path: ["hold"],
76886
- usage: USAGE$38
76944
+ usage: USAGE$39
76887
76945
  },
76888
76946
  {
76889
76947
  path: ["mailbox"],
76890
- usage: USAGE$37
76948
+ usage: USAGE$38
76891
76949
  }
76892
76950
  ];
76893
76951
  // src/commands/email-sync-text.ts
@@ -76927,7 +76985,7 @@ async function companyRead(context, subcommand, rest) {
76927
76985
  if (subcommand === "mailboxes") return await mailboxes(company, rest);
76928
76986
  if (subcommand === "mailbox") return await mailbox(company, rest);
76929
76987
  if (subcommand === "aliases") return await aliases(company, rest);
76930
- throw new UsageError(USAGE$33);
76988
+ throw new UsageError(USAGE$34);
76931
76989
  }
76932
76990
  /** The renderer for a tagged feature read, or null when this command renders the answer itself. */
76933
76991
  function taggedText(report) {
@@ -77012,7 +77070,7 @@ var email = {
77012
77070
  ...EMAIL_METADATA,
77013
77071
  async run(context) {
77014
77072
  const [subcommand, ...rest] = context.positional;
77015
- if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$33);
77073
+ if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$34);
77016
77074
  const feature = dispatched$1(context, subcommand, rest);
77017
77075
  if (feature !== null) return await feature;
77018
77076
  return await companyRead(context, subcommand, rest);
@@ -77097,7 +77155,7 @@ async function aliases(company, rest) {
77097
77155
  /** `mailbox <email-domain-uuid> <mailbox-uuid>`: one record, independent of index pagination. */
77098
77156
  async function mailbox(company, rest) {
77099
77157
  const [emailDomainUuid, mailboxUuid, ...extra] = rest;
77100
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$33);
77158
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
77101
77159
  return (await emailMailboxesShow({ path: {
77102
77160
  company,
77103
77161
  emailDomainUuid,
@@ -77107,12 +77165,12 @@ async function mailbox(company, rest) {
77107
77165
  /** The one uuid a collection read names, or a usage refusal. */
77108
77166
  function oneUuid$4(rest) {
77109
77167
  const [uuid, ...extra] = rest;
77110
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$33);
77168
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
77111
77169
  return uuid;
77112
77170
  }
77113
77171
  /** A company-wide read takes no positional arguments. */
77114
77172
  function noExtra$12(rest) {
77115
- if (rest.length > 0) throw new UsageError(USAGE$33);
77173
+ if (rest.length > 0) throw new UsageError(USAGE$34);
77116
77174
  }
77117
77175
  // src/commands/environment-activation.ts
77118
77176
  async function environmentActivation(context, args) {
@@ -77127,7 +77185,7 @@ async function environmentActivation(context, args) {
77127
77185
  };
77128
77186
  }
77129
77187
  // src/commands/environment-admin.ts
77130
- var USAGE$32 = [
77188
+ var USAGE$33 = [
77131
77189
  "Usage: hostingctl environment retention <environment-uuid> --company <slug>",
77132
77190
  " hostingctl environment retention-set <environment-uuid> --company <slug> --extra-days <n> --effective-at <iso> --agreement <uuid> [--package <key>]",
77133
77191
  " hostingctl environment database-show <environment-uuid> <database-uuid> --company <slug>",
@@ -77151,9 +77209,9 @@ async function environmentAdmin(context, subcommand, rest) {
77151
77209
  if (subcommand === "retention") return await retention(context, first);
77152
77210
  if (subcommand === "retention-set") return await retentionSet(context, first);
77153
77211
  if (subcommand === "database-show" || subcommand === "database-reveal") {
77154
- if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$32);
77212
+ if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$33);
77155
77213
  const path = {
77156
- ...await environmentPath$1(context, first, USAGE$32),
77214
+ ...await environmentPath$1(context, first, USAGE$33),
77157
77215
  databaseUuid: tail[0] ?? ""
77158
77216
  };
77159
77217
  if (subcommand === "database-show") return {
@@ -77163,24 +77221,24 @@ async function environmentAdmin(context, subcommand, rest) {
77163
77221
  return await revealDatabase(context, path);
77164
77222
  }
77165
77223
  if (subcommand === "tuning") return await tuning(context, first, tail);
77166
- throw new UsageError(USAGE$32);
77224
+ throw new UsageError(USAGE$33);
77167
77225
  }
77168
77226
  /** `retention <env>`. */
77169
77227
  async function retention(context, environmentUuid) {
77170
77228
  return {
77171
77229
  kind: "retention",
77172
- retention: (await hostingRetentionShow({ path: await environmentPath$1(context, environmentUuid, USAGE$32) })).data
77230
+ retention: (await hostingRetentionShow({ path: await environmentPath$1(context, environmentUuid, USAGE$33) })).data
77173
77231
  };
77174
77232
  }
77175
77233
  /** `retention-set <env> --extra-days … --effective-at … --agreement …`. */
77176
77234
  async function retentionSet(context, environmentUuid) {
77177
- const path = await environmentPath$1(context, environmentUuid, USAGE$32);
77235
+ const path = await environmentPath$1(context, environmentUuid, USAGE$33);
77178
77236
  const extraDays = Number(context.flags.get("--extra-days") ?? "");
77179
77237
  const effectiveAt = context.flags.get("--effective-at")?.trim() ?? "";
77180
77238
  const baselineAgreementUuid = context.flags.get("--agreement")?.trim() ?? "";
77181
- 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$32}`);
77182
- if (effectiveAt === "" || Number.isNaN(Date.parse(effectiveAt))) throw new UsageError(`retention-set needs --effective-at as an ISO date.\n\n${USAGE$32}`);
77183
- if (baselineAgreementUuid === "") throw new UsageError(`retention-set needs --agreement.\n\n${USAGE$32}`);
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}`);
77184
77242
  const packageKey = context.flags.get("--package")?.trim();
77185
77243
  return {
77186
77244
  kind: "write",
@@ -77207,7 +77265,7 @@ async function revealDatabase(context, path) {
77207
77265
  /** `tuning preview|restore <env>`. */
77208
77266
  async function tuning(context, action, rest) {
77209
77267
  const environmentUuid = rest[0];
77210
- const path = await environmentPath$1(context, environmentUuid, USAGE$32);
77268
+ const path = await environmentPath$1(context, environmentUuid, USAGE$33);
77211
77269
  if (action === "preview" && rest.length === 1) {
77212
77270
  const body = (await hostingEnvironmentShow({ path })).data;
77213
77271
  return {
@@ -77220,7 +77278,7 @@ async function tuning(context, action, rest) {
77220
77278
  }
77221
77279
  if (action === "restore" && rest.length === 1) {
77222
77280
  const generation = Number(context.flags.get("--generation") ?? "");
77223
- if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$32}`);
77281
+ if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$33}`);
77224
77282
  return {
77225
77283
  kind: "write",
77226
77284
  outcome: await confirmableWrite(context, `Restore the recorded tuning for generation ${String(generation)}.`, async () => (await hostingTuningRestore({
@@ -77229,7 +77287,7 @@ async function tuning(context, action, rest) {
77229
77287
  })).data)
77230
77288
  };
77231
77289
  }
77232
- throw new UsageError(USAGE$32);
77290
+ throw new UsageError(USAGE$33);
77233
77291
  }
77234
77292
  /** One retention window as one line, and the write receipt for it. */
77235
77293
  function retentionText(one) {
@@ -77334,7 +77392,7 @@ async function cacheSet(context, path) {
77334
77392
  })).data);
77335
77393
  }
77336
77394
  // src/commands/environment-component-version.ts
77337
- var USAGE$31 = [
77395
+ var USAGE$32 = [
77338
77396
  "Usage: hostingctl environment component-version <environment-uuid> <workload-uuid> <version> --company <slug>",
77339
77397
  "",
77340
77398
  " component-version Move one curated component instance to another version this platform pins an image",
@@ -77352,7 +77410,7 @@ var USAGE$31 = [
77352
77410
  */
77353
77411
  async function environmentComponentVersion(context, rest) {
77354
77412
  const [uuid, workloadUuid, version, ...extra] = rest;
77355
- if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$31);
77413
+ if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$32);
77356
77414
  const path = {
77357
77415
  company: await requireCompany(context.flags),
77358
77416
  environmentUuid: uuid,
@@ -77788,7 +77846,7 @@ function initialSelectionText(selection) {
77788
77846
  return `${selection.volumeType}: ${selection.storageClass ?? selection.storageClassUuid ?? ""}`;
77789
77847
  }
77790
77848
  // src/commands/environment-create.ts
77791
- var USAGE$30 = [
77849
+ var USAGE$31 = [
77792
77850
  "Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
77793
77851
  " hostingctl environment create --client <slug> --name <name> [--slug <slug>] [--package <key>]",
77794
77852
  " [--storage-classes <volume-type>=<class>[,<volume-type>=<class>...]] [--environment-mode <live|test>]",
@@ -77858,12 +77916,12 @@ var CREATE_FLAG_SPECS = [
77858
77916
  * not.
77859
77917
  */
77860
77918
  async function create$2(context, rest) {
77861
- if (rest.length > 0) throw new UsageError(USAGE$30);
77919
+ if (rest.length > 0) throw new UsageError(USAGE$31);
77862
77920
  const name = context.flags.get("--name")?.trim() ?? "";
77863
- if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$30}`);
77864
- const slug = slugFor(context.flags.get("--slug"), name, USAGE$30);
77865
- const slice = sliceFor(context.flags, USAGE$30);
77866
- const storageSelections = storageSelectionsFor(context.flags, USAGE$30);
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);
77867
77925
  const mode = environmentModeFor(context.flags.get("--environment-mode"));
77868
77926
  const scope = await scopeFor(context.flags);
77869
77927
  const chosen = chosenPackage(await catalogFor(scope), context.flags.get("--package")?.trim() ?? "");
@@ -77881,18 +77939,18 @@ async function create$2(context, rest) {
77881
77939
  function environmentModeFor(value) {
77882
77940
  const mode = value?.trim() ?? "live";
77883
77941
  if (mode === "live" || mode === "test") return mode;
77884
- throw new UsageError(`--environment-mode must be live or test (got ${mode}).\n\n${USAGE$30}`);
77942
+ throw new UsageError(`--environment-mode must be live or test (got ${mode}).\n\n${USAGE$31}`);
77885
77943
  }
77886
77944
  /** Which company or client the create is for, from exactly one of `--company` and `--client`. */
77887
77945
  async function scopeFor(flags) {
77888
77946
  const client = flags.get("--client")?.trim() ?? "";
77889
77947
  const company = flags.get("--company")?.trim() ?? "";
77890
- if (client !== "" && company !== "") throw new UsageError(`Pass --company or --client, not both.\n\n${USAGE$30}`);
77948
+ if (client !== "" && company !== "") throw new UsageError(`Pass --company or --client, not both.\n\n${USAGE$31}`);
77891
77949
  if (client !== "") return {
77892
77950
  mode: "client",
77893
77951
  client
77894
77952
  };
77895
- if (company === "") throw new UsageError(`create needs --company <slug> or --client <slug>.\n\n${USAGE$30}`);
77953
+ if (company === "") throw new UsageError(`create needs --company <slug> or --client <slug>.\n\n${USAGE$31}`);
77896
77954
  return {
77897
77955
  mode: "company",
77898
77956
  company: await requireCompany(flags)
@@ -77906,7 +77964,7 @@ async function catalogFor(scope) {
77906
77964
  /** The package the create sends: the one named, or the catalog's first, refused when the catalog does not carry it. */
77907
77965
  function chosenPackage(packages, requested) {
77908
77966
  const chosen = requested === "" ? packages[0] : packages.find((one) => one.key === requested);
77909
- if (chosen === void 0) throw new UsageError(`--package must be one of ${packages.map((one) => one.key).join(", ")} (got ${requested}).\n\n${USAGE$30}`);
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}`);
77910
77968
  return chosen;
77911
77969
  }
77912
77970
  /** The create itself, through the route that addressee is reached by. */
@@ -78262,7 +78320,7 @@ function oneUuid$2(rest) {
78262
78320
  return uuid;
78263
78321
  }
78264
78322
  // src/commands/environment-domains.ts
78265
- var USAGE$29 = [
78323
+ var USAGE$30 = [
78266
78324
  "Usage: hostingctl environment domains <environment-uuid> --company <slug>",
78267
78325
  " hostingctl environment domain-add <environment-uuid> --company <slug> --hostname <host> --application <application-uuid> [--intended on|off]",
78268
78326
  " hostingctl environment domain-verify|domain-check-routing|domain-intended|domain-primary|domain-remove <environment-uuid> <domain-uuid> --company <slug>",
@@ -78295,7 +78353,7 @@ var DOMAIN_ACTIONS = {
78295
78353
  /** `environment domains|domain-add|domain-*|redirects|redirect-set|redirect-remove`. */
78296
78354
  async function environmentDomains(context, subcommand, rest) {
78297
78355
  const [environmentUuid, ...tail] = rest;
78298
- const path = await environmentPath$1(context, environmentUuid, USAGE$29);
78356
+ const path = await environmentPath$1(context, environmentUuid, USAGE$30);
78299
78357
  if (subcommand === "domains") return await domains(path, tail);
78300
78358
  if (subcommand === "redirects") return await redirects(path, tail);
78301
78359
  if (subcommand === "domain-add") return await add$7(context, path, tail);
@@ -78304,7 +78362,7 @@ async function environmentDomains(context, subcommand, rest) {
78304
78362
  if (subcommand === "domain-remove") return await removeDomain(context, path, tail);
78305
78363
  const action = DOMAIN_ACTIONS[subcommand];
78306
78364
  if (action !== void 0) return await domainAction(context, subcommand, action, path, tail);
78307
- throw new UsageError(USAGE$29);
78365
+ throw new UsageError(USAGE$30);
78308
78366
  }
78309
78367
  /** `domains <env>`. */
78310
78368
  async function domains(path, rest) {
@@ -78327,7 +78385,7 @@ async function add$7(context, path, rest) {
78327
78385
  noExtra$11(rest);
78328
78386
  const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
78329
78387
  const workloadUuid = context.flags.get("--application")?.trim() ?? "";
78330
- if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --application.\n\n${USAGE$29}`);
78388
+ if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --application.\n\n${USAGE$30}`);
78331
78389
  const intended = onOffFlag(context, "--intended") ?? false;
78332
78390
  return await written$2(confirmableWrite(context, `Serve ${hostname} from application ${workloadUuid}${intended ? " as an intended name" : ""}.`, async () => {
78333
78391
  return (await hostingDomainStore({
@@ -78343,7 +78401,7 @@ async function add$7(context, path, rest) {
78343
78401
  /** The five actions that take only the environment and the name. */
78344
78402
  async function domainAction(context, subcommand, action, path, rest) {
78345
78403
  const [domainUuid, ...extra] = rest;
78346
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$29);
78404
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
78347
78405
  const described = {
78348
78406
  "domain-verify": "Check this name's ownership TXT record now.",
78349
78407
  "domain-check-routing": "Check this name's routing now.",
@@ -78361,7 +78419,7 @@ async function domainAction(context, subcommand, action, path, rest) {
78361
78419
  /** `domain-remove <env> <domain>`: stop serving a name. */
78362
78420
  async function removeDomain(context, path, rest) {
78363
78421
  const [domainUuid, ...extra] = rest;
78364
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$29);
78422
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
78365
78423
  const fallBackToGenerated = onOffFlag(context, "--fall-back-to-generated") ?? true;
78366
78424
  return await written$2(confirmableWrite(context, "Stop serving this name. Its record stays readable, and the environment keeps its generated hostname.", async () => {
78367
78425
  const body = { fallBackToGenerated };
@@ -78377,13 +78435,13 @@ async function removeDomain(context, path, rest) {
78377
78435
  /** `redirect-set <env> <domain> --target … --mode … [--destination …]`. */
78378
78436
  async function setRedirect(context, path, rest) {
78379
78437
  const [domainUuid, ...extra] = rest;
78380
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$29);
78438
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
78381
78439
  const target = context.flags.get("--target")?.trim() ?? "";
78382
78440
  const mode = context.flags.get("--mode")?.trim() ?? "";
78383
78441
  const destinationUrl = context.flags.get("--destination")?.trim() ?? "";
78384
- if (!TARGETS.has(target)) throw new UsageError(`--target must be application or fixed.\n\n${USAGE$29}`);
78385
- if (!MODES$2.has(mode)) throw new UsageError(`--mode must be temporary or permanent.\n\n${USAGE$29}`);
78386
- if (target === "fixed" && destinationUrl === "") throw new UsageError(`--target fixed needs --destination <url>.\n\n${USAGE$29}`);
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}`);
78387
78445
  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 () => {
78388
78446
  const body = {
78389
78447
  target,
@@ -78403,7 +78461,7 @@ async function setRedirect(context, path, rest) {
78403
78461
  /** `redirect-remove <env> <redirect-uuid>`. */
78404
78462
  async function removeRedirect(context, path, rest) {
78405
78463
  const [redirectUuid, ...extra] = rest;
78406
- if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$29);
78464
+ if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
78407
78465
  return await written$2(confirmableWrite(context, `Remove redirect ${redirectUuid}.`, async () => {
78408
78466
  return (await hostingDomainRedirectDestroy({ path: {
78409
78467
  ...path,
@@ -78420,7 +78478,7 @@ async function written$2(pending) {
78420
78478
  }
78421
78479
  /** No positional arguments, or a usage refusal. */
78422
78480
  function noExtra$11(rest) {
78423
- if (rest.length > 0) throw new UsageError(USAGE$29);
78481
+ if (rest.length > 0) throw new UsageError(USAGE$30);
78424
78482
  }
78425
78483
  // src/commands/schedule-flags.ts
78426
78484
  /** The API's own bound on patterns in one schedule. */
@@ -78630,7 +78688,7 @@ async function releaseBundle(context, args) {
78630
78688
  };
78631
78689
  }
78632
78690
  // src/commands/environment-exports.ts
78633
- var USAGE$28 = [
78691
+ var USAGE$29 = [
78634
78692
  "Usage: hostingctl environment export-sources <environment-uuid> --company <slug>",
78635
78693
  " hostingctl environment export-sources-refresh <environment-uuid> --company <slug>",
78636
78694
  " hostingctl environment export-create <environment-uuid> <source-id> --company <slug>",
@@ -78668,7 +78726,7 @@ var USAGE$28 = [
78668
78726
  async function environmentExports(context, subcommand, rest) {
78669
78727
  if (subcommand === "release-bundle") return await releaseBundle(context, rest);
78670
78728
  const [environmentUuid, ...tail] = rest;
78671
- const path = await environmentPath$1(context, environmentUuid, USAGE$28);
78729
+ const path = await environmentPath$1(context, environmentUuid, USAGE$29);
78672
78730
  if (subcommand === "export-sources" || subcommand === "export-sources-refresh") {
78673
78731
  noExtra$10(tail);
78674
78732
  return await environmentExportSources(context, path, subcommand);
@@ -78687,15 +78745,15 @@ async function environmentExports(context, subcommand, rest) {
78687
78745
  noExtra$10(tail);
78688
78746
  return await listBackupSchedules(path);
78689
78747
  }
78690
- if (subcommand === "database-backup-schedule-stop") return await stopBackupSchedule(context, path, tail, USAGE$28);
78691
- if (subcommand === "database-import" || subcommand === "database-import-confirm") return await databaseImport(context, path, subcommand, tail, USAGE$28);
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);
78692
78750
  if (subcommand === "database-export-download") return await download(path, tail);
78693
78751
  if (subcommand === "database-export-remove") return await remove$2(context, path, tail);
78694
- throw new UsageError(USAGE$28);
78752
+ throw new UsageError(USAGE$29);
78695
78753
  }
78696
78754
  async function createRetained(context, path, rest) {
78697
78755
  const [sourceId, ...extra] = rest;
78698
- if (!sourceId || extra.length > 0) throw new UsageError(USAGE$28);
78756
+ if (!sourceId || extra.length > 0) throw new UsageError(USAGE$29);
78699
78757
  return {
78700
78758
  kind: "export-write",
78701
78759
  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({
@@ -78705,7 +78763,7 @@ async function createRetained(context, path, rest) {
78705
78763
  };
78706
78764
  }
78707
78765
  async function create(context, path, rest) {
78708
- const databaseUuid = oneUuid$7(rest, USAGE$28);
78766
+ const databaseUuid = oneUuid$7(rest, USAGE$29);
78709
78767
  return {
78710
78768
  kind: "export-write",
78711
78769
  outcome: await confirmableWrite(context, "Take a portable export of this database now. It is downloadable until its expiry.", async () => {
@@ -78721,7 +78779,7 @@ async function create(context, path, rest) {
78721
78779
  }
78722
78780
  /** `database-backup <env> <connection>`: back up a database on another host into an export of this environment. */
78723
78781
  async function backup(context, path, rest) {
78724
- const connection = oneUuid$7(rest, USAGE$28);
78782
+ const connection = oneUuid$7(rest, USAGE$29);
78725
78783
  if ([
78726
78784
  "--schedule",
78727
78785
  "--timezone",
@@ -78742,7 +78800,7 @@ async function backup(context, path, rest) {
78742
78800
  }
78743
78801
  /** `database-export-download <env> <export>`: a time-limited URL, which is the customer's copy. */
78744
78802
  async function download(path, rest) {
78745
- const exportUuid = oneUuid$7(rest, USAGE$28);
78803
+ const exportUuid = oneUuid$7(rest, USAGE$29);
78746
78804
  return {
78747
78805
  kind: "download",
78748
78806
  download: (await hostingDatabaseExportDownload({ path: {
@@ -78752,7 +78810,7 @@ async function download(path, rest) {
78752
78810
  };
78753
78811
  }
78754
78812
  async function remove$2(context, path, rest) {
78755
- const exportUuid = oneUuid$7(rest, USAGE$28);
78813
+ const exportUuid = oneUuid$7(rest, USAGE$29);
78756
78814
  return {
78757
78815
  kind: "export-write",
78758
78816
  outcome: await confirmableWrite(context, `Retire export ${exportUuid}. Its URL stops working once it is gone.`, async () => (await hostingDatabaseExportDestroy({ path: {
@@ -78762,7 +78820,7 @@ async function remove$2(context, path, rest) {
78762
78820
  };
78763
78821
  }
78764
78822
  function noExtra$10(rest) {
78765
- if (rest.length > 0) throw new UsageError(USAGE$28);
78823
+ if (rest.length > 0) throw new UsageError(USAGE$29);
78766
78824
  }
78767
78825
  function exportLine(one) {
78768
78826
  const size = one.sizeBytes === null ? "" : ` ${String(Math.round(one.sizeBytes / 1024))} KiB`;
@@ -78853,7 +78911,7 @@ function environmentMailRelayText(report) {
78853
78911
  return renderWriteOutcome(report.outcome, diagnosisText);
78854
78912
  }
78855
78913
  // src/commands/environment-mode.ts
78856
- var USAGE$27 = [
78914
+ var USAGE$28 = [
78857
78915
  "Usage: hostingctl environment mode review <environment-uuid> --company <slug> --to <live|test>",
78858
78916
  " hostingctl environment mode set <environment-uuid> --company <slug> --to live --data-handover <handover>",
78859
78917
  " hostingctl environment mode set <environment-uuid> --company <slug> --to test",
@@ -78880,8 +78938,8 @@ var MODE_FLAG_SPECS = [{
78880
78938
  /** `environment mode review|set`. */
78881
78939
  async function environmentMode(context, rest) {
78882
78940
  const [action, environmentUuid, ...extra] = rest;
78883
- if (action === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
78884
- const path = await environmentPath$1(context, environmentUuid, USAGE$27);
78941
+ if (action === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
78942
+ const path = await environmentPath$1(context, environmentUuid, USAGE$28);
78885
78943
  const target = oneOf(context.flags.get("--to"), MODES$1, "--to");
78886
78944
  if (action === "review") return {
78887
78945
  kind: "mode-review",
@@ -78891,7 +78949,7 @@ async function environmentMode(context, rest) {
78891
78949
  })).data
78892
78950
  };
78893
78951
  if (action === "set") return await set$1(context, path, target);
78894
- throw new UsageError(USAGE$27);
78952
+ throw new UsageError(USAGE$28);
78895
78953
  }
78896
78954
  async function set$1(context, path, target) {
78897
78955
  const handover = target === "live" ? oneOf(context.flags.get("--data-handover"), HANDOVERS, "--data-handover") : null;
@@ -78915,7 +78973,7 @@ async function set$1(context, path, target) {
78915
78973
  }
78916
78974
  function oneOf(value, allowed, flag) {
78917
78975
  const chosen = allowed.find((one) => one === value?.trim());
78918
- if (chosen === void 0) throw new UsageError(`${flag} must be one of ${allowed.join(", ")}.\n\n${USAGE$27}`);
78976
+ if (chosen === void 0) throw new UsageError(`${flag} must be one of ${allowed.join(", ")}.\n\n${USAGE$28}`);
78919
78977
  return chosen;
78920
78978
  }
78921
78979
  /** The `environment mode …` renderer. */
@@ -78936,7 +78994,7 @@ function environmentModeText(report) {
78936
78994
  ].join("\n");
78937
78995
  }
78938
78996
  // src/commands/environment-outbound-rules.ts
78939
- var USAGE$26 = [
78997
+ var USAGE$27 = [
78940
78998
  "Usage: hostingctl environment outbound-rules show <environment-uuid> --company <slug>",
78941
78999
  " hostingctl environment outbound-rules set <environment-uuid> --company <slug> --rules <json|null>",
78942
79000
  "",
@@ -78956,8 +79014,8 @@ var DESCRIPTION = "Change public outbound ports for the whole environment, inclu
78956
79014
  /** `environment outbound-rules show|set`. */
78957
79015
  async function environmentOutboundRules(context, rest) {
78958
79016
  const [action, environmentUuid, ...extra] = rest;
78959
- if (action !== "show" && action !== "set" || extra.length > 0) throw new UsageError(USAGE$26);
78960
- const path = await environmentPath$1(context, environmentUuid, USAGE$26);
79017
+ if (action !== "show" && action !== "set" || extra.length > 0) throw new UsageError(USAGE$27);
79018
+ const path = await environmentPath$1(context, environmentUuid, USAGE$27);
78961
79019
  if (action === "show") return {
78962
79020
  kind: "outbound-rules",
78963
79021
  rules: await read(path)
@@ -78986,7 +79044,7 @@ function parsedRules(value) {
78986
79044
  const rules = JSON.parse(value ?? "");
78987
79045
  if (rules === null || Array.isArray(rules)) return rules;
78988
79046
  } catch {}
78989
- throw new UsageError(`--rules must be null or a JSON array of protocol, port and optional end_port.\n\n${USAGE$26}`);
79047
+ throw new UsageError(`--rules must be null or a JSON array of protocol, port and optional end_port.\n\n${USAGE$27}`);
78990
79048
  }
78991
79049
  /** The `environment outbound-rules …` renderer: the rules as the API states them. */
78992
79050
  function environmentOutboundRulesText(report) {
@@ -79037,7 +79095,7 @@ var RUNTIME_VERSION_GRANT_FLAG_SPECS = [
79037
79095
  description: "The grant UUID to revoke."
79038
79096
  }
79039
79097
  ];
79040
- var USAGE$25 = [
79098
+ var USAGE$26 = [
79041
79099
  "Usage:",
79042
79100
  " hostingctl environment runtime-version-grants --company <slug>",
79043
79101
  " hostingctl environment runtime-version-grants grant --company <slug> --type <type> --line <line>",
@@ -79065,18 +79123,18 @@ async function environmentRuntimeVersionGrants(context, rest) {
79065
79123
  kind: "runtime-version-grants",
79066
79124
  grants: (await hostingRuntimeVersionGrantsIndex({ path: { company } })).data
79067
79125
  };
79068
- if (tail.length > 0) throw new UsageError(USAGE$25);
79126
+ if (tail.length > 0) throw new UsageError(USAGE$26);
79069
79127
  if (action === "grant") return grant(context, company);
79070
79128
  if (action === "revoke") return revoke$3(context, company);
79071
- throw new UsageError(USAGE$25);
79129
+ throw new UsageError(USAGE$26);
79072
79130
  }
79073
79131
  async function grant(context, company) {
79074
79132
  const type = required$4(context, "--type");
79075
79133
  const line = required$4(context, "--line");
79076
79134
  const scope = required$4(context, "--scope");
79077
- if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$25}`);
79135
+ if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$26}`);
79078
79136
  const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
79079
- if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$25}`);
79137
+ if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$26}`);
79080
79138
  const reason = required$4(context, "--reason");
79081
79139
  const expiresAt = required$4(context, "--expires");
79082
79140
  return {
@@ -79109,7 +79167,7 @@ async function revoke$3(context, company) {
79109
79167
  /** One flag's value, refused by name when it was not given. */
79110
79168
  function required$4(context, flag) {
79111
79169
  const value = context.flags.get(flag)?.trim() ?? "";
79112
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$25}`);
79170
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$26}`);
79113
79171
  return value;
79114
79172
  }
79115
79173
  /** One line per grant: the line it names, who it covers, why, and when it ends. */
@@ -79177,6 +79235,7 @@ var ENVIRONMENT_SUBCOMMANDS = [
79177
79235
  "reconcile",
79178
79236
  "scale",
79179
79237
  "cache-set",
79238
+ "purge-tokens",
79180
79239
  "object-cache",
79181
79240
  "object-cache-set",
79182
79241
  "portable",
@@ -79257,6 +79316,7 @@ var ENVIRONMENT_USAGE = [
79257
79316
  " hostingctl environment reconcile <uuid> --company <slug>",
79258
79317
  " hostingctl environment scale <uuid> --company <slug> [--cpu <millicores>] [--memory <mib>]",
79259
79318
  " hostingctl environment cache-set <uuid> --company <slug> [--template <name>]",
79319
+ " hostingctl environment purge-tokens <uuid> [status|rotate] --company <slug>",
79260
79320
  " hostingctl environment object-cache <uuid> --company <slug>",
79261
79321
  " hostingctl environment object-cache-set <uuid> --company <slug> --enabled <true|false> --generation <n>",
79262
79322
  " hostingctl environment portable <export|preview|prepare|confirm> <uuid> --company <slug> [--file <path>]",
@@ -79290,6 +79350,7 @@ var ENVIRONMENT_USAGE = [
79290
79350
  " reconcile Ask the platform to apply this environment's recorded desired state again.",
79291
79351
  " scale Set what every application reserves in CPU and memory; how far each may burst above it is kept.",
79292
79352
  " cache-set Turn on the HTTP cache for every application that can carry it, using a starting pattern.",
79353
+ " purge-tokens Read rotation status, or rotate every cache purge token without restarting applications.",
79293
79354
  " object-cache This environment's recorded WordPress object-cache choice, whether it can serve it, and",
79294
79355
  " what the platform has applied.",
79295
79356
  " object-cache-set Turn the WordPress object cache on or off. Enabling is refused when the environment cannot",
@@ -79321,7 +79382,7 @@ var ENVIRONMENT_USAGE = [
79321
79382
  " findings. -verify, -audit and -fix act on one --site; -fix takes --fix <name>.",
79322
79383
  "",
79323
79384
  "The writes (create, setup, reconcile, scale, component-version, object-cache-set, site-insights-verify/audit/fix,",
79324
- "portable prepare/confirm, configuration save/apply,",
79385
+ "portable prepare/confirm, configuration save/apply, purge-tokens rotate,",
79325
79386
  "secret write/import, mail-relay-test, database create/bind/retire) need --confirm; --dry-run describes the change without making it.",
79326
79387
  "",
79327
79388
  "`secret local` is the one exception and is a read: it writes each declaration's local development value - a",
@@ -79330,7 +79391,7 @@ var ENVIRONMENT_USAGE = [
79330
79391
  "to standard output, and it changes nothing on the platform, so it needs no --confirm."
79331
79392
  ].join("\n");
79332
79393
  // src/commands/environment-runtime-versions.ts
79333
- var USAGE$24 = [
79394
+ var USAGE$25 = [
79334
79395
  "Usage: hostingctl environment runtime-versions --company <slug>",
79335
79396
  "",
79336
79397
  " runtime-versions The version lines each application type offers, which may be chosen now, and why the",
@@ -79347,7 +79408,7 @@ var USAGE$24 = [
79347
79408
  * will accept, and one reported as unavailable says which image is missing.
79348
79409
  */
79349
79410
  async function environmentRuntimeVersions(context, rest) {
79350
- if (rest.length > 0) throw new UsageError(USAGE$24);
79411
+ if (rest.length > 0) throw new UsageError(USAGE$25);
79351
79412
  return {
79352
79413
  kind: "runtime-versions",
79353
79414
  types: (await hostingRuntimeVersionsIndex({ path: { company: await requireCompany(context.flags) } })).data
@@ -79661,7 +79722,7 @@ function oneUuid$1(rest) {
79661
79722
  return uuid;
79662
79723
  }
79663
79724
  // src/commands/environment-services.ts
79664
- var USAGE$23 = [
79725
+ var USAGE$24 = [
79665
79726
  "Usage: hostingctl environment service-add-review <environment-uuid> <type> --company <slug> [--name <n>] [--replicas <n>]",
79666
79727
  " hostingctl environment service-add <environment-uuid> <type> --company <slug> --name <n> [--replicas <n>]",
79667
79728
  " hostingctl environment service-runtime <environment-uuid> <type> --company <slug> --running <on|off>",
@@ -79690,8 +79751,8 @@ var SERVICE_TYPES = /* @__PURE__ */ new Set([
79690
79751
  /** `environment service-*`, from the `environment` command. */
79691
79752
  async function environmentServices(context, subcommand, rest) {
79692
79753
  const [environmentUuid, type, ...tail] = rest;
79693
- const path = await environmentPath$1(context, environmentUuid, USAGE$23);
79694
- if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$23);
79754
+ const path = await environmentPath$1(context, environmentUuid, USAGE$24);
79755
+ if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$24);
79695
79756
  if (subcommand === "service-add-review") return await reviewAddition(context, path, type);
79696
79757
  if (subcommand === "service-retirement") return {
79697
79758
  kind: "service-retirement",
@@ -79704,7 +79765,7 @@ async function environmentServices(context, subcommand, rest) {
79704
79765
  if (subcommand === "service-runtime") return await runtime(context, path, type);
79705
79766
  if (subcommand === "service-protect") return await protect(context, path, type);
79706
79767
  if (subcommand === "service-retire") return await retire$1(context, path, type);
79707
- throw new UsageError(USAGE$23);
79768
+ throw new UsageError(USAGE$24);
79708
79769
  }
79709
79770
  /** `service-add-review <type> [--name …] [--replicas …]`. */
79710
79771
  async function reviewAddition(context, path, type) {
@@ -79727,9 +79788,9 @@ async function reviewAddition(context, path, type) {
79727
79788
  /** `service-add <type> --name … [--replicas …]`. */
79728
79789
  async function add$6(context, path, type) {
79729
79790
  const name = context.flags.get("--name")?.trim() ?? "";
79730
- if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$23}`);
79791
+ if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$24}`);
79731
79792
  const replicas = wholeNumber(context, "--replicas") ?? 1;
79732
- if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$23}`);
79793
+ if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$24}`);
79733
79794
  const serviceType = type;
79734
79795
  return await written$1(confirmableWrite(context, `Add the ${type} service "${name}" with ${String(replicas)} replica(s).`, async () => {
79735
79796
  const desiredGeneration = await environmentGeneration(path);
@@ -79746,7 +79807,7 @@ async function add$6(context, path, type) {
79746
79807
  }
79747
79808
  /** `service-runtime <type> --running …`. */
79748
79809
  async function runtime(context, path, type) {
79749
- const running = onOff$5(context, "--running", USAGE$23);
79810
+ const running = onOff$5(context, "--running", USAGE$24);
79750
79811
  return await written$1(confirmableWrite(context, `${running ? "Start" : "Stop"} the ${type} service. Its data is kept either way.`, async () => {
79751
79812
  const desiredGeneration = await environmentGeneration(path);
79752
79813
  const body = {
@@ -79764,7 +79825,7 @@ async function runtime(context, path, type) {
79764
79825
  }
79765
79826
  /** `service-protect <type> --locked …`. */
79766
79827
  async function protect(context, path, type) {
79767
- const locked = onOff$5(context, "--locked", USAGE$23);
79828
+ const locked = onOff$5(context, "--locked", USAGE$24);
79768
79829
  return await written$1(confirmableWrite(context, locked ? `Lock the ${type} service, so no removal path may delete it.` : `Unlock the ${type} service.`, async () => {
79769
79830
  const desiredGeneration = await environmentGeneration(path);
79770
79831
  const body = {
@@ -79783,7 +79844,7 @@ async function protect(context, path, type) {
79783
79844
  /** Retire against a reviewed digest and the client's explicit data disposition. */
79784
79845
  async function retire$1(context, path, type) {
79785
79846
  const digest = context.flags.get("--digest")?.trim() ?? "";
79786
- if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$23}`);
79847
+ if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$24}`);
79787
79848
  const confirmation = context.flags.get("--confirmation");
79788
79849
  const disposition = context.flags.get("--data-disposition");
79789
79850
  if (disposition !== void 0 && disposition !== "copy-taken" && disposition !== "accepted-loss") throw new UsageError("--data-disposition must be copy-taken or accepted-loss.");
@@ -79822,7 +79883,7 @@ function wholeNumber(context, flag) {
79822
79883
  const raw = context.flags.get(flag)?.trim() ?? "";
79823
79884
  if (raw === "") return null;
79824
79885
  const value = Number(raw);
79825
- if (!Number.isInteger(value) || value < 1) throw new UsageError(`${flag} must be a whole number of at least 1 (got ${raw}).\n\n${USAGE$23}`);
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}`);
79826
79887
  return value;
79827
79888
  }
79828
79889
  /** The write receipt, by the shape the API answered with. */
@@ -79859,7 +79920,7 @@ function environmentServicesText(report) {
79859
79920
  return retirementText(report.review);
79860
79921
  }
79861
79922
  // src/commands/environment-site-access.ts
79862
- var USAGE$22 = [
79923
+ var USAGE$23 = [
79863
79924
  "Usage: hostingctl environment site-access <environment-uuid> --company <slug>",
79864
79925
  " hostingctl environment site-access-set <environment-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
79865
79926
  " hostingctl environment site-users <environment-uuid> --company <slug>",
@@ -79905,15 +79966,15 @@ var flow = siteAccessFlow({
79905
79966
  refresh: async (path) => (await hostingSiteAccessUsersRefresh({ path })).data,
79906
79967
  destroy: async (path) => (await hostingSiteAccessUsersDestroy({ path })).data,
79907
79968
  rotate: null
79908
- }, USAGE$22);
79969
+ }, USAGE$23);
79909
79970
  /** `environment site-access*|site-user*`: resolve the environment, then run the shared flow. */
79910
79971
  async function environmentSiteAccess(context, action, rest) {
79911
79972
  const [environmentUuid, ...tail] = rest;
79912
- if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$22);
79913
- return await flow(context, action, await environmentPath$1(context, environmentUuid, USAGE$22), tail);
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);
79914
79975
  }
79915
79976
  // src/commands/environment-tools.ts
79916
- var USAGE$21 = [
79977
+ var USAGE$22 = [
79917
79978
  "Usage: hostingctl environment tools verify <environment-uuid> <tool> --company <slug>",
79918
79979
  " hostingctl environment tools select <environment-uuid> <tool> --company <slug> --enabled <on|off>",
79919
79980
  "",
@@ -79927,8 +79988,8 @@ var USAGE$21 = [
79927
79988
  /** `environment tools verify|select`. */
79928
79989
  async function environmentTools(context, rest) {
79929
79990
  const [action, environmentUuid, tool, ...extra] = rest;
79930
- if (action === void 0 || tool === void 0 || extra.length > 0) throw new UsageError(USAGE$21);
79931
- const path = await environmentPath$1(context, environmentUuid, USAGE$21);
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);
79932
79993
  if (action === "verify") return {
79933
79994
  kind: "tool",
79934
79995
  tool,
@@ -79938,11 +79999,11 @@ async function environmentTools(context, rest) {
79938
79999
  } })).data
79939
80000
  };
79940
80001
  if (action === "select") return await select$1(context, path, tool);
79941
- throw new UsageError(USAGE$21);
80002
+ throw new UsageError(USAGE$22);
79942
80003
  }
79943
80004
  /** `select --enabled …`: one tool's presence, echoed with the environment's generation. */
79944
80005
  async function select$1(context, path, tool) {
79945
- const enabled = onOff$5(context, "--enabled", USAGE$21);
80006
+ const enabled = onOff$5(context, "--enabled", USAGE$22);
79946
80007
  return {
79947
80008
  kind: "tools-write",
79948
80009
  outcome: await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} the ${tool} tool for this environment.`, async () => {
@@ -80060,23 +80121,23 @@ function list$5(values) {
80060
80121
  var ENVIRONMENT_TOPICS = [
80061
80122
  {
80062
80123
  path: ["retention"],
80063
- usage: USAGE$32
80124
+ usage: USAGE$33
80064
80125
  },
80065
80126
  {
80066
80127
  path: ["retention-set"],
80067
- usage: USAGE$32
80128
+ usage: USAGE$33
80068
80129
  },
80069
80130
  {
80070
80131
  path: ["database-show"],
80071
- usage: USAGE$32
80132
+ usage: USAGE$33
80072
80133
  },
80073
80134
  {
80074
80135
  path: ["database-reveal"],
80075
- usage: USAGE$32
80136
+ usage: USAGE$33
80076
80137
  },
80077
80138
  {
80078
80139
  path: ["tuning"],
80079
- usage: USAGE$32
80140
+ usage: USAGE$33
80080
80141
  },
80081
80142
  {
80082
80143
  path: ["configuration"],
@@ -80104,155 +80165,155 @@ var ENVIRONMENT_TOPICS = [
80104
80165
  },
80105
80166
  {
80106
80167
  path: ["domains"],
80107
- usage: USAGE$29
80168
+ usage: USAGE$30
80108
80169
  },
80109
80170
  {
80110
80171
  path: ["domain-add"],
80111
- usage: USAGE$29
80172
+ usage: USAGE$30
80112
80173
  },
80113
80174
  {
80114
80175
  path: ["domain-verify"],
80115
- usage: USAGE$29
80176
+ usage: USAGE$30
80116
80177
  },
80117
80178
  {
80118
80179
  path: ["domain-check-routing"],
80119
- usage: USAGE$29
80180
+ usage: USAGE$30
80120
80181
  },
80121
80182
  {
80122
80183
  path: ["domain-intended"],
80123
- usage: USAGE$29
80184
+ usage: USAGE$30
80124
80185
  },
80125
80186
  {
80126
80187
  path: ["domain-primary"],
80127
- usage: USAGE$29
80188
+ usage: USAGE$30
80128
80189
  },
80129
80190
  {
80130
80191
  path: ["domain-remove"],
80131
- usage: USAGE$29
80192
+ usage: USAGE$30
80132
80193
  },
80133
80194
  {
80134
80195
  path: ["redirects"],
80135
- usage: USAGE$29
80196
+ usage: USAGE$30
80136
80197
  },
80137
80198
  {
80138
80199
  path: ["redirect-set"],
80139
- usage: USAGE$29
80200
+ usage: USAGE$30
80140
80201
  },
80141
80202
  {
80142
80203
  path: ["redirect-remove"],
80143
- usage: USAGE$29
80204
+ usage: USAGE$30
80144
80205
  },
80145
80206
  {
80146
80207
  path: ["export-sources"],
80147
- usage: USAGE$28
80208
+ usage: USAGE$29
80148
80209
  },
80149
80210
  {
80150
80211
  path: ["export-sources-refresh"],
80151
- usage: USAGE$28
80212
+ usage: USAGE$29
80152
80213
  },
80153
80214
  {
80154
80215
  path: ["export-create"],
80155
- usage: USAGE$28
80216
+ usage: USAGE$29
80156
80217
  },
80157
80218
  {
80158
80219
  path: ["database-exports"],
80159
- usage: USAGE$28
80220
+ usage: USAGE$29
80160
80221
  },
80161
80222
  {
80162
80223
  path: ["database-export-create"],
80163
- usage: USAGE$28
80224
+ usage: USAGE$29
80164
80225
  },
80165
80226
  {
80166
80227
  path: ["database-backup"],
80167
- usage: USAGE$28
80228
+ usage: USAGE$29
80168
80229
  },
80169
80230
  {
80170
80231
  path: ["database-backup-schedules"],
80171
- usage: USAGE$28
80232
+ usage: USAGE$29
80172
80233
  },
80173
80234
  {
80174
80235
  path: ["database-backup-schedule-stop"],
80175
- usage: USAGE$28
80236
+ usage: USAGE$29
80176
80237
  },
80177
80238
  {
80178
80239
  path: ["database-export-download"],
80179
- usage: USAGE$28
80240
+ usage: USAGE$29
80180
80241
  },
80181
80242
  {
80182
80243
  path: ["database-export-remove"],
80183
- usage: USAGE$28
80244
+ usage: USAGE$29
80184
80245
  },
80185
80246
  {
80186
80247
  path: ["database-import"],
80187
- usage: USAGE$28
80248
+ usage: USAGE$29
80188
80249
  },
80189
80250
  {
80190
80251
  path: ["database-import-confirm"],
80191
- usage: USAGE$28
80252
+ usage: USAGE$29
80192
80253
  },
80193
80254
  {
80194
80255
  path: ["release-bundle"],
80195
- usage: USAGE$28
80256
+ usage: USAGE$29
80196
80257
  },
80197
80258
  {
80198
80259
  path: ["service-add-review"],
80199
- usage: USAGE$23
80260
+ usage: USAGE$24
80200
80261
  },
80201
80262
  {
80202
80263
  path: ["service-add"],
80203
- usage: USAGE$23
80264
+ usage: USAGE$24
80204
80265
  },
80205
80266
  {
80206
80267
  path: ["service-runtime"],
80207
- usage: USAGE$23
80268
+ usage: USAGE$24
80208
80269
  },
80209
80270
  {
80210
80271
  path: ["service-protect"],
80211
- usage: USAGE$23
80272
+ usage: USAGE$24
80212
80273
  },
80213
80274
  {
80214
80275
  path: ["service-retirement"],
80215
- usage: USAGE$23
80276
+ usage: USAGE$24
80216
80277
  },
80217
80278
  {
80218
80279
  path: ["service-retire"],
80219
- usage: USAGE$23
80280
+ usage: USAGE$24
80220
80281
  },
80221
80282
  {
80222
80283
  path: ["site-access"],
80223
- usage: USAGE$22
80284
+ usage: USAGE$23
80224
80285
  },
80225
80286
  {
80226
80287
  path: ["site-access-set"],
80227
- usage: USAGE$22
80288
+ usage: USAGE$23
80228
80289
  },
80229
80290
  {
80230
80291
  path: ["site-users"],
80231
- usage: USAGE$22
80292
+ usage: USAGE$23
80232
80293
  },
80233
80294
  {
80234
80295
  path: ["site-user"],
80235
- usage: USAGE$22
80296
+ usage: USAGE$23
80236
80297
  },
80237
80298
  {
80238
80299
  path: ["tools"],
80239
- usage: USAGE$21
80300
+ usage: USAGE$22
80240
80301
  },
80241
80302
  {
80242
80303
  path: ["mode"],
80243
- usage: USAGE$27
80304
+ usage: USAGE$28
80244
80305
  },
80245
80306
  {
80246
80307
  path: ["outbound-rules"],
80247
- usage: USAGE$26
80308
+ usage: USAGE$27
80248
80309
  },
80249
80310
  {
80250
80311
  path: ["runtime-versions"],
80251
- usage: USAGE$24
80312
+ usage: USAGE$25
80252
80313
  },
80253
80314
  {
80254
80315
  path: ["runtime-version-grants"],
80255
- usage: USAGE$25
80316
+ usage: USAGE$26
80256
80317
  }
80257
80318
  ];
80258
80319
  // src/commands/environment-metadata.ts
@@ -80578,6 +80639,27 @@ async function objectCacheSet(context, path, usage) {
80578
80639
  })).data)
80579
80640
  };
80580
80641
  }
80642
+ // src/commands/environment-purge-tokens.ts
80643
+ var USAGE$21 = "environment purge-tokens <environment-uuid> [status|rotate] --company <slug> [--dry-run|--confirm]";
80644
+ async function environmentPurgeTokens(context, rest) {
80645
+ 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);
80648
+ if (action === "status") return {
80649
+ kind: "purge-tokens",
80650
+ rotation: (await hostingEnvironmentsCachePurgeRotationShow({ path })).data
80651
+ };
80652
+ return {
80653
+ kind: "purge-tokens-write",
80654
+ outcome: await confirmableWrite(context, `Rotate cache purge tokens for environment ${path.environmentUuid} in company ${path.company}. Applications keep serving. Old tokens stop authorizing cache clears as replacements apply. Custom integrations must read the current purge credential file.`, async () => (await hostingEnvironmentsCachePurgeRotationStart({ path })).data)
80655
+ };
80656
+ }
80657
+ function purgeTokensText(rotation) {
80658
+ return `${rotation.message} Version ${rotation.version} (applied ${rotation.appliedVersion}).`;
80659
+ }
80660
+ function environmentPurgeTokensText(report) {
80661
+ return report.kind === "purge-tokens" ? purgeTokensText(report.rotation) : renderWriteOutcome(report.outcome, purgeTokensText);
80662
+ }
80581
80663
  // src/commands/environment-references.ts
80582
80664
  var USAGE$20 = [
80583
80665
  "Usage: hostingctl environment references <environment-uuid> --company <slug>",
@@ -81157,6 +81239,7 @@ function environmentTaggedText(report) {
81157
81239
  if (report.kind === "activation") return renderWriteOutcome(report.outcome, (result) => JSON.stringify(result, null, 2));
81158
81240
  if (report.kind === "mode-review" || report.kind === "mode-write") return environmentModeText(report);
81159
81241
  if (report.kind === "outbound-rules" || report.kind === "outbound-rules-write") return environmentOutboundRulesText(report);
81242
+ if (report.kind === "purge-tokens" || report.kind === "purge-tokens-write") return environmentPurgeTokensText(report);
81160
81243
  return featureText(report);
81161
81244
  }
81162
81245
  function featureText(report) {
@@ -81736,6 +81819,7 @@ var SIMPLE_SUBCOMMANDS = {
81736
81819
  tools: environmentTools,
81737
81820
  mode: environmentMode,
81738
81821
  "outbound-rules": environmentOutboundRules,
81822
+ "purge-tokens": environmentPurgeTokens,
81739
81823
  activate: environmentActivation,
81740
81824
  create: create$2,
81741
81825
  setup,
@@ -92362,7 +92446,7 @@ function writeUpdateState(state, env = process.env) {
92362
92446
  } catch {}
92363
92447
  }
92364
92448
  // src/version.ts
92365
- var VERSION = "1.0.851";
92449
+ var VERSION = "1.0.854";
92366
92450
  // src/commands/update.ts
92367
92451
  /**
92368
92452
  * `update` — bring this copy of the CLI up to the published version.
@@ -92436,7 +92520,7 @@ var update = {
92436
92520
  }, process.env);
92437
92521
  return {
92438
92522
  ...known,
92439
- current: after ?? "1.0.851",
92523
+ current: after ?? "1.0.854",
92440
92524
  latest: after ?? latest,
92441
92525
  upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
92442
92526
  action: "run",
@@ -92722,7 +92806,7 @@ async function printUpdateNotice(options) {
92722
92806
  }, env, { waitMs: NOTICE_LOCK_WAIT_MS });
92723
92807
  } catch {}
92724
92808
  if (latest === null) return;
92725
- if (!isNewerVersion(latest, "1.0.851")) return;
92809
+ if (!isNewerVersion(latest, "1.0.854")) return;
92726
92810
  process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
92727
92811
  }
92728
92812
  /** Whether an environment variable is set to something, which is how CI and the opt-out are read. */