@haakco/hostingctl 1.0.333 → 1.0.343

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
@@ -4793,6 +4793,22 @@ function hostingApplicationCachePurge(options) {
4793
4793
  }));
4794
4794
  }
4795
4795
  /**
4796
+ * {@link /c/:company/hosting/environments/:environmentUuid/applications/:workloadUuid/version}
4797
+ */
4798
+ function hostingApplicationsVersion(options) {
4799
+ const { client: request = client, ...config } = options;
4800
+ return withUnwrap(request({
4801
+ method: "PUT",
4802
+ url: "/c/{company}/hosting/environments/{environmentUuid}/applications/{workloadUuid}/version",
4803
+ security: [{
4804
+ type: "http",
4805
+ scheme: "bearer"
4806
+ }],
4807
+ ...config,
4808
+ throwOnError: config.throwOnError ?? true
4809
+ }));
4810
+ }
4811
+ /**
4796
4812
  * {@link /c/:company/hosting/environments/:environmentUuid/applications/:workloadUuid/recovery}
4797
4813
  */
4798
4814
  function hostingApplicationRecoveryShow(options) {
@@ -5961,6 +5977,22 @@ function hostingEnvironmentsProfile(options) {
5961
5977
  }));
5962
5978
  }
5963
5979
  /**
5980
+ * {@link /c/:company/hosting/environments/:environmentUuid/references}
5981
+ */
5982
+ function hostingEnvironmentsReferences(options) {
5983
+ const { client: request = client, ...config } = options;
5984
+ return withUnwrap(request({
5985
+ method: "GET",
5986
+ url: "/c/{company}/hosting/environments/{environmentUuid}/references",
5987
+ security: [{
5988
+ type: "http",
5989
+ scheme: "bearer"
5990
+ }],
5991
+ ...config,
5992
+ throwOnError: config.throwOnError ?? true
5993
+ }));
5994
+ }
5995
+ /**
5964
5996
  * {@link /c/:company/hosting/environments/:environmentUuid/secret-connections}
5965
5997
  */
5966
5998
  function hostingExternalSecretIndex(options) {
@@ -8363,7 +8395,7 @@ function yahooFeedbackUpdate(options) {
8363
8395
  }
8364
8396
  //#endregion
8365
8397
  //#region src/commands/auth-account.ts
8366
- var USAGE$48 = [
8398
+ var USAGE$50 = [
8367
8399
  "Usage: hostingctl auth closure show",
8368
8400
  " hostingctl auth closure request --reason <text> (--current-password-file <path>|--current-password-stdin)",
8369
8401
  " hostingctl auth picture set --image-file <path>",
@@ -8387,26 +8419,26 @@ async function account$1(context, subcommand, rest) {
8387
8419
  if (subcommand === "closure") return await closure(context, action, tail);
8388
8420
  if (subcommand === "picture") return await picture(context, action, tail);
8389
8421
  if (subcommand === "notifications") return await notifications(context, action, tail);
8390
- throw new UsageError(USAGE$48);
8422
+ throw new UsageError(USAGE$50);
8391
8423
  }
8392
8424
  /** `auth closure show|request`. */
8393
8425
  async function closure(context, action, tail) {
8394
- if (tail.length > 0) throw new UsageError(USAGE$48);
8426
+ if (tail.length > 0) throw new UsageError(USAGE$50);
8395
8427
  if (action === "show") return (await accountClosureShow({})).data;
8396
8428
  if (action === "request") return await closeAccount(context);
8397
- throw new UsageError(USAGE$48);
8429
+ throw new UsageError(USAGE$50);
8398
8430
  }
8399
8431
  /** `auth picture set|remove`. */
8400
8432
  async function picture(context, action, tail) {
8401
- if (tail.length > 0) throw new UsageError(USAGE$48);
8433
+ if (tail.length > 0) throw new UsageError(USAGE$50);
8402
8434
  if (action === "set") return await setPicture(context);
8403
8435
  if (action === "remove") return await removePicture(context);
8404
- throw new UsageError(USAGE$48);
8436
+ throw new UsageError(USAGE$50);
8405
8437
  }
8406
8438
  /** `auth notifications`, `read <id>` or `read-all`. */
8407
8439
  async function notifications(context, action, tail) {
8408
8440
  if (action === void 0) {
8409
- if (tail.length > 0) throw new UsageError(USAGE$48);
8441
+ if (tail.length > 0) throw new UsageError(USAGE$50);
8410
8442
  return await allPages(async (page, perPage) => {
8411
8443
  const answer = await notificationIndex({ query: {
8412
8444
  page,
@@ -8422,7 +8454,7 @@ async function notifications(context, action, tail) {
8422
8454
  await notificationMarkAllRead({});
8423
8455
  return null;
8424
8456
  });
8425
- if (action !== "read" || tail.length !== 1) throw new UsageError(USAGE$48);
8457
+ if (action !== "read" || tail.length !== 1) throw new UsageError(USAGE$50);
8426
8458
  const notification = tail[0] ?? "";
8427
8459
  return await confirmableWrite(context, `Mark notification ${notification} read.`, async () => {
8428
8460
  await notificationMarkRead({ path: { notification } });
@@ -8438,11 +8470,11 @@ async function notifications(context, action, tail) {
8438
8470
  */
8439
8471
  async function closeAccount(context) {
8440
8472
  const reason = context.flags.get("--reason")?.trim() ?? "";
8441
- if (reason === "") throw new UsageError(`closure request needs --reason.\n\n${USAGE$48}`);
8473
+ if (reason === "") throw new UsageError(`closure request needs --reason.\n\n${USAGE$50}`);
8442
8474
  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 () => {
8443
8475
  const review = (await accountClosureShow({})).data;
8444
8476
  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"));
8445
- const currentPassword = readSecret(context, "current-password", 1024, USAGE$48);
8477
+ const currentPassword = readSecret(context, "current-password", 1024, USAGE$50);
8446
8478
  return (await accountClosureStore({ body: {
8447
8479
  reason,
8448
8480
  reviewedDigest: review.digest,
@@ -8454,7 +8486,7 @@ async function closeAccount(context) {
8454
8486
  async function setPicture(context) {
8455
8487
  const file = context.flags.get("--image-file") ?? "";
8456
8488
  return await confirmableWrite(context, file === "" ? "Set the profile picture." : `Set the profile picture to ${file}.`, async () => {
8457
- return (await profilePictureStore({ body: await imageUpload(file, USAGE$48) })).data;
8489
+ return (await profilePictureStore({ body: await imageUpload(file, USAGE$50) })).data;
8458
8490
  });
8459
8491
  }
8460
8492
  /** `auth picture remove`. */
@@ -8465,7 +8497,7 @@ async function removePicture(context) {
8465
8497
  }
8466
8498
  //#endregion
8467
8499
  //#region src/commands/auth-identity.ts
8468
- var USAGE$47 = [
8500
+ var USAGE$49 = [
8469
8501
  "Usage: hostingctl auth profile [--name <name>] [--email <email>] [--current-password-file <path>]",
8470
8502
  " hostingctl auth password (--current-password-file <path>|--current-password-stdin) (--new-password-file <path>|--new-password-stdin)",
8471
8503
  " hostingctl auth register --name <name> --email <email> (--password-file <path>|--password-stdin)",
@@ -8490,12 +8522,12 @@ var MAX_TOKEN_BYTES = 4096;
8490
8522
  /** One required flag's value, or a refusal naming the flag. */
8491
8523
  function required$3(context, flag) {
8492
8524
  const value = context.flags.get(flag)?.trim() ?? "";
8493
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$47}`);
8525
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$49}`);
8494
8526
  return value;
8495
8527
  }
8496
8528
  /** No positional arguments: every input here is a flag or a secret source. */
8497
8529
  function noPositional(rest) {
8498
- if (rest.length > 0) throw new UsageError(USAGE$47);
8530
+ if (rest.length > 0) throw new UsageError(USAGE$49);
8499
8531
  }
8500
8532
  /** The API's password contract takes a confirmation; the CLI's one input is the new password itself. */
8501
8533
  function passwordBody(password) {
@@ -8518,16 +8550,16 @@ async function identity(context, subcommand, rest) {
8518
8550
  if (subcommand === "forgot-password") return await forgotPassword(context);
8519
8551
  if (subcommand === "reset-password") return await resetPassword(context);
8520
8552
  if (subcommand === "verify-email") return await verifyEmail(context);
8521
- throw new UsageError(USAGE$47);
8553
+ throw new UsageError(USAGE$49);
8522
8554
  }
8523
8555
  /** `auth profile`: the account's own name and email, with the current password only when the email changes. */
8524
8556
  async function profile$1(context) {
8525
8557
  const name = context.flags.get("--name")?.trim() ?? "";
8526
8558
  const email = context.flags.get("--email")?.trim() ?? "";
8527
- 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$47}`);
8559
+ 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$49}`);
8528
8560
  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 () => {
8529
8561
  const current = (await authMe({})).data;
8530
- const currentPassword = hasSecret(context, "current-password") ? readSecret(context, "current-password", MAX_PASSWORD_BYTES, USAGE$47) : void 0;
8562
+ const currentPassword = hasSecret(context, "current-password") ? readSecret(context, "current-password", MAX_PASSWORD_BYTES, USAGE$49) : void 0;
8531
8563
  return (await authUpdateProfile({ body: {
8532
8564
  name: name === "" ? current.name ?? "" : name,
8533
8565
  email: email === "" ? current.email ?? "" : email,
@@ -8543,8 +8575,8 @@ function hasSecret(context, name) {
8543
8575
  async function password$1(context) {
8544
8576
  return await confirmableWrite(context, "Change the account's password.", async () => {
8545
8577
  return (await authChangePassword({ body: {
8546
- currentPassword: readSecret(context, "current-password", MAX_PASSWORD_BYTES, USAGE$47),
8547
- ...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES, USAGE$47))
8578
+ currentPassword: readSecret(context, "current-password", MAX_PASSWORD_BYTES, USAGE$49),
8579
+ ...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES, USAGE$49))
8548
8580
  } })).data;
8549
8581
  });
8550
8582
  }
@@ -8556,7 +8588,7 @@ async function register$1(context) {
8556
8588
  return (await authRegister({ body: {
8557
8589
  name,
8558
8590
  email,
8559
- ...passwordBody(readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$47))
8591
+ ...passwordBody(readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$49))
8560
8592
  } })).data;
8561
8593
  });
8562
8594
  }
@@ -8571,8 +8603,8 @@ async function forgotPassword(context) {
8571
8603
  async function resetPassword(context) {
8572
8604
  const email = required$3(context, "--email");
8573
8605
  return await confirmableWrite(context, `Reset the password for ${email}.`, async () => {
8574
- const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$47);
8575
- const password = readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$47);
8606
+ const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$49);
8607
+ const password = readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$49);
8576
8608
  return (await authResetPassword({ body: {
8577
8609
  token,
8578
8610
  email,
@@ -8588,7 +8620,7 @@ async function verifyEmail(context) {
8588
8620
  }
8589
8621
  //#endregion
8590
8622
  //#region src/commands/auth-impersonation.ts
8591
- var USAGE$46 = [
8623
+ var USAGE$48 = [
8592
8624
  "Usage: hostingctl auth impersonate start --target <user-uuid> --company <slug> --reason <text> [--minutes <n>] --store-as <profile>",
8593
8625
  " hostingctl auth impersonate status",
8594
8626
  " hostingctl auth impersonate stop",
@@ -8621,7 +8653,7 @@ async function impersonation(context, rest) {
8621
8653
  if (action === "stop" && tail.length === 0) return await stop(context);
8622
8654
  if (action === "list" && tail.length === 0) return await list$5();
8623
8655
  if (action === "end" && tail.length === 1) return await end(context, tail[0] ?? "");
8624
- throw new UsageError(USAGE$46);
8656
+ throw new UsageError(USAGE$48);
8625
8657
  }
8626
8658
  /** `start`: mint a token for another user, and keep it in a profile of its own. */
8627
8659
  async function start(context) {
@@ -8629,8 +8661,8 @@ async function start(context) {
8629
8661
  const company = context.flags.get("--company")?.trim() ?? "";
8630
8662
  const reason = context.flags.get("--reason")?.trim() ?? "";
8631
8663
  const storeAs = context.flags.get("--store-as")?.trim() ?? "";
8632
- if (target === "" || company === "" || reason === "") throw new UsageError(`start needs --target, --company and --reason.\n\n${USAGE$46}`);
8633
- if (storeAs === "") throw new UsageError(`start needs --store-as <profile>.\n\n${USAGE$46}`);
8664
+ if (target === "" || company === "" || reason === "") throw new UsageError(`start needs --target, --company and --reason.\n\n${USAGE$48}`);
8665
+ if (storeAs === "") throw new UsageError(`start needs --store-as <profile>.\n\n${USAGE$48}`);
8634
8666
  const minutes = wholeNumberFlag(context.flags, "--minutes") ?? DEFAULT_MINUTES;
8635
8667
  const document = await readProfiles();
8636
8668
  const operator = namedProfile(context.flags, document);
@@ -8643,8 +8675,9 @@ async function start(context) {
8643
8675
  expiresInMinutes: minutes
8644
8676
  } })).data;
8645
8677
  const expiresAt = new Date(Date.now() + answered.expiresIn * 1e3);
8678
+ const namedApiUrl = (context.flags.get("--api-url") ?? process.env.HOSTINGCTL_API_URL ?? "").trim();
8646
8679
  await saveProfile({
8647
- apiUrl: document.profiles[operator]?.apiUrl ?? "",
8680
+ apiUrl: namedApiUrl !== "" ? namedApiUrl : document.profiles[operator]?.apiUrl ?? "",
8648
8681
  clientId: "",
8649
8682
  refreshToken: "",
8650
8683
  accessToken: answered.accessToken,
@@ -8723,7 +8756,7 @@ async function list$5() {
8723
8756
  }
8724
8757
  /** `end <uuid>`: end one recorded session by its uuid. */
8725
8758
  async function end(context, uuid) {
8726
- if (uuid === "") throw new UsageError(USAGE$46);
8759
+ if (uuid === "") throw new UsageError(USAGE$48);
8727
8760
  return await confirmableWrite(context, `End impersonation session ${uuid}.`, async () => ({
8728
8761
  ...EMPTY,
8729
8762
  action: "end",
@@ -8732,7 +8765,7 @@ async function end(context, uuid) {
8732
8765
  }
8733
8766
  //#endregion
8734
8767
  //#region src/commands/auth-push.ts
8735
- var USAGE$45 = [
8768
+ var USAGE$47 = [
8736
8769
  "Usage: hostingctl auth push-token set (--token-file <path>|--token-stdin)",
8737
8770
  " hostingctl auth push-token remove (--token-file <path>|--token-stdin)",
8738
8771
  "",
@@ -8743,12 +8776,12 @@ var USAGE$45 = [
8743
8776
  /** `auth push-token set|remove`: this account's mobile push registration. */
8744
8777
  async function authPush(context, rest) {
8745
8778
  const [action, ...tail] = rest;
8746
- if (tail.length > 0) throw new UsageError(USAGE$45);
8779
+ if (tail.length > 0) throw new UsageError(USAGE$47);
8747
8780
  if (action === "set") return {
8748
8781
  kind: "push-token",
8749
8782
  action: "set",
8750
8783
  sent: (await confirmableWrite(context, "Register this device's push token.", async () => {
8751
- await expoTokenStore({ body: { token: readSecret(context, "token", 4096, USAGE$45) } });
8784
+ await expoTokenStore({ body: { token: readSecret(context, "token", 4096, USAGE$47) } });
8752
8785
  return null;
8753
8786
  })).sent
8754
8787
  };
@@ -8756,11 +8789,11 @@ async function authPush(context, rest) {
8756
8789
  kind: "push-token",
8757
8790
  action: "remove",
8758
8791
  sent: (await confirmableWrite(context, "Remove this device's push token.", async () => {
8759
- await expoTokenDestroy({ query: { token: readSecret(context, "token", 4096, USAGE$45) } });
8792
+ await expoTokenDestroy({ query: { token: readSecret(context, "token", 4096, USAGE$47) } });
8760
8793
  return null;
8761
8794
  })).sent
8762
8795
  };
8763
- throw new UsageError(USAGE$45);
8796
+ throw new UsageError(USAGE$47);
8764
8797
  }
8765
8798
  /** The `auth push-token` renderer. */
8766
8799
  function authPushText(report) {
@@ -8911,47 +8944,47 @@ var AUTH_METADATA = {
8911
8944
  var AUTH_TOPICS = [
8912
8945
  {
8913
8946
  path: ["profile"],
8914
- usage: USAGE$47
8947
+ usage: USAGE$49
8915
8948
  },
8916
8949
  {
8917
8950
  path: ["password"],
8918
- usage: USAGE$47
8951
+ usage: USAGE$49
8919
8952
  },
8920
8953
  {
8921
8954
  path: ["register"],
8922
- usage: USAGE$47
8955
+ usage: USAGE$49
8923
8956
  },
8924
8957
  {
8925
8958
  path: ["forgot-password"],
8926
- usage: USAGE$47
8959
+ usage: USAGE$49
8927
8960
  },
8928
8961
  {
8929
8962
  path: ["reset-password"],
8930
- usage: USAGE$47
8963
+ usage: USAGE$49
8931
8964
  },
8932
8965
  {
8933
8966
  path: ["verify-email"],
8934
- usage: USAGE$47
8967
+ usage: USAGE$49
8935
8968
  },
8936
8969
  {
8937
8970
  path: ["closure"],
8938
- usage: USAGE$48
8971
+ usage: USAGE$50
8939
8972
  },
8940
8973
  {
8941
8974
  path: ["picture"],
8942
- usage: USAGE$48
8975
+ usage: USAGE$50
8943
8976
  },
8944
8977
  {
8945
8978
  path: ["notifications"],
8946
- usage: USAGE$48
8979
+ usage: USAGE$50
8947
8980
  },
8948
8981
  {
8949
8982
  path: ["push-token"],
8950
- usage: USAGE$45
8983
+ usage: USAGE$47
8951
8984
  },
8952
8985
  {
8953
8986
  path: ["impersonate"],
8954
- usage: USAGE$46
8987
+ usage: USAGE$48
8955
8988
  }
8956
8989
  ];
8957
8990
  //#endregion
@@ -9484,7 +9517,7 @@ var MAILBOX_TOPICS = [{
9484
9517
  }];
9485
9518
  //#endregion
9486
9519
  //#region src/commands/mailbox-recovery.ts
9487
- var USAGE$44 = [
9520
+ var USAGE$46 = [
9488
9521
  "Usage: hostingctl mailbox recovery <request|verify|reset> [options]",
9489
9522
  "",
9490
9523
  " request --address <address> Ask for a self-service reset link for a mailbox address.",
@@ -9512,16 +9545,16 @@ function isSessionlessMailboxCommand(argv) {
9512
9545
  /** `mailbox recovery request|verify|reset`: the unauthenticated, token-authorized recovery journey. */
9513
9546
  async function runMailboxRecovery(context, rest) {
9514
9547
  const [action, extra] = rest;
9515
- if (extra !== void 0) throw new UsageError(USAGE$44);
9548
+ if (extra !== void 0) throw new UsageError(USAGE$46);
9516
9549
  if (action === "request") return await request$1(context);
9517
9550
  if (action === "verify") return await verify$1(context);
9518
9551
  if (action === "reset") return await reset(context);
9519
- throw new UsageError(USAGE$44);
9552
+ throw new UsageError(USAGE$46);
9520
9553
  }
9521
9554
  /** `request`: the answer is deliberately identical whether or not an eligible mailbox exists. */
9522
9555
  async function request$1(context) {
9523
9556
  const address = context.flags.get("--address");
9524
- if (address === void 0 || address === "") throw new UsageError(USAGE$44);
9557
+ if (address === void 0 || address === "") throw new UsageError(USAGE$46);
9525
9558
  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);
9526
9559
  }
9527
9560
  /** `verify`: the token is read only when the send actually happens, so a dry run never touches a secret. */
@@ -9542,7 +9575,7 @@ async function reset(context) {
9542
9575
  }
9543
9576
  /** One recovery token or new password, read from a private file or stdin under the recovery bound. */
9544
9577
  function recoverySecret(context, name) {
9545
- return readSecret(context, name, MAX_RECOVERY_SECRET_BYTES, USAGE$44);
9578
+ return readSecret(context, name, MAX_RECOVERY_SECRET_BYTES, USAGE$46);
9546
9579
  }
9547
9580
  //#endregion
9548
9581
  //#region src/commands/mailbox.ts
@@ -9678,7 +9711,7 @@ async function environmentGeneration(path) {
9678
9711
  //#endregion
9679
9712
  //#region src/commands/access-credentials.ts
9680
9713
  /** The usage this module refuses with, owned by the commands it implements. */
9681
- var USAGE$43 = [
9714
+ var USAGE$45 = [
9682
9715
  "Usage: hostingctl access key add <environment-uuid> --company <slug> --access-user <uuid> --name <n> --public-key-file <path>",
9683
9716
  " hostingctl access key remove <environment-uuid> --company <slug> --access-user <uuid> <key-uuid>",
9684
9717
  " hostingctl access password set <environment-uuid> --company <slug> --access-user <uuid> (--password-file <path>|--password-stdin)",
@@ -9696,12 +9729,12 @@ var USAGE$43 = [
9696
9729
  /** `key add|remove`. */
9697
9730
  async function key(context, path, action, tail) {
9698
9731
  const accessUserUuid = context.flags.get("--access-user") ?? "";
9699
- if (accessUserUuid === "") throw new UsageError(`key needs --access-user.\\n\\n${USAGE$43}`);
9732
+ if (accessUserUuid === "") throw new UsageError(`key needs --access-user.\\n\\n${USAGE$45}`);
9700
9733
  if (action === "add") {
9701
- if (tail.length > 0) throw new UsageError(USAGE$43);
9734
+ if (tail.length > 0) throw new UsageError(USAGE$45);
9702
9735
  const name = context.flags.get("--name")?.trim() ?? "";
9703
9736
  const file = context.flags.get("--public-key-file") ?? "";
9704
- if (name === "" || file === "") throw new UsageError(`key add needs --name and --public-key-file.\\n\\n${USAGE$43}`);
9737
+ if (name === "" || file === "") throw new UsageError(`key add needs --name and --public-key-file.\\n\\n${USAGE$45}`);
9705
9738
  const publicKey = readPrivateFile(file, "public key", 8192).trim();
9706
9739
  return await confirmableWrite(context, `Add key "${name}" to login ${accessUserUuid}.`, async () => {
9707
9740
  const body = {
@@ -9720,7 +9753,7 @@ async function key(context, path, action, tail) {
9720
9753
  }
9721
9754
  if (action === "remove") {
9722
9755
  const [keyUuid, ...extra] = tail;
9723
- if (keyUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$43);
9756
+ if (keyUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$45);
9724
9757
  return await confirmableWrite(context, `Remove key ${keyUuid} from login ${accessUserUuid}.`, async () => {
9725
9758
  return (await hostingAccessDestroyKey({
9726
9759
  path: {
@@ -9732,18 +9765,18 @@ async function key(context, path, action, tail) {
9732
9765
  })).data;
9733
9766
  });
9734
9767
  }
9735
- throw new UsageError(USAGE$43);
9768
+ throw new UsageError(USAGE$45);
9736
9769
  }
9737
9770
  /** `password set|clear`. */
9738
9771
  async function password(context, path, action, tail) {
9739
9772
  const accessUserUuid = context.flags.get("--access-user") ?? "";
9740
- if (accessUserUuid === "" || tail.length > 0) throw new UsageError(`password needs --access-user.\\n\\n${USAGE$43}`);
9773
+ if (accessUserUuid === "" || tail.length > 0) throw new UsageError(`password needs --access-user.\\n\\n${USAGE$45}`);
9741
9774
  const userPath = {
9742
9775
  ...path,
9743
9776
  accessUserUuid
9744
9777
  };
9745
9778
  if (action === "set") return await confirmableWrite(context, "Set this login's password. The previous password stops working when the change is applied.", async () => {
9746
- const password = readSecret(context, "password", 1024, USAGE$43);
9779
+ const password = readSecret(context, "password", 1024, USAGE$45);
9747
9780
  const body = {
9748
9781
  desiredGeneration: await environmentGeneration(path),
9749
9782
  password,
@@ -9761,7 +9794,7 @@ async function password(context, path, action, tail) {
9761
9794
  query
9762
9795
  })).data;
9763
9796
  });
9764
- throw new UsageError(USAGE$43);
9797
+ throw new UsageError(USAGE$45);
9765
9798
  }
9766
9799
  //#endregion
9767
9800
  //#region src/commands/booleans.ts
@@ -9786,7 +9819,7 @@ function onOff$5(context, flag, usage) {
9786
9819
  }
9787
9820
  //#endregion
9788
9821
  //#region src/commands/access-admin.ts
9789
- var USAGE$42 = [
9822
+ var USAGE$44 = [
9790
9823
  "Usage: hostingctl access settings <environment-uuid> --company <slug>",
9791
9824
  " hostingctl access settings-set <environment-uuid> --company <slug> --password <on|off> --sftp-only <on|off>",
9792
9825
  " hostingctl access grants <environment-uuid> --company <slug>",
@@ -9814,7 +9847,7 @@ var USAGE$42 = [
9814
9847
  /** `access settings|settings-set|grants|grant|un-grant|key|password|user-show|user-set|received`. */
9815
9848
  async function accessAdmin(context, subcommand, rest) {
9816
9849
  if (subcommand === "received") {
9817
- if (rest.length > 0) throw new UsageError(USAGE$42);
9850
+ if (rest.length > 0) throw new UsageError(USAGE$44);
9818
9851
  return {
9819
9852
  kind: "received",
9820
9853
  grants: (await hostingAccessReceivedIndex({})).data.items
@@ -9822,7 +9855,7 @@ async function accessAdmin(context, subcommand, rest) {
9822
9855
  }
9823
9856
  const [first, ...after] = rest;
9824
9857
  const takesAction = subcommand === "key" || subcommand === "password";
9825
- const path = await environmentPath(context, takesAction ? after[0] : first, USAGE$42);
9858
+ const path = await environmentPath(context, takesAction ? after[0] : first, USAGE$44);
9826
9859
  const tail = takesAction ? after.slice(1) : after;
9827
9860
  return await routed(context, subcommand, path, first ?? "", tail);
9828
9861
  }
@@ -9837,7 +9870,7 @@ async function routed(context, subcommand, path, action, tail) {
9837
9870
  if (subcommand === "password") return await written$7(password(context, path, action, tail));
9838
9871
  if (subcommand === "user-show") return await userShow(path, tail);
9839
9872
  if (subcommand === "user-set") return await written$7(userSet(context, path, tail));
9840
- throw new UsageError(USAGE$42);
9873
+ throw new UsageError(USAGE$44);
9841
9874
  }
9842
9875
  /** Tag one write's outcome with the group that produced it. */
9843
9876
  async function written$7(pending) {
@@ -9848,7 +9881,7 @@ async function written$7(pending) {
9848
9881
  }
9849
9882
  /** A company-wide read takes no positionals. */
9850
9883
  function noExtra$18(rest) {
9851
- if (rest.length > 0) throw new UsageError(USAGE$42);
9884
+ if (rest.length > 0) throw new UsageError(USAGE$44);
9852
9885
  }
9853
9886
  /** `settings`. */
9854
9887
  async function settings$1(path, rest) {
@@ -9861,8 +9894,8 @@ async function settings$1(path, rest) {
9861
9894
  /** `settings-set --password … --sftp-only …`. */
9862
9895
  async function settingsSet(context, path, rest) {
9863
9896
  noExtra$18(rest);
9864
- const passwordEnabled = onOff$5(context, "--password", USAGE$42);
9865
- const sftpOnly = onOff$5(context, "--sftp-only", USAGE$42);
9897
+ const passwordEnabled = onOff$5(context, "--password", USAGE$44);
9898
+ const sftpOnly = onOff$5(context, "--sftp-only", USAGE$44);
9866
9899
  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 () => {
9867
9900
  return (await hostingAccessUpdate({
9868
9901
  path,
@@ -9887,7 +9920,7 @@ async function grant(context, path, rest) {
9887
9920
  noExtra$18(rest);
9888
9921
  const userUuid = context.flags.get("--user") ?? "";
9889
9922
  const accessUserUuid = context.flags.get("--access-user") ?? "";
9890
- if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$42}`);
9923
+ if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$44}`);
9891
9924
  return await confirmableWrite(context, `Grant user ${userUuid} the login ${accessUserUuid} on this environment.`, async () => {
9892
9925
  return (await hostingAccessGrantStore({
9893
9926
  path,
@@ -9902,7 +9935,7 @@ async function grant(context, path, rest) {
9902
9935
  /** `un-grant <grant-uuid>`. */
9903
9936
  async function unGrant(context, path, rest) {
9904
9937
  const [grantUuid, ...extra] = rest;
9905
- if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
9938
+ if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$44);
9906
9939
  return await confirmableWrite(context, `Withdraw grant ${grantUuid}. The login stays; only this account's access to it ends.`, async () => {
9907
9940
  const query = { desiredGeneration: await environmentGeneration(path) };
9908
9941
  return (await hostingAccessGrantDestroy({
@@ -9917,7 +9950,7 @@ async function unGrant(context, path, rest) {
9917
9950
  /** `user-show <access-user-uuid>`. */
9918
9951
  async function userShow(path, rest) {
9919
9952
  const [accessUserUuid, ...extra] = rest;
9920
- if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
9953
+ if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$44);
9921
9954
  return {
9922
9955
  kind: "user",
9923
9956
  user: (await hostingAccessShowUser({ path: {
@@ -9929,7 +9962,7 @@ async function userShow(path, rest) {
9929
9962
  /** `user-set <access-user-uuid> [--name] [--enabled] [--read-only]`. */
9930
9963
  async function userSet(context, path, rest) {
9931
9964
  const [accessUserUuid, ...extra] = rest;
9932
- if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
9965
+ if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$44);
9933
9966
  const userPath = {
9934
9967
  ...path,
9935
9968
  accessUserUuid
@@ -9938,7 +9971,7 @@ async function userSet(context, path, rest) {
9938
9971
  const name = context.flags.get("--name")?.trim();
9939
9972
  const enabled = onOffFlag(context, "--enabled");
9940
9973
  const readOnly = onOffFlag(context, "--read-only");
9941
- if (name === void 0 && enabled === null && readOnly === null) throw new UsageError(`user-set needs --name, --enabled, --read-only or a combination.\\n\\n${USAGE$42}`);
9974
+ if (name === void 0 && enabled === null && readOnly === null) throw new UsageError(`user-set needs --name, --enabled, --read-only or a combination.\\n\\n${USAGE$44}`);
9942
9975
  const body = {
9943
9976
  desiredGeneration: await environmentGeneration(path),
9944
9977
  name: name === void 0 || name === "" ? current.name : name,
@@ -10089,43 +10122,43 @@ var ACCESS_METADATA = {
10089
10122
  var ACCESS_TOPICS = [
10090
10123
  {
10091
10124
  path: ["settings"],
10092
- usage: USAGE$42
10125
+ usage: USAGE$44
10093
10126
  },
10094
10127
  {
10095
10128
  path: ["settings-set"],
10096
- usage: USAGE$42
10129
+ usage: USAGE$44
10097
10130
  },
10098
10131
  {
10099
10132
  path: ["grants"],
10100
- usage: USAGE$42
10133
+ usage: USAGE$44
10101
10134
  },
10102
10135
  {
10103
10136
  path: ["grant"],
10104
- usage: USAGE$42
10137
+ usage: USAGE$44
10105
10138
  },
10106
10139
  {
10107
10140
  path: ["un-grant"],
10108
- usage: USAGE$42
10141
+ usage: USAGE$44
10109
10142
  },
10110
10143
  {
10111
10144
  path: ["user-show"],
10112
- usage: USAGE$42
10145
+ usage: USAGE$44
10113
10146
  },
10114
10147
  {
10115
10148
  path: ["user-set"],
10116
- usage: USAGE$42
10149
+ usage: USAGE$44
10117
10150
  },
10118
10151
  {
10119
10152
  path: ["received"],
10120
- usage: USAGE$42
10153
+ usage: USAGE$44
10121
10154
  },
10122
10155
  {
10123
10156
  path: ["key"],
10124
- usage: USAGE$43
10157
+ usage: USAGE$45
10125
10158
  },
10126
10159
  {
10127
10160
  path: ["password"],
10128
- usage: USAGE$43
10161
+ usage: USAGE$45
10129
10162
  }
10130
10163
  ];
10131
10164
  //#endregion
@@ -10345,7 +10378,7 @@ var ADMIN_ACTIONS = /* @__PURE__ */ new Set([
10345
10378
  ]);
10346
10379
  //#endregion
10347
10380
  //#region src/commands/application-admin.ts
10348
- var USAGE$41 = [
10381
+ var USAGE$43 = [
10349
10382
  "Usage: hostingctl application administrator <environment-uuid> <application-uuid> --company <slug>",
10350
10383
  " hostingctl application administrator-reset|administrator-reveal <environment-uuid> <application-uuid> --company <slug>",
10351
10384
  " hostingctl application recovery-status|recovery-retry|recovery-cancel <environment-uuid> <application-uuid> <recovery-uuid> --company <slug>",
@@ -10372,7 +10405,7 @@ async function applicationAdmin(context, action, path, rest) {
10372
10405
  if (action === "administrator-reset") return await credential(context, path, rest, "reset");
10373
10406
  if (action === "administrator-reveal") return await credential(context, path, rest, "reveal");
10374
10407
  const [recoveryUuid, ...extra] = rest;
10375
- if (recoveryUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
10408
+ if (recoveryUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$43);
10376
10409
  const recoveryPath = {
10377
10410
  ...path,
10378
10411
  recoveryUuid
@@ -10385,7 +10418,7 @@ async function applicationAdmin(context, action, path, rest) {
10385
10418
  return (await hostingApplicationRecoveryRetry({ path: recoveryPath })).data;
10386
10419
  }));
10387
10420
  if (action === "recovery-cancel") return await written$6(confirmableWrite(context, "Cancel this recovery. Writers are released and the application returns to its previous state.", async () => (await hostingApplicationRecoveryCancel({ path: recoveryPath })).data));
10388
- throw new UsageError(USAGE$41);
10421
+ throw new UsageError(USAGE$43);
10389
10422
  }
10390
10423
  /** `administrator-reset|reveal`: the one place the application's own password is printed. */
10391
10424
  async function credential(context, path, rest, kind) {
@@ -10406,7 +10439,7 @@ async function written$6(pending) {
10406
10439
  }
10407
10440
  /** No positional arguments, or a usage refusal. */
10408
10441
  function noExtra$17(rest) {
10409
- if (rest.length > 0) throw new UsageError(USAGE$41);
10442
+ if (rest.length > 0) throw new UsageError(USAGE$43);
10410
10443
  }
10411
10444
  /** One recovery as one line: what it is doing, how far, and what it holds. */
10412
10445
  function recoveryLines$1(one) {
@@ -10443,7 +10476,7 @@ function applicationAdminText(report) {
10443
10476
  }
10444
10477
  //#endregion
10445
10478
  //#region src/commands/application-builds.ts
10446
- var USAGE$40 = [
10479
+ var USAGE$42 = [
10447
10480
  "Usage: hostingctl application build-log <environment-uuid> <application-uuid> <build-uuid> --company <slug>",
10448
10481
  " hostingctl application build-retry|build-cancel <environment-uuid> <application-uuid> <build-uuid> --company <slug>",
10449
10482
  " hostingctl application source-bind <environment-uuid> <application-uuid> --company <slug> --selection <uuid> [--branch <name>] [--tag <name>] [--auto-deploy <on|off>]",
@@ -10466,7 +10499,7 @@ async function applicationBuilds(context, action, path, rest) {
10466
10499
  }
10467
10500
  if (action === "source-bind") return await bind$1(context, path, rest);
10468
10501
  const [buildUuid, ...extra] = rest;
10469
- if (buildUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$40);
10502
+ if (buildUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
10470
10503
  const buildPath = {
10471
10504
  ...path,
10472
10505
  buildUuid
@@ -10481,13 +10514,13 @@ async function applicationBuilds(context, action, path, rest) {
10481
10514
  if (action === "build-cancel") return await written$5(confirmableWrite(context, "Stop this build. A running build stops where it is.", async () => {
10482
10515
  return (await hostingDeploymentCancel({ path: buildPath })).data;
10483
10516
  }));
10484
- throw new UsageError(USAGE$40);
10517
+ throw new UsageError(USAGE$42);
10485
10518
  }
10486
10519
  /** `source-bind --selection … [--branch …] [--tag …] [--auto-deploy …]`. */
10487
10520
  async function bind$1(context, path, rest) {
10488
10521
  noExtra$16(rest);
10489
10522
  const repositorySelectionUuid = context.flags.get("--selection") ?? "";
10490
- if (repositorySelectionUuid === "") throw new UsageError(`source-bind needs --selection.\n\n${USAGE$40}`);
10523
+ if (repositorySelectionUuid === "") throw new UsageError(`source-bind needs --selection.\n\n${USAGE$42}`);
10491
10524
  const branch = context.flags.get("--branch")?.trim();
10492
10525
  const tag = context.flags.get("--tag")?.trim();
10493
10526
  const autoDeploy = onOffFlag(context, "--auto-deploy");
@@ -10513,7 +10546,7 @@ async function written$5(pending) {
10513
10546
  }
10514
10547
  /** No positional arguments, or a usage refusal. */
10515
10548
  function noExtra$16(rest) {
10516
- if (rest.length > 0) throw new UsageError(USAGE$40);
10549
+ if (rest.length > 0) throw new UsageError(USAGE$42);
10517
10550
  }
10518
10551
  /** The write receipt: a build's own fields, or the deployment's source. */
10519
10552
  function writeText$4(report) {
@@ -10542,7 +10575,7 @@ function applicationBuildText(report) {
10542
10575
  }
10543
10576
  //#endregion
10544
10577
  //#region src/commands/application-cache.ts
10545
- var USAGE$39 = [
10578
+ var USAGE$41 = [
10546
10579
  "Usage: hostingctl application cache <environment-uuid> <application-uuid> --company <slug>",
10547
10580
  " hostingctl application cache-set <environment-uuid> <application-uuid> --company <slug> [--enabled <on|off>] [--fresh <s>] [--background <s>] [--browser <s>] [--reset <on|off>]",
10548
10581
  " hostingctl application cache-purge <environment-uuid> <application-uuid> --company <slug>",
@@ -10578,7 +10611,7 @@ async function applicationCache(context, action, path, rest) {
10578
10611
  })).data));
10579
10612
  if (action === "canonical") {
10580
10613
  const routeUuid = context.flags.get("--route") ?? "";
10581
- if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$39}`);
10614
+ if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$41}`);
10582
10615
  return await written$4(confirmableWrite(context, `Make route ${routeUuid} this application's canonical address.`, async () => {
10583
10616
  const desiredGeneration = await generation$1(path);
10584
10617
  return (await hostingApplicationRouteSelectCanonical({
@@ -10590,7 +10623,7 @@ async function applicationCache(context, action, path, rest) {
10590
10623
  })).data;
10591
10624
  }));
10592
10625
  }
10593
- throw new UsageError(USAGE$39);
10626
+ throw new UsageError(USAGE$41);
10594
10627
  }
10595
10628
  /** `application routes|route-add|route-remove`, which are environment-scoped. */
10596
10629
  async function applicationRoutes(context, action, path, rest) {
@@ -10604,7 +10637,7 @@ async function applicationRoutes(context, action, path, rest) {
10604
10637
  if (action === "route-add") return await addRoute(context, path, rest);
10605
10638
  if (action === "route-remove") {
10606
10639
  const [routeUuid, ...extra] = rest;
10607
- if (routeUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$39);
10640
+ if (routeUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
10608
10641
  return await written$4(confirmableWrite(context, `Remove route ${routeUuid}.`, async () => {
10609
10642
  const body = { desiredGeneration: await generation$1(path) };
10610
10643
  return (await hostingApplicationRouteRemove({
@@ -10616,7 +10649,7 @@ async function applicationRoutes(context, action, path, rest) {
10616
10649
  })).data;
10617
10650
  }));
10618
10651
  }
10619
- throw new UsageError(USAGE$39);
10652
+ throw new UsageError(USAGE$41);
10620
10653
  }
10621
10654
  /** `route-add --source … --target … --path …`. */
10622
10655
  async function addRoute(context, path, rest) {
@@ -10624,7 +10657,7 @@ async function addRoute(context, path, rest) {
10624
10657
  const sourceWorkloadUuid = context.flags.get("--source") ?? "";
10625
10658
  const targetWorkloadUuid = context.flags.get("--target") ?? "";
10626
10659
  const routePath = context.flags.get("--path") ?? "";
10627
- if (sourceWorkloadUuid === "" || targetWorkloadUuid === "" || routePath === "") throw new UsageError(`route-add needs --source, --target and --path.\n\n${USAGE$39}`);
10660
+ if (sourceWorkloadUuid === "" || targetWorkloadUuid === "" || routePath === "") throw new UsageError(`route-add needs --source, --target and --path.\n\n${USAGE$41}`);
10628
10661
  const domainUuid = context.flags.get("--domain")?.trim();
10629
10662
  const canonical = onOffFlag(context, "--canonical") ?? false;
10630
10663
  return await written$4(confirmableWrite(context, `Route ${routePath} from ${sourceWorkloadUuid} to ${targetWorkloadUuid}${canonical ? " as canonical" : ""}.`, async () => {
@@ -10657,10 +10690,10 @@ function cacheBody(context) {
10657
10690
  const raw = context.flags.get(flag)?.trim() ?? "";
10658
10691
  if (raw === "") continue;
10659
10692
  const value = Number(raw);
10660
- if (!Number.isInteger(value) || value < 0) throw new UsageError(`${flag} must be a whole number of seconds.\n\n${USAGE$39}`);
10693
+ if (!Number.isInteger(value) || value < 0) throw new UsageError(`${flag} must be a whole number of seconds.\n\n${USAGE$41}`);
10661
10694
  body[field] = value;
10662
10695
  }
10663
- if (Object.keys(body).length === 0) throw new UsageError(`cache-set needs at least one field.\n\n${USAGE$39}`);
10696
+ if (Object.keys(body).length === 0) throw new UsageError(`cache-set needs at least one field.\n\n${USAGE$41}`);
10664
10697
  return body;
10665
10698
  }
10666
10699
  /** The environment's generation, which every write here must name. */
@@ -10676,7 +10709,7 @@ async function written$4(pending) {
10676
10709
  }
10677
10710
  /** No positional arguments, or a usage refusal. */
10678
10711
  function noExtra$15(rest) {
10679
- if (rest.length > 0) throw new UsageError(USAGE$39);
10712
+ if (rest.length > 0) throw new UsageError(USAGE$41);
10680
10713
  }
10681
10714
  /** The `application cache*|routes|route-*` renderer. */
10682
10715
  function applicationCacheText(report) {
@@ -10701,7 +10734,7 @@ function routeLines(page) {
10701
10734
  }
10702
10735
  //#endregion
10703
10736
  //#region src/commands/application-create.ts
10704
- var USAGE$38 = [
10737
+ var USAGE$40 = [
10705
10738
  "Usage: hostingctl application create <environment-uuid> --company <slug> --type <wordpress|moodle> --name <name>",
10706
10739
  " --cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
10707
10740
  " [--replicas <count>] [--label <text>] [--hostname <host>]",
@@ -10719,11 +10752,11 @@ var USAGE$38 = [
10719
10752
  var TYPES = /* @__PURE__ */ new Set(["wordpress", "moodle"]);
10720
10753
  /** `application create <env> …`, from the `application` command. */
10721
10754
  async function applicationCreate(context, path, rest) {
10722
- if (rest.length > 0) throw new UsageError(USAGE$38);
10755
+ if (rest.length > 0) throw new UsageError(USAGE$40);
10723
10756
  const type = context.flags.get("--type")?.trim().toLowerCase() ?? "";
10724
- if (!TYPES.has(type)) throw new UsageError(`create needs --type wordpress or moodle.\n\n${USAGE$38}`);
10757
+ if (!TYPES.has(type)) throw new UsageError(`create needs --type wordpress or moodle.\n\n${USAGE$40}`);
10725
10758
  const name = context.flags.get("--name")?.trim() ?? "";
10726
- if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$38}`);
10759
+ if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$40}`);
10727
10760
  const resources = {
10728
10761
  cpuRequestMillicores: required$2(context, "--cpu-request"),
10729
10762
  cpuLimitMillicores: required$2(context, "--cpu-limit"),
@@ -10757,7 +10790,7 @@ async function applicationCreate(context, path, rest) {
10757
10790
  /** One required whole-number flag, or a usage refusal naming the flag. */
10758
10791
  function required$2(context, flag) {
10759
10792
  const value = wholeNumberFlag(context.flags, flag);
10760
- if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$38}`);
10793
+ if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$40}`);
10761
10794
  return value;
10762
10795
  }
10763
10796
  //#endregion
@@ -10787,7 +10820,7 @@ function requiredFlag$2(context, flag, usage) {
10787
10820
  }
10788
10821
  //#endregion
10789
10822
  //#region src/commands/application-upload.ts
10790
- var USAGE$37 = [
10823
+ var USAGE$39 = [
10791
10824
  "Usage: hostingctl application import-upload <environment-uuid> <application-uuid> --company <slug>",
10792
10825
  " --database <path-to.sql> [--archive <path-to.zip> | --directory <dir>]",
10793
10826
  "",
@@ -10803,11 +10836,11 @@ var USAGE$37 = [
10803
10836
  ].join("\n");
10804
10837
  /** `application import-upload`, which stages a client site for review. */
10805
10838
  async function applicationUpload(context, path, rest) {
10806
- if (rest.length > 0) throw new UsageError(USAGE$37);
10807
- const database = requiredFlag$2(context, "--database", USAGE$37);
10839
+ if (rest.length > 0) throw new UsageError(USAGE$39);
10840
+ const database = requiredFlag$2(context, "--database", USAGE$39);
10808
10841
  const archive = context.flags.get("--archive")?.trim() ?? "";
10809
10842
  const directory = context.flags.get("--directory")?.trim() ?? "";
10810
- if (archive !== "" && directory !== "") throw new UsageError(`Send the site files as either --archive or --directory, not both.\n\n${USAGE$37}`);
10843
+ if (archive !== "" && directory !== "") throw new UsageError(`Send the site files as either --archive or --directory, not both.\n\n${USAGE$39}`);
10811
10844
  const databaseBytes = await sizeOf(database, "database");
10812
10845
  const files = directory === "" ? [] : await manifestOf(directory);
10813
10846
  const fileBytes = directory === "" ? 0 : await totalSize(files);
@@ -10885,7 +10918,7 @@ function describe(bytes) {
10885
10918
  }
10886
10919
  //#endregion
10887
10920
  //#region src/commands/application-import.ts
10888
- var USAGE$36 = [
10921
+ var USAGE$38 = [
10889
10922
  "Usage: hostingctl application import <environment-uuid> <application-uuid> <import-uuid> --company <slug>",
10890
10923
  " hostingctl application import-upload <environment-uuid> <application-uuid> --company <slug>",
10891
10924
  " --database <path-to.sql> [--archive <path-to.zip> | --directory <dir>]",
@@ -10907,7 +10940,7 @@ async function applicationImport(context, action, path, rest) {
10907
10940
  if (action === "url-repair-preview") return await previewRepair(context, path, rest);
10908
10941
  if (action === "import-upload") return await applicationUpload(context, path, rest);
10909
10942
  const [importUuid, ...extra] = rest;
10910
- if (importUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$36);
10943
+ if (importUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$38);
10911
10944
  if (action === "import") return {
10912
10945
  kind: "import",
10913
10946
  staged: (await hostingWordpressImportShowImport({ path: {
@@ -10920,13 +10953,13 @@ async function applicationImport(context, action, path, rest) {
10920
10953
  importUuid
10921
10954
  } })).data));
10922
10955
  if (action === "url-repair-confirm") return await confirmRepair(context, path, importUuid);
10923
- throw new UsageError(USAGE$36);
10956
+ throw new UsageError(USAGE$38);
10924
10957
  }
10925
10958
  /** `url-repair-preview --source-url …`: the review a confirmation is made against. */
10926
10959
  async function previewRepair(context, path, rest) {
10927
- if (rest.length > 0) throw new UsageError(USAGE$36);
10960
+ if (rest.length > 0) throw new UsageError(USAGE$38);
10928
10961
  const sourceUrl = context.flags.get("--source-url")?.trim() ?? "";
10929
- if (sourceUrl === "") throw new UsageError(`url-repair-preview needs --source-url.\n\n${USAGE$36}`);
10962
+ if (sourceUrl === "") throw new UsageError(`url-repair-preview needs --source-url.\n\n${USAGE$38}`);
10930
10963
  return {
10931
10964
  kind: "url-repair",
10932
10965
  recovery: (await hostingWordpressUrlRepairPreview({
@@ -10938,7 +10971,7 @@ async function previewRepair(context, path, rest) {
10938
10971
  /** `url-repair-confirm <recovery> --confirmation …`: the typed text the review asked for. */
10939
10972
  async function confirmRepair(context, path, recoveryUuid) {
10940
10973
  const confirmation = context.flags.get("--confirmation")?.trim() ?? "";
10941
- if (confirmation === "") throw new UsageError(`url-repair-confirm needs --confirmation.\n\n${USAGE$36}`);
10974
+ if (confirmation === "") throw new UsageError(`url-repair-confirm needs --confirmation.\n\n${USAGE$38}`);
10942
10975
  return await written$3(confirmableWrite(context, `Confirm the URL repair by typing its confirmation ("${confirmation}").`, async () => {
10943
10976
  const desiredGeneration = (await hostingEnvironmentShow({ path })).data.desiredGeneration;
10944
10977
  const body = {
@@ -10989,7 +11022,7 @@ function recoveryLines(one) {
10989
11022
  }
10990
11023
  //#endregion
10991
11024
  //#region src/commands/application-recovery.ts
10992
- var USAGE$35 = [
11025
+ var USAGE$37 = [
10993
11026
  "Usage: hostingctl application recovery-review <environment-uuid> <application-uuid> --company <slug>",
10994
11027
  " hostingctl application recovery-confirm <environment-uuid> <application-uuid> --company <slug> --confirmation <text>",
10995
11028
  "",
@@ -11005,16 +11038,16 @@ var USAGE$35 = [
11005
11038
  ].join("\n");
11006
11039
  /** `application recovery-review|recovery-confirm`. */
11007
11040
  async function applicationRecovery(context, action, path, rest) {
11008
- if (rest.length > 0) throw new UsageError(USAGE$35);
11041
+ if (rest.length > 0) throw new UsageError(USAGE$37);
11009
11042
  const review = (await hostingApplicationRecoveryShow({ path })).data;
11010
11043
  if (action === "recovery-review") return {
11011
11044
  kind: "recovery-review",
11012
11045
  review
11013
11046
  };
11014
- if (action !== "recovery-confirm") throw new UsageError(USAGE$35);
11047
+ if (action !== "recovery-confirm") throw new UsageError(USAGE$37);
11015
11048
  if (review.blockedReason !== null) throw new UsageError(`This restore is blocked: ${review.blockedReason}`);
11016
11049
  const confirmation = context.flags.get("--confirmation")?.trim() ?? "";
11017
- if (confirmation === "") throw new UsageError(`recovery-confirm needs --confirmation.\n\n${USAGE$35}`);
11050
+ if (confirmation === "") throw new UsageError(`recovery-confirm needs --confirmation.\n\n${USAGE$37}`);
11018
11051
  return {
11019
11052
  kind: "recovery-write",
11020
11053
  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 () => {
@@ -11214,7 +11247,7 @@ function siteAccessText(report) {
11214
11247
  }
11215
11248
  //#endregion
11216
11249
  //#region src/commands/application-site-access.ts
11217
- var USAGE$34 = [
11250
+ var USAGE$36 = [
11218
11251
  "Usage: hostingctl application site-access <environment-uuid> <application-uuid> --company <slug>",
11219
11252
  " hostingctl application site-access-set <environment-uuid> <application-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
11220
11253
  " hostingctl application site-access-rotate <environment-uuid> <application-uuid> --company <slug>",
@@ -11257,10 +11290,10 @@ var flow$1 = siteAccessFlow({
11257
11290
  refresh: async (path) => (await hostingApplicationSiteAccessUsersRefresh({ path })).data,
11258
11291
  destroy: async (path) => (await hostingApplicationSiteAccessUsersDestroy({ path })).data,
11259
11292
  rotate: async (path) => (await hostingApplicationSiteAccessRotate({ path })).data
11260
- }, USAGE$34);
11293
+ }, USAGE$36);
11261
11294
  /** `application site-access*|site-user*`, which the application dispatcher calls with its resolved path. */
11262
11295
  async function applicationSiteAccess(context, action, path, rest) {
11263
- if (rest.some((one) => one === "")) throw new UsageError(USAGE$34);
11296
+ if (rest.some((one) => one === "")) throw new UsageError(USAGE$36);
11264
11297
  return await flow$1(context, action, path, rest);
11265
11298
  }
11266
11299
  //#endregion
@@ -11272,7 +11305,7 @@ async function applicationSiteAccess(context, action, path, rest) {
11272
11305
  * paused. It starts no build and promotes nothing. The pause is the customer's own control: while it holds, a push to
11273
11306
  * the bound ref is read and matched but builds nothing, and the release that is serving is untouched either way.
11274
11307
  */
11275
- var USAGE$33 = [
11308
+ var USAGE$35 = [
11276
11309
  "Usage: hostingctl application updates <environment-uuid> <application-uuid> --company <slug>",
11277
11310
  " hostingctl application updates-pause <environment-uuid> <application-uuid> --company <slug>",
11278
11311
  " hostingctl application updates-resume <environment-uuid> <application-uuid> --company <slug>",
@@ -11285,7 +11318,7 @@ var USAGE$33 = [
11285
11318
  "Both writes need --confirm; --dry-run describes the change without sending it."
11286
11319
  ].join("\n");
11287
11320
  async function applicationUpdates(context, action, path, rest) {
11288
- if (rest.length > 0) throw new UsageError(USAGE$33);
11321
+ if (rest.length > 0) throw new UsageError(USAGE$35);
11289
11322
  if (action === "updates") return {
11290
11323
  kind: "updates",
11291
11324
  surface: (await hostingApplicationUpdatesShow({ path })).data
@@ -11297,7 +11330,7 @@ async function applicationUpdates(context, action, path, rest) {
11297
11330
  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)
11298
11331
  };
11299
11332
  }
11300
- throw new UsageError(USAGE$33);
11333
+ throw new UsageError(USAGE$35);
11301
11334
  }
11302
11335
  /**
11303
11336
  * The update state in words.
@@ -11585,83 +11618,83 @@ var APPLICATION_METADATA = {
11585
11618
  var APPLICATION_TOPICS = [
11586
11619
  {
11587
11620
  path: ["create"],
11588
- usage: USAGE$38
11621
+ usage: USAGE$40
11589
11622
  },
11590
11623
  {
11591
11624
  path: ["build-log"],
11592
- usage: USAGE$40
11625
+ usage: USAGE$42
11593
11626
  },
11594
11627
  {
11595
11628
  path: ["build-retry"],
11596
- usage: USAGE$40
11629
+ usage: USAGE$42
11597
11630
  },
11598
11631
  {
11599
11632
  path: ["build-cancel"],
11600
- usage: USAGE$40
11633
+ usage: USAGE$42
11601
11634
  },
11602
11635
  {
11603
11636
  path: ["source-bind"],
11604
- usage: USAGE$40
11637
+ usage: USAGE$42
11605
11638
  },
11606
11639
  {
11607
11640
  path: ["source-unbind"],
11608
- usage: USAGE$40
11641
+ usage: USAGE$42
11609
11642
  },
11610
11643
  {
11611
11644
  path: ["cache"],
11612
- usage: USAGE$39
11645
+ usage: USAGE$41
11613
11646
  },
11614
11647
  {
11615
11648
  path: ["cache-set"],
11616
- usage: USAGE$39
11649
+ usage: USAGE$41
11617
11650
  },
11618
11651
  {
11619
11652
  path: ["cache-purge"],
11620
- usage: USAGE$39
11653
+ usage: USAGE$41
11621
11654
  },
11622
11655
  {
11623
11656
  path: ["routes"],
11624
- usage: USAGE$39
11657
+ usage: USAGE$41
11625
11658
  },
11626
11659
  {
11627
11660
  path: ["route-add"],
11628
- usage: USAGE$39
11661
+ usage: USAGE$41
11629
11662
  },
11630
11663
  {
11631
11664
  path: ["route-remove"],
11632
- usage: USAGE$39
11665
+ usage: USAGE$41
11633
11666
  },
11634
11667
  {
11635
11668
  path: ["canonical"],
11636
- usage: USAGE$39
11669
+ usage: USAGE$41
11637
11670
  },
11638
11671
  {
11639
11672
  path: ["import"],
11640
- usage: USAGE$36
11673
+ usage: USAGE$38
11641
11674
  },
11642
11675
  {
11643
11676
  path: ["import-upload"],
11644
- usage: USAGE$37
11677
+ usage: USAGE$39
11645
11678
  },
11646
11679
  {
11647
11680
  path: ["import-discard"],
11648
- usage: USAGE$36
11681
+ usage: USAGE$38
11649
11682
  },
11650
11683
  {
11651
11684
  path: ["url-repair-preview"],
11652
- usage: USAGE$36
11685
+ usage: USAGE$38
11653
11686
  },
11654
11687
  {
11655
11688
  path: ["url-repair-confirm"],
11656
- usage: USAGE$36
11689
+ usage: USAGE$38
11657
11690
  },
11658
11691
  {
11659
11692
  path: ["recovery-review"],
11660
- usage: USAGE$35
11693
+ usage: USAGE$37
11661
11694
  },
11662
11695
  {
11663
11696
  path: ["recovery-confirm"],
11664
- usage: USAGE$35
11697
+ usage: USAGE$37
11665
11698
  },
11666
11699
  {
11667
11700
  path: ["runtime"],
@@ -11669,59 +11702,59 @@ var APPLICATION_TOPICS = [
11669
11702
  },
11670
11703
  {
11671
11704
  path: ["site-access"],
11672
- usage: USAGE$34
11705
+ usage: USAGE$36
11673
11706
  },
11674
11707
  {
11675
11708
  path: ["site-access-set"],
11676
- usage: USAGE$34
11709
+ usage: USAGE$36
11677
11710
  },
11678
11711
  {
11679
11712
  path: ["site-access-rotate"],
11680
- usage: USAGE$34
11713
+ usage: USAGE$36
11681
11714
  },
11682
11715
  {
11683
11716
  path: ["site-users"],
11684
- usage: USAGE$34
11717
+ usage: USAGE$36
11685
11718
  },
11686
11719
  {
11687
11720
  path: ["site-user"],
11688
- usage: USAGE$34
11721
+ usage: USAGE$36
11689
11722
  },
11690
11723
  {
11691
11724
  path: ["updates"],
11692
- usage: USAGE$33
11725
+ usage: USAGE$35
11693
11726
  },
11694
11727
  {
11695
11728
  path: ["updates-pause"],
11696
- usage: USAGE$33
11729
+ usage: USAGE$35
11697
11730
  },
11698
11731
  {
11699
11732
  path: ["updates-resume"],
11700
- usage: USAGE$33
11733
+ usage: USAGE$35
11701
11734
  },
11702
11735
  {
11703
11736
  path: ["administrator"],
11704
- usage: USAGE$41
11737
+ usage: USAGE$43
11705
11738
  },
11706
11739
  {
11707
11740
  path: ["administrator-reset"],
11708
- usage: USAGE$41
11741
+ usage: USAGE$43
11709
11742
  },
11710
11743
  {
11711
11744
  path: ["administrator-reveal"],
11712
- usage: USAGE$41
11745
+ usage: USAGE$43
11713
11746
  },
11714
11747
  {
11715
11748
  path: ["recovery-status"],
11716
- usage: USAGE$41
11749
+ usage: USAGE$43
11717
11750
  },
11718
11751
  {
11719
11752
  path: ["recovery-retry"],
11720
- usage: USAGE$41
11753
+ usage: USAGE$43
11721
11754
  },
11722
11755
  {
11723
11756
  path: ["recovery-cancel"],
11724
- usage: USAGE$41
11757
+ usage: USAGE$43
11725
11758
  }
11726
11759
  ];
11727
11760
  //#endregion
@@ -12787,7 +12820,7 @@ function episode(rest) {
12787
12820
  }
12788
12821
  //#endregion
12789
12822
  //#region src/commands/company-assets.ts
12790
- var USAGE$32 = [
12823
+ var USAGE$34 = [
12791
12824
  "Usage: hostingctl company logo|favicon set --image-file <path> --company <slug>",
12792
12825
  " hostingctl company logo|favicon remove --company <slug>",
12793
12826
  "",
@@ -12802,17 +12835,17 @@ var USAGE$32 = [
12802
12835
  */
12803
12836
  async function companyAssets(context, asset, rest) {
12804
12837
  const [action, ...tail] = rest;
12805
- if (tail.length > 0) throw new UsageError(USAGE$32);
12838
+ if (tail.length > 0) throw new UsageError(USAGE$34);
12806
12839
  const company = await requireCompany(context.flags);
12807
12840
  if (action === "set") return await set(context, asset, company);
12808
12841
  if (action === "remove") return await remove$2(context, asset, company);
12809
- throw new UsageError(USAGE$32);
12842
+ throw new UsageError(USAGE$34);
12810
12843
  }
12811
12844
  /** `set --image-file …`: one multipart upload of the asset. */
12812
12845
  async function set(context, asset, company) {
12813
12846
  const file = context.flags.get("--image-file") ?? "";
12814
12847
  return await confirmableWrite(context, file === "" ? `Set ${company}'s ${asset}.` : `Set ${company}'s ${asset} to ${file}.`, async () => {
12815
- const body = await imageUpload(file, USAGE$32);
12848
+ const body = await imageUpload(file, USAGE$34);
12816
12849
  return asset === "logo" ? (await companyAssetStoreLogo({
12817
12850
  path: { company },
12818
12851
  body
@@ -12850,7 +12883,7 @@ function companyRole(raw, usage) {
12850
12883
  }
12851
12884
  //#endregion
12852
12885
  //#region src/commands/company-invitations.ts
12853
- var USAGE$31 = [
12886
+ var USAGE$33 = [
12854
12887
  "Usage: hostingctl company invitations --company <slug>",
12855
12888
  " hostingctl company invite --company <slug> --email <email> --name <name> --role <admin|member>",
12856
12889
  " hostingctl company cancel-invitation <invitation-uuid> --company <slug>",
@@ -12874,7 +12907,7 @@ var MAX_INVITATION_TOKEN_BYTES = 4096;
12874
12907
  */
12875
12908
  async function companyInvitations(context, subcommand, rest) {
12876
12909
  if (subcommand === "invitations") {
12877
- if (rest.length > 0) throw new UsageError(USAGE$31);
12910
+ if (rest.length > 0) throw new UsageError(USAGE$33);
12878
12911
  const company = await requireCompany(context.flags);
12879
12912
  return {
12880
12913
  kind: "invitations",
@@ -12885,20 +12918,20 @@ async function companyInvitations(context, subcommand, rest) {
12885
12918
  if (subcommand === "invite") return await invite(context, rest);
12886
12919
  if (subcommand === "cancel-invitation") return await cancel(context, rest);
12887
12920
  if (subcommand === "invitation-preview") return (await companyInvitationPreview({
12888
- path: { invitationUuid: oneUuid$7(rest, USAGE$31) },
12889
- body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$31) }
12921
+ path: { invitationUuid: oneUuid$7(rest, USAGE$33) },
12922
+ body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$33) }
12890
12923
  })).data;
12891
12924
  if (subcommand === "invitation-accept") return await accept(context, rest);
12892
- throw new UsageError(USAGE$31);
12925
+ throw new UsageError(USAGE$33);
12893
12926
  }
12894
12927
  /** `invite --email … --name … --role …`. */
12895
12928
  async function invite(context, rest) {
12896
- if (rest.length > 0) throw new UsageError(USAGE$31);
12929
+ if (rest.length > 0) throw new UsageError(USAGE$33);
12897
12930
  const company = await requireCompany(context.flags);
12898
12931
  const email = context.flags.get("--email")?.trim() ?? "";
12899
12932
  const name = context.flags.get("--name")?.trim() ?? "";
12900
- const role = companyRole(context.flags.get("--role"), USAGE$31);
12901
- if (email === "" || name === "") throw new UsageError(`invite needs --email and --name.\n\n${USAGE$31}`);
12933
+ const role = companyRole(context.flags.get("--role"), USAGE$33);
12934
+ if (email === "" || name === "") throw new UsageError(`invite needs --email and --name.\n\n${USAGE$33}`);
12902
12935
  return await confirmableWrite(context, `Invite ${name} <${email}> into ${company} as ${role}.`, async () => (await companyInvitationStore({
12903
12936
  path: { company },
12904
12937
  body: {
@@ -12910,7 +12943,7 @@ async function invite(context, rest) {
12910
12943
  }
12911
12944
  /** `cancel-invitation <uuid> --company …`. */
12912
12945
  async function cancel(context, rest) {
12913
- const invitationUuid = oneUuid$7(rest, USAGE$31);
12946
+ const invitationUuid = oneUuid$7(rest, USAGE$33);
12914
12947
  const company = await requireCompany(context.flags);
12915
12948
  return await confirmableWrite(context, `Cancel invitation ${invitationUuid}.`, async () => {
12916
12949
  return (await companyInvitationDestroy({ path: {
@@ -12921,11 +12954,11 @@ async function cancel(context, rest) {
12921
12954
  }
12922
12955
  /** `invitation-accept <uuid>`: join the company the invitation names. */
12923
12956
  async function accept(context, rest) {
12924
- const invitationUuid = oneUuid$7(rest, USAGE$31);
12957
+ const invitationUuid = oneUuid$7(rest, USAGE$33);
12925
12958
  return await confirmableWrite(context, `Accept invitation ${invitationUuid}.`, async () => {
12926
12959
  return (await companyInvitationAccept({
12927
12960
  path: { invitationUuid },
12928
- body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$31) }
12961
+ body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$33) }
12929
12962
  })).data;
12930
12963
  });
12931
12964
  }
@@ -13026,31 +13059,31 @@ var COMPANY_METADATA = {
13026
13059
  var COMPANY_TOPICS = [
13027
13060
  {
13028
13061
  path: ["logo"],
13029
- usage: USAGE$32
13062
+ usage: USAGE$34
13030
13063
  },
13031
13064
  {
13032
13065
  path: ["favicon"],
13033
- usage: USAGE$32
13066
+ usage: USAGE$34
13034
13067
  },
13035
13068
  {
13036
13069
  path: ["invitations"],
13037
- usage: USAGE$31
13070
+ usage: USAGE$33
13038
13071
  },
13039
13072
  {
13040
13073
  path: ["invite"],
13041
- usage: USAGE$31
13074
+ usage: USAGE$33
13042
13075
  },
13043
13076
  {
13044
13077
  path: ["cancel-invitation"],
13045
- usage: USAGE$31
13078
+ usage: USAGE$33
13046
13079
  },
13047
13080
  {
13048
13081
  path: ["invitation-preview"],
13049
- usage: USAGE$31
13082
+ usage: USAGE$33
13050
13083
  },
13051
13084
  {
13052
13085
  path: ["invitation-accept"],
13053
- usage: USAGE$31
13086
+ usage: USAGE$33
13054
13087
  }
13055
13088
  ];
13056
13089
  //#endregion
@@ -13871,7 +13904,7 @@ function readJsonObject(file, subject) {
13871
13904
  }
13872
13905
  //#endregion
13873
13906
  //#region src/commands/dns-records.ts
13874
- var USAGE$30 = [
13907
+ var USAGE$32 = [
13875
13908
  "Usage: hostingctl dns enable <domain-uuid> --company <slug>",
13876
13909
  " hostingctl dns record set <domain-uuid> --company <slug> --file <set.json>",
13877
13910
  " hostingctl dns record remove <domain-uuid> --company <slug> --name <relative> --type <type>",
@@ -13910,7 +13943,7 @@ async function dnsWrites(context, subcommand, rest) {
13910
13943
  if (subcommand === "record") return await record$4(context, rest);
13911
13944
  if (subcommand === "dnssec") return await changeDnssec(context, rest);
13912
13945
  if (subcommand === "handover") return await handover(context, rest);
13913
- throw new UsageError(USAGE$30);
13946
+ throw new UsageError(USAGE$32);
13914
13947
  }
13915
13948
  /** The zone's current desired generation, which every write must name. */
13916
13949
  async function generation(company, domainUuid) {
@@ -13921,7 +13954,7 @@ async function generation(company, domainUuid) {
13921
13954
  }
13922
13955
  /** `dns enable <uuid>`: take the zone over into managed DNS. */
13923
13956
  async function enable(context, rest) {
13924
- const domainUuid = oneUuid$7(rest, USAGE$30);
13957
+ const domainUuid = oneUuid$7(rest, USAGE$32);
13925
13958
  const company = await requireCompany(context.flags);
13926
13959
  return await confirmableWrite(context, "Publish this name's zone in managed DNS.", async () => (await domainsDnsStore({ path: {
13927
13960
  company,
@@ -13931,16 +13964,16 @@ async function enable(context, rest) {
13931
13964
  /** `dns record set|remove`. */
13932
13965
  async function record$4(context, rest) {
13933
13966
  const [action, ...tail] = rest;
13934
- const domainUuid = oneUuid$7(tail, USAGE$30);
13967
+ const domainUuid = oneUuid$7(tail, USAGE$32);
13935
13968
  const company = await requireCompany(context.flags);
13936
13969
  if (action === "set") return await setRecord(context, company, domainUuid);
13937
13970
  if (action === "remove") return await removeRecord(context, company, domainUuid);
13938
- throw new UsageError(USAGE$30);
13971
+ throw new UsageError(USAGE$32);
13939
13972
  }
13940
13973
  /** `record set --file`: replace one set with the file's own values. */
13941
13974
  async function setRecord(context, company, domainUuid) {
13942
13975
  const file = context.flags.get("--file") ?? "";
13943
- if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$30}`);
13976
+ if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$32}`);
13944
13977
  const set = recordSetFromFile(file);
13945
13978
  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 () => {
13946
13979
  const body = {
@@ -13960,7 +13993,7 @@ async function setRecord(context, company, domainUuid) {
13960
13993
  async function removeRecord(context, company, domainUuid) {
13961
13994
  const relativeName = context.flags.get("--name") ?? "";
13962
13995
  const recordType = recordTypeFlag(context);
13963
- if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$30}`);
13996
+ if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$32}`);
13964
13997
  return await confirmableWrite(context, `Remove the ${recordType.toUpperCase()} set "${relativeName}".`, async () => {
13965
13998
  const query = {
13966
13999
  relativeName,
@@ -13979,8 +14012,8 @@ async function removeRecord(context, company, domainUuid) {
13979
14012
  /** `dns dnssec <signed|unsigned> <uuid>`: the signing mode, with the confirmation the API requires. */
13980
14013
  async function changeDnssec(context, rest) {
13981
14014
  const [mode, uuid, ...extra] = rest;
13982
- if (mode === void 0 || mode !== "signed" && mode !== "unsigned" || extra.length > 0) throw new UsageError(USAGE$30);
13983
- const domainUuid = oneUuid$7(uuid === void 0 ? [] : [uuid], USAGE$30);
14015
+ if (mode === void 0 || mode !== "signed" && mode !== "unsigned" || extra.length > 0) throw new UsageError(USAGE$32);
14016
+ const domainUuid = oneUuid$7(uuid === void 0 ? [] : [uuid], USAGE$32);
13984
14017
  const company = await requireCompany(context.flags);
13985
14018
  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 () => {
13986
14019
  const body = {
@@ -13999,7 +14032,7 @@ async function changeDnssec(context, rest) {
13999
14032
  }
14000
14033
  /** `dns handover <uuid>`: hand the zone back, dropping what this platform publishes. */
14001
14034
  async function handover(context, rest) {
14002
- const domainUuid = oneUuid$7(rest, USAGE$30);
14035
+ const domainUuid = oneUuid$7(rest, USAGE$32);
14003
14036
  const company = await requireCompany(context.flags);
14004
14037
  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 () => {
14005
14038
  const body = {
@@ -14018,7 +14051,7 @@ async function handover(context, rest) {
14018
14051
  /** A record type flag, refused when it is not one of the API's own values. */
14019
14052
  function recordTypeFlag(context) {
14020
14053
  const raw = (context.flags.get("--type") ?? "").trim().toLowerCase();
14021
- if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$30}`);
14054
+ if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$32}`);
14022
14055
  return raw;
14023
14056
  }
14024
14057
  /**
@@ -14052,7 +14085,7 @@ function recordSetFromValue(value, subject) {
14052
14085
  }
14053
14086
  //#endregion
14054
14087
  //#region src/commands/dns-templates.ts
14055
- var USAGE$29 = [
14088
+ var USAGE$31 = [
14056
14089
  "Usage: hostingctl dns template list --company <slug>",
14057
14090
  " hostingctl dns template show <template-uuid> --company <slug>",
14058
14091
  " hostingctl dns template save [<template-uuid>] --company <slug> --file <template.json>",
@@ -14074,24 +14107,24 @@ var USAGE$29 = [
14074
14107
  async function dnsTemplates(context, rest) {
14075
14108
  const [action, ...tail] = rest;
14076
14109
  if (action === "list") {
14077
- if (tail.length > 0) throw new UsageError(USAGE$29);
14110
+ if (tail.length > 0) throw new UsageError(USAGE$31);
14078
14111
  return {
14079
14112
  kind: "templates",
14080
14113
  templates: (await dnsTemplatesIndex({ path: { company: await requireCompany(context.flags) } })).data.templates
14081
14114
  };
14082
14115
  }
14083
- if (action === "show") return await show$4(context, oneUuid$7(tail, USAGE$29));
14116
+ if (action === "show") return await show$4(context, oneUuid$7(tail, USAGE$31));
14084
14117
  if (action === "save") return await save$1(context, tail[0]);
14085
- if (action === "delete") return await destroy$1(context, oneUuid$7(tail, USAGE$29));
14086
- if (action === "from-zone") return await fromZone(context, oneUuid$7(tail, USAGE$29));
14118
+ if (action === "delete") return await destroy$1(context, oneUuid$7(tail, USAGE$31));
14119
+ if (action === "from-zone") return await fromZone(context, oneUuid$7(tail, USAGE$31));
14087
14120
  if (action === "preview") return await preview$1(context, tail);
14088
14121
  if (action === "apply") return await apply(context, tail);
14089
- throw new UsageError(USAGE$29);
14122
+ throw new UsageError(USAGE$31);
14090
14123
  }
14091
14124
  /** Two uuids: the template, then the zone it applies to. */
14092
14125
  function templateAndZone(rest) {
14093
14126
  const [templateUuid, domainUuid, ...extra] = rest;
14094
- if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$29);
14127
+ if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$31);
14095
14128
  return {
14096
14129
  templateUuid,
14097
14130
  domainUuid
@@ -14110,7 +14143,7 @@ async function show$4(context, templateUuid) {
14110
14143
  /** `save [<uuid>] --file …`: record a new template, or replace the one named. */
14111
14144
  async function save$1(context, templateUuid) {
14112
14145
  const file = context.flags.get("--file") ?? "";
14113
- if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$29}`);
14146
+ if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$31}`);
14114
14147
  const company = await requireCompany(context.flags);
14115
14148
  const document = readJsonObject(file, "template");
14116
14149
  const name = typeof document.name === "string" ? document.name.trim() : "";
@@ -14146,7 +14179,7 @@ async function destroy$1(context, templateUuid) {
14146
14179
  async function fromZone(context, domainUuid) {
14147
14180
  const company = await requireCompany(context.flags);
14148
14181
  const name = context.flags.get("--name")?.trim() ?? "";
14149
- if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$29}`);
14182
+ if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$31}`);
14150
14183
  const zone = (await domainsDnsShow({ path: {
14151
14184
  company,
14152
14185
  domainUuid
@@ -14216,7 +14249,7 @@ function recordSetsFromFile$1(document, subject) {
14216
14249
  }
14217
14250
  //#endregion
14218
14251
  //#region src/commands/dns-text.ts
14219
- var USAGE$28 = [
14252
+ var USAGE$30 = [
14220
14253
  "Usage: hostingctl dns <zone|export> <domain-uuid> --company <slug>",
14221
14254
  " hostingctl dns import <preview|apply> <domain-uuid> --company <slug> --file <path> [--confirm]",
14222
14255
  " hostingctl dns enable <domain-uuid> --company <slug>",
@@ -14287,7 +14320,7 @@ function applyText(result) {
14287
14320
  var DNS_METADATA = {
14288
14321
  name: "dns",
14289
14322
  summary: "A managed name's zone, its zone-file export, and the reviewed import write.",
14290
- usage: USAGE$28,
14323
+ usage: USAGE$30,
14291
14324
  flags: [
14292
14325
  {
14293
14326
  name: "--file",
@@ -14325,23 +14358,23 @@ var DNS_METADATA = {
14325
14358
  var DNS_TOPICS = [
14326
14359
  {
14327
14360
  path: ["enable"],
14328
- usage: USAGE$30
14361
+ usage: USAGE$32
14329
14362
  },
14330
14363
  {
14331
14364
  path: ["record"],
14332
- usage: USAGE$30
14365
+ usage: USAGE$32
14333
14366
  },
14334
14367
  {
14335
14368
  path: ["dnssec"],
14336
- usage: USAGE$30
14369
+ usage: USAGE$32
14337
14370
  },
14338
14371
  {
14339
14372
  path: ["handover"],
14340
- usage: USAGE$30
14373
+ usage: USAGE$32
14341
14374
  },
14342
14375
  {
14343
14376
  path: ["template"],
14344
- usage: USAGE$29
14377
+ usage: USAGE$31
14345
14378
  }
14346
14379
  ];
14347
14380
  //#endregion
@@ -14359,7 +14392,7 @@ var IMPORT_LINE = /^(\S+)\s+(\d+)\s+(\S+)\s+(.+)$/;
14359
14392
  * hold customer DNS data, so its contents are never printed; only the API's own answer is shown.
14360
14393
  */
14361
14394
  function recordSetsFromFile(file) {
14362
- if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$28}`);
14395
+ if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$30}`);
14363
14396
  const sets = /* @__PURE__ */ new Map();
14364
14397
  for (const [index, raw] of readBoundedImportFile(file, "import").split("\n").entries()) addLine(sets, raw.trim(), index + 1);
14365
14398
  if (sets.size === 0) throw new UsageError(`The import file [${file}] holds no record sets.`);
@@ -14453,7 +14486,7 @@ var dns = {
14453
14486
  if (subcommand === "import") return await importRecords(context, rest);
14454
14487
  if (subcommand === "template") return await dnsTemplates(context, rest);
14455
14488
  if (WRITE_SUBCOMMANDS$1.has(subcommand ?? "")) return await dnsWrites(context, subcommand ?? "", rest);
14456
- throw new UsageError(USAGE$28);
14489
+ throw new UsageError(USAGE$30);
14457
14490
  },
14458
14491
  human(report) {
14459
14492
  if ("sent" in report) return renderWriteOutcome(report, dnsWriteText);
@@ -14472,7 +14505,7 @@ async function readZone(context, rest, which) {
14472
14505
  /** `import preview|apply <uuid> --file <path>`: the review, or the reviewed write. */
14473
14506
  async function importRecords(context, rest) {
14474
14507
  const [action, ...tail] = rest;
14475
- if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$28);
14508
+ if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$30);
14476
14509
  const path = await domainPath$1(context, tail);
14477
14510
  const recordSets = recordSetsFromFile(context.flags.get("--file"));
14478
14511
  if (action === "preview") return (await domainsDnsImportPreview({
@@ -14509,7 +14542,7 @@ async function applyImport(context, path, recordSets) {
14509
14542
  /** The company and the one domain uuid a DNS subcommand needs, or a usage refusal. */
14510
14543
  async function domainPath$1(context, rest) {
14511
14544
  const [domainUuid, ...extra] = rest;
14512
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
14545
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
14513
14546
  return {
14514
14547
  company: await requireCompany(context.flags),
14515
14548
  domainUuid
@@ -14678,7 +14711,7 @@ function checkText(check) {
14678
14711
  //#endregion
14679
14712
  //#region src/commands/email-alias.ts
14680
14713
  /** The one usage string this group refuses with, owned by the group it belongs to. */
14681
- var USAGE$27 = [
14714
+ var USAGE$29 = [
14682
14715
  "Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
14683
14716
  " hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
14684
14717
  " hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
@@ -14702,16 +14735,16 @@ async function aliasGroup(context, action, tail) {
14702
14735
  if (action === "set") return await aliasSet(context, tail);
14703
14736
  if (action === "remove") return await aliasRemove(context, tail);
14704
14737
  if (action === "unroute") return await aliasUnroute(context, tail);
14705
- throw new UsageError(USAGE$27);
14738
+ throw new UsageError(USAGE$29);
14706
14739
  }
14707
14740
  /** `alias add <domain> --local … --destinations …`: a new forwarding address. */
14708
14741
  async function aliasAdd(context, tail) {
14709
14742
  const [emailDomainUuid, ...extra] = tail;
14710
- if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
14743
+ if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$29);
14711
14744
  const company = await requireCompany(context.flags);
14712
14745
  const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
14713
14746
  const list = destinations$1(context);
14714
- if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$27}`);
14747
+ if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$29}`);
14715
14748
  return await confirmableWrite(context, [`Create ${localPart}@… forwarding to:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
14716
14749
  return (await emailAliasesStore({
14717
14750
  path: {
@@ -14728,10 +14761,10 @@ async function aliasAdd(context, tail) {
14728
14761
  /** `alias set <domain> <alias> --destinations …`: replace the complete recipient list. */
14729
14762
  async function aliasSet(context, tail) {
14730
14763
  const [emailDomainUuid, aliasUuid, ...extra] = tail;
14731
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
14764
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$29);
14732
14765
  const company = await requireCompany(context.flags);
14733
14766
  const list = destinations$1(context);
14734
- if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$27}`);
14767
+ if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$29}`);
14735
14768
  return await confirmableWrite(context, [`Replace ${aliasUuid}'s destinations with:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
14736
14769
  return (await emailAliasesUpdate({
14737
14770
  path: {
@@ -14746,7 +14779,7 @@ async function aliasSet(context, tail) {
14746
14779
  /** `alias remove <domain> <alias>`. */
14747
14780
  async function aliasRemove(context, tail) {
14748
14781
  const [emailDomainUuid, aliasUuid, ...extra] = tail;
14749
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
14782
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$29);
14750
14783
  const company = await requireCompany(context.flags);
14751
14784
  return await confirmableWrite(context, `Remove alias ${aliasUuid}.`, async () => {
14752
14785
  return (await emailAliasesDestroy({ path: {
@@ -14759,7 +14792,7 @@ async function aliasRemove(context, tail) {
14759
14792
  /** `alias unroute <domain> <alias> <mailbox>`: drop one destination. */
14760
14793
  async function aliasUnroute(context, tail) {
14761
14794
  const [emailDomainUuid, aliasUuid, mailboxUuid, ...extra] = tail;
14762
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
14795
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$29);
14763
14796
  const company = await requireCompany(context.flags);
14764
14797
  return await confirmableWrite(context, `Stop forwarding ${aliasUuid} to mailbox ${mailboxUuid}.`, async () => {
14765
14798
  return (await emailAliasesDestinationsDestroy({ path: {
@@ -14772,7 +14805,7 @@ async function aliasUnroute(context, tail) {
14772
14805
  }
14773
14806
  //#endregion
14774
14807
  //#region src/commands/email-address.ts
14775
- var USAGE$26 = [
14808
+ var USAGE$28 = [
14776
14809
  "Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
14777
14810
  " hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
14778
14811
  " hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
@@ -14798,13 +14831,13 @@ async function emailAddresses(context, subcommand, rest) {
14798
14831
  if (subcommand === "alias") return await aliasGroup(context, action, tail);
14799
14832
  if (subcommand === "app-token") return await appToken(context, action, tail);
14800
14833
  if (subcommand === "send-as") return await sendAs(context, action, tail);
14801
- throw new UsageError(USAGE$26);
14834
+ throw new UsageError(USAGE$28);
14802
14835
  }
14803
14836
  /** `app-token list|issue|revoke|deliver`. */
14804
14837
  async function appToken(context, action, tail) {
14805
14838
  const company = await requireCompany(context.flags);
14806
14839
  const [emailDomainUuid, mailboxUuid, third, ...extra] = tail;
14807
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$26);
14840
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
14808
14841
  const path = {
14809
14842
  company,
14810
14843
  emailDomainUuid,
@@ -14832,7 +14865,7 @@ async function appToken(context, action, tail) {
14832
14865
  }
14833
14866
  if (action === "issue" && third === void 0) {
14834
14867
  const label = context.flags.get("--label")?.trim() ?? "";
14835
- if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$26}`);
14868
+ if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$28}`);
14836
14869
  return await confirmableWrite(context, `Create an application password labelled "${label}".`, async () => {
14837
14870
  return (await emailAppTokensStore({
14838
14871
  path,
@@ -14840,7 +14873,7 @@ async function appToken(context, action, tail) {
14840
14873
  })).data;
14841
14874
  });
14842
14875
  }
14843
- if (third === void 0) throw new UsageError(USAGE$26);
14876
+ if (third === void 0) throw new UsageError(USAGE$28);
14844
14877
  const tokenPath = {
14845
14878
  ...path,
14846
14879
  tokenUuid: third
@@ -14849,14 +14882,14 @@ async function appToken(context, action, tail) {
14849
14882
  return (await emailAppTokensRevoke({ path: tokenPath })).data;
14850
14883
  });
14851
14884
  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);
14852
- throw new UsageError(USAGE$26);
14885
+ throw new UsageError(USAGE$28);
14853
14886
  }
14854
14887
  /** `send-as list|grant|revoke`. */
14855
14888
  async function sendAs(context, action, tail) {
14856
14889
  const company = await requireCompany(context.flags);
14857
14890
  if (action === "revoke") {
14858
14891
  const [grantUuid, ...extra] = tail;
14859
- if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$26);
14892
+ if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
14860
14893
  return await confirmableWrite(context, `Revoke send-as grant ${grantUuid}.`, async () => {
14861
14894
  return (await emailSendAsGrantsDestroy({ path: {
14862
14895
  company,
@@ -14865,7 +14898,7 @@ async function sendAs(context, action, tail) {
14865
14898
  });
14866
14899
  }
14867
14900
  const [emailDomainUuid, mailboxUuid, ...extra] = tail;
14868
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$26);
14901
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
14869
14902
  const path = {
14870
14903
  company,
14871
14904
  emailDomainUuid,
@@ -14892,7 +14925,7 @@ async function sendAs(context, action, tail) {
14892
14925
  }
14893
14926
  if (action === "grant") {
14894
14927
  const grantedAddressUuid = context.flags.get("--address") ?? "";
14895
- if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$26}`);
14928
+ if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$28}`);
14896
14929
  return await confirmableWrite(context, `Allow this mailbox to send as address ${grantedAddressUuid}.`, async () => {
14897
14930
  return (await emailSendAsGrantsStore({
14898
14931
  path,
@@ -14900,7 +14933,7 @@ async function sendAs(context, action, tail) {
14900
14933
  })).data;
14901
14934
  });
14902
14935
  }
14903
- throw new UsageError(USAGE$26);
14936
+ throw new UsageError(USAGE$28);
14904
14937
  }
14905
14938
  //#endregion
14906
14939
  //#region src/commands/email-write-text.ts
@@ -14969,7 +15002,7 @@ function emailAddressText(report) {
14969
15002
  }
14970
15003
  //#endregion
14971
15004
  //#region src/commands/email-domain.ts
14972
- var USAGE$25 = [
15005
+ var USAGE$27 = [
14973
15006
  "Usage: hostingctl email offer",
14974
15007
  " hostingctl email enroll --company <slug>",
14975
15008
  " hostingctl email agree --company <slug> --term <package-term-uuid>",
@@ -14990,7 +15023,7 @@ var USAGE$25 = [
14990
15023
  /** `email offer|agree|provision|domain|catch-all`, dispatched from the `email` command. */
14991
15024
  async function emailDomains(context, subcommand, rest) {
14992
15025
  if (subcommand === "offer") {
14993
- if (rest.length > 0) throw new UsageError(USAGE$25);
15026
+ if (rest.length > 0) throw new UsageError(USAGE$27);
14994
15027
  return {
14995
15028
  kind: "offers",
14996
15029
  offers: (await emailOffers({ path: { company: await requireCompany(context.flags) } })).data
@@ -15001,11 +15034,11 @@ async function emailDomains(context, subcommand, rest) {
15001
15034
  if (subcommand === "provision") return await provision(context, rest);
15002
15035
  if (subcommand === "domain") return await domain(context, rest);
15003
15036
  if (subcommand === "catch-all") return await catchAll(context, rest);
15004
- throw new UsageError(USAGE$25);
15037
+ throw new UsageError(USAGE$27);
15005
15038
  }
15006
15039
  /** A company-wide command takes no positionals. */
15007
15040
  function noExtra$12(rest) {
15008
- if (rest.length > 0) throw new UsageError(USAGE$25);
15041
+ if (rest.length > 0) throw new UsageError(USAGE$27);
15009
15042
  }
15010
15043
  /** `enroll`: create the service record and start provisioning, which is the API's own create. */
15011
15044
  async function enroll(context, rest) {
@@ -15018,7 +15051,7 @@ async function agree(context, rest) {
15018
15051
  noExtra$12(rest);
15019
15052
  const company = await requireCompany(context.flags);
15020
15053
  const packageTermUuid = context.flags.get("--term") ?? "";
15021
- if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$25}`);
15054
+ if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$27}`);
15022
15055
  return await confirmableWrite(context, `Accept email package term ${packageTermUuid} for ${company}.`, async () => (await emailAgreement({
15023
15056
  path: { company },
15024
15057
  body: { packageTermUuid }
@@ -15037,7 +15070,7 @@ async function domain(context, rest) {
15037
15070
  if (action === "add") {
15038
15071
  noExtra$12(tail);
15039
15072
  const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
15040
- if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$25}`);
15073
+ if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$27}`);
15041
15074
  return await confirmableWrite(context, `Attach ${hostname} to ${company}'s mail service.`, async () => {
15042
15075
  return (await emailDomainsStore({
15043
15076
  path: { company },
@@ -15047,7 +15080,7 @@ async function domain(context, rest) {
15047
15080
  }
15048
15081
  const path = {
15049
15082
  company,
15050
- emailDomainUuid: oneUuid$7(tail, USAGE$25)
15083
+ emailDomainUuid: oneUuid$7(tail, USAGE$27)
15051
15084
  };
15052
15085
  if (action === "recheck") return await confirmableWrite(context, "Re-observe this name's DNS now.", async () => {
15053
15086
  return (await emailDomainsRecheck({ path })).data;
@@ -15067,14 +15100,14 @@ async function domain(context, rest) {
15067
15100
  body
15068
15101
  })).data;
15069
15102
  });
15070
- throw new UsageError(USAGE$25);
15103
+ throw new UsageError(USAGE$27);
15071
15104
  }
15072
15105
  /** `catch-all show|set|clear`. */
15073
15106
  async function catchAll(context, rest) {
15074
15107
  const [action, ...tail] = rest;
15075
15108
  const path = {
15076
15109
  company: await requireCompany(context.flags),
15077
- emailDomainUuid: oneUuid$7(tail, USAGE$25)
15110
+ emailDomainUuid: oneUuid$7(tail, USAGE$27)
15078
15111
  };
15079
15112
  if (action === "show") return {
15080
15113
  kind: "catch-all",
@@ -15082,7 +15115,7 @@ async function catchAll(context, rest) {
15082
15115
  };
15083
15116
  if (action === "set") {
15084
15117
  const destinations = destinationList(context);
15085
- if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$25}`);
15118
+ if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$27}`);
15086
15119
  return await confirmableWrite(context, [`Enable the catch-all for this name, forwarding to:`, ...destinations.map((one) => ` ${one}`)].join("\n"), async () => {
15087
15120
  return (await emailCatchAllUpdate({
15088
15121
  path,
@@ -15094,7 +15127,7 @@ async function catchAll(context, rest) {
15094
15127
  });
15095
15128
  }
15096
15129
  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);
15097
- throw new UsageError(USAGE$25);
15130
+ throw new UsageError(USAGE$27);
15098
15131
  }
15099
15132
  /**
15100
15133
  * The comma-separated `--destinations`.
@@ -15126,7 +15159,7 @@ function catchAllText(one) {
15126
15159
  }
15127
15160
  //#endregion
15128
15161
  //#region src/commands/email-holds.ts
15129
- var USAGE$24 = [
15162
+ var USAGE$26 = [
15130
15163
  "Usage: hostingctl email hold list --company <slug>",
15131
15164
  " hostingctl email hold create --company <slug> --reason <compromise|abuse|operator> [--mailbox <uuid>]",
15132
15165
  " hostingctl email hold release <hold-uuid> --company <slug>",
@@ -15149,21 +15182,21 @@ async function emailHolds(context, rest) {
15149
15182
  const [action, ...tail] = rest;
15150
15183
  const company = await requireCompany(context.flags);
15151
15184
  if (action === "list") {
15152
- if (tail.length > 0) throw new UsageError(USAGE$24);
15185
+ if (tail.length > 0) throw new UsageError(USAGE$26);
15153
15186
  return {
15154
15187
  kind: "holds",
15155
15188
  holds: (await emailHoldsIndex({ path: { company } })).data.holds
15156
15189
  };
15157
15190
  }
15158
15191
  if (action === "create") return await create$3(context, tail, company);
15159
- if (action === "release") return await release(context, oneUuid$7(tail, USAGE$24), company);
15160
- throw new UsageError(USAGE$24);
15192
+ if (action === "release") return await release(context, oneUuid$7(tail, USAGE$26), company);
15193
+ throw new UsageError(USAGE$26);
15161
15194
  }
15162
15195
  /** `create --reason … [--mailbox …]`. */
15163
15196
  async function create$3(context, tail, company) {
15164
- if (tail.length > 0) throw new UsageError(USAGE$24);
15197
+ if (tail.length > 0) throw new UsageError(USAGE$26);
15165
15198
  const raw = context.flags.get("--reason")?.trim() ?? "";
15166
- if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$24}`);
15199
+ if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$26}`);
15167
15200
  const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
15168
15201
  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 () => {
15169
15202
  return (await emailHoldsStore({
@@ -15199,7 +15232,7 @@ function emailHoldText(report) {
15199
15232
  }
15200
15233
  //#endregion
15201
15234
  //#region src/commands/email-mailbox-admin.ts
15202
- var USAGE$23 = [
15235
+ var USAGE$25 = [
15203
15236
  "Usage: hostingctl email mailbox add <email-domain-uuid> --company <slug> --local <name> --quota <gb-5|gb-10|gb-20>",
15204
15237
  " hostingctl email mailbox change <email-domain-uuid> <mailbox-uuid> --company <slug> [--status enabled|suspended] [--quota <size>]",
15205
15238
  " hostingctl email mailbox remove <email-domain-uuid> <mailbox-uuid> --company <slug>",
@@ -15231,7 +15264,7 @@ var STATUSES = /* @__PURE__ */ new Set(["enabled", "suspended"]);
15231
15264
  async function emailMailboxAdmin(context, action, tail) {
15232
15265
  if (action === "add") return await add$6(context, tail);
15233
15266
  const [emailDomainUuid, mailboxUuid, ...extra] = tail;
15234
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
15267
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$25);
15235
15268
  const path = {
15236
15269
  company: await requireCompany(context.flags),
15237
15270
  emailDomainUuid,
@@ -15249,7 +15282,7 @@ async function emailMailboxAdmin(context, action, tail) {
15249
15282
  if (action === "preferences-set") return await preferences(context, path);
15250
15283
  if (action === "credential") return await revealCredential(context, path, false);
15251
15284
  if (action === "reset-credential") return await revealCredential(context, path, true);
15252
- throw new UsageError(USAGE$23);
15285
+ throw new UsageError(USAGE$25);
15253
15286
  }
15254
15287
  /** A quota flag from the API's own values. */
15255
15288
  function quota(context) {
@@ -15265,11 +15298,11 @@ function destinations(context) {
15265
15298
  /** `add <domain> --local … --quota …`. */
15266
15299
  async function add$6(context, tail) {
15267
15300
  const [emailDomainUuid, ...extra] = tail;
15268
- if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
15301
+ if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$25);
15269
15302
  const company = await requireCompany(context.flags);
15270
15303
  const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
15271
15304
  const size = quota(context);
15272
- if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$23}`);
15305
+ if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$25}`);
15273
15306
  return await confirmableWrite(context, `Create mailbox ${localPart}@… with a ${size} quota.`, async () => {
15274
15307
  return (await emailMailboxesStore({
15275
15308
  path: {
@@ -15294,7 +15327,7 @@ function statusFlag(context) {
15294
15327
  async function change$1(context, path) {
15295
15328
  const status = statusFlag(context);
15296
15329
  const size = quota(context);
15297
- if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$23}`);
15330
+ if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$25}`);
15298
15331
  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 () => {
15299
15332
  return (await emailMailboxesUpdate({
15300
15333
  path,
@@ -15322,7 +15355,7 @@ async function preferences(context, path) {
15322
15355
  const markRead = onOff$4(context, "--spam-mark-read");
15323
15356
  const threshold = context.flags.get("--spam-threshold");
15324
15357
  const summary = context.flags.get("--vacation-subject");
15325
- 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$23}`);
15358
+ 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$25}`);
15326
15359
  const body = {
15327
15360
  vacationEnabled: vacation ?? current.vacationEnabled,
15328
15361
  vacationSubject: context.flags.get("--vacation-subject") ?? current.vacationSubject,
@@ -15377,7 +15410,7 @@ function emailMailboxAdminText(report) {
15377
15410
  }
15378
15411
  //#endregion
15379
15412
  //#region src/commands/email-service.ts
15380
- var USAGE$22 = [
15413
+ var USAGE$24 = [
15381
15414
  "Usage: hostingctl email service <suspend|resume> --company <slug>",
15382
15415
  " hostingctl email service cancellation --company <slug>",
15383
15416
  " hostingctl email service cancel --company <slug> --ends-at <iso-date>",
@@ -15404,11 +15437,11 @@ async function emailService(context, subcommand, rest) {
15404
15437
  if (subcommand === "dmarc-set") return await dmarcSet$1(context, rest);
15405
15438
  if (subcommand === "blocklist-set") return await blocklistSet(context, rest);
15406
15439
  if (subcommand === "service") return await service(context, rest);
15407
- throw new UsageError(USAGE$22);
15440
+ throw new UsageError(USAGE$24);
15408
15441
  }
15409
15442
  /** A company-wide command takes no positionals. */
15410
15443
  function noExtra$11(rest) {
15411
- if (rest.length > 0) throw new UsageError(USAGE$22);
15444
+ if (rest.length > 0) throw new UsageError(USAGE$24);
15412
15445
  }
15413
15446
  /** `service suspend|resume|cancellation|cancel|cancel-withdraw`. */
15414
15447
  async function service(context, rest) {
@@ -15434,7 +15467,7 @@ async function service(context, rest) {
15434
15467
  if (action === "cancel") {
15435
15468
  noExtra$11(tail);
15436
15469
  const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
15437
- if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$22}`);
15470
+ if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$24}`);
15438
15471
  if (Number.isNaN(Date.parse(endsAt))) throw new UsageError(`--ends-at must be an ISO date (got "${endsAt}").`);
15439
15472
  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({
15440
15473
  path: { company },
@@ -15447,7 +15480,7 @@ async function service(context, rest) {
15447
15480
  return (await emailCancellationWithdraw({ path: { company } })).data;
15448
15481
  });
15449
15482
  }
15450
- throw new UsageError(USAGE$22);
15483
+ throw new UsageError(USAGE$24);
15451
15484
  }
15452
15485
  /** `dmarc`: DMARC reporting for every attached name. */
15453
15486
  async function dmarc$1(context, rest) {
@@ -15467,7 +15500,7 @@ async function blocklist$1(context, rest) {
15467
15500
  }
15468
15501
  /** `dmarc-set <name> --enabled on|off`. */
15469
15502
  async function dmarcSet$1(context, rest) {
15470
- const emailDomainUuid = oneUuid$7(rest, USAGE$22);
15503
+ const emailDomainUuid = oneUuid$7(rest, USAGE$24);
15471
15504
  const company = await requireCompany(context.flags);
15472
15505
  const enabled = onOff$3(context);
15473
15506
  return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} DMARC reporting for this name.`, async () => {
@@ -15482,7 +15515,7 @@ async function dmarcSet$1(context, rest) {
15482
15515
  }
15483
15516
  /** `blocklist-set <name> --enabled on|off`. */
15484
15517
  async function blocklistSet(context, rest) {
15485
- const emailDomainUuid = oneUuid$7(rest, USAGE$22);
15518
+ const emailDomainUuid = oneUuid$7(rest, USAGE$24);
15486
15519
  const company = await requireCompany(context.flags);
15487
15520
  const enabled = onOff$3(context);
15488
15521
  return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} blocklist monitoring for this name.`, async () => {
@@ -15499,7 +15532,7 @@ async function blocklistSet(context, rest) {
15499
15532
  async function importSchema(context, rest) {
15500
15533
  noExtra$11(rest);
15501
15534
  const version = context.flags.get("--version")?.trim() ?? "";
15502
- if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$22}`);
15535
+ if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$24}`);
15503
15536
  return {
15504
15537
  kind: "schema",
15505
15538
  version,
@@ -15511,7 +15544,7 @@ function onOff$3(context) {
15511
15544
  const raw = context.flags.get("--enabled")?.trim() ?? "";
15512
15545
  if (raw === "on" || raw === "true") return true;
15513
15546
  if (raw === "off" || raw === "false") return false;
15514
- throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$22}`);
15547
+ throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$24}`);
15515
15548
  }
15516
15549
  /** The `email service|dmarc|blocklist|import-schema` renderer. */
15517
15550
  function emailServiceText(report) {
@@ -15524,7 +15557,7 @@ function emailServiceText(report) {
15524
15557
  //#endregion
15525
15558
  //#region src/commands/email-sync-csv.ts
15526
15559
  /** The usage this group refuses with, owned by the command it belongs to. */
15527
- var USAGE$21 = [
15560
+ var USAGE$23 = [
15528
15561
  "Usage: hostingctl email sync csv <preview|commit> <email-domain-uuid> --company <slug> --file <path>",
15529
15562
  "",
15530
15563
  " preview What the file's rows would become. Writes nothing.",
@@ -15535,7 +15568,7 @@ var USAGE$21 = [
15535
15568
  /** One named uuid, or a usage refusal. */
15536
15569
  function one$1(rest) {
15537
15570
  const [uuid, ...extra] = rest;
15538
- if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$21);
15571
+ if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$23);
15539
15572
  return uuid;
15540
15573
  }
15541
15574
  /** `csv preview|commit <domain> --file <path>`: one multipart upload of the CSV itself. */
@@ -15543,7 +15576,7 @@ async function csv(context, tail) {
15543
15576
  const [action, ...args] = tail;
15544
15577
  const path = await domainPath(context, one$1(args));
15545
15578
  const file = context.flags.get("--file") ?? "";
15546
- if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$21}`);
15579
+ if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$23}`);
15547
15580
  if (action === "preview") return {
15548
15581
  kind: "csv-preview",
15549
15582
  rows: (await emailMailboxSyncCsvPreview({
@@ -15551,10 +15584,10 @@ async function csv(context, tail) {
15551
15584
  body: await csvPreviewBody(file)
15552
15585
  })).data.rows
15553
15586
  };
15554
- if (action !== "commit") throw new UsageError(USAGE$21);
15587
+ if (action !== "commit") throw new UsageError(USAGE$23);
15555
15588
  const recurrence = recurrenceFlag(context) ?? "once";
15556
15589
  const endsAt = context.flags.get("--ends-at")?.trim() || null;
15557
- if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$21}`);
15590
+ if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$23}`);
15558
15591
  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 () => {
15559
15592
  const accepted = (await emailMailboxSyncCsvPreview({
15560
15593
  path,
@@ -15603,7 +15636,7 @@ async function csvCommitBody(file, accepted, recurrence, endsAt) {
15603
15636
  }
15604
15637
  //#endregion
15605
15638
  //#region src/commands/email-sync.ts
15606
- var USAGE$20 = [
15639
+ var USAGE$22 = [
15607
15640
  "Usage: hostingctl email sync show <email-domain-uuid> --company <slug>",
15608
15641
  " hostingctl email sync server <email-domain-uuid> --company <slug> --host <host> --port <n> --encryption <tls|starttls>",
15609
15642
  " 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>]",
@@ -15628,12 +15661,12 @@ async function emailSync(context, rest) {
15628
15661
  if (action === "server") return await server(context, tail);
15629
15662
  if (action === "account") return await account(context, tail);
15630
15663
  if (action === "csv") return await csv(context, tail);
15631
- throw new UsageError(USAGE$20);
15664
+ throw new UsageError(USAGE$22);
15632
15665
  }
15633
15666
  /** One named uuid, or a usage refusal. */
15634
15667
  function one(rest) {
15635
15668
  const [uuid, ...extra] = rest;
15636
- if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$20);
15669
+ if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$22);
15637
15670
  return uuid;
15638
15671
  }
15639
15672
  /** `show`: the server and every account. */
@@ -15649,9 +15682,9 @@ async function server(context, tail) {
15649
15682
  const host = context.flags.get("--host")?.trim() ?? "";
15650
15683
  const port = Number(context.flags.get("--port") ?? "");
15651
15684
  const encryption = context.flags.get("--encryption")?.trim() ?? "";
15652
- if (host === "") throw new UsageError(`sync server needs --host.\n\n${USAGE$20}`);
15653
- if (!Number.isInteger(port) || port < 1 || port > 65535) throw new UsageError(`--port must be a whole number between 1 and 65535.\n\n${USAGE$20}`);
15654
- if (!ENCRYPTIONS.has(encryption)) throw new UsageError(`--encryption must be tls or starttls (got "${encryption}").\n\n${USAGE$20}`);
15685
+ if (host === "") throw new UsageError(`sync server needs --host.\n\n${USAGE$22}`);
15686
+ if (!Number.isInteger(port) || port < 1 || port > 65535) throw new UsageError(`--port must be a whole number between 1 and 65535.\n\n${USAGE$22}`);
15687
+ if (!ENCRYPTIONS.has(encryption)) throw new UsageError(`--encryption must be tls or starttls (got "${encryption}").\n\n${USAGE$22}`);
15655
15688
  return await confirmableWrite(context, `Point the mailbox sync source at ${host}:${String(port)} over ${encryption}.`, async () => {
15656
15689
  return (await emailMailboxSyncServerUpdate({
15657
15690
  path,
@@ -15675,9 +15708,9 @@ async function account(context, tail) {
15675
15708
  const [action, ...args] = tail;
15676
15709
  if (action === "add") return await accountAdd(context, args);
15677
15710
  if (action === "change") return await accountChange(context, args);
15678
- if (action === void 0) throw new UsageError(USAGE$20);
15711
+ if (action === void 0) throw new UsageError(USAGE$22);
15679
15712
  const [emailDomainUuid, accountUuid, ...extra] = args;
15680
- if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$20);
15713
+ if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
15681
15714
  return await accountAction(context, action, {
15682
15715
  ...await domainPath(context, emailDomainUuid),
15683
15716
  accountUuid
@@ -15696,13 +15729,13 @@ async function accountAction(context, action, path) {
15696
15729
  if (action === "start") return await startAccount(context, path);
15697
15730
  if (action === "stop") return await confirmableWrite(context, "Stop this account's scheduled sync. The source credential is kept.", async () => (await emailMailboxSyncAccountsStop({ path })).data);
15698
15731
  if (action === "forget") return await confirmableWrite(context, "Forget this account's source credential and stop future work.", async () => (await emailMailboxSyncAccountsForget({ path })).data);
15699
- throw new UsageError(USAGE$20);
15732
+ throw new UsageError(USAGE$22);
15700
15733
  }
15701
15734
  /** `start`: the schedule the account should run on from now. */
15702
15735
  async function startAccount(context, path) {
15703
15736
  const recurrence = recurrenceFlag(context) ?? "once";
15704
15737
  const endsAt = context.flags.get("--ends-at")?.trim() || null;
15705
- if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$20}`);
15738
+ if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$22}`);
15706
15739
  return await confirmableWrite(context, `Start this account's scheduled sync (${recurrence}${endsAt === null ? "" : ` until ${endsAt}`}).`, async () => (await emailMailboxSyncAccountsStart({
15707
15740
  path,
15708
15741
  body: {
@@ -15715,7 +15748,7 @@ async function startAccount(context, path) {
15715
15748
  async function accountAdd(context, args) {
15716
15749
  const path = await domainPath(context, one(args));
15717
15750
  const body = accountBody(context);
15718
- const sourcePassword = readSecret(context, "password", 4096, USAGE$20);
15751
+ const sourcePassword = readSecret(context, "password", 4096, USAGE$22);
15719
15752
  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({
15720
15753
  path,
15721
15754
  body: {
@@ -15727,7 +15760,7 @@ async function accountAdd(context, args) {
15727
15760
  /** `account change <domain> <account> [fields]`: only the fields named are sent. */
15728
15761
  async function accountChange(context, args) {
15729
15762
  const [emailDomainUuid, accountUuid, ...extra] = args;
15730
- if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$20);
15763
+ if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
15731
15764
  const path = {
15732
15765
  ...await domainPath(context, emailDomainUuid),
15733
15766
  accountUuid
@@ -15741,8 +15774,8 @@ async function accountChange(context, args) {
15741
15774
  if (mailbox !== "") body.mailboxUuid = mailbox;
15742
15775
  if (recurrence !== null) body.recurrence = recurrence;
15743
15776
  if (endsAt !== "") body.endsAt = endsAt;
15744
- if (context.flags.has("--password-file") || context.flags.has("--password-stdin")) body.sourcePassword = readSecret(context, "password", 4096, USAGE$20);
15745
- if (Object.keys(body).length === 0) throw new UsageError(`account change needs at least one field.\n\n${USAGE$20}`);
15777
+ if (context.flags.has("--password-file") || context.flags.has("--password-stdin")) body.sourcePassword = readSecret(context, "password", 4096, USAGE$22);
15778
+ if (Object.keys(body).length === 0) throw new UsageError(`account change needs at least one field.\n\n${USAGE$22}`);
15746
15779
  return await confirmableWrite(context, "Change this sync account.", async () => {
15747
15780
  return (await emailMailboxSyncAccountsUpdate({
15748
15781
  path,
@@ -15756,8 +15789,8 @@ function accountBody(context) {
15756
15789
  const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
15757
15790
  const recurrence = recurrenceFlag(context) ?? "once";
15758
15791
  const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
15759
- if (sourceUsername === "" || mailboxUuid === "") throw new UsageError(`account add needs --username and --mailbox.\n\n${USAGE$20}`);
15760
- if (recurrence === "until" && endsAt === "") throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$20}`);
15792
+ if (sourceUsername === "" || mailboxUuid === "") throw new UsageError(`account add needs --username and --mailbox.\n\n${USAGE$22}`);
15793
+ if (recurrence === "until" && endsAt === "") throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$22}`);
15761
15794
  return {
15762
15795
  sourceUsername,
15763
15796
  mailboxUuid,
@@ -15774,7 +15807,7 @@ function recurrenceFlag(context) {
15774
15807
  }
15775
15808
  //#endregion
15776
15809
  //#region src/commands/email-text.ts
15777
- var USAGE$19 = [
15810
+ var USAGE$21 = [
15778
15811
  "Usage: hostingctl email <show|names> --company <slug>",
15779
15812
  " hostingctl email <mailboxes|aliases> <email-domain-uuid> --company <slug>",
15780
15813
  " hostingctl email mailbox <email-domain-uuid> <mailbox-uuid> --company <slug>",
@@ -15857,7 +15890,7 @@ function count(shown, total) {
15857
15890
  var EMAIL_METADATA = {
15858
15891
  name: "email",
15859
15892
  summary: "A company's email service, its attached names, their mailboxes and aliases.",
15860
- usage: USAGE$19,
15893
+ usage: USAGE$21,
15861
15894
  flags: [
15862
15895
  {
15863
15896
  name: "--address",
@@ -16037,75 +16070,75 @@ var EMAIL_METADATA = {
16037
16070
  var EMAIL_TOPICS = [
16038
16071
  {
16039
16072
  path: ["alias"],
16040
- usage: USAGE$27
16073
+ usage: USAGE$29
16041
16074
  },
16042
16075
  {
16043
16076
  path: ["app-token"],
16044
- usage: USAGE$26
16077
+ usage: USAGE$28
16045
16078
  },
16046
16079
  {
16047
16080
  path: ["send-as"],
16048
- usage: USAGE$26
16081
+ usage: USAGE$28
16049
16082
  },
16050
16083
  {
16051
16084
  path: ["offer"],
16052
- usage: USAGE$25
16085
+ usage: USAGE$27
16053
16086
  },
16054
16087
  {
16055
16088
  path: ["enroll"],
16056
- usage: USAGE$25
16089
+ usage: USAGE$27
16057
16090
  },
16058
16091
  {
16059
16092
  path: ["agree"],
16060
- usage: USAGE$25
16093
+ usage: USAGE$27
16061
16094
  },
16062
16095
  {
16063
16096
  path: ["provision"],
16064
- usage: USAGE$25
16097
+ usage: USAGE$27
16065
16098
  },
16066
16099
  {
16067
16100
  path: ["domain"],
16068
- usage: USAGE$25
16101
+ usage: USAGE$27
16069
16102
  },
16070
16103
  {
16071
16104
  path: ["catch-all"],
16072
- usage: USAGE$25
16105
+ usage: USAGE$27
16073
16106
  },
16074
16107
  {
16075
16108
  path: ["service"],
16076
- usage: USAGE$22
16109
+ usage: USAGE$24
16077
16110
  },
16078
16111
  {
16079
16112
  path: ["dmarc"],
16080
- usage: USAGE$22
16113
+ usage: USAGE$24
16081
16114
  },
16082
16115
  {
16083
16116
  path: ["dmarc-set"],
16084
- usage: USAGE$22
16117
+ usage: USAGE$24
16085
16118
  },
16086
16119
  {
16087
16120
  path: ["blocklist"],
16088
- usage: USAGE$22
16121
+ usage: USAGE$24
16089
16122
  },
16090
16123
  {
16091
16124
  path: ["blocklist-set"],
16092
- usage: USAGE$22
16125
+ usage: USAGE$24
16093
16126
  },
16094
16127
  {
16095
16128
  path: ["import-schema"],
16096
- usage: USAGE$22
16129
+ usage: USAGE$24
16097
16130
  },
16098
16131
  {
16099
16132
  path: ["sync"],
16100
- usage: USAGE$20
16133
+ usage: USAGE$22
16101
16134
  },
16102
16135
  {
16103
16136
  path: ["hold"],
16104
- usage: USAGE$24
16137
+ usage: USAGE$26
16105
16138
  },
16106
16139
  {
16107
16140
  path: ["mailbox"],
16108
- usage: USAGE$23
16141
+ usage: USAGE$25
16109
16142
  }
16110
16143
  ];
16111
16144
  //#endregion
@@ -16147,7 +16180,7 @@ async function companyRead(context, subcommand, rest) {
16147
16180
  if (subcommand === "mailboxes") return await mailboxes(company, rest);
16148
16181
  if (subcommand === "mailbox") return await mailbox(company, rest);
16149
16182
  if (subcommand === "aliases") return await aliases(company, rest);
16150
- throw new UsageError(USAGE$19);
16183
+ throw new UsageError(USAGE$21);
16151
16184
  }
16152
16185
  /** The renderer for a tagged feature read, or null when this command renders the answer itself. */
16153
16186
  function taggedText$1(report) {
@@ -16232,7 +16265,7 @@ var email$2 = {
16232
16265
  ...EMAIL_METADATA,
16233
16266
  async run(context) {
16234
16267
  const [subcommand, ...rest] = context.positional;
16235
- if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$19);
16268
+ if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$21);
16236
16269
  const feature = dispatched$1(context, subcommand, rest);
16237
16270
  if (feature !== null) return await feature;
16238
16271
  return await companyRead(context, subcommand, rest);
@@ -16317,7 +16350,7 @@ async function aliases(company, rest) {
16317
16350
  /** `mailbox <email-domain-uuid> <mailbox-uuid>`: one record, independent of index pagination. */
16318
16351
  async function mailbox(company, rest) {
16319
16352
  const [emailDomainUuid, mailboxUuid, ...extra] = rest;
16320
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$19);
16353
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$21);
16321
16354
  return (await emailMailboxesShow({ path: {
16322
16355
  company,
16323
16356
  emailDomainUuid,
@@ -16327,16 +16360,16 @@ async function mailbox(company, rest) {
16327
16360
  /** The one uuid a collection read names, or a usage refusal. */
16328
16361
  function oneUuid$4(rest) {
16329
16362
  const [uuid, ...extra] = rest;
16330
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$19);
16363
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$21);
16331
16364
  return uuid;
16332
16365
  }
16333
16366
  /** A company-wide read takes no positional arguments. */
16334
16367
  function noExtra$10(rest) {
16335
- if (rest.length > 0) throw new UsageError(USAGE$19);
16368
+ if (rest.length > 0) throw new UsageError(USAGE$21);
16336
16369
  }
16337
16370
  //#endregion
16338
16371
  //#region src/commands/environment-admin.ts
16339
- var USAGE$18 = [
16372
+ var USAGE$20 = [
16340
16373
  "Usage: hostingctl environment retention <environment-uuid> --company <slug>",
16341
16374
  " hostingctl environment retention-set <environment-uuid> --company <slug> --extra-days <n> --effective-at <iso> --agreement <uuid> [--package <key>]",
16342
16375
  " hostingctl environment database-show <environment-uuid> <database-uuid> --company <slug>",
@@ -16360,9 +16393,9 @@ async function environmentAdmin(context, subcommand, rest) {
16360
16393
  if (subcommand === "retention") return await retention(context, first);
16361
16394
  if (subcommand === "retention-set") return await retentionSet(context, first);
16362
16395
  if (subcommand === "database-show" || subcommand === "database-reveal") {
16363
- if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$18);
16396
+ if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$20);
16364
16397
  const path = {
16365
- ...await environmentPath(context, first, USAGE$18),
16398
+ ...await environmentPath(context, first, USAGE$20),
16366
16399
  databaseUuid: tail[0] ?? ""
16367
16400
  };
16368
16401
  if (subcommand === "database-show") return {
@@ -16372,24 +16405,24 @@ async function environmentAdmin(context, subcommand, rest) {
16372
16405
  return await revealDatabase(context, path);
16373
16406
  }
16374
16407
  if (subcommand === "tuning") return await tuning(context, first, tail);
16375
- throw new UsageError(USAGE$18);
16408
+ throw new UsageError(USAGE$20);
16376
16409
  }
16377
16410
  /** `retention <env>`. */
16378
16411
  async function retention(context, environmentUuid) {
16379
16412
  return {
16380
16413
  kind: "retention",
16381
- retention: (await hostingRetentionShow({ path: await environmentPath(context, environmentUuid, USAGE$18) })).data
16414
+ retention: (await hostingRetentionShow({ path: await environmentPath(context, environmentUuid, USAGE$20) })).data
16382
16415
  };
16383
16416
  }
16384
16417
  /** `retention-set <env> --extra-days … --effective-at … --agreement …`. */
16385
16418
  async function retentionSet(context, environmentUuid) {
16386
- const path = await environmentPath(context, environmentUuid, USAGE$18);
16419
+ const path = await environmentPath(context, environmentUuid, USAGE$20);
16387
16420
  const extraDays = Number(context.flags.get("--extra-days") ?? "");
16388
16421
  const effectiveAt = context.flags.get("--effective-at")?.trim() ?? "";
16389
16422
  const baselineAgreementUuid = context.flags.get("--agreement")?.trim() ?? "";
16390
- 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$18}`);
16391
- if (effectiveAt === "" || Number.isNaN(Date.parse(effectiveAt))) throw new UsageError(`retention-set needs --effective-at as an ISO date.\n\n${USAGE$18}`);
16392
- if (baselineAgreementUuid === "") throw new UsageError(`retention-set needs --agreement.\n\n${USAGE$18}`);
16423
+ 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$20}`);
16424
+ if (effectiveAt === "" || Number.isNaN(Date.parse(effectiveAt))) throw new UsageError(`retention-set needs --effective-at as an ISO date.\n\n${USAGE$20}`);
16425
+ if (baselineAgreementUuid === "") throw new UsageError(`retention-set needs --agreement.\n\n${USAGE$20}`);
16393
16426
  const packageKey = context.flags.get("--package")?.trim();
16394
16427
  return {
16395
16428
  kind: "write",
@@ -16416,7 +16449,7 @@ async function revealDatabase(context, path) {
16416
16449
  /** `tuning preview|restore <env>`. */
16417
16450
  async function tuning(context, action, rest) {
16418
16451
  const environmentUuid = rest[0];
16419
- const path = await environmentPath(context, environmentUuid, USAGE$18);
16452
+ const path = await environmentPath(context, environmentUuid, USAGE$20);
16420
16453
  if (action === "preview" && rest.length === 1) {
16421
16454
  const body = (await hostingEnvironmentShow({ path })).data;
16422
16455
  return {
@@ -16429,7 +16462,7 @@ async function tuning(context, action, rest) {
16429
16462
  }
16430
16463
  if (action === "restore" && rest.length === 1) {
16431
16464
  const generation = Number(context.flags.get("--generation") ?? "");
16432
- if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$18}`);
16465
+ if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$20}`);
16433
16466
  return {
16434
16467
  kind: "write",
16435
16468
  outcome: await confirmableWrite(context, `Restore the recorded tuning for generation ${String(generation)}.`, async () => (await hostingTuningRestore({
@@ -16438,7 +16471,7 @@ async function tuning(context, action, rest) {
16438
16471
  })).data)
16439
16472
  };
16440
16473
  }
16441
- throw new UsageError(USAGE$18);
16474
+ throw new UsageError(USAGE$20);
16442
16475
  }
16443
16476
  /** One retention window as one line, and the write receipt for it. */
16444
16477
  function retentionText(one) {
@@ -16482,6 +16515,37 @@ function environmentAdminText(report) {
16482
16515
  return tuningText(report.tuning);
16483
16516
  }
16484
16517
  //#endregion
16518
+ //#region src/commands/environment-component-version.ts
16519
+ var USAGE$19 = [
16520
+ "Usage: hostingctl environment component-version <environment-uuid> <workload-uuid> <version> --company <slug>",
16521
+ "",
16522
+ " component-version Move one curated component instance to another version this platform pins an image",
16523
+ " for (Infisical, Supabase auth/rest/realtime).",
16524
+ "",
16525
+ "The version must be one the platform pins an image for; anything else is refused by name rather than falling",
16526
+ "back to the pin. The answer names the image the instance will now run, so it can be checked against a manifest",
16527
+ "instead of trusted. This never touches the component's material: an upgrade must not mint a new signing secret."
16528
+ ].join("\n");
16529
+ /**
16530
+ * `environment component-version <uuid> <workload-uuid> <version>`: move ONE instance to another pinned version.
16531
+ *
16532
+ * The alternative was writing the recorded version into the database by hand, which the platform's own rules forbid: a
16533
+ * version change is a product operation with a refusal, an answer and a reconcile attached.
16534
+ */
16535
+ async function environmentComponentVersion(context, rest) {
16536
+ const [uuid, workloadUuid, version, ...extra] = rest;
16537
+ if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$19);
16538
+ const path = {
16539
+ company: await requireCompany(context.flags),
16540
+ environmentUuid: uuid,
16541
+ workloadUuid
16542
+ };
16543
+ return await confirmableWrite(context, `Move the curated component ${workloadUuid} in environment ${uuid} to version ${version}.`, async () => (await hostingApplicationsVersion({
16544
+ path,
16545
+ body: { version }
16546
+ })).data);
16547
+ }
16548
+ //#endregion
16485
16549
  //#region src/commands/environment-configuration.ts
16486
16550
  var CONFIGURATION_USAGE = [
16487
16551
  "Usage: hostingctl environment configuration show <environment-uuid> --company <slug>",
@@ -16615,7 +16679,7 @@ function oneUuid$3(rest) {
16615
16679
  }
16616
16680
  //#endregion
16617
16681
  //#region src/commands/environment-create.ts
16618
- var USAGE$17 = [
16682
+ var USAGE$18 = [
16619
16683
  "Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
16620
16684
  "",
16621
16685
  "The package is one of the keys this environment's catalog offers; the platform chooses the placement,",
@@ -16623,16 +16687,16 @@ var USAGE$17 = [
16623
16687
  ].join("\n");
16624
16688
  /** `environment create --name … [--slug …] [--package …]`: a new environment from a platform package. */
16625
16689
  async function create$2(context, rest) {
16626
- if (rest.length > 0) throw new UsageError(USAGE$17);
16690
+ if (rest.length > 0) throw new UsageError(USAGE$18);
16627
16691
  const name = context.flags.get("--name")?.trim() ?? "";
16628
- if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$17}`);
16629
- const slug = slugFor(context.flags.get("--slug"), name, USAGE$17);
16692
+ if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$18}`);
16693
+ const slug = slugFor(context.flags.get("--slug"), name, USAGE$18);
16630
16694
  const company = await requireCompany(context.flags);
16631
16695
  const packages = (await hostingEnvironmentPackagesIndex({ path: { company } })).data;
16632
16696
  const offered = packages.map((one) => one.key).join(", ");
16633
16697
  const requested = context.flags.get("--package")?.trim() ?? "";
16634
16698
  const chosen = requested === "" ? packages[0] : packages.find((one) => one.key === requested);
16635
- if (chosen === void 0) throw new UsageError(`--package must be one of ${offered} (got ${requested}).\n\n${USAGE$17}`);
16699
+ if (chosen === void 0) throw new UsageError(`--package must be one of ${offered} (got ${requested}).\n\n${USAGE$18}`);
16636
16700
  const resourceProfile = chosen.key;
16637
16701
  return await confirmableWrite(context, describeCreate$1(name, slug, chosen.key), async () => {
16638
16702
  return (await hostingEnvironmentStore({
@@ -16982,7 +17046,7 @@ function oneUuid$2(rest) {
16982
17046
  }
16983
17047
  //#endregion
16984
17048
  //#region src/commands/environment-domains.ts
16985
- var USAGE$16 = [
17049
+ var USAGE$17 = [
16986
17050
  "Usage: hostingctl environment domains <environment-uuid> --company <slug>",
16987
17051
  " hostingctl environment domain-add <environment-uuid> --company <slug> --hostname <host> --workload <uuid> [--intended on|off]",
16988
17052
  " hostingctl environment domain-verify|domain-check-routing|domain-intended|domain-primary|domain-remove <environment-uuid> <domain-uuid> --company <slug>",
@@ -17013,7 +17077,7 @@ var DOMAIN_ACTIONS = {
17013
17077
  /** `environment domains|domain-add|domain-*|redirects|redirect-set|redirect-remove`. */
17014
17078
  async function environmentDomains(context, subcommand, rest) {
17015
17079
  const [environmentUuid, ...tail] = rest;
17016
- const path = await environmentPath(context, environmentUuid, USAGE$16);
17080
+ const path = await environmentPath(context, environmentUuid, USAGE$17);
17017
17081
  if (subcommand === "domains") return await domains(path, tail);
17018
17082
  if (subcommand === "redirects") return await redirects(path, tail);
17019
17083
  if (subcommand === "domain-add") return await add$5(context, path, tail);
@@ -17022,7 +17086,7 @@ async function environmentDomains(context, subcommand, rest) {
17022
17086
  if (subcommand === "domain-remove") return await removeDomain(context, path, tail);
17023
17087
  const action = DOMAIN_ACTIONS[subcommand];
17024
17088
  if (action !== void 0) return await domainAction(context, subcommand, action, path, tail);
17025
- throw new UsageError(USAGE$16);
17089
+ throw new UsageError(USAGE$17);
17026
17090
  }
17027
17091
  /** `domains <env>`. */
17028
17092
  async function domains(path, rest) {
@@ -17045,7 +17109,7 @@ async function add$5(context, path, rest) {
17045
17109
  noExtra$9(rest);
17046
17110
  const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
17047
17111
  const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
17048
- if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --workload.\n\n${USAGE$16}`);
17112
+ if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --workload.\n\n${USAGE$17}`);
17049
17113
  const intended = onOffFlag(context, "--intended") ?? false;
17050
17114
  return await written$2(confirmableWrite(context, `Serve ${hostname} from workload ${workloadUuid}${intended ? " as an intended name" : ""}.`, async () => {
17051
17115
  return (await hostingDomainStore({
@@ -17061,7 +17125,7 @@ async function add$5(context, path, rest) {
17061
17125
  /** The five actions that take only the environment and the name. */
17062
17126
  async function domainAction(context, subcommand, action, path, rest) {
17063
17127
  const [domainUuid, ...extra] = rest;
17064
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$16);
17128
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$17);
17065
17129
  const described = {
17066
17130
  "domain-verify": "Check this name's routing now.",
17067
17131
  "domain-check-routing": "Check this name's routing now.",
@@ -17079,7 +17143,7 @@ async function domainAction(context, subcommand, action, path, rest) {
17079
17143
  /** `domain-remove <env> <domain>`: stop serving a name. */
17080
17144
  async function removeDomain(context, path, rest) {
17081
17145
  const [domainUuid, ...extra] = rest;
17082
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$16);
17146
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$17);
17083
17147
  const fallBackToGenerated = onOffFlag(context, "--fall-back-to-generated") ?? true;
17084
17148
  return await written$2(confirmableWrite(context, "Stop serving this name. Its record stays readable, and the environment keeps its generated hostname.", async () => {
17085
17149
  const body = { fallBackToGenerated };
@@ -17095,13 +17159,13 @@ async function removeDomain(context, path, rest) {
17095
17159
  /** `redirect-set <env> <domain> --target … --mode … [--destination …]`. */
17096
17160
  async function setRedirect(context, path, rest) {
17097
17161
  const [domainUuid, ...extra] = rest;
17098
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$16);
17162
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$17);
17099
17163
  const target = context.flags.get("--target")?.trim() ?? "";
17100
17164
  const mode = context.flags.get("--mode")?.trim() ?? "";
17101
17165
  const destinationUrl = context.flags.get("--destination")?.trim() ?? "";
17102
- if (!TARGETS.has(target)) throw new UsageError(`--target must be application or fixed.\n\n${USAGE$16}`);
17103
- if (!MODES$1.has(mode)) throw new UsageError(`--mode must be temporary or permanent.\n\n${USAGE$16}`);
17104
- if (target === "fixed" && destinationUrl === "") throw new UsageError(`--target fixed needs --destination <url>.\n\n${USAGE$16}`);
17166
+ if (!TARGETS.has(target)) throw new UsageError(`--target must be application or fixed.\n\n${USAGE$17}`);
17167
+ if (!MODES$1.has(mode)) throw new UsageError(`--mode must be temporary or permanent.\n\n${USAGE$17}`);
17168
+ if (target === "fixed" && destinationUrl === "") throw new UsageError(`--target fixed needs --destination <url>.\n\n${USAGE$17}`);
17105
17169
  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 () => {
17106
17170
  const body = {
17107
17171
  target,
@@ -17121,7 +17185,7 @@ async function setRedirect(context, path, rest) {
17121
17185
  /** `redirect-remove <env> <redirect-uuid>`. */
17122
17186
  async function removeRedirect(context, path, rest) {
17123
17187
  const [redirectUuid, ...extra] = rest;
17124
- if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$16);
17188
+ if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$17);
17125
17189
  return await written$2(confirmableWrite(context, `Remove redirect ${redirectUuid}.`, async () => {
17126
17190
  return (await hostingDomainRedirectDestroy({ path: {
17127
17191
  ...path,
@@ -17138,11 +17202,11 @@ async function written$2(pending) {
17138
17202
  }
17139
17203
  /** No positional arguments, or a usage refusal. */
17140
17204
  function noExtra$9(rest) {
17141
- if (rest.length > 0) throw new UsageError(USAGE$16);
17205
+ if (rest.length > 0) throw new UsageError(USAGE$17);
17142
17206
  }
17143
17207
  //#endregion
17144
17208
  //#region src/commands/environment-exports.ts
17145
- var USAGE$15 = [
17209
+ var USAGE$16 = [
17146
17210
  "Usage: hostingctl environment database-exports <environment-uuid> --company <slug>",
17147
17211
  " hostingctl environment database-export-create <environment-uuid> <database-uuid> --company <slug>",
17148
17212
  " hostingctl environment database-export-download <environment-uuid> <export-uuid> --company <slug>",
@@ -17162,7 +17226,7 @@ var USAGE$15 = [
17162
17226
  async function environmentExports(context, subcommand, rest) {
17163
17227
  if (subcommand === "release-bundle") {
17164
17228
  const [releaseUuid, ...extra] = rest;
17165
- if (releaseUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$15);
17229
+ if (releaseUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$16);
17166
17230
  return {
17167
17231
  kind: "bundle",
17168
17232
  releaseUuid,
@@ -17170,7 +17234,7 @@ async function environmentExports(context, subcommand, rest) {
17170
17234
  };
17171
17235
  }
17172
17236
  const [environmentUuid, ...tail] = rest;
17173
- const path = await environmentPath(context, environmentUuid, USAGE$15);
17237
+ const path = await environmentPath(context, environmentUuid, USAGE$16);
17174
17238
  if (subcommand === "database-exports") {
17175
17239
  noExtra$8(tail);
17176
17240
  return {
@@ -17181,11 +17245,11 @@ async function environmentExports(context, subcommand, rest) {
17181
17245
  if (subcommand === "database-export-create") return await create(context, path, tail);
17182
17246
  if (subcommand === "database-export-download") return await download(path, tail);
17183
17247
  if (subcommand === "database-export-remove") return await remove$1(context, path, tail);
17184
- throw new UsageError(USAGE$15);
17248
+ throw new UsageError(USAGE$16);
17185
17249
  }
17186
17250
  /** `database-export-create <env> <db>`. */
17187
17251
  async function create(context, path, rest) {
17188
- const databaseUuid = oneUuid$7(rest, USAGE$15);
17252
+ const databaseUuid = oneUuid$7(rest, USAGE$16);
17189
17253
  return {
17190
17254
  kind: "export-write",
17191
17255
  outcome: await confirmableWrite(context, "Take a portable export of this database now. It is downloadable until its expiry.", async () => {
@@ -17201,7 +17265,7 @@ async function create(context, path, rest) {
17201
17265
  }
17202
17266
  /** `database-export-download <env> <export>`: a time-limited URL, which is the customer's copy. */
17203
17267
  async function download(path, rest) {
17204
- const exportUuid = oneUuid$7(rest, USAGE$15);
17268
+ const exportUuid = oneUuid$7(rest, USAGE$16);
17205
17269
  return {
17206
17270
  kind: "download",
17207
17271
  download: (await hostingDatabaseExportDownload({ path: {
@@ -17212,7 +17276,7 @@ async function download(path, rest) {
17212
17276
  }
17213
17277
  /** `database-export-remove <env> <export>`. */
17214
17278
  async function remove$1(context, path, rest) {
17215
- const exportUuid = oneUuid$7(rest, USAGE$15);
17279
+ const exportUuid = oneUuid$7(rest, USAGE$16);
17216
17280
  return {
17217
17281
  kind: "export-write",
17218
17282
  outcome: await confirmableWrite(context, `Retire export ${exportUuid}. Its URL stops working once it is gone.`, async () => (await hostingDatabaseExportDestroy({ path: {
@@ -17223,7 +17287,7 @@ async function remove$1(context, path, rest) {
17223
17287
  }
17224
17288
  /** No positional arguments, or a usage refusal. */
17225
17289
  function noExtra$8(rest) {
17226
- if (rest.length > 0) throw new UsageError(USAGE$15);
17290
+ if (rest.length > 0) throw new UsageError(USAGE$16);
17227
17291
  }
17228
17292
  /** One export as one line. */
17229
17293
  function exportLine(one) {
@@ -17495,7 +17559,7 @@ function oneUuid$1(rest) {
17495
17559
  }
17496
17560
  //#endregion
17497
17561
  //#region src/commands/environment-services.ts
17498
- var USAGE$14 = [
17562
+ var USAGE$15 = [
17499
17563
  "Usage: hostingctl environment service-add-review <environment-uuid> <type> --company <slug> [--name <n>] [--replicas <n>]",
17500
17564
  " hostingctl environment service-add <environment-uuid> <type> --company <slug> --name <n> [--replicas <n>]",
17501
17565
  " hostingctl environment service-runtime <environment-uuid> <type> --company <slug> --running <on|off>",
@@ -17524,8 +17588,8 @@ var SERVICE_TYPES = /* @__PURE__ */ new Set([
17524
17588
  /** `environment service-*`, from the `environment` command. */
17525
17589
  async function environmentServices(context, subcommand, rest) {
17526
17590
  const [environmentUuid, type, ...tail] = rest;
17527
- const path = await environmentPath(context, environmentUuid, USAGE$14);
17528
- if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$14);
17591
+ const path = await environmentPath(context, environmentUuid, USAGE$15);
17592
+ if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$15);
17529
17593
  if (subcommand === "service-add-review") return await reviewAddition(context, path, type);
17530
17594
  if (subcommand === "service-retirement") return {
17531
17595
  kind: "service-retirement",
@@ -17538,7 +17602,7 @@ async function environmentServices(context, subcommand, rest) {
17538
17602
  if (subcommand === "service-runtime") return await runtime$1(context, path, type);
17539
17603
  if (subcommand === "service-protect") return await protect(context, path, type);
17540
17604
  if (subcommand === "service-retire") return await retire(context, path, type);
17541
- throw new UsageError(USAGE$14);
17605
+ throw new UsageError(USAGE$15);
17542
17606
  }
17543
17607
  /** `service-add-review <type> [--name …] [--replicas …]`. */
17544
17608
  async function reviewAddition(context, path, type) {
@@ -17561,9 +17625,9 @@ async function reviewAddition(context, path, type) {
17561
17625
  /** `service-add <type> --name … [--replicas …]`. */
17562
17626
  async function add$4(context, path, type) {
17563
17627
  const name = context.flags.get("--name")?.trim() ?? "";
17564
- if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$14}`);
17628
+ if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$15}`);
17565
17629
  const replicas = wholeNumber(context, "--replicas") ?? 1;
17566
- if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$14}`);
17630
+ if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$15}`);
17567
17631
  const serviceType = type;
17568
17632
  return await written$1(confirmableWrite(context, `Add the ${type} service "${name}" with ${String(replicas)} replica(s).`, async () => {
17569
17633
  const desiredGeneration = await environmentGeneration(path);
@@ -17580,7 +17644,7 @@ async function add$4(context, path, type) {
17580
17644
  }
17581
17645
  /** `service-runtime <type> --running …`. */
17582
17646
  async function runtime$1(context, path, type) {
17583
- const running = onOff$5(context, "--running", USAGE$14);
17647
+ const running = onOff$5(context, "--running", USAGE$15);
17584
17648
  return await written$1(confirmableWrite(context, `${running ? "Start" : "Stop"} the ${type} service. Its data is kept either way.`, async () => {
17585
17649
  const desiredGeneration = await environmentGeneration(path);
17586
17650
  const body = {
@@ -17598,7 +17662,7 @@ async function runtime$1(context, path, type) {
17598
17662
  }
17599
17663
  /** `service-protect <type> --locked …`. */
17600
17664
  async function protect(context, path, type) {
17601
- const locked = onOff$5(context, "--locked", USAGE$14);
17665
+ const locked = onOff$5(context, "--locked", USAGE$15);
17602
17666
  return await written$1(confirmableWrite(context, locked ? `Lock the ${type} service, so no removal path may delete it.` : `Unlock the ${type} service.`, async () => {
17603
17667
  const desiredGeneration = await environmentGeneration(path);
17604
17668
  const body = {
@@ -17617,7 +17681,7 @@ async function protect(context, path, type) {
17617
17681
  /** `service-retire <type> --digest …`: the review's digest is the confirmation. */
17618
17682
  async function retire(context, path, type) {
17619
17683
  const digest = context.flags.get("--digest")?.trim() ?? "";
17620
- if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$14}`);
17684
+ if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$15}`);
17621
17685
  return await written$1(confirmableWrite(context, [`Request the retirement of the ${type} service.`, " The digest binds this request to the review it was made against."].join("\n"), async () => {
17622
17686
  const desiredGeneration = await environmentGeneration(path);
17623
17687
  const body = {
@@ -17645,7 +17709,7 @@ function wholeNumber(context, flag) {
17645
17709
  const raw = context.flags.get(flag)?.trim() ?? "";
17646
17710
  if (raw === "") return null;
17647
17711
  const value = Number(raw);
17648
- if (!Number.isInteger(value) || value < 1) throw new UsageError(`${flag} must be a whole number of at least 1 (got ${raw}).\n\n${USAGE$14}`);
17712
+ if (!Number.isInteger(value) || value < 1) throw new UsageError(`${flag} must be a whole number of at least 1 (got ${raw}).\n\n${USAGE$15}`);
17649
17713
  return value;
17650
17714
  }
17651
17715
  /** The write receipt, by the shape the API answered with. */
@@ -17683,7 +17747,7 @@ function environmentServicesText(report) {
17683
17747
  }
17684
17748
  //#endregion
17685
17749
  //#region src/commands/environment-shared.ts
17686
- var USAGE$13 = [
17750
+ var USAGE$14 = [
17687
17751
  "Usage: hostingctl environment shared-runtime <environment-uuid> --company <slug>",
17688
17752
  " hostingctl environment shared-runtime-adopt|shared-runtime-release <environment-uuid> --company <slug>",
17689
17753
  " hostingctl environment shared-app <environment-uuid> --company <slug>",
@@ -17700,7 +17764,7 @@ var USAGE$13 = [
17700
17764
  /** `environment shared-runtime|shared-app|shared-adopt`, from the `environment` command. */
17701
17765
  async function environmentShared(context, subcommand, rest) {
17702
17766
  const [environmentUuid, ...tail] = rest;
17703
- const path = await environmentPath(context, environmentUuid, USAGE$13);
17767
+ const path = await environmentPath(context, environmentUuid, USAGE$14);
17704
17768
  noExtra$7(tail);
17705
17769
  if (subcommand === "shared-runtime") return {
17706
17770
  kind: "shared-runtime",
@@ -17715,7 +17779,7 @@ async function environmentShared(context, subcommand, rest) {
17715
17779
  if (subcommand === "shared-app-adopt") return await app(context, "adopt", path);
17716
17780
  if (subcommand === "shared-app-release") return await app(context, "release", path);
17717
17781
  if (subcommand === "shared-adopt") return await environment$1(context, path);
17718
- throw new UsageError(USAGE$13);
17782
+ throw new UsageError(USAGE$14);
17719
17783
  }
17720
17784
  /** `shared-runtime-adopt|release`: one runtime, adopted or given back. */
17721
17785
  async function runtime(context, kind, path) {
@@ -17743,7 +17807,7 @@ async function environment$1(context, path) {
17743
17807
  }
17744
17808
  /** No positional arguments, or a usage refusal. */
17745
17809
  function noExtra$7(rest) {
17746
- if (rest.length > 0) throw new UsageError(USAGE$13);
17810
+ if (rest.length > 0) throw new UsageError(USAGE$14);
17747
17811
  }
17748
17812
  /** The line shared by both shared states: adopted, with whom, and the ceiling it lives inside. */
17749
17813
  function sharedLine(one) {
@@ -17767,7 +17831,7 @@ function environmentSharedText(report) {
17767
17831
  }
17768
17832
  //#endregion
17769
17833
  //#region src/commands/environment-site-access.ts
17770
- var USAGE$12 = [
17834
+ var USAGE$13 = [
17771
17835
  "Usage: hostingctl environment site-access <environment-uuid> --company <slug>",
17772
17836
  " hostingctl environment site-access-set <environment-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
17773
17837
  " hostingctl environment site-users <environment-uuid> --company <slug>",
@@ -17813,16 +17877,16 @@ var flow = siteAccessFlow({
17813
17877
  refresh: async (path) => (await hostingSiteAccessUsersRefresh({ path })).data,
17814
17878
  destroy: async (path) => (await hostingSiteAccessUsersDestroy({ path })).data,
17815
17879
  rotate: null
17816
- }, USAGE$12);
17880
+ }, USAGE$13);
17817
17881
  /** `environment site-access*|site-user*`: resolve the environment, then run the shared flow. */
17818
17882
  async function environmentSiteAccess(context, action, rest) {
17819
17883
  const [environmentUuid, ...tail] = rest;
17820
- if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$12);
17821
- return await flow(context, action, await environmentPath(context, environmentUuid, USAGE$12), tail);
17884
+ if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$13);
17885
+ return await flow(context, action, await environmentPath(context, environmentUuid, USAGE$13), tail);
17822
17886
  }
17823
17887
  //#endregion
17824
17888
  //#region src/commands/environment-tools.ts
17825
- var USAGE$11 = [
17889
+ var USAGE$12 = [
17826
17890
  "Usage: hostingctl environment tools verify <environment-uuid> <tool> --company <slug>",
17827
17891
  " hostingctl environment tools select <environment-uuid> <tool> --company <slug> --enabled <on|off>",
17828
17892
  "",
@@ -17836,8 +17900,8 @@ var USAGE$11 = [
17836
17900
  /** `environment tools verify|select`. */
17837
17901
  async function environmentTools(context, rest) {
17838
17902
  const [action, environmentUuid, tool, ...extra] = rest;
17839
- if (action === void 0 || tool === void 0 || extra.length > 0) throw new UsageError(USAGE$11);
17840
- const path = await environmentPath(context, environmentUuid, USAGE$11);
17903
+ if (action === void 0 || tool === void 0 || extra.length > 0) throw new UsageError(USAGE$12);
17904
+ const path = await environmentPath(context, environmentUuid, USAGE$12);
17841
17905
  if (action === "verify") return {
17842
17906
  kind: "tool",
17843
17907
  tool,
@@ -17847,11 +17911,11 @@ async function environmentTools(context, rest) {
17847
17911
  } })).data
17848
17912
  };
17849
17913
  if (action === "select") return await select$1(context, path, tool);
17850
- throw new UsageError(USAGE$11);
17914
+ throw new UsageError(USAGE$12);
17851
17915
  }
17852
17916
  /** `select --enabled …`: one tool's presence, echoed with the environment's generation. */
17853
17917
  async function select$1(context, path, tool) {
17854
- const enabled = onOff$5(context, "--enabled", USAGE$11);
17918
+ const enabled = onOff$5(context, "--enabled", USAGE$12);
17855
17919
  return {
17856
17920
  kind: "tools-write",
17857
17921
  outcome: await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} the ${tool} tool for this environment.`, async () => {
@@ -17971,23 +18035,23 @@ function list$3(values) {
17971
18035
  var ENVIRONMENT_TOPICS = [
17972
18036
  {
17973
18037
  path: ["retention"],
17974
- usage: USAGE$18
18038
+ usage: USAGE$20
17975
18039
  },
17976
18040
  {
17977
18041
  path: ["retention-set"],
17978
- usage: USAGE$18
18042
+ usage: USAGE$20
17979
18043
  },
17980
18044
  {
17981
18045
  path: ["database-show"],
17982
- usage: USAGE$18
18046
+ usage: USAGE$20
17983
18047
  },
17984
18048
  {
17985
18049
  path: ["database-reveal"],
17986
- usage: USAGE$18
18050
+ usage: USAGE$20
17987
18051
  },
17988
18052
  {
17989
18053
  path: ["tuning"],
17990
- usage: USAGE$18
18054
+ usage: USAGE$20
17991
18055
  },
17992
18056
  {
17993
18057
  path: ["configuration"],
@@ -18011,144 +18075,142 @@ var ENVIRONMENT_TOPICS = [
18011
18075
  },
18012
18076
  {
18013
18077
  path: ["domains"],
18014
- usage: USAGE$16
18078
+ usage: USAGE$17
18015
18079
  },
18016
18080
  {
18017
18081
  path: ["domain-add"],
18018
- usage: USAGE$16
18082
+ usage: USAGE$17
18019
18083
  },
18020
18084
  {
18021
18085
  path: ["domain-verify"],
18022
- usage: USAGE$16
18086
+ usage: USAGE$17
18023
18087
  },
18024
18088
  {
18025
18089
  path: ["domain-check-routing"],
18026
- usage: USAGE$16
18090
+ usage: USAGE$17
18027
18091
  },
18028
18092
  {
18029
18093
  path: ["domain-intended"],
18030
- usage: USAGE$16
18094
+ usage: USAGE$17
18031
18095
  },
18032
18096
  {
18033
18097
  path: ["domain-primary"],
18034
- usage: USAGE$16
18098
+ usage: USAGE$17
18035
18099
  },
18036
18100
  {
18037
18101
  path: ["domain-remove"],
18038
- usage: USAGE$16
18102
+ usage: USAGE$17
18039
18103
  },
18040
18104
  {
18041
18105
  path: ["redirects"],
18042
- usage: USAGE$16
18106
+ usage: USAGE$17
18043
18107
  },
18044
18108
  {
18045
18109
  path: ["redirect-set"],
18046
- usage: USAGE$16
18110
+ usage: USAGE$17
18047
18111
  },
18048
18112
  {
18049
18113
  path: ["redirect-remove"],
18050
- usage: USAGE$16
18114
+ usage: USAGE$17
18051
18115
  },
18052
18116
  {
18053
18117
  path: ["database-exports"],
18054
- usage: USAGE$15
18118
+ usage: USAGE$16
18055
18119
  },
18056
18120
  {
18057
18121
  path: ["database-export-create"],
18058
- usage: USAGE$15
18122
+ usage: USAGE$16
18059
18123
  },
18060
18124
  {
18061
18125
  path: ["database-export-download"],
18062
- usage: USAGE$15
18126
+ usage: USAGE$16
18063
18127
  },
18064
18128
  {
18065
18129
  path: ["database-export-remove"],
18066
- usage: USAGE$15
18130
+ usage: USAGE$16
18067
18131
  },
18068
18132
  {
18069
18133
  path: ["release-bundle"],
18070
- usage: USAGE$15
18134
+ usage: USAGE$16
18071
18135
  },
18072
18136
  {
18073
18137
  path: ["service-add-review"],
18074
- usage: USAGE$14
18138
+ usage: USAGE$15
18075
18139
  },
18076
18140
  {
18077
18141
  path: ["service-add"],
18078
- usage: USAGE$14
18142
+ usage: USAGE$15
18079
18143
  },
18080
18144
  {
18081
18145
  path: ["service-runtime"],
18082
- usage: USAGE$14
18146
+ usage: USAGE$15
18083
18147
  },
18084
18148
  {
18085
18149
  path: ["service-protect"],
18086
- usage: USAGE$14
18150
+ usage: USAGE$15
18087
18151
  },
18088
18152
  {
18089
18153
  path: ["service-retirement"],
18090
- usage: USAGE$14
18154
+ usage: USAGE$15
18091
18155
  },
18092
18156
  {
18093
18157
  path: ["service-retire"],
18094
- usage: USAGE$14
18158
+ usage: USAGE$15
18095
18159
  },
18096
18160
  {
18097
18161
  path: ["shared-runtime"],
18098
- usage: USAGE$13
18162
+ usage: USAGE$14
18099
18163
  },
18100
18164
  {
18101
18165
  path: ["shared-runtime-adopt"],
18102
- usage: USAGE$13
18166
+ usage: USAGE$14
18103
18167
  },
18104
18168
  {
18105
18169
  path: ["shared-runtime-release"],
18106
- usage: USAGE$13
18170
+ usage: USAGE$14
18107
18171
  },
18108
18172
  {
18109
18173
  path: ["shared-app"],
18110
- usage: USAGE$13
18174
+ usage: USAGE$14
18111
18175
  },
18112
18176
  {
18113
18177
  path: ["shared-app-adopt"],
18114
- usage: USAGE$13
18178
+ usage: USAGE$14
18115
18179
  },
18116
18180
  {
18117
18181
  path: ["shared-app-release"],
18118
- usage: USAGE$13
18182
+ usage: USAGE$14
18119
18183
  },
18120
18184
  {
18121
18185
  path: ["shared-adopt"],
18122
- usage: USAGE$13
18186
+ usage: USAGE$14
18123
18187
  },
18124
18188
  {
18125
18189
  path: ["site-access"],
18126
- usage: USAGE$12
18190
+ usage: USAGE$13
18127
18191
  },
18128
18192
  {
18129
18193
  path: ["site-access-set"],
18130
- usage: USAGE$12
18194
+ usage: USAGE$13
18131
18195
  },
18132
18196
  {
18133
18197
  path: ["site-users"],
18134
- usage: USAGE$12
18198
+ usage: USAGE$13
18135
18199
  },
18136
18200
  {
18137
18201
  path: ["site-user"],
18138
- usage: USAGE$12
18202
+ usage: USAGE$13
18139
18203
  },
18140
18204
  {
18141
18205
  path: ["tools"],
18142
- usage: USAGE$11
18206
+ usage: USAGE$12
18143
18207
  }
18144
18208
  ];
18145
18209
  //#endregion
18146
18210
  //#region src/commands/environment-metadata.ts
18147
18211
  /**
18148
- * `environment` — creating an environment, reading one, and the writes that change it.
18149
- *
18150
- * The usage text moves here from the command module, so the description of the command and the command
18151
- * itself hold one copy of it between them.
18212
+ * `environment` — creating an environment, reading one, and the writes that change it. The usage text moves here
18213
+ * from the command module, so the description of the command and the command itself hold one copy of it between them.
18152
18214
  */
18153
18215
  var ENVIRONMENT_USAGE = [
18154
18216
  "Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
@@ -18159,6 +18221,8 @@ var ENVIRONMENT_USAGE = [
18159
18221
  " hostingctl environment configuration <show|preview|save|apply> <uuid> --company <slug> [--file <path>]",
18160
18222
  " hostingctl environment secret <write|import|local> <uuid> --company <slug> …",
18161
18223
  " hostingctl environment databases|database <uuid> … --company <slug>",
18224
+ " hostingctl environment component-version <uuid> <workload-uuid> <version> --company <slug>",
18225
+ " hostingctl environment references <uuid> --company <slug>",
18162
18226
  "",
18163
18227
  " create Create an environment from a platform package; the platform chooses the placement.",
18164
18228
  " show One environment in detail, including the status the listing does not carry.",
@@ -18171,9 +18235,13 @@ var ENVIRONMENT_USAGE = [
18171
18235
  " declarations' local development values for a local run.",
18172
18236
  " databases List the environment-owned databases, declare one, replace who may consume it, or retire",
18173
18237
  " one while retaining its data and its backups.",
18238
+ " component-version Move one curated component instance to another version this platform pins an image for.",
18239
+ " references Every producer a configuration document for this environment may reference, the kind each",
18240
+ " is written as, and the fields each admits: the key goes in the shape's first slot, the field",
18241
+ " in `field`, and a credential field is marked rather than valued.",
18174
18242
  "",
18175
- "The writes (create, reconcile, scale, portable prepare/confirm, configuration save/apply, secret write/import,",
18176
- "database create/bind/retire) need --confirm; --dry-run describes the change without making it.",
18243
+ "The writes (create, reconcile, scale, component-version, portable prepare/confirm, configuration save/apply,",
18244
+ "secret write/import, database create/bind/retire) need --confirm; --dry-run describes the change without making it.",
18177
18245
  "",
18178
18246
  "`secret local` is the one exception and is a read: it writes each declaration's local development value - a",
18179
18247
  "development default such as `password`, not a credential - into an env file for a local run, names the declared",
@@ -18392,6 +18460,8 @@ var ENVIRONMENT_METADATA = {
18392
18460
  "secret",
18393
18461
  "databases",
18394
18462
  "database",
18463
+ "component-version",
18464
+ "references",
18395
18465
  "retention",
18396
18466
  "retention-set",
18397
18467
  "database-show",
@@ -18433,6 +18503,33 @@ var ENVIRONMENT_METADATA = {
18433
18503
  ]
18434
18504
  };
18435
18505
  //#endregion
18506
+ //#region src/commands/environment-references.ts
18507
+ var USAGE$11 = [
18508
+ "Usage: hostingctl environment references <environment-uuid> --company <slug>",
18509
+ "",
18510
+ " references Every producer a configuration document for this environment may reference, the kind",
18511
+ " each is written as, and the fields each admits.",
18512
+ "",
18513
+ "A producer's key is what goes in its shape's first slot and a field is what goes in `field`. A producer with",
18514
+ "no fields is written without one: {secret: app_token}, {redis: cache}. A field marked (credential) hands",
18515
+ "over a secret when it is read, so it is named here and never printed."
18516
+ ].join("\n");
18517
+ /**
18518
+ * `environment references <uuid>`: what a document here may reference, and what each producer admits.
18519
+ *
18520
+ * The directory is the platform's own projection of the document's secrets and databases, the cache
18521
+ * contract and the workloads this environment runs, so this command answers discovery without restating any
18522
+ * of those vocabularies and without resolving a single value.
18523
+ */
18524
+ async function environmentReferences(context, rest) {
18525
+ const [uuid, ...extra] = rest;
18526
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$11);
18527
+ return (await hostingEnvironmentsReferences({ path: {
18528
+ company: await requireCompany(context.flags),
18529
+ environmentUuid: uuid
18530
+ } })).data;
18531
+ }
18532
+ //#endregion
18436
18533
  //#region src/commands/environment-configuration-text.ts
18437
18534
  /**
18438
18535
  * The phrases the platform writes when the cluster itself answered that it cannot run an engine.
@@ -18482,6 +18579,12 @@ function configurationPageText(page) {
18482
18579
  lines.push(...revisionLines("known good", page.knownGoodRevision));
18483
18580
  return lines.join("\n");
18484
18581
  }
18582
+ /**
18583
+ * One revision's line and the secrets it declares.
18584
+ *
18585
+ * The page carries one revision in full and names the others, so both shapes are read by the same
18586
+ * printing: every field here is one the reference carries too, and the document is not printed.
18587
+ */
18485
18588
  function revisionLines(label, revision) {
18486
18589
  if (revision === null) return [` ${label} none`];
18487
18590
  const lines = [` ${label} ${revision.origin} ${revision.applied ? "applied" : "draft"} ${revision.configHash}`];
@@ -18549,6 +18652,7 @@ function taggedText(report) {
18549
18652
  function environmentText(report) {
18550
18653
  if ("kind" in report) return taggedText(report);
18551
18654
  if ("sent" in report) return renderWriteOutcome(report, outcomeOf$1);
18655
+ if ("producers" in report) return referenceDirectoryText(report);
18552
18656
  if ("configuration" in report) return configurationPreviewText(report);
18553
18657
  if ("canManage" in report && "revision" in report) return configurationPageText(report);
18554
18658
  if ("canManage" in report && "databases" in report) return databasePageText(report);
@@ -18568,6 +18672,28 @@ function environmentText(report) {
18568
18672
  ` layout ${report.applicationLayout}`
18569
18673
  ].join("\n");
18570
18674
  }
18675
+ /**
18676
+ * The reference directory: one line per producer — its kind, its key, then what may be read from it.
18677
+ *
18678
+ * A field a read hands a credential over is marked rather than valued, so this renderer cannot print one even
18679
+ * if a later payload carried it. A producer with no fields says so and shows the shape it is written with,
18680
+ * because "which producer" and "which field" are the two questions a customer actually asks.
18681
+ */
18682
+ function referenceDirectoryText(directory) {
18683
+ if (directory.producers.length === 0) return "No producers: a configuration document for this environment may not reference anything yet.";
18684
+ return [
18685
+ `Producers a configuration document for this environment may reference (${String(directory.producers.length)}):`,
18686
+ ...directory.producers.map((one) => referenceProducerLine(one)),
18687
+ "",
18688
+ "A (credential) field hands over a secret when it is read, so it is named here and never printed. Write the",
18689
+ "producer's key in the shape's first slot and the field in `field`."
18690
+ ].join("\n");
18691
+ }
18692
+ /** One producer on one line: the kind, the key, then every field it admits. */
18693
+ function referenceProducerLine(producer) {
18694
+ const fields = producer.fields.length === 0 ? `no field (write {${producer.kind}: ${producer.key}})` : producer.fields.map((field) => field.secret ? `${field.name} (credential)` : field.name).join(", ");
18695
+ return ` ${producer.kind} ${producer.key} — ${fields}`;
18696
+ }
18571
18697
  /** The last observation that was an actual reconcile, or that none is retained. Never derived here. */
18572
18698
  function lastReconcile(data) {
18573
18699
  if (data === null) return "none observed";
@@ -18575,6 +18701,7 @@ function lastReconcile(data) {
18575
18701
  }
18576
18702
  /** A write's answer: the environment, the configuration page, the database, or a retirement. */
18577
18703
  function outcomeOf$1(result) {
18704
+ if ("previous" in result) return componentVersionText(result);
18578
18705
  if ("revision" in result && "environmentUuid" in result) return configurationPageText(result);
18579
18706
  if ("prepared" in result) return portablePreparationText(result);
18580
18707
  if ("message" in result) return portableResultText(result);
@@ -18582,6 +18709,10 @@ function outcomeOf$1(result) {
18582
18709
  if ("databaseName" in result) return databaseText(result);
18583
18710
  return ` status ${result.status.status} generation ${String(result.desiredGeneration)}`;
18584
18711
  }
18712
+ /** A curated component's move: the version it left, the version it now runs, and that version's image. */
18713
+ function componentVersionText(data) {
18714
+ return [` version ${data.previous} → ${data.version}`, ` image ${data.image}`].join("\n");
18715
+ }
18585
18716
  /**
18586
18717
  * The three states, each named for what it means rather than for the comparison: an environment that never
18587
18718
  * adopted the shared set is not participating, not incomplete, and the difference is the whole reason the
@@ -26051,6 +26182,7 @@ var hostingDatabaseDataSchema = object({
26051
26182
  userName: string(),
26052
26183
  engine: hostingWorkloadEnumSchema,
26053
26184
  configurationKey: string().nullable(),
26185
+ extensions: array(string()).nullable().describe("PostgreSQL extensions this identity has enabled. Exposed so a screen can show what the database already loads and keep it when the identity is\nre-declared: a document that silently omitted them would turn a rebind into a removal."),
26054
26186
  grants: dataCollectionSchema,
26055
26187
  retirement: union([hostingDatabaseRetirementDataSchema, _null()])
26056
26188
  });
@@ -26644,6 +26776,11 @@ var hostingClusterDataSchema = object({
26644
26776
  name: string(),
26645
26777
  baseDomain: string()
26646
26778
  });
26779
+ object({
26780
+ previous: string(),
26781
+ version: string(),
26782
+ image: string()
26783
+ });
26647
26784
  var hostingConfigurationSourceDataSchema = object({ root: string() });
26648
26785
  var hostingConfigurationEnvironmentDataSchema = object({
26649
26786
  name: string(),
@@ -26748,7 +26885,8 @@ var hostingConfigurationDatabaseDataSchema = object({
26748
26885
  engine: string(),
26749
26886
  application: string().nullable(),
26750
26887
  bindings: array(string()),
26751
- server: string().nullable().describe("The server this database belongs to, when the environment runs more than one of its engine. Absent, the engine's single server is resolved as before. An environment may run a second\nserver of an engine because the client asked for one (`DEDICATED`), and then the database\nmust say which one it means: binding by engine alone would silently serve every database\nfrom whichever sorted first.")
26888
+ server: string().nullable().describe("The server this database belongs to, when the environment runs more than one of its engine. Absent, the engine's single server is resolved as before. An environment may run a second\nserver of an engine because the client asked for one (`DEDICATED`), and then the database\nmust say which one it means: binding by engine alone would silently serve every database\nfrom whichever sorted first."),
26889
+ extensions: array(string()).nullable().describe("PostgreSQL extensions this declaration enables. Selecting one has to reach BOTH the cluster (which must load the library at startup) and the\ndatabase (which must enable the extension), so the declaration records the selection and the\nrenderer derives both from it.")
26752
26890
  });
26753
26891
  var hostingConfigurationServiceDataSchema = object({
26754
26892
  key: string(),
@@ -26819,13 +26957,21 @@ var hostingConfigurationRevisionDataSchema = object({
26819
26957
  source: union([hostingConfigurationRepositorySourceDataSchema, _null()]),
26820
26958
  sourceProof: string().nullable()
26821
26959
  });
26960
+ var hostingConfigurationRevisionReferenceDataSchema = object({
26961
+ uuid: string(),
26962
+ origin: hostingConfigurationOriginEnumSchema,
26963
+ desiredGeneration: int(),
26964
+ configHash: string(),
26965
+ applied: boolean(),
26966
+ secrets: array(hostingConfigurationSecretStatusDataSchema)
26967
+ });
26822
26968
  var hostingConfigurationPageDataSchema = object({
26823
26969
  environmentUuid: string(),
26824
26970
  desiredGeneration: int(),
26825
26971
  canManage: boolean(),
26826
26972
  revision: union([hostingConfigurationRevisionDataSchema, _null()]),
26827
- activeRevision: union([hostingConfigurationRevisionDataSchema, _null()]),
26828
- knownGoodRevision: union([hostingConfigurationRevisionDataSchema, _null()]),
26973
+ activeRevision: union([hostingConfigurationRevisionReferenceDataSchema, _null()]),
26974
+ knownGoodRevision: union([hostingConfigurationRevisionReferenceDataSchema, _null()]),
26829
26975
  canRestore: boolean().describe("Whether the desired configuration differs from the last known good revision."),
26830
26976
  capabilities: hostingConfigurationCapabilitiesDataSchema
26831
26977
  });
@@ -26981,7 +27127,8 @@ var hostingDatabaseGrantDataSchema = object({
26981
27127
  var hostingDatabaseInputDataSchema = object({
26982
27128
  application: string().nullable(),
26983
27129
  server: string(),
26984
- bindings: array(string())
27130
+ bindings: array(string()),
27131
+ extensions: array(string()).describe("PostgreSQL extensions to enable.")
26985
27132
  });
26986
27133
  object({
26987
27134
  environmentUuid: string(),
@@ -27494,6 +27641,21 @@ object({
27494
27641
  });
27495
27642
  var hostingRedirectModeEnumSchema = _enum(["temporary", "permanent"]);
27496
27643
  var hostingRedirectTargetEnumSchema = _enum(["application", "fixed"]).describe("What a whole-domain redirect points at. A redirect is either an application alias that sends the browser to that application's own canonical address — so a later primary change moves the redirect with it — or a fixed HTTPS destination saved by the customer, for a name that redirects without a hosted application. The two are distinct states, not a boolean on one shape, so they are named here rather than left to a nullable column's presence.\n");
27644
+ var hostingReferenceKindEnumSchema = _enum([
27645
+ "secret",
27646
+ "database",
27647
+ "redis",
27648
+ "service"
27649
+ ]).describe("Which document shape a reference is written with. The kind is NOT decoration: it is the first slot of the shape a client writes (`{secret: …}`, `{database: …}`, `{redis: …}`, `{service: …}`), and each shape admits a different vocabulary. Keeping the kind explicit is what lets a refusal say what was wrong at the point the document is read, rather than after something has been resolved.\n");
27650
+ var hostingReferenceFieldDataSchema = object({
27651
+ name: string(),
27652
+ secret: boolean()
27653
+ });
27654
+ object({ producers: array(object({
27655
+ key: string(),
27656
+ kind: hostingReferenceKindEnumSchema.describe("Which document shape a reference is written with. The kind is NOT decoration: it is the first slot of the shape a client writes (`{secret: …}`, `{database: …}`, `{redis: …}`, `{service: …}`), and each shape admits a different vocabulary. Keeping the kind explicit is what lets a refusal say what was wrong at the point the document is read, rather than after something has been resolved.\n"),
27657
+ fields: array(hostingReferenceFieldDataSchema)
27658
+ })) });
27497
27659
  var hostingRefusalDataSchema = object({
27498
27660
  message: string(),
27499
27661
  detail: string()
@@ -28821,6 +28983,7 @@ var updateHostingApplicationCacheRequestSchema = object({
28821
28983
  })).optional()
28822
28984
  }).describe("The shape rules for an application's HTTP cache settings.\n\nShape only: types, presence and length. The bounds, the verified-hostname check and every\ncross-field rule live in `HostingHttpCacheService`, because they depend on the platform's\nconfiguration and on the application's own names — neither of which a static rule can see.");
28823
28985
  var updateHostingApplicationRequestSchema = object({ label: string().max(100).nullable() }).describe("Renaming one application.\n\nOnly the label is accepted. Everything a rename must not touch — the workload UUID, the\nimmutable `name` matching key, the generated hostname, the tree path and the database\nidentity — is deliberately absent from this request, so no payload can move them.\n\nThe label is `present` rather than `required` so \"clear it\" is a distinct, expressible\ninstruction: a null or blank label means \"show the application's own name again\", which\nis what every application looked like before it was ever renamed.");
28986
+ var updateHostingComponentVersionRequestSchema = object({ version: string().max(64).describe("Which versions this platform pins an image for is decided by the service, from the version catalogue, and\nrefused there by name. This only says the field must be a non-empty string.") }).describe("The version one curated component instance should run.\n\nA FormRequest rather than a bare array because that is what the generated contract can describe: a Spatie Data\nargument was accepted by the action but never appeared as a `requestBody`, so the published client had no body to send\nand the CLI could not call the endpoint at all. The rules live here so the documented contract and the accepted input\nare the same thing.");
28824
28987
  var updateHostingEnvironmentRequestSchema = object({
28825
28988
  certificateIssuer: hostingCertificateIssuerEnumSchema.optional(),
28826
28989
  desiredGeneration: int().min(1),
@@ -29904,6 +30067,13 @@ union([
29904
30067
  messageDataSchema,
29905
30068
  messageDataSchema
29906
30069
  ]);
30070
+ union([
30071
+ object({ message: string().describe("Error overview.") }),
30072
+ object({ message: string().describe("Error overview.") }),
30073
+ messageDataSchema,
30074
+ messageDataSchema
30075
+ ]);
30076
+ updateHostingComponentVersionRequestSchema.describe("The version one curated component instance should run.\n\nA FormRequest rather than a bare array because that is what the generated contract can describe: a Spatie Data\nargument was accepted by the action but never appeared as a `requestBody`, so the published client had no body to send\nand the CLI could not call the endpoint at all. The rules live here so the documented contract and the accepted input\nare the same thing.");
29907
30077
  string().optional().default("restore").describe("The reviewed action: `reset` for a clean installation, `restore` for a retained backup.");
29908
30078
  string().optional().describe("The application version a reset should install.");
29909
30079
  string().optional().default("").describe("The version the collected backup holds.");
@@ -30365,6 +30535,11 @@ union([
30365
30535
  object({ message: string().describe("Error overview.") }),
30366
30536
  messageDataSchema
30367
30537
  ]);
30538
+ union([
30539
+ object({ message: string().describe("Error overview.") }),
30540
+ object({ message: string().describe("Error overview.") }),
30541
+ messageDataSchema
30542
+ ]);
30368
30543
  var hostingExternalSecretStoreStatus200Schema = hostingExternalSecretConnectionDataSchema;
30369
30544
  var hostingExternalSecretStoreStatus201Schema = hostingExternalSecretConnectionDataSchema;
30370
30545
  var hostingExternalSecretStoreStatus401Schema = object({ message: string().describe("Error overview.") });
@@ -31537,22 +31712,34 @@ function oneUuid(rest) {
31537
31712
  }
31538
31713
  //#endregion
31539
31714
  //#region src/commands/environment.ts
31715
+ /**
31716
+ * The subcommands answered by exactly one function, as a table rather than a chain of comparisons.
31717
+ *
31718
+ * A table is what keeps this cheap to extend: adding a command is an entry, not another branch in a function the
31719
+ * complexity guard is already watching.
31720
+ */
31721
+ var SIMPLE_SUBCOMMANDS = {
31722
+ tools: environmentTools,
31723
+ create: create$2,
31724
+ portable,
31725
+ configuration,
31726
+ secret,
31727
+ databases,
31728
+ database
31729
+ };
31540
31730
  /** Which feature group answers this subcommand and arguments, or null when the command itself does. */
31541
31731
  function dispatched(context, subcommand, rest) {
31542
31732
  if (subcommand === void 0) return null;
31543
31733
  if (ADMIN_SUBCOMMANDS.has(subcommand)) return environmentAdmin(context, subcommand, rest);
31544
31734
  if (DOMAIN_SUBCOMMANDS.has(subcommand)) return environmentDomains(context, subcommand, rest);
31545
31735
  if (SITE_SUBCOMMANDS.has(subcommand)) return environmentSiteAccess(context, subcommand, rest);
31546
- if (subcommand === "tools") return environmentTools(context, rest);
31547
31736
  if (SHARED_SUBCOMMANDS.has(subcommand)) return environmentShared(context, subcommand, rest);
31548
31737
  if (EXPORT_SUBCOMMANDS.has(subcommand)) return environmentExports(context, subcommand, rest);
31549
31738
  if (SERVICE_SUBCOMMANDS.has(subcommand)) return environmentServices(context, subcommand, rest);
31550
- if (subcommand === "create") return create$2(context, rest);
31551
- if (subcommand === "portable") return portable(context, rest);
31552
- if (subcommand === "configuration") return configuration(context, rest);
31553
- if (subcommand === "secret") return secret(context, rest);
31554
- if (subcommand === "databases") return databases(context, rest);
31555
- if (subcommand === "database") return database(context, rest);
31739
+ const simple = Object.hasOwn(SIMPLE_SUBCOMMANDS, subcommand) ? SIMPLE_SUBCOMMANDS[subcommand] : void 0;
31740
+ if (simple !== void 0) return simple(context, rest);
31741
+ if (COMPONENT_VERSION_SUBCOMMANDS.has(subcommand)) return environmentComponentVersion(context, rest);
31742
+ if (REFERENCES_SUBCOMMANDS.has(subcommand)) return environmentReferences(context, rest);
31556
31743
  return null;
31557
31744
  }
31558
31745
  /** The subcommands environment-services.ts owns: adding, stopping, locking and retiring one service. */
@@ -31564,6 +31751,10 @@ var SERVICE_SUBCOMMANDS = /* @__PURE__ */ new Set([
31564
31751
  "service-retirement",
31565
31752
  "service-retire"
31566
31753
  ]);
31754
+ /** The subcommands environment-references.ts owns: what a configuration document here may reference. */
31755
+ var REFERENCES_SUBCOMMANDS = /* @__PURE__ */ new Set(["references"]);
31756
+ /** The subcommands environment-component-version.ts owns: moving one curated component instance. */
31757
+ var COMPONENT_VERSION_SUBCOMMANDS = /* @__PURE__ */ new Set(["component-version"]);
31567
31758
  /** The subcommands environment-exports.ts owns: portable database exports and a release's bundle. */
31568
31759
  var EXPORT_SUBCOMMANDS = /* @__PURE__ */ new Set([
31569
31760
  "database-exports",
@@ -36627,7 +36818,7 @@ function writeUpdateState(state, env = process.env) {
36627
36818
  }
36628
36819
  //#endregion
36629
36820
  //#region src/version.ts
36630
- var VERSION = "1.0.333";
36821
+ var VERSION = "1.0.343";
36631
36822
  //#endregion
36632
36823
  //#region src/commands/update.ts
36633
36824
  /**
@@ -36702,7 +36893,7 @@ var update = {
36702
36893
  }, process.env);
36703
36894
  return {
36704
36895
  ...known,
36705
- current: after ?? "1.0.333",
36896
+ current: after ?? "1.0.343",
36706
36897
  latest: after ?? latest,
36707
36898
  upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
36708
36899
  action: "run",
@@ -36977,7 +37168,7 @@ async function printUpdateNotice(options) {
36977
37168
  }, env, { waitMs: NOTICE_LOCK_WAIT_MS });
36978
37169
  } catch {}
36979
37170
  if (latest === null) return;
36980
- if (!isNewerVersion(latest, "1.0.333")) return;
37171
+ if (!isNewerVersion(latest, "1.0.343")) return;
36981
37172
  process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
36982
37173
  }
36983
37174
  /** Whether an environment variable is set to something, which is how CI and the opt-out are read. */