@haakco/hostingctl 1.0.689 → 1.0.695

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
@@ -38116,6 +38116,38 @@ function platformStorageClassSetDefault(options) {
38116
38116
  }));
38117
38117
  }
38118
38118
  /**
38119
+ * {@link /platform/hosting/clusters/:clusterUuid/system-database-pools}
38120
+ */
38121
+ function platformSystemDatabasePoolShow(options) {
38122
+ const { client: request = client, ...config } = options;
38123
+ return withUnwrap(request({
38124
+ method: "GET",
38125
+ url: "/platform/hosting/clusters/{clusterUuid}/system-database-pools",
38126
+ security: [{
38127
+ type: "http",
38128
+ scheme: "bearer"
38129
+ }],
38130
+ ...config,
38131
+ throwOnError: config.throwOnError ?? true
38132
+ }));
38133
+ }
38134
+ /**
38135
+ * {@link /platform/hosting/clusters/:clusterUuid/system-database-pools}
38136
+ */
38137
+ function platformSystemDatabasePoolUpdate(options) {
38138
+ const { client: request = client, ...config } = options;
38139
+ return withUnwrap(request({
38140
+ method: "PATCH",
38141
+ url: "/platform/hosting/clusters/{clusterUuid}/system-database-pools",
38142
+ security: [{
38143
+ type: "http",
38144
+ scheme: "bearer"
38145
+ }],
38146
+ ...config,
38147
+ throwOnError: config.throwOnError ?? true
38148
+ }));
38149
+ }
38150
+ /**
38119
38151
  * {@link /platform/hosting/orphans}
38120
38152
  */
38121
38153
  function platformHostingOrphans(options = {}) {
@@ -38788,7 +38820,7 @@ function renderWriteOutcome(outcome, describeResult) {
38788
38820
  }
38789
38821
  //#endregion
38790
38822
  //#region src/commands/auth-account.ts
38791
- var USAGE$59 = [
38823
+ var USAGE$60 = [
38792
38824
  "Usage: hostingctl auth closure show",
38793
38825
  " hostingctl auth closure request --reason <text> (--current-password-file <path>|--current-password-stdin)",
38794
38826
  " hostingctl auth picture set --image-file <path>",
@@ -38813,26 +38845,26 @@ async function account$1(context, subcommand, rest) {
38813
38845
  if (subcommand === "picture") return await picture(context, action, tail);
38814
38846
  if (subcommand === "notifications") return await notifications(context, action, tail);
38815
38847
  if (subcommand === "sent-email" || subcommand === "sent-email-show") return await sentEmail(context, { kind: "auth" }, subcommand, rest);
38816
- throw new UsageError(USAGE$59);
38848
+ throw new UsageError(USAGE$60);
38817
38849
  }
38818
38850
  /** `auth closure show|request`. */
38819
38851
  async function closure(context, action, tail) {
38820
- if (tail.length > 0) throw new UsageError(USAGE$59);
38852
+ if (tail.length > 0) throw new UsageError(USAGE$60);
38821
38853
  if (action === "show") return (await accountClosureShow({})).data;
38822
38854
  if (action === "request") return await closeAccount(context);
38823
- throw new UsageError(USAGE$59);
38855
+ throw new UsageError(USAGE$60);
38824
38856
  }
38825
38857
  /** `auth picture set|remove`. */
38826
38858
  async function picture(context, action, tail) {
38827
- if (tail.length > 0) throw new UsageError(USAGE$59);
38859
+ if (tail.length > 0) throw new UsageError(USAGE$60);
38828
38860
  if (action === "set") return await setPicture(context);
38829
38861
  if (action === "remove") return await removePicture(context);
38830
- throw new UsageError(USAGE$59);
38862
+ throw new UsageError(USAGE$60);
38831
38863
  }
38832
38864
  /** `auth notifications`, `read <id>` or `read-all`. */
38833
38865
  async function notifications(context, action, tail) {
38834
38866
  if (action === void 0) {
38835
- if (tail.length > 0) throw new UsageError(USAGE$59);
38867
+ if (tail.length > 0) throw new UsageError(USAGE$60);
38836
38868
  return await allPages(async (page, perPage) => {
38837
38869
  const answer = await notificationIndex({ query: {
38838
38870
  page,
@@ -38848,7 +38880,7 @@ async function notifications(context, action, tail) {
38848
38880
  await notificationMarkAllRead({});
38849
38881
  return null;
38850
38882
  });
38851
- if (action !== "read" || tail.length !== 1) throw new UsageError(USAGE$59);
38883
+ if (action !== "read" || tail.length !== 1) throw new UsageError(USAGE$60);
38852
38884
  const notification = tail[0] ?? "";
38853
38885
  return await confirmableWrite(context, `Mark notification ${notification} read.`, async () => {
38854
38886
  await notificationMarkRead({ path: { notification } });
@@ -38864,11 +38896,11 @@ async function notifications(context, action, tail) {
38864
38896
  */
38865
38897
  async function closeAccount(context) {
38866
38898
  const reason = context.flags.get("--reason")?.trim() ?? "";
38867
- if (reason === "") throw new UsageError(`closure request needs --reason.\n\n${USAGE$59}`);
38899
+ if (reason === "") throw new UsageError(`closure request needs --reason.\n\n${USAGE$60}`);
38868
38900
  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 () => {
38869
38901
  const review = (await accountClosureShow({})).data;
38870
38902
  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"));
38871
- const currentPassword = readSecret(context, "current-password", 1024, USAGE$59);
38903
+ const currentPassword = readSecret(context, "current-password", 1024, USAGE$60);
38872
38904
  return (await accountClosureStore({ body: {
38873
38905
  reason,
38874
38906
  reviewedDigest: review.digest,
@@ -38880,7 +38912,7 @@ async function closeAccount(context) {
38880
38912
  async function setPicture(context) {
38881
38913
  const file = context.flags.get("--image-file") ?? "";
38882
38914
  return await confirmableWrite(context, file === "" ? "Set the profile picture." : `Set the profile picture to ${file}.`, async () => {
38883
- return (await profilePictureStore({ body: await imageUpload(file, USAGE$59) })).data;
38915
+ return (await profilePictureStore({ body: await imageUpload(file, USAGE$60) })).data;
38884
38916
  });
38885
38917
  }
38886
38918
  /** `auth picture remove`. */
@@ -38891,7 +38923,7 @@ async function removePicture(context) {
38891
38923
  }
38892
38924
  //#endregion
38893
38925
  //#region src/commands/auth-identity.ts
38894
- var USAGE$58 = [
38926
+ var USAGE$59 = [
38895
38927
  "Usage: hostingctl auth profile [--name <name>] [--email <email>] [--current-password-file <path>]",
38896
38928
  " hostingctl auth password (--current-password-file <path>|--current-password-stdin) (--new-password-file <path>|--new-password-stdin)",
38897
38929
  " hostingctl auth register --name <name> --email <email> (--password-file <path>|--password-stdin)",
@@ -38916,12 +38948,12 @@ var MAX_TOKEN_BYTES = 4096;
38916
38948
  /** One required flag's value, or a refusal naming the flag. */
38917
38949
  function required$8(context, flag) {
38918
38950
  const value = context.flags.get(flag)?.trim() ?? "";
38919
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$58}`);
38951
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$59}`);
38920
38952
  return value;
38921
38953
  }
38922
38954
  /** No positional arguments: every input here is a flag or a secret source. */
38923
38955
  function noPositional(rest) {
38924
- if (rest.length > 0) throw new UsageError(USAGE$58);
38956
+ if (rest.length > 0) throw new UsageError(USAGE$59);
38925
38957
  }
38926
38958
  /** The API's password contract takes a confirmation; the CLI's one input is the new password itself. */
38927
38959
  function passwordBody(password) {
@@ -38944,16 +38976,16 @@ async function identity(context, subcommand, rest) {
38944
38976
  if (subcommand === "forgot-password") return await forgotPassword(context);
38945
38977
  if (subcommand === "reset-password") return await resetPassword(context);
38946
38978
  if (subcommand === "verify-email") return await verifyEmail(context);
38947
- throw new UsageError(USAGE$58);
38979
+ throw new UsageError(USAGE$59);
38948
38980
  }
38949
38981
  /** `auth profile`: the account's own name and email, with the current password only when the email changes. */
38950
38982
  async function profile$2(context) {
38951
38983
  const name = context.flags.get("--name")?.trim() ?? "";
38952
38984
  const email = context.flags.get("--email")?.trim() ?? "";
38953
- 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$58}`);
38985
+ 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$59}`);
38954
38986
  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 () => {
38955
38987
  const current = (await authMe({})).data;
38956
- const currentPassword = hasSecret(context, "current-password") ? readSecret(context, "current-password", MAX_PASSWORD_BYTES, USAGE$58) : void 0;
38988
+ const currentPassword = hasSecret(context, "current-password") ? readSecret(context, "current-password", MAX_PASSWORD_BYTES, USAGE$59) : void 0;
38957
38989
  return (await authUpdateProfile({ body: {
38958
38990
  name: name === "" ? current.name ?? "" : name,
38959
38991
  email: email === "" ? current.email ?? "" : email,
@@ -38969,8 +39001,8 @@ function hasSecret(context, name) {
38969
39001
  async function password$1(context) {
38970
39002
  return await confirmableWrite(context, "Change the account's password.", async () => {
38971
39003
  return (await authChangePassword({ body: {
38972
- currentPassword: readSecret(context, "current-password", MAX_PASSWORD_BYTES, USAGE$58),
38973
- ...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES, USAGE$58))
39004
+ currentPassword: readSecret(context, "current-password", MAX_PASSWORD_BYTES, USAGE$59),
39005
+ ...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES, USAGE$59))
38974
39006
  } })).data;
38975
39007
  });
38976
39008
  }
@@ -38982,7 +39014,7 @@ async function register$1(context) {
38982
39014
  return (await authRegister({ body: {
38983
39015
  name,
38984
39016
  email,
38985
- ...passwordBody(readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$58))
39017
+ ...passwordBody(readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$59))
38986
39018
  } })).data;
38987
39019
  });
38988
39020
  }
@@ -38997,8 +39029,8 @@ async function forgotPassword(context) {
38997
39029
  async function resetPassword(context) {
38998
39030
  const email = required$8(context, "--email");
38999
39031
  return await confirmableWrite(context, `Reset the password for ${email}.`, async () => {
39000
- const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$58);
39001
- const password = readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$58);
39032
+ const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$59);
39033
+ const password = readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$59);
39002
39034
  return (await authResetPassword({ body: {
39003
39035
  token,
39004
39036
  email,
@@ -39014,7 +39046,7 @@ async function verifyEmail(context) {
39014
39046
  }
39015
39047
  //#endregion
39016
39048
  //#region src/commands/auth-impersonation.ts
39017
- var USAGE$57 = [
39049
+ var USAGE$58 = [
39018
39050
  "Usage: hostingctl auth impersonate start --target <user-uuid> --company <slug> --reason <text> [--minutes <n>] --store-as <profile>",
39019
39051
  " hostingctl auth impersonate status",
39020
39052
  " hostingctl auth impersonate stop",
@@ -39047,7 +39079,7 @@ async function impersonation(context, rest) {
39047
39079
  if (action === "stop" && tail.length === 0) return await stop(context);
39048
39080
  if (action === "list" && tail.length === 0) return await list$6();
39049
39081
  if (action === "end" && tail.length === 1) return await end(context, tail[0] ?? "");
39050
- throw new UsageError(USAGE$57);
39082
+ throw new UsageError(USAGE$58);
39051
39083
  }
39052
39084
  /** `start`: mint a token for another user, and keep it in a profile of its own. */
39053
39085
  async function start$1(context) {
@@ -39055,8 +39087,8 @@ async function start$1(context) {
39055
39087
  const company = context.flags.get("--company")?.trim() ?? "";
39056
39088
  const reason = context.flags.get("--reason")?.trim() ?? "";
39057
39089
  const storeAs = context.flags.get("--store-as")?.trim() ?? "";
39058
- if (target === "" || company === "" || reason === "") throw new UsageError(`start needs --target, --company and --reason.\n\n${USAGE$57}`);
39059
- if (storeAs === "") throw new UsageError(`start needs --store-as <profile>.\n\n${USAGE$57}`);
39090
+ if (target === "" || company === "" || reason === "") throw new UsageError(`start needs --target, --company and --reason.\n\n${USAGE$58}`);
39091
+ if (storeAs === "") throw new UsageError(`start needs --store-as <profile>.\n\n${USAGE$58}`);
39060
39092
  const minutes = wholeNumberFlag(context.flags, "--minutes") ?? DEFAULT_MINUTES;
39061
39093
  const document = await readProfiles();
39062
39094
  const operator = namedProfile(context.flags, document);
@@ -39150,7 +39182,7 @@ async function list$6() {
39150
39182
  }
39151
39183
  /** `end <uuid>`: end one recorded session by its uuid. */
39152
39184
  async function end(context, uuid) {
39153
- if (uuid === "") throw new UsageError(USAGE$57);
39185
+ if (uuid === "") throw new UsageError(USAGE$58);
39154
39186
  return await confirmableWrite(context, `End impersonation session ${uuid}.`, async () => ({
39155
39187
  ...EMPTY,
39156
39188
  action: "end",
@@ -39159,7 +39191,7 @@ async function end(context, uuid) {
39159
39191
  }
39160
39192
  //#endregion
39161
39193
  //#region src/commands/auth-push.ts
39162
- var USAGE$56 = [
39194
+ var USAGE$57 = [
39163
39195
  "Usage: hostingctl auth push-token set (--token-file <path>|--token-stdin)",
39164
39196
  " hostingctl auth push-token remove (--token-file <path>|--token-stdin)",
39165
39197
  "",
@@ -39170,12 +39202,12 @@ var USAGE$56 = [
39170
39202
  /** `auth push-token set|remove`: this account's mobile push registration. */
39171
39203
  async function authPush(context, rest) {
39172
39204
  const [action, ...tail] = rest;
39173
- if (tail.length > 0) throw new UsageError(USAGE$56);
39205
+ if (tail.length > 0) throw new UsageError(USAGE$57);
39174
39206
  if (action === "set") return {
39175
39207
  kind: "push-token",
39176
39208
  action: "set",
39177
39209
  sent: (await confirmableWrite(context, "Register this device's push token.", async () => {
39178
- await expoTokenStore({ body: { token: readSecret(context, "token", 4096, USAGE$56) } });
39210
+ await expoTokenStore({ body: { token: readSecret(context, "token", 4096, USAGE$57) } });
39179
39211
  return null;
39180
39212
  })).sent
39181
39213
  };
@@ -39183,11 +39215,11 @@ async function authPush(context, rest) {
39183
39215
  kind: "push-token",
39184
39216
  action: "remove",
39185
39217
  sent: (await confirmableWrite(context, "Remove this device's push token.", async () => {
39186
- await expoTokenDestroy({ query: { token: readSecret(context, "token", 4096, USAGE$56) } });
39218
+ await expoTokenDestroy({ query: { token: readSecret(context, "token", 4096, USAGE$57) } });
39187
39219
  return null;
39188
39220
  })).sent
39189
39221
  };
39190
- throw new UsageError(USAGE$56);
39222
+ throw new UsageError(USAGE$57);
39191
39223
  }
39192
39224
  /** The `auth push-token` renderer. */
39193
39225
  function authPushText(report) {
@@ -39396,52 +39428,52 @@ var AUTH_TOPICS = [
39396
39428
  },
39397
39429
  {
39398
39430
  path: ["profile"],
39399
- usage: USAGE$58
39431
+ usage: USAGE$59
39400
39432
  },
39401
39433
  {
39402
39434
  path: ["password"],
39403
- usage: USAGE$58
39435
+ usage: USAGE$59
39404
39436
  },
39405
39437
  {
39406
39438
  path: ["register"],
39407
- usage: USAGE$58
39439
+ usage: USAGE$59
39408
39440
  },
39409
39441
  {
39410
39442
  path: ["forgot-password"],
39411
- usage: USAGE$58
39443
+ usage: USAGE$59
39412
39444
  },
39413
39445
  {
39414
39446
  path: ["reset-password"],
39415
- usage: USAGE$58
39447
+ usage: USAGE$59
39416
39448
  },
39417
39449
  {
39418
39450
  path: ["verify-email"],
39419
- usage: USAGE$58
39451
+ usage: USAGE$59
39420
39452
  },
39421
39453
  {
39422
39454
  path: ["closure"],
39423
- usage: USAGE$59
39455
+ usage: USAGE$60
39424
39456
  },
39425
39457
  {
39426
39458
  path: ["picture"],
39427
- usage: USAGE$59
39459
+ usage: USAGE$60
39428
39460
  },
39429
39461
  {
39430
39462
  path: ["notifications"],
39431
- usage: USAGE$59
39463
+ usage: USAGE$60
39432
39464
  },
39433
39465
  {
39434
39466
  path: ["push-token"],
39435
- usage: USAGE$56
39467
+ usage: USAGE$57
39436
39468
  },
39437
39469
  {
39438
39470
  path: ["impersonate"],
39439
- usage: USAGE$57
39471
+ usage: USAGE$58
39440
39472
  }
39441
39473
  ];
39442
39474
  //#endregion
39443
39475
  //#region src/commands/auth-sessions.ts
39444
- var USAGE$55 = [
39476
+ var USAGE$56 = [
39445
39477
  "Usage: hostingctl auth profiles",
39446
39478
  "",
39447
39479
  "Lists every session this machine holds: the profile name, the API it signs in to, when its access token",
@@ -39459,7 +39491,7 @@ var USAGE$55 = [
39459
39491
  * made a machine signed in to two accounts look like a machine signed in to none.
39460
39492
  */
39461
39493
  async function authSessions(context, rest) {
39462
- if (rest.length > 0) throw new UsageError(USAGE$55);
39494
+ if (rest.length > 0) throw new UsageError(USAGE$56);
39463
39495
  const document = await readProfiles();
39464
39496
  const selected = namedProfile(context.flags, document);
39465
39497
  const profiles = Object.entries(document.profiles).map(([name, stored]) => ({
@@ -40083,7 +40115,7 @@ var MAILBOX_TOPICS = [{
40083
40115
  }];
40084
40116
  //#endregion
40085
40117
  //#region src/commands/mailbox-recovery.ts
40086
- var USAGE$54 = [
40118
+ var USAGE$55 = [
40087
40119
  "Usage: hostingctl mailbox recovery <request|verify|reset> [options]",
40088
40120
  "",
40089
40121
  " request --address <address> Ask for a self-service reset link for a mailbox address.",
@@ -40111,16 +40143,16 @@ function isSessionlessMailboxCommand(argv) {
40111
40143
  /** `mailbox recovery request|verify|reset`: the unauthenticated, token-authorized recovery journey. */
40112
40144
  async function runMailboxRecovery(context, rest) {
40113
40145
  const [action, extra] = rest;
40114
- if (extra !== void 0) throw new UsageError(USAGE$54);
40146
+ if (extra !== void 0) throw new UsageError(USAGE$55);
40115
40147
  if (action === "request") return await request$2(context);
40116
40148
  if (action === "verify") return await verify$1(context);
40117
40149
  if (action === "reset") return await reset(context);
40118
- throw new UsageError(USAGE$54);
40150
+ throw new UsageError(USAGE$55);
40119
40151
  }
40120
40152
  /** `request`: the answer is deliberately identical whether or not an eligible mailbox exists. */
40121
40153
  async function request$2(context) {
40122
40154
  const address = context.flags.get("--address");
40123
- if (address === void 0 || address === "") throw new UsageError(USAGE$54);
40155
+ if (address === void 0 || address === "") throw new UsageError(USAGE$55);
40124
40156
  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);
40125
40157
  }
40126
40158
  /** `verify`: the token is read only when the send actually happens, so a dry run never touches a secret. */
@@ -40141,7 +40173,7 @@ async function reset(context) {
40141
40173
  }
40142
40174
  /** One recovery token or new password, read from a private file or stdin under the recovery bound. */
40143
40175
  function recoverySecret(context, name) {
40144
- return readSecret(context, name, MAX_RECOVERY_SECRET_BYTES, USAGE$54);
40176
+ return readSecret(context, name, MAX_RECOVERY_SECRET_BYTES, USAGE$55);
40145
40177
  }
40146
40178
  //#endregion
40147
40179
  //#region src/commands/mailbox.ts
@@ -40277,7 +40309,7 @@ async function environmentGeneration(path) {
40277
40309
  //#endregion
40278
40310
  //#region src/commands/access-credentials.ts
40279
40311
  /** The usage this module refuses with, owned by the commands it implements. */
40280
- var USAGE$53 = [
40312
+ var USAGE$54 = [
40281
40313
  "Usage: hostingctl access key add <environment-uuid> --company <slug> --access-user <uuid> --name <n> --public-key-file <path>",
40282
40314
  " hostingctl access key remove <environment-uuid> --company <slug> --access-user <uuid> <key-uuid>",
40283
40315
  " hostingctl access password set <environment-uuid> --company <slug> --access-user <uuid> (--password-file <path>|--password-stdin)",
@@ -40295,12 +40327,12 @@ var USAGE$53 = [
40295
40327
  /** `key add|remove`. */
40296
40328
  async function key(context, path, action, tail) {
40297
40329
  const accessUserUuid = context.flags.get("--access-user") ?? "";
40298
- if (accessUserUuid === "") throw new UsageError(`key needs --access-user.\\n\\n${USAGE$53}`);
40330
+ if (accessUserUuid === "") throw new UsageError(`key needs --access-user.\\n\\n${USAGE$54}`);
40299
40331
  if (action === "add") {
40300
- if (tail.length > 0) throw new UsageError(USAGE$53);
40332
+ if (tail.length > 0) throw new UsageError(USAGE$54);
40301
40333
  const name = context.flags.get("--name")?.trim() ?? "";
40302
40334
  const file = context.flags.get("--public-key-file") ?? "";
40303
- if (name === "" || file === "") throw new UsageError(`key add needs --name and --public-key-file.\\n\\n${USAGE$53}`);
40335
+ if (name === "" || file === "") throw new UsageError(`key add needs --name and --public-key-file.\\n\\n${USAGE$54}`);
40304
40336
  const publicKey = readPrivateFile(file, "public key", 8192).trim();
40305
40337
  return await confirmableWrite(context, `Add key "${name}" to login ${accessUserUuid}.`, async () => {
40306
40338
  const body = {
@@ -40319,7 +40351,7 @@ async function key(context, path, action, tail) {
40319
40351
  }
40320
40352
  if (action === "remove") {
40321
40353
  const [keyUuid, ...extra] = tail;
40322
- if (keyUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$53);
40354
+ if (keyUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$54);
40323
40355
  return await confirmableWrite(context, `Remove key ${keyUuid} from login ${accessUserUuid}.`, async () => {
40324
40356
  return (await hostingAccessDestroyKey({
40325
40357
  path: {
@@ -40331,18 +40363,18 @@ async function key(context, path, action, tail) {
40331
40363
  })).data;
40332
40364
  });
40333
40365
  }
40334
- throw new UsageError(USAGE$53);
40366
+ throw new UsageError(USAGE$54);
40335
40367
  }
40336
40368
  /** `password set|clear`. */
40337
40369
  async function password(context, path, action, tail) {
40338
40370
  const accessUserUuid = context.flags.get("--access-user") ?? "";
40339
- if (accessUserUuid === "" || tail.length > 0) throw new UsageError(`password needs --access-user.\\n\\n${USAGE$53}`);
40371
+ if (accessUserUuid === "" || tail.length > 0) throw new UsageError(`password needs --access-user.\\n\\n${USAGE$54}`);
40340
40372
  const userPath = {
40341
40373
  ...path,
40342
40374
  accessUserUuid
40343
40375
  };
40344
40376
  if (action === "set") return await confirmableWrite(context, "Set this login's password. The previous password stops working when the change is applied.", async () => {
40345
- const password = readSecret(context, "password", 1024, USAGE$53);
40377
+ const password = readSecret(context, "password", 1024, USAGE$54);
40346
40378
  const body = {
40347
40379
  desiredGeneration: await environmentGeneration(path),
40348
40380
  password,
@@ -40360,7 +40392,7 @@ async function password(context, path, action, tail) {
40360
40392
  query
40361
40393
  })).data;
40362
40394
  });
40363
- throw new UsageError(USAGE$53);
40395
+ throw new UsageError(USAGE$54);
40364
40396
  }
40365
40397
  //#endregion
40366
40398
  //#region src/commands/booleans.ts
@@ -40385,7 +40417,7 @@ function onOff$5(context, flag, usage) {
40385
40417
  }
40386
40418
  //#endregion
40387
40419
  //#region src/commands/access-admin.ts
40388
- var USAGE$52 = [
40420
+ var USAGE$53 = [
40389
40421
  "Usage: hostingctl access settings <environment-uuid> --company <slug>",
40390
40422
  " hostingctl access settings-set <environment-uuid> --company <slug> --password <on|off> --sftp-only <on|off>",
40391
40423
  " hostingctl access grants <environment-uuid> --company <slug>",
@@ -40413,7 +40445,7 @@ var USAGE$52 = [
40413
40445
  /** `access settings|settings-set|grants|grant|un-grant|key|password|user-show|user-set|received`. */
40414
40446
  async function accessAdmin(context, subcommand, rest) {
40415
40447
  if (subcommand === "received") {
40416
- if (rest.length > 0) throw new UsageError(USAGE$52);
40448
+ if (rest.length > 0) throw new UsageError(USAGE$53);
40417
40449
  return {
40418
40450
  kind: "received",
40419
40451
  grants: (await hostingAccessReceivedIndex({})).data.items
@@ -40421,7 +40453,7 @@ async function accessAdmin(context, subcommand, rest) {
40421
40453
  }
40422
40454
  const [first, ...after] = rest;
40423
40455
  const takesAction = subcommand === "key" || subcommand === "password";
40424
- const path = await environmentPath(context, takesAction ? after[0] : first, USAGE$52);
40456
+ const path = await environmentPath(context, takesAction ? after[0] : first, USAGE$53);
40425
40457
  const tail = takesAction ? after.slice(1) : after;
40426
40458
  return await routed(context, subcommand, path, first ?? "", tail);
40427
40459
  }
@@ -40436,7 +40468,7 @@ async function routed(context, subcommand, path, action, tail) {
40436
40468
  if (subcommand === "password") return await written$9(password(context, path, action, tail));
40437
40469
  if (subcommand === "user-show") return await userShow(path, tail);
40438
40470
  if (subcommand === "user-set") return await written$9(userSet(context, path, tail));
40439
- throw new UsageError(USAGE$52);
40471
+ throw new UsageError(USAGE$53);
40440
40472
  }
40441
40473
  /** Tag one write's outcome with the group that produced it. */
40442
40474
  async function written$9(pending) {
@@ -40447,7 +40479,7 @@ async function written$9(pending) {
40447
40479
  }
40448
40480
  /** A company-wide read takes no positionals. */
40449
40481
  function noExtra$22(rest) {
40450
- if (rest.length > 0) throw new UsageError(USAGE$52);
40482
+ if (rest.length > 0) throw new UsageError(USAGE$53);
40451
40483
  }
40452
40484
  /** `settings`. */
40453
40485
  async function settings$1(path, rest) {
@@ -40460,8 +40492,8 @@ async function settings$1(path, rest) {
40460
40492
  /** `settings-set --password … --sftp-only …`. */
40461
40493
  async function settingsSet(context, path, rest) {
40462
40494
  noExtra$22(rest);
40463
- const passwordEnabled = onOff$5(context, "--password", USAGE$52);
40464
- const sftpOnly = onOff$5(context, "--sftp-only", USAGE$52);
40495
+ const passwordEnabled = onOff$5(context, "--password", USAGE$53);
40496
+ const sftpOnly = onOff$5(context, "--sftp-only", USAGE$53);
40465
40497
  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 () => {
40466
40498
  return (await hostingAccessUpdate({
40467
40499
  path,
@@ -40486,7 +40518,7 @@ async function grant$1(context, path, rest) {
40486
40518
  noExtra$22(rest);
40487
40519
  const userUuid = context.flags.get("--user") ?? "";
40488
40520
  const accessUserUuid = context.flags.get("--access-user") ?? "";
40489
- if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$52}`);
40521
+ if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$53}`);
40490
40522
  return await confirmableWrite(context, `Grant user ${userUuid} the login ${accessUserUuid} on this environment.`, async () => {
40491
40523
  return (await hostingAccessGrantStore({
40492
40524
  path,
@@ -40501,7 +40533,7 @@ async function grant$1(context, path, rest) {
40501
40533
  /** `un-grant <grant-uuid>`. */
40502
40534
  async function unGrant(context, path, rest) {
40503
40535
  const [grantUuid, ...extra] = rest;
40504
- if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$52);
40536
+ if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$53);
40505
40537
  return await confirmableWrite(context, `Withdraw grant ${grantUuid}. The login stays; only this account's access to it ends.`, async () => {
40506
40538
  const query = { desiredGeneration: await environmentGeneration(path) };
40507
40539
  return (await hostingAccessGrantDestroy({
@@ -40516,7 +40548,7 @@ async function unGrant(context, path, rest) {
40516
40548
  /** `user-show <access-user-uuid>`. */
40517
40549
  async function userShow(path, rest) {
40518
40550
  const [accessUserUuid, ...extra] = rest;
40519
- if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$52);
40551
+ if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$53);
40520
40552
  return {
40521
40553
  kind: "user",
40522
40554
  user: (await hostingAccessShowUser({ path: {
@@ -40528,7 +40560,7 @@ async function userShow(path, rest) {
40528
40560
  /** `user-set <access-user-uuid> [--name] [--enabled] [--read-only]`. */
40529
40561
  async function userSet(context, path, rest) {
40530
40562
  const [accessUserUuid, ...extra] = rest;
40531
- if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$52);
40563
+ if (accessUserUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$53);
40532
40564
  const userPath = {
40533
40565
  ...path,
40534
40566
  accessUserUuid
@@ -40537,7 +40569,7 @@ async function userSet(context, path, rest) {
40537
40569
  const name = context.flags.get("--name")?.trim();
40538
40570
  const enabled = onOffFlag(context, "--enabled");
40539
40571
  const readOnly = onOffFlag(context, "--read-only");
40540
- if (name === void 0 && enabled === null && readOnly === null) throw new UsageError(`user-set needs --name, --enabled, --read-only or a combination.\\n\\n${USAGE$52}`);
40572
+ if (name === void 0 && enabled === null && readOnly === null) throw new UsageError(`user-set needs --name, --enabled, --read-only or a combination.\\n\\n${USAGE$53}`);
40541
40573
  const body = {
40542
40574
  desiredGeneration: await environmentGeneration(path),
40543
40575
  name: name === void 0 || name === "" ? current.name : name,
@@ -40689,43 +40721,43 @@ var ACCESS_METADATA = {
40689
40721
  var ACCESS_TOPICS = [
40690
40722
  {
40691
40723
  path: ["settings"],
40692
- usage: USAGE$52
40724
+ usage: USAGE$53
40693
40725
  },
40694
40726
  {
40695
40727
  path: ["settings-set"],
40696
- usage: USAGE$52
40728
+ usage: USAGE$53
40697
40729
  },
40698
40730
  {
40699
40731
  path: ["grants"],
40700
- usage: USAGE$52
40732
+ usage: USAGE$53
40701
40733
  },
40702
40734
  {
40703
40735
  path: ["grant"],
40704
- usage: USAGE$52
40736
+ usage: USAGE$53
40705
40737
  },
40706
40738
  {
40707
40739
  path: ["un-grant"],
40708
- usage: USAGE$52
40740
+ usage: USAGE$53
40709
40741
  },
40710
40742
  {
40711
40743
  path: ["user-show"],
40712
- usage: USAGE$52
40744
+ usage: USAGE$53
40713
40745
  },
40714
40746
  {
40715
40747
  path: ["user-set"],
40716
- usage: USAGE$52
40748
+ usage: USAGE$53
40717
40749
  },
40718
40750
  {
40719
40751
  path: ["received"],
40720
- usage: USAGE$52
40752
+ usage: USAGE$53
40721
40753
  },
40722
40754
  {
40723
40755
  path: ["key"],
40724
- usage: USAGE$53
40756
+ usage: USAGE$54
40725
40757
  },
40726
40758
  {
40727
40759
  path: ["password"],
40728
- usage: USAGE$53
40760
+ usage: USAGE$54
40729
40761
  }
40730
40762
  ];
40731
40763
  //#endregion
@@ -41094,7 +41126,7 @@ function notAMember(unknown, eligible) {
41094
41126
  }
41095
41127
  //#endregion
41096
41128
  //#region src/commands/environment-storage-usage.ts
41097
- var USAGE$51 = [
41129
+ var USAGE$52 = [
41098
41130
  "Usage: hostingctl environment storage-usage <environment-uuid> --company <slug>",
41099
41131
  "",
41100
41132
  " storage-usage What each volume was allocated, what it has written and what is left, from the",
@@ -41113,7 +41145,7 @@ var USAGE$51 = [
41113
41145
  */
41114
41146
  async function environmentStorageUsage(context, rest) {
41115
41147
  const [uuid, ...extra] = rest;
41116
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$51);
41148
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$52);
41117
41149
  return (await hostingEnvironmentsStorageUsage({ path: {
41118
41150
  company: await requireCompany(context.flags),
41119
41151
  environmentUuid: uuid
@@ -41564,7 +41596,7 @@ var ADMIN_ACTIONS = /* @__PURE__ */ new Set([
41564
41596
  ]);
41565
41597
  //#endregion
41566
41598
  //#region src/commands/application-admin.ts
41567
- var USAGE$50 = [
41599
+ var USAGE$51 = [
41568
41600
  "Usage: hostingctl application administrator <environment-uuid> <application-uuid> --company <slug>",
41569
41601
  " hostingctl application administrator-reset|administrator-reveal <environment-uuid> <application-uuid> --company <slug>",
41570
41602
  " hostingctl application recovery-status|recovery-retry|recovery-cancel <environment-uuid> <application-uuid> <recovery-uuid> --company <slug>",
@@ -41591,7 +41623,7 @@ async function applicationAdmin(context, action, path, rest) {
41591
41623
  if (action === "administrator-reset") return await credential(context, path, rest, "reset");
41592
41624
  if (action === "administrator-reveal") return await credential(context, path, rest, "reveal");
41593
41625
  const [recoveryUuid, ...extra] = rest;
41594
- if (recoveryUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$50);
41626
+ if (recoveryUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$51);
41595
41627
  const recoveryPath = {
41596
41628
  ...path,
41597
41629
  recoveryUuid
@@ -41604,7 +41636,7 @@ async function applicationAdmin(context, action, path, rest) {
41604
41636
  return (await hostingApplicationRecoveryRetry({ path: recoveryPath })).data;
41605
41637
  }));
41606
41638
  if (action === "recovery-cancel") return await written$8(confirmableWrite(context, "Cancel this recovery. Writers are released and the application returns to its previous state.", async () => (await hostingApplicationRecoveryCancel({ path: recoveryPath })).data));
41607
- throw new UsageError(USAGE$50);
41639
+ throw new UsageError(USAGE$51);
41608
41640
  }
41609
41641
  /** `administrator-reset|reveal`: the one place the application's own password is printed. */
41610
41642
  async function credential(context, path, rest, kind) {
@@ -41625,7 +41657,7 @@ async function written$8(pending) {
41625
41657
  }
41626
41658
  /** No positional arguments, or a usage refusal. */
41627
41659
  function noExtra$21(rest) {
41628
- if (rest.length > 0) throw new UsageError(USAGE$50);
41660
+ if (rest.length > 0) throw new UsageError(USAGE$51);
41629
41661
  }
41630
41662
  /** One recovery as one line: what it is doing, how far, and what it holds. */
41631
41663
  function recoveryLines$1(one) {
@@ -41724,7 +41756,7 @@ var APPLICATION_USAGE = [
41724
41756
  ].join("\n");
41725
41757
  //#endregion
41726
41758
  //#region src/commands/application-builds.ts
41727
- var USAGE$49 = [
41759
+ var USAGE$50 = [
41728
41760
  "Usage: hostingctl application build <environment-uuid> <application-uuid> --company <slug> [--source <selection-uuid> | --source-upload <upload-uuid> | --ssh-source <connection-uuid>] [--idempotency-key <key>]",
41729
41761
  " hostingctl application build-log <environment-uuid> <application-uuid> <build-uuid> --company <slug>",
41730
41762
  " hostingctl application build-retry|build-cancel <environment-uuid> <application-uuid> <build-uuid> --company <slug>",
@@ -41752,7 +41784,7 @@ async function applicationBuilds(context, action, path, rest) {
41752
41784
  }
41753
41785
  if (action === "source-bind") return await bind$2(context, path, rest);
41754
41786
  const [buildUuid, ...extra] = rest;
41755
- if (buildUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$49);
41787
+ if (buildUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$50);
41756
41788
  const buildPath = {
41757
41789
  ...path,
41758
41790
  buildUuid
@@ -41767,7 +41799,7 @@ async function applicationBuilds(context, action, path, rest) {
41767
41799
  if (action === "build-cancel") return await written$7(confirmableWrite(context, "Stop this build. A running build stops where it is.", async () => {
41768
41800
  return (await hostingDeploymentCancel({ path: buildPath })).data;
41769
41801
  }));
41770
- throw new UsageError(USAGE$49);
41802
+ throw new UsageError(USAGE$50);
41771
41803
  }
41772
41804
  /**
41773
41805
  * `source-bind --selection … | --ssh-source … [--source-kind …] [--branch …] [--tag …] [--auto-deploy …]`.
@@ -41779,7 +41811,7 @@ async function bind$2(context, path, rest) {
41779
41811
  noExtra$20(rest);
41780
41812
  const repositorySelectionUuid = context.flags.get("--selection")?.trim() ?? "";
41781
41813
  const sshSourceUuid = context.flags.get("--ssh-source")?.trim() ?? "";
41782
- if (repositorySelectionUuid === "" === (sshSourceUuid === "")) throw new UsageError(`source-bind needs exactly one of --selection or --ssh-source.\n\n${USAGE$49}`);
41814
+ if (repositorySelectionUuid === "" === (sshSourceUuid === "")) throw new UsageError(`source-bind needs exactly one of --selection or --ssh-source.\n\n${USAGE$50}`);
41783
41815
  const sourceKind = sourceKindFlag(context, sshSourceUuid === "" ? "github" : "ssh");
41784
41816
  const branch = context.flags.get("--branch")?.trim();
41785
41817
  const tag = context.flags.get("--tag")?.trim();
@@ -41803,8 +41835,8 @@ async function bind$2(context, path, rest) {
41803
41835
  function sourceKindFlag(context, implied) {
41804
41836
  const value = context.flags.get("--source-kind")?.trim() ?? "";
41805
41837
  if (value === "") return implied;
41806
- if (value !== "github" && value !== "ssh") throw new UsageError(`--source-kind must be github or ssh (got "${value}").\n\n${USAGE$49}`);
41807
- if (value !== implied) throw new UsageError(`--source-kind ${value} does not match the ${implied} reference named.\n\n${USAGE$49}`);
41838
+ if (value !== "github" && value !== "ssh") throw new UsageError(`--source-kind must be github or ssh (got "${value}").\n\n${USAGE$50}`);
41839
+ if (value !== implied) throw new UsageError(`--source-kind ${value} does not match the ${implied} reference named.\n\n${USAGE$50}`);
41808
41840
  return value;
41809
41841
  }
41810
41842
  /** Tag one write's outcome with the group that produced it. */
@@ -41816,7 +41848,7 @@ async function written$7(pending) {
41816
41848
  }
41817
41849
  /** No positional arguments, or a usage refusal. */
41818
41850
  function noExtra$20(rest) {
41819
- if (rest.length > 0) throw new UsageError(USAGE$49);
41851
+ if (rest.length > 0) throw new UsageError(USAGE$50);
41820
41852
  }
41821
41853
  /**
41822
41854
  * `build <env> <workload> [--source …|--source-upload …|--ssh-source …] [--idempotency-key …]`: queue a build.
@@ -41884,7 +41916,7 @@ function applicationBuildText(report) {
41884
41916
  }
41885
41917
  //#endregion
41886
41918
  //#region src/commands/application-cache.ts
41887
- var USAGE$48 = [
41919
+ var USAGE$49 = [
41888
41920
  "Usage: hostingctl application cache <environment-uuid> <application-uuid> --company <slug>",
41889
41921
  " hostingctl application cache-set <environment-uuid> <application-uuid> --company <slug> [--enabled <on|off>] [--fresh <s>] [--background <s>] [--browser <s>] [--reset <on|off>]",
41890
41922
  " hostingctl application cache-purge <environment-uuid> <application-uuid> --company <slug>",
@@ -41922,7 +41954,7 @@ async function applicationCache(context, action, path, rest) {
41922
41954
  }
41923
41955
  if (action === "canonical") {
41924
41956
  const routeUuid = context.flags.get("--route") ?? "";
41925
- if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$48}`);
41957
+ if (routeUuid === "") throw new UsageError(`canonical needs --route.\n\n${USAGE$49}`);
41926
41958
  return await written$6(confirmableWrite(context, `Make route ${routeUuid} this application's canonical address.`, async () => {
41927
41959
  const desiredGeneration = await generation$1(path);
41928
41960
  return (await hostingApplicationRouteSelectCanonical({
@@ -41934,7 +41966,7 @@ async function applicationCache(context, action, path, rest) {
41934
41966
  })).data;
41935
41967
  }));
41936
41968
  }
41937
- throw new UsageError(USAGE$48);
41969
+ throw new UsageError(USAGE$49);
41938
41970
  }
41939
41971
  /** `application routes|route-add|route-remove`, which are environment-scoped. */
41940
41972
  async function applicationRoutes(context, action, path, rest) {
@@ -41948,7 +41980,7 @@ async function applicationRoutes(context, action, path, rest) {
41948
41980
  if (action === "route-add") return await addRoute(context, path, rest);
41949
41981
  if (action === "route-remove") {
41950
41982
  const [routeUuid, ...extra] = rest;
41951
- if (routeUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$48);
41983
+ if (routeUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$49);
41952
41984
  return await written$6(confirmableWrite(context, `Remove route ${routeUuid}.`, async () => {
41953
41985
  const body = { desiredGeneration: await generation$1(path) };
41954
41986
  return (await hostingApplicationRouteRemove({
@@ -41960,7 +41992,7 @@ async function applicationRoutes(context, action, path, rest) {
41960
41992
  })).data;
41961
41993
  }));
41962
41994
  }
41963
- throw new UsageError(USAGE$48);
41995
+ throw new UsageError(USAGE$49);
41964
41996
  }
41965
41997
  /** `route-add --source … --target … --path …`. */
41966
41998
  async function addRoute(context, path, rest) {
@@ -41968,7 +42000,7 @@ async function addRoute(context, path, rest) {
41968
42000
  const sourceWorkloadUuid = context.flags.get("--source") ?? "";
41969
42001
  const targetWorkloadUuid = context.flags.get("--target") ?? "";
41970
42002
  const routePath = context.flags.get("--path") ?? "";
41971
- if (sourceWorkloadUuid === "" || targetWorkloadUuid === "" || routePath === "") throw new UsageError(`route-add needs --source, --target and --path.\n\n${USAGE$48}`);
42003
+ if (sourceWorkloadUuid === "" || targetWorkloadUuid === "" || routePath === "") throw new UsageError(`route-add needs --source, --target and --path.\n\n${USAGE$49}`);
41972
42004
  const domainUuid = context.flags.get("--domain")?.trim();
41973
42005
  const canonical = onOffFlag(context, "--canonical") ?? false;
41974
42006
  return await written$6(confirmableWrite(context, `Route ${routePath} from ${sourceWorkloadUuid} to ${targetWorkloadUuid}${canonical ? " as canonical" : ""}.`, async () => {
@@ -42001,10 +42033,10 @@ function cacheBody(context) {
42001
42033
  const raw = context.flags.get(flag)?.trim() ?? "";
42002
42034
  if (raw === "") continue;
42003
42035
  const value = Number(raw);
42004
- if (!Number.isInteger(value) || value < 0) throw new UsageError(`${flag} must be a whole number of seconds.\n\n${USAGE$48}`);
42036
+ if (!Number.isInteger(value) || value < 0) throw new UsageError(`${flag} must be a whole number of seconds.\n\n${USAGE$49}`);
42005
42037
  body[field] = value;
42006
42038
  }
42007
- if (Object.keys(body).length === 0) throw new UsageError(`cache-set needs at least one field.\n\n${USAGE$48}`);
42039
+ if (Object.keys(body).length === 0) throw new UsageError(`cache-set needs at least one field.\n\n${USAGE$49}`);
42008
42040
  return body;
42009
42041
  }
42010
42042
  /** The environment's generation, which every write here must name. */
@@ -42020,7 +42052,7 @@ async function written$6(pending) {
42020
42052
  }
42021
42053
  /** No positional arguments, or a usage refusal. */
42022
42054
  function noExtra$19(rest) {
42023
- if (rest.length > 0) throw new UsageError(USAGE$48);
42055
+ if (rest.length > 0) throw new UsageError(USAGE$49);
42024
42056
  }
42025
42057
  /** The `application cache*|routes|route-*` renderer. */
42026
42058
  function applicationCacheText(report) {
@@ -42182,7 +42214,7 @@ function describeAuth(workloadUuid, auth) {
42182
42214
  }
42183
42215
  //#endregion
42184
42216
  //#region src/commands/application-create.ts
42185
- var USAGE$47 = [
42217
+ var USAGE$48 = [
42186
42218
  "Usage: hostingctl application create <environment-uuid> --company <slug> --type <wordpress|moodle> --name <name>",
42187
42219
  " --cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
42188
42220
  " [--replicas <count>] [--label <text>] [--hostname <host>] [--runtime-version <line>]",
@@ -42209,11 +42241,11 @@ var CREATE_FLAGS = [{
42209
42241
  }];
42210
42242
  /** `application create <env> …`, from the `application` command. */
42211
42243
  async function applicationCreate(context, path, rest) {
42212
- if (rest.length > 0) throw new UsageError(USAGE$47);
42244
+ if (rest.length > 0) throw new UsageError(USAGE$48);
42213
42245
  const type = context.flags.get("--type")?.trim().toLowerCase() ?? "";
42214
- if (!TYPES.has(type)) throw new UsageError(`create needs --type wordpress or moodle.\n\n${USAGE$47}`);
42246
+ if (!TYPES.has(type)) throw new UsageError(`create needs --type wordpress or moodle.\n\n${USAGE$48}`);
42215
42247
  const name = context.flags.get("--name")?.trim() ?? "";
42216
- if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$47}`);
42248
+ if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$48}`);
42217
42249
  const resources = {
42218
42250
  cpuRequestMillicores: required$7(context, "--cpu-request"),
42219
42251
  cpuLimitMillicores: required$7(context, "--cpu-limit"),
@@ -42249,12 +42281,12 @@ async function applicationCreate(context, path, rest) {
42249
42281
  /** One required whole-number flag, or a usage refusal naming the flag. */
42250
42282
  function required$7(context, flag) {
42251
42283
  const value = wholeNumberFlag(context.flags, flag);
42252
- if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$47}`);
42284
+ if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$48}`);
42253
42285
  return value;
42254
42286
  }
42255
42287
  //#endregion
42256
42288
  //#region src/commands/application-upload.ts
42257
- var USAGE$46 = [
42289
+ var USAGE$47 = [
42258
42290
  "Usage: hostingctl application import-upload <environment-uuid> <application-uuid> --company <slug>",
42259
42291
  " --database <path-to.sql> --archive <path-to.zip|path-to.jpa> | --directory <dir>",
42260
42292
  "",
@@ -42283,12 +42315,12 @@ var STAGING_WAIT_MS = 9e5;
42283
42315
  /** How often the staged import is asked for its state while the queue works. */
42284
42316
  var STAGING_POLL_MS = 3e3;
42285
42317
  async function applicationUpload(context, path, rest) {
42286
- if (rest.length > 0) throw new UsageError(USAGE$46);
42318
+ if (rest.length > 0) throw new UsageError(USAGE$47);
42287
42319
  const database = context.flags.get("--database")?.trim() ?? "";
42288
42320
  const archive = context.flags.get("--archive")?.trim() ?? "";
42289
42321
  const directory = context.flags.get("--directory")?.trim() ?? "";
42290
- if (archive !== "" && directory !== "") throw new UsageError(`Send the site files as either --archive or --directory, not both.\n\n${USAGE$46}`);
42291
- if (database === "" && !isAkeebaArchive(archive)) throw new UsageError(`--database is required unless --archive is an Akeeba backup (.jpa or .jps), which carries the site's database inside the archive. If --archive is an Akeeba backup renamed .zip, rename it so its own database is used.\n\n${USAGE$46}`);
42322
+ if (archive !== "" && directory !== "") throw new UsageError(`Send the site files as either --archive or --directory, not both.\n\n${USAGE$47}`);
42323
+ if (database === "" && !isAkeebaArchive(archive)) throw new UsageError(`--database is required unless --archive is an Akeeba backup (.jpa or .jps), which carries the site's database inside the archive. If --archive is an Akeeba backup renamed .zip, rename it so its own database is used.\n\n${USAGE$47}`);
42292
42324
  const databaseBytes = database === "" ? 0 : await sizeOf(database, "database");
42293
42325
  const files = directory === "" ? [] : await manifestOf(directory);
42294
42326
  const fileBytes = directory === "" ? 0 : await totalSize(files);
@@ -42398,7 +42430,7 @@ function describe(bytes) {
42398
42430
  }
42399
42431
  //#endregion
42400
42432
  //#region src/commands/application-import.ts
42401
- var USAGE$45 = [
42433
+ var USAGE$46 = [
42402
42434
  "Usage: hostingctl application import <environment-uuid> <application-uuid> <import-uuid> --company <slug>",
42403
42435
  " hostingctl application import-upload <environment-uuid> <application-uuid> --company <slug>",
42404
42436
  " --database <path-to.sql> [--archive <path-to.zip> | --directory <dir>]",
@@ -42420,7 +42452,7 @@ async function applicationImport(context, action, path, rest) {
42420
42452
  if (action === "url-repair-preview") return await previewRepair(context, path, rest);
42421
42453
  if (action === "import-upload") return await applicationUpload(context, path, rest);
42422
42454
  const [importUuid, ...extra] = rest;
42423
- if (importUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$45);
42455
+ if (importUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$46);
42424
42456
  if (action === "import") return {
42425
42457
  kind: "import",
42426
42458
  staged: (await hostingWordpressImportShowImport({ path: {
@@ -42433,13 +42465,13 @@ async function applicationImport(context, action, path, rest) {
42433
42465
  importUuid
42434
42466
  } })).data));
42435
42467
  if (action === "url-repair-confirm") return await confirmRepair(context, path, importUuid);
42436
- throw new UsageError(USAGE$45);
42468
+ throw new UsageError(USAGE$46);
42437
42469
  }
42438
42470
  /** `url-repair-preview --source-url …`: the review a confirmation is made against. */
42439
42471
  async function previewRepair(context, path, rest) {
42440
- if (rest.length > 0) throw new UsageError(USAGE$45);
42472
+ if (rest.length > 0) throw new UsageError(USAGE$46);
42441
42473
  const sourceUrl = context.flags.get("--source-url")?.trim() ?? "";
42442
- if (sourceUrl === "") throw new UsageError(`url-repair-preview needs --source-url.\n\n${USAGE$45}`);
42474
+ if (sourceUrl === "") throw new UsageError(`url-repair-preview needs --source-url.\n\n${USAGE$46}`);
42443
42475
  return {
42444
42476
  kind: "url-repair",
42445
42477
  recovery: (await hostingWordpressUrlRepairPreview({
@@ -42451,7 +42483,7 @@ async function previewRepair(context, path, rest) {
42451
42483
  /** `url-repair-confirm <recovery> --confirmation …`: the typed text the review asked for. */
42452
42484
  async function confirmRepair(context, path, recoveryUuid) {
42453
42485
  const confirmation = context.flags.get("--confirmation")?.trim() ?? "";
42454
- if (confirmation === "") throw new UsageError(`url-repair-confirm needs --confirmation.\n\n${USAGE$45}`);
42486
+ if (confirmation === "") throw new UsageError(`url-repair-confirm needs --confirmation.\n\n${USAGE$46}`);
42455
42487
  return await written$5(confirmableWrite(context, `Confirm the URL repair by typing its confirmation ("${confirmation}").`, async () => {
42456
42488
  const desiredGeneration = (await hostingEnvironmentShow({ path })).data.desiredGeneration;
42457
42489
  const body = {
@@ -42554,7 +42586,7 @@ function applicationCapacityText(finding) {
42554
42586
  }
42555
42587
  //#endregion
42556
42588
  //#region src/commands/application-recovery.ts
42557
- var USAGE$44 = [
42589
+ var USAGE$45 = [
42558
42590
  "Usage: hostingctl application recovery-review <environment-uuid> <application-uuid> --company <slug> [--import <uuid>]",
42559
42591
  " hostingctl application recovery-confirm <environment-uuid> <application-uuid> --company <slug> --confirmation <text> [--import <uuid>]",
42560
42592
  "",
@@ -42573,9 +42605,9 @@ var USAGE$44 = [
42573
42605
  ].join("\n");
42574
42606
  /** `application recovery-review|recovery-confirm`. */
42575
42607
  async function applicationRecovery(context, action, path, rest) {
42576
- if (rest.length > 0) throw new UsageError(USAGE$44);
42608
+ if (rest.length > 0) throw new UsageError(USAGE$45);
42577
42609
  const importUuid = context.flags.get("--import")?.trim();
42578
- if (importUuid === "") throw new UsageError(`--import needs the staged import's id.\n\n${USAGE$44}`);
42610
+ if (importUuid === "") throw new UsageError(`--import needs the staged import's id.\n\n${USAGE$45}`);
42579
42611
  const review = (await hostingApplicationRecoveryShow({
42580
42612
  path,
42581
42613
  ...importUuid === void 0 ? {} : { query: { importUuid } }
@@ -42584,10 +42616,10 @@ async function applicationRecovery(context, action, path, rest) {
42584
42616
  kind: "recovery-review",
42585
42617
  review
42586
42618
  };
42587
- if (action !== "recovery-confirm") throw new UsageError(USAGE$44);
42619
+ if (action !== "recovery-confirm") throw new UsageError(USAGE$45);
42588
42620
  if (review.blockedReason !== null) throw new UsageError(`This restore is blocked: ${review.blockedReason}`);
42589
42621
  const confirmation = context.flags.get("--confirmation")?.trim() ?? "";
42590
- if (confirmation === "") throw new UsageError(`recovery-confirm needs --confirmation.\n\n${USAGE$44}`);
42622
+ if (confirmation === "") throw new UsageError(`recovery-confirm needs --confirmation.\n\n${USAGE$45}`);
42591
42623
  return {
42592
42624
  kind: "recovery-write",
42593
42625
  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 () => {
@@ -42787,7 +42819,7 @@ function siteAccessText(report) {
42787
42819
  }
42788
42820
  //#endregion
42789
42821
  //#region src/commands/application-site-access.ts
42790
- var USAGE$43 = [
42822
+ var USAGE$44 = [
42791
42823
  "Usage: hostingctl application site-access <environment-uuid> <application-uuid> --company <slug>",
42792
42824
  " hostingctl application site-access-set <environment-uuid> <application-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
42793
42825
  " hostingctl application site-access-rotate <environment-uuid> <application-uuid> --company <slug>",
@@ -42830,15 +42862,15 @@ var flow$1 = siteAccessFlow({
42830
42862
  refresh: async (path) => (await hostingApplicationSiteAccessUsersRefresh({ path })).data,
42831
42863
  destroy: async (path) => (await hostingApplicationSiteAccessUsersDestroy({ path })).data,
42832
42864
  rotate: async (path) => (await hostingApplicationSiteAccessRotate({ path })).data
42833
- }, USAGE$43);
42865
+ }, USAGE$44);
42834
42866
  /** `application site-access*|site-user*`, which the application dispatcher calls with its resolved path. */
42835
42867
  async function applicationSiteAccess(context, action, path, rest) {
42836
- if (rest.some((one) => one === "")) throw new UsageError(USAGE$43);
42868
+ if (rest.some((one) => one === "")) throw new UsageError(USAGE$44);
42837
42869
  return await flow$1(context, action, path, rest);
42838
42870
  }
42839
42871
  //#endregion
42840
42872
  //#region src/commands/application-source-ssh.ts
42841
- var USAGE$42 = [
42873
+ var USAGE$43 = [
42842
42874
  "Usage: hostingctl application source-ssh-list --company <slug>",
42843
42875
  " hostingctl application source-ssh-show <connection-uuid> --company <slug>",
42844
42876
  " hostingctl application source-ssh-create --company <slug> --name <label> --repo <url> --ref <name> [--ref-kind branch|tag]",
@@ -42890,7 +42922,7 @@ async function applicationSshSources(context, action, company, rest) {
42890
42922
  }
42891
42923
  if (action === "source-ssh-create") return await create$5(context, company, rest);
42892
42924
  const [connectionUuid, ...extra] = rest;
42893
- if (connectionUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
42925
+ if (connectionUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$43);
42894
42926
  const path = {
42895
42927
  company,
42896
42928
  connectionUuid
@@ -42912,7 +42944,7 @@ async function applicationSshSources(context, action, company, rest) {
42912
42944
  "to be installed on the Git server before access can be proved again."
42913
42945
  ].join("\n"), async () => (await hostingSshSourcesRotateKey({ path })).data));
42914
42946
  if (action === "source-ssh-revoke") return await written$4(confirmableWrite(context, [`Retire the SSH source ${connectionUuid}.`, "The source stops fetching and cannot promote a pending candidate; a release already serving is unchanged."].join("\n"), async () => (await hostingSshSourcesRevoke({ path })).data));
42915
- throw new UsageError(USAGE$42);
42947
+ throw new UsageError(USAGE$43);
42916
42948
  }
42917
42949
  /** `source-ssh-create --name … --repo … --ref … [--ref-kind …]`: one repository and the ref it reads. */
42918
42950
  async function create$5(context, company, rest) {
@@ -42942,7 +42974,7 @@ async function update$4(context, path) {
42942
42974
  const name = optionalFlag(context, "--name");
42943
42975
  const ref = optionalFlag(context, "--ref");
42944
42976
  const refKind = refKindFlag(context);
42945
- if (name === null && ref === null && refKind === null) throw new UsageError(`source-ssh-update needs --name, --ref or --ref-kind.\n\n${USAGE$42}`);
42977
+ if (name === null && ref === null && refKind === null) throw new UsageError(`source-ssh-update needs --name, --ref or --ref-kind.\n\n${USAGE$43}`);
42946
42978
  const described = [name === null ? "" : `label ${name}`, ref === null ? "" : `ref ${ref}`].filter((one) => one !== "").join(", ");
42947
42979
  return await written$4(confirmableWrite(context, [
42948
42980
  `Edit the SSH source ${path.connectionUuid}${described === "" ? "" : `: ${described}`}.`,
@@ -42974,7 +43006,7 @@ async function confirmHostKey(context, path) {
42974
43006
  /** A required flag's value, or a refusal naming the flag. */
42975
43007
  function required$6(context, flag) {
42976
43008
  const value = context.flags.get(flag)?.trim() ?? "";
42977
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$42}`);
43009
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$43}`);
42978
43010
  return value;
42979
43011
  }
42980
43012
  /** An optional flag's value, or null when it was not given. */
@@ -42987,7 +43019,7 @@ function refKindFlag(context) {
42987
43019
  const value = context.flags.get("--ref-kind")?.trim() ?? "";
42988
43020
  if (value === "") return null;
42989
43021
  if (value === "branch" || value === "tag") return value;
42990
- throw new UsageError(`--ref-kind must be branch or tag (got "${value}").\n\n${USAGE$42}`);
43022
+ throw new UsageError(`--ref-kind must be branch or tag (got "${value}").\n\n${USAGE$43}`);
42991
43023
  }
42992
43024
  /** Tag one write's outcome with the group that produced it. */
42993
43025
  async function written$4(pending) {
@@ -42998,11 +43030,11 @@ async function written$4(pending) {
42998
43030
  }
42999
43031
  /** No positional arguments, or a usage refusal. */
43000
43032
  function noExtra$17(rest) {
43001
- if (rest.length > 0) throw new UsageError(USAGE$42);
43033
+ if (rest.length > 0) throw new UsageError(USAGE$43);
43002
43034
  }
43003
43035
  //#endregion
43004
43036
  //#region src/commands/application-source-upload.ts
43005
- var USAGE$41 = [
43037
+ var USAGE$42 = [
43006
43038
  "Usage: hostingctl application source-upload <environment-uuid> <application-uuid> --company <slug> --file <path-to.zip>",
43007
43039
  " hostingctl application source-uploads <environment-uuid> <application-uuid> --company <slug>",
43008
43040
  " hostingctl application source-upload-show <environment-uuid> <application-uuid> <upload-uuid> --company <slug>",
@@ -43041,7 +43073,7 @@ async function applicationSourceUploads(context, action, path, rest) {
43041
43073
  };
43042
43074
  }
43043
43075
  const [uploadUuid, ...extra] = rest;
43044
- if (uploadUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$41);
43076
+ if (uploadUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$42);
43045
43077
  const uploadPath = {
43046
43078
  ...path,
43047
43079
  uploadUuid
@@ -43053,7 +43085,7 @@ async function applicationSourceUploads(context, action, path, rest) {
43053
43085
  if (action === "source-upload-discard") return await written$3(confirmableWrite(context, [`Discard the staged source upload ${uploadUuid}.`, "A build that already used it keeps the copy it was handed, so nothing that is serving changes."].join("\n"), async () => {
43054
43086
  await hostingSourceUploadsDestroy({ path: uploadPath });
43055
43087
  }));
43056
- throw new UsageError(USAGE$41);
43088
+ throw new UsageError(USAGE$42);
43057
43089
  }
43058
43090
  /**
43059
43091
  * `source-upload --file …`: stage one ZIP as the application's source.
@@ -43065,7 +43097,7 @@ async function applicationSourceUploads(context, action, path, rest) {
43065
43097
  async function store(context, path, rest) {
43066
43098
  noExtra$16(rest);
43067
43099
  const file = context.flags.get("--file")?.trim() ?? "";
43068
- if (file === "") throw new UsageError(`source-upload needs --file.\n\n${USAGE$41}`);
43100
+ if (file === "") throw new UsageError(`source-upload needs --file.\n\n${USAGE$42}`);
43069
43101
  return await written$3(confirmableWrite(context, [
43070
43102
  `Upload ${file} as the staged source for application ${path.workloadUuid}.`,
43071
43103
  "The platform normalizes the archive, measures it and reviews it; installing dependencies and changing anything",
@@ -43105,7 +43137,7 @@ async function written$3(pending) {
43105
43137
  }
43106
43138
  /** No positional arguments, or a usage refusal. */
43107
43139
  function noExtra$16(rest) {
43108
- if (rest.length > 0) throw new UsageError(USAGE$41);
43140
+ if (rest.length > 0) throw new UsageError(USAGE$42);
43109
43141
  }
43110
43142
  /** One staged upload: what the platform measured, what the review found, and when staging expires. */
43111
43143
  function uploadLines(upload) {
@@ -43233,51 +43265,51 @@ var SOURCE_SUBCOMMANDS = [
43233
43265
  var SOURCE_TOPICS = [
43234
43266
  {
43235
43267
  path: ["source-upload"],
43236
- usage: USAGE$41
43268
+ usage: USAGE$42
43237
43269
  },
43238
43270
  {
43239
43271
  path: ["source-uploads"],
43240
- usage: USAGE$41
43272
+ usage: USAGE$42
43241
43273
  },
43242
43274
  {
43243
43275
  path: ["source-upload-show"],
43244
- usage: USAGE$41
43276
+ usage: USAGE$42
43245
43277
  },
43246
43278
  {
43247
43279
  path: ["source-upload-discard"],
43248
- usage: USAGE$41
43280
+ usage: USAGE$42
43249
43281
  },
43250
43282
  {
43251
43283
  path: ["source-ssh-list"],
43252
- usage: USAGE$42
43284
+ usage: USAGE$43
43253
43285
  },
43254
43286
  {
43255
43287
  path: ["source-ssh-show"],
43256
- usage: USAGE$42
43288
+ usage: USAGE$43
43257
43289
  },
43258
43290
  {
43259
43291
  path: ["source-ssh-create"],
43260
- usage: USAGE$42
43292
+ usage: USAGE$43
43261
43293
  },
43262
43294
  {
43263
43295
  path: ["source-ssh-update"],
43264
- usage: USAGE$42
43296
+ usage: USAGE$43
43265
43297
  },
43266
43298
  {
43267
43299
  path: ["source-ssh-confirm-host-key"],
43268
- usage: USAGE$42
43300
+ usage: USAGE$43
43269
43301
  },
43270
43302
  {
43271
43303
  path: ["source-ssh-verify"],
43272
- usage: USAGE$42
43304
+ usage: USAGE$43
43273
43305
  },
43274
43306
  {
43275
43307
  path: ["source-ssh-rotate-key"],
43276
- usage: USAGE$42
43308
+ usage: USAGE$43
43277
43309
  },
43278
43310
  {
43279
43311
  path: ["source-ssh-revoke"],
43280
- usage: USAGE$42
43312
+ usage: USAGE$43
43281
43313
  }
43282
43314
  ];
43283
43315
  //#endregion
@@ -43309,7 +43341,7 @@ function applicationSpeedText(check) {
43309
43341
  * paused. It starts no build and promotes nothing. The pause is the customer's own control: while it holds, a push to
43310
43342
  * the bound ref is read and matched but builds nothing, and the release that is serving is untouched either way.
43311
43343
  */
43312
- var USAGE$40 = [
43344
+ var USAGE$41 = [
43313
43345
  "Usage: hostingctl application updates <environment-uuid> <application-uuid> --company <slug>",
43314
43346
  " hostingctl application updates-pause <environment-uuid> <application-uuid> --company <slug>",
43315
43347
  " hostingctl application updates-resume <environment-uuid> <application-uuid> --company <slug>",
@@ -43322,7 +43354,7 @@ var USAGE$40 = [
43322
43354
  "Both writes need --confirm; --dry-run describes the change without sending it."
43323
43355
  ].join("\n");
43324
43356
  async function applicationUpdates(context, action, path, rest) {
43325
- if (rest.length > 0) throw new UsageError(USAGE$40);
43357
+ if (rest.length > 0) throw new UsageError(USAGE$41);
43326
43358
  if (action === "updates") return {
43327
43359
  kind: "updates",
43328
43360
  surface: (await hostingApplicationUpdatesShow({ path })).data
@@ -43334,7 +43366,7 @@ async function applicationUpdates(context, action, path, rest) {
43334
43366
  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)
43335
43367
  };
43336
43368
  }
43337
- throw new UsageError(USAGE$40);
43369
+ throw new UsageError(USAGE$41);
43338
43370
  }
43339
43371
  /**
43340
43372
  * The update state in words.
@@ -43593,84 +43625,84 @@ var APPLICATION_TOPICS = [
43593
43625
  },
43594
43626
  {
43595
43627
  path: ["create"],
43596
- usage: USAGE$47
43628
+ usage: USAGE$48
43597
43629
  },
43598
43630
  {
43599
43631
  path: ["build-log"],
43600
- usage: USAGE$49
43632
+ usage: USAGE$50
43601
43633
  },
43602
43634
  {
43603
43635
  path: ["build-retry"],
43604
- usage: USAGE$49
43636
+ usage: USAGE$50
43605
43637
  },
43606
43638
  {
43607
43639
  path: ["build-cancel"],
43608
- usage: USAGE$49
43640
+ usage: USAGE$50
43609
43641
  },
43610
43642
  {
43611
43643
  path: ["source-bind"],
43612
- usage: USAGE$49
43644
+ usage: USAGE$50
43613
43645
  },
43614
43646
  {
43615
43647
  path: ["source-unbind"],
43616
- usage: USAGE$49
43648
+ usage: USAGE$50
43617
43649
  },
43618
43650
  ...SOURCE_TOPICS,
43619
43651
  {
43620
43652
  path: ["cache"],
43621
- usage: USAGE$48
43653
+ usage: USAGE$49
43622
43654
  },
43623
43655
  {
43624
43656
  path: ["cache-set"],
43625
- usage: USAGE$48
43657
+ usage: USAGE$49
43626
43658
  },
43627
43659
  {
43628
43660
  path: ["cache-purge"],
43629
- usage: USAGE$48
43661
+ usage: USAGE$49
43630
43662
  },
43631
43663
  {
43632
43664
  path: ["routes"],
43633
- usage: USAGE$48
43665
+ usage: USAGE$49
43634
43666
  },
43635
43667
  {
43636
43668
  path: ["route-add"],
43637
- usage: USAGE$48
43669
+ usage: USAGE$49
43638
43670
  },
43639
43671
  {
43640
43672
  path: ["route-remove"],
43641
- usage: USAGE$48
43673
+ usage: USAGE$49
43642
43674
  },
43643
43675
  {
43644
43676
  path: ["canonical"],
43645
- usage: USAGE$48
43677
+ usage: USAGE$49
43646
43678
  },
43647
43679
  {
43648
43680
  path: ["import"],
43649
- usage: USAGE$45
43681
+ usage: USAGE$46
43650
43682
  },
43651
43683
  {
43652
43684
  path: ["import-upload"],
43653
- usage: USAGE$46
43685
+ usage: USAGE$47
43654
43686
  },
43655
43687
  {
43656
43688
  path: ["import-discard"],
43657
- usage: USAGE$45
43689
+ usage: USAGE$46
43658
43690
  },
43659
43691
  {
43660
43692
  path: ["url-repair-preview"],
43661
- usage: USAGE$45
43693
+ usage: USAGE$46
43662
43694
  },
43663
43695
  {
43664
43696
  path: ["url-repair-confirm"],
43665
- usage: USAGE$45
43697
+ usage: USAGE$46
43666
43698
  },
43667
43699
  {
43668
43700
  path: ["recovery-review"],
43669
- usage: USAGE$44
43701
+ usage: USAGE$45
43670
43702
  },
43671
43703
  {
43672
43704
  path: ["recovery-confirm"],
43673
- usage: USAGE$44
43705
+ usage: USAGE$45
43674
43706
  },
43675
43707
  {
43676
43708
  path: ["runtime"],
@@ -43682,59 +43714,59 @@ var APPLICATION_TOPICS = [
43682
43714
  },
43683
43715
  {
43684
43716
  path: ["site-access"],
43685
- usage: USAGE$43
43717
+ usage: USAGE$44
43686
43718
  },
43687
43719
  {
43688
43720
  path: ["site-access-set"],
43689
- usage: USAGE$43
43721
+ usage: USAGE$44
43690
43722
  },
43691
43723
  {
43692
43724
  path: ["site-access-rotate"],
43693
- usage: USAGE$43
43725
+ usage: USAGE$44
43694
43726
  },
43695
43727
  {
43696
43728
  path: ["site-users"],
43697
- usage: USAGE$43
43729
+ usage: USAGE$44
43698
43730
  },
43699
43731
  {
43700
43732
  path: ["site-user"],
43701
- usage: USAGE$43
43733
+ usage: USAGE$44
43702
43734
  },
43703
43735
  {
43704
43736
  path: ["updates"],
43705
- usage: USAGE$40
43737
+ usage: USAGE$41
43706
43738
  },
43707
43739
  {
43708
43740
  path: ["updates-pause"],
43709
- usage: USAGE$40
43741
+ usage: USAGE$41
43710
43742
  },
43711
43743
  {
43712
43744
  path: ["updates-resume"],
43713
- usage: USAGE$40
43745
+ usage: USAGE$41
43714
43746
  },
43715
43747
  {
43716
43748
  path: ["administrator"],
43717
- usage: USAGE$50
43749
+ usage: USAGE$51
43718
43750
  },
43719
43751
  {
43720
43752
  path: ["administrator-reset"],
43721
- usage: USAGE$50
43753
+ usage: USAGE$51
43722
43754
  },
43723
43755
  {
43724
43756
  path: ["administrator-reveal"],
43725
- usage: USAGE$50
43757
+ usage: USAGE$51
43726
43758
  },
43727
43759
  {
43728
43760
  path: ["recovery-status"],
43729
- usage: USAGE$50
43761
+ usage: USAGE$51
43730
43762
  },
43731
43763
  {
43732
43764
  path: ["recovery-retry"],
43733
- usage: USAGE$50
43765
+ usage: USAGE$51
43734
43766
  },
43735
43767
  {
43736
43768
  path: ["recovery-cancel"],
43737
- usage: USAGE$50
43769
+ usage: USAGE$51
43738
43770
  }
43739
43771
  ];
43740
43772
  //#endregion
@@ -47246,7 +47278,7 @@ function episode(rest) {
47246
47278
  }
47247
47279
  //#endregion
47248
47280
  //#region src/commands/company-assets.ts
47249
- var USAGE$39 = [
47281
+ var USAGE$40 = [
47250
47282
  "Usage: hostingctl company logo|favicon set --image-file <path> --company <slug>",
47251
47283
  " hostingctl company logo|favicon remove --company <slug>",
47252
47284
  "",
@@ -47261,17 +47293,17 @@ var USAGE$39 = [
47261
47293
  */
47262
47294
  async function companyAssets(context, asset, rest) {
47263
47295
  const [action, ...tail] = rest;
47264
- if (tail.length > 0) throw new UsageError(USAGE$39);
47296
+ if (tail.length > 0) throw new UsageError(USAGE$40);
47265
47297
  const company = await requireCompany(context.flags);
47266
47298
  if (action === "set") return await set$1(context, asset, company);
47267
47299
  if (action === "remove") return await remove$2(context, asset, company);
47268
- throw new UsageError(USAGE$39);
47300
+ throw new UsageError(USAGE$40);
47269
47301
  }
47270
47302
  /** `set --image-file …`: one multipart upload of the asset. */
47271
47303
  async function set$1(context, asset, company) {
47272
47304
  const file = context.flags.get("--image-file") ?? "";
47273
47305
  return await confirmableWrite(context, file === "" ? `Set ${company}'s ${asset}.` : `Set ${company}'s ${asset} to ${file}.`, async () => {
47274
- const body = await imageUpload(file, USAGE$39);
47306
+ const body = await imageUpload(file, USAGE$40);
47275
47307
  return asset === "logo" ? (await companyAssetStoreLogo({
47276
47308
  path: { company },
47277
47309
  body
@@ -47309,7 +47341,7 @@ function companyRole(raw, usage) {
47309
47341
  }
47310
47342
  //#endregion
47311
47343
  //#region src/commands/company-invitations.ts
47312
- var USAGE$38 = [
47344
+ var USAGE$39 = [
47313
47345
  "Usage: hostingctl company invitations --company <slug>",
47314
47346
  " hostingctl company invite --company <slug> --email <email> --name <name> --role <admin|member>",
47315
47347
  " hostingctl company cancel-invitation <invitation-uuid> --company <slug>",
@@ -47333,7 +47365,7 @@ var MAX_INVITATION_TOKEN_BYTES = 4096;
47333
47365
  */
47334
47366
  async function companyInvitations(context, subcommand, rest) {
47335
47367
  if (subcommand === "invitations") {
47336
- if (rest.length > 0) throw new UsageError(USAGE$38);
47368
+ if (rest.length > 0) throw new UsageError(USAGE$39);
47337
47369
  const company = await requireCompany(context.flags);
47338
47370
  return {
47339
47371
  kind: "invitations",
@@ -47344,20 +47376,20 @@ async function companyInvitations(context, subcommand, rest) {
47344
47376
  if (subcommand === "invite") return await invite(context, rest);
47345
47377
  if (subcommand === "cancel-invitation") return await cancel$1(context, rest);
47346
47378
  if (subcommand === "invitation-preview") return (await companyInvitationPreview({
47347
- path: { invitationUuid: oneUuid$7(rest, USAGE$38) },
47348
- body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$38) }
47379
+ path: { invitationUuid: oneUuid$7(rest, USAGE$39) },
47380
+ body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$39) }
47349
47381
  })).data;
47350
47382
  if (subcommand === "invitation-accept") return await accept(context, rest);
47351
- throw new UsageError(USAGE$38);
47383
+ throw new UsageError(USAGE$39);
47352
47384
  }
47353
47385
  /** `invite --email … --name … --role …`. */
47354
47386
  async function invite(context, rest) {
47355
- if (rest.length > 0) throw new UsageError(USAGE$38);
47387
+ if (rest.length > 0) throw new UsageError(USAGE$39);
47356
47388
  const company = await requireCompany(context.flags);
47357
47389
  const email = context.flags.get("--email")?.trim() ?? "";
47358
47390
  const name = context.flags.get("--name")?.trim() ?? "";
47359
- const role = companyRole(context.flags.get("--role"), USAGE$38);
47360
- if (email === "" || name === "") throw new UsageError(`invite needs --email and --name.\n\n${USAGE$38}`);
47391
+ const role = companyRole(context.flags.get("--role"), USAGE$39);
47392
+ if (email === "" || name === "") throw new UsageError(`invite needs --email and --name.\n\n${USAGE$39}`);
47361
47393
  return await confirmableWrite(context, `Invite ${name} <${email}> into ${company} as ${role}.`, async () => (await companyInvitationStore({
47362
47394
  path: { company },
47363
47395
  body: {
@@ -47369,7 +47401,7 @@ async function invite(context, rest) {
47369
47401
  }
47370
47402
  /** `cancel-invitation <uuid> --company …`. */
47371
47403
  async function cancel$1(context, rest) {
47372
- const invitationUuid = oneUuid$7(rest, USAGE$38);
47404
+ const invitationUuid = oneUuid$7(rest, USAGE$39);
47373
47405
  const company = await requireCompany(context.flags);
47374
47406
  return await confirmableWrite(context, `Cancel invitation ${invitationUuid}.`, async () => {
47375
47407
  return (await companyInvitationDestroy({ path: {
@@ -47380,11 +47412,11 @@ async function cancel$1(context, rest) {
47380
47412
  }
47381
47413
  /** `invitation-accept <uuid>`: join the company the invitation names. */
47382
47414
  async function accept(context, rest) {
47383
- const invitationUuid = oneUuid$7(rest, USAGE$38);
47415
+ const invitationUuid = oneUuid$7(rest, USAGE$39);
47384
47416
  return await confirmableWrite(context, `Accept invitation ${invitationUuid}.`, async () => {
47385
47417
  return (await companyInvitationAccept({
47386
47418
  path: { invitationUuid },
47387
- body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$38) }
47419
+ body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$39) }
47388
47420
  })).data;
47389
47421
  });
47390
47422
  }
@@ -47501,31 +47533,31 @@ var COMPANY_TOPICS = [
47501
47533
  },
47502
47534
  {
47503
47535
  path: ["logo"],
47504
- usage: USAGE$39
47536
+ usage: USAGE$40
47505
47537
  },
47506
47538
  {
47507
47539
  path: ["favicon"],
47508
- usage: USAGE$39
47540
+ usage: USAGE$40
47509
47541
  },
47510
47542
  {
47511
47543
  path: ["invitations"],
47512
- usage: USAGE$38
47544
+ usage: USAGE$39
47513
47545
  },
47514
47546
  {
47515
47547
  path: ["invite"],
47516
- usage: USAGE$38
47548
+ usage: USAGE$39
47517
47549
  },
47518
47550
  {
47519
47551
  path: ["cancel-invitation"],
47520
- usage: USAGE$38
47552
+ usage: USAGE$39
47521
47553
  },
47522
47554
  {
47523
47555
  path: ["invitation-preview"],
47524
- usage: USAGE$38
47556
+ usage: USAGE$39
47525
47557
  },
47526
47558
  {
47527
47559
  path: ["invitation-accept"],
47528
- usage: USAGE$38
47560
+ usage: USAGE$39
47529
47561
  }
47530
47562
  ];
47531
47563
  //#endregion
@@ -48351,7 +48383,7 @@ function readJsonObject(file, subject) {
48351
48383
  }
48352
48384
  //#endregion
48353
48385
  //#region src/commands/dns-records.ts
48354
- var USAGE$37 = [
48386
+ var USAGE$38 = [
48355
48387
  "Usage: hostingctl dns enable <domain-uuid> --company <slug>",
48356
48388
  " hostingctl dns record set <domain-uuid> --company <slug> --file <set.json>",
48357
48389
  " hostingctl dns record remove <domain-uuid> --company <slug> --name <relative> --type <type>",
@@ -48390,7 +48422,7 @@ async function dnsWrites(context, subcommand, rest) {
48390
48422
  if (subcommand === "record") return await record$4(context, rest);
48391
48423
  if (subcommand === "dnssec") return await changeDnssec(context, rest);
48392
48424
  if (subcommand === "handover") return await handover(context, rest);
48393
- throw new UsageError(USAGE$37);
48425
+ throw new UsageError(USAGE$38);
48394
48426
  }
48395
48427
  /** The zone's current desired generation, which every write must name. */
48396
48428
  async function generation(company, domainUuid) {
@@ -48401,7 +48433,7 @@ async function generation(company, domainUuid) {
48401
48433
  }
48402
48434
  /** `dns enable <uuid>`: take the zone over into managed DNS. */
48403
48435
  async function enable(context, rest) {
48404
- const domainUuid = oneUuid$7(rest, USAGE$37);
48436
+ const domainUuid = oneUuid$7(rest, USAGE$38);
48405
48437
  const company = await requireCompany(context.flags);
48406
48438
  return await confirmableWrite(context, "Publish this name's zone in managed DNS.", async () => (await domainsDnsStore({ path: {
48407
48439
  company,
@@ -48411,16 +48443,16 @@ async function enable(context, rest) {
48411
48443
  /** `dns record set|remove`. */
48412
48444
  async function record$4(context, rest) {
48413
48445
  const [action, ...tail] = rest;
48414
- const domainUuid = oneUuid$7(tail, USAGE$37);
48446
+ const domainUuid = oneUuid$7(tail, USAGE$38);
48415
48447
  const company = await requireCompany(context.flags);
48416
48448
  if (action === "set") return await setRecord(context, company, domainUuid);
48417
48449
  if (action === "remove") return await removeRecord(context, company, domainUuid);
48418
- throw new UsageError(USAGE$37);
48450
+ throw new UsageError(USAGE$38);
48419
48451
  }
48420
48452
  /** `record set --file`: replace one set with the file's own values. */
48421
48453
  async function setRecord(context, company, domainUuid) {
48422
48454
  const file = context.flags.get("--file") ?? "";
48423
- if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$37}`);
48455
+ if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$38}`);
48424
48456
  const set = recordSetFromFile(file);
48425
48457
  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 () => {
48426
48458
  const body = {
@@ -48440,7 +48472,7 @@ async function setRecord(context, company, domainUuid) {
48440
48472
  async function removeRecord(context, company, domainUuid) {
48441
48473
  const relativeName = context.flags.get("--name") ?? "";
48442
48474
  const recordType = recordTypeFlag(context);
48443
- if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$37}`);
48475
+ if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$38}`);
48444
48476
  return await confirmableWrite(context, `Remove the ${recordType.toUpperCase()} set "${relativeName}".`, async () => {
48445
48477
  const query = {
48446
48478
  relativeName,
@@ -48459,8 +48491,8 @@ async function removeRecord(context, company, domainUuid) {
48459
48491
  /** `dns dnssec <signed|unsigned> <uuid>`: the signing mode, with the confirmation the API requires. */
48460
48492
  async function changeDnssec(context, rest) {
48461
48493
  const [mode, uuid, ...extra] = rest;
48462
- if (mode === void 0 || mode !== "signed" && mode !== "unsigned" || extra.length > 0) throw new UsageError(USAGE$37);
48463
- const domainUuid = oneUuid$7(uuid === void 0 ? [] : [uuid], USAGE$37);
48494
+ if (mode === void 0 || mode !== "signed" && mode !== "unsigned" || extra.length > 0) throw new UsageError(USAGE$38);
48495
+ const domainUuid = oneUuid$7(uuid === void 0 ? [] : [uuid], USAGE$38);
48464
48496
  const company = await requireCompany(context.flags);
48465
48497
  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 () => {
48466
48498
  const body = {
@@ -48479,7 +48511,7 @@ async function changeDnssec(context, rest) {
48479
48511
  }
48480
48512
  /** `dns handover <uuid>`: hand the zone back, dropping what this platform publishes. */
48481
48513
  async function handover(context, rest) {
48482
- const domainUuid = oneUuid$7(rest, USAGE$37);
48514
+ const domainUuid = oneUuid$7(rest, USAGE$38);
48483
48515
  const company = await requireCompany(context.flags);
48484
48516
  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 () => {
48485
48517
  const body = {
@@ -48498,7 +48530,7 @@ async function handover(context, rest) {
48498
48530
  /** A record type flag, refused when it is not one of the API's own values. */
48499
48531
  function recordTypeFlag(context) {
48500
48532
  const raw = (context.flags.get("--type") ?? "").trim().toLowerCase();
48501
- if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$37}`);
48533
+ if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$38}`);
48502
48534
  return raw;
48503
48535
  }
48504
48536
  /**
@@ -48532,7 +48564,7 @@ function recordSetFromValue(value, subject) {
48532
48564
  }
48533
48565
  //#endregion
48534
48566
  //#region src/commands/dns-templates.ts
48535
- var USAGE$36 = [
48567
+ var USAGE$37 = [
48536
48568
  "Usage: hostingctl dns template list --company <slug>",
48537
48569
  " hostingctl dns template show <template-uuid> --company <slug>",
48538
48570
  " hostingctl dns template save [<template-uuid>] --company <slug> --file <template.json>",
@@ -48554,24 +48586,24 @@ var USAGE$36 = [
48554
48586
  async function dnsTemplates(context, rest) {
48555
48587
  const [action, ...tail] = rest;
48556
48588
  if (action === "list") {
48557
- if (tail.length > 0) throw new UsageError(USAGE$36);
48589
+ if (tail.length > 0) throw new UsageError(USAGE$37);
48558
48590
  return {
48559
48591
  kind: "templates",
48560
48592
  templates: (await dnsTemplatesIndex({ path: { company: await requireCompany(context.flags) } })).data.templates
48561
48593
  };
48562
48594
  }
48563
- if (action === "show") return await show$5(context, oneUuid$7(tail, USAGE$36));
48595
+ if (action === "show") return await show$5(context, oneUuid$7(tail, USAGE$37));
48564
48596
  if (action === "save") return await save$1(context, tail[0]);
48565
- if (action === "delete") return await destroy$1(context, oneUuid$7(tail, USAGE$36));
48566
- if (action === "from-zone") return await fromZone(context, oneUuid$7(tail, USAGE$36));
48597
+ if (action === "delete") return await destroy$1(context, oneUuid$7(tail, USAGE$37));
48598
+ if (action === "from-zone") return await fromZone(context, oneUuid$7(tail, USAGE$37));
48567
48599
  if (action === "preview") return await preview$1(context, tail);
48568
48600
  if (action === "apply") return await apply(context, tail);
48569
- throw new UsageError(USAGE$36);
48601
+ throw new UsageError(USAGE$37);
48570
48602
  }
48571
48603
  /** Two uuids: the template, then the zone it applies to. */
48572
48604
  function templateAndZone(rest) {
48573
48605
  const [templateUuid, domainUuid, ...extra] = rest;
48574
- if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$36);
48606
+ if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$37);
48575
48607
  return {
48576
48608
  templateUuid,
48577
48609
  domainUuid
@@ -48590,7 +48622,7 @@ async function show$5(context, templateUuid) {
48590
48622
  /** `save [<uuid>] --file …`: record a new template, or replace the one named. */
48591
48623
  async function save$1(context, templateUuid) {
48592
48624
  const file = context.flags.get("--file") ?? "";
48593
- if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$36}`);
48625
+ if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$37}`);
48594
48626
  const company = await requireCompany(context.flags);
48595
48627
  const document = readJsonObject(file, "template");
48596
48628
  const name = typeof document.name === "string" ? document.name.trim() : "";
@@ -48626,7 +48658,7 @@ async function destroy$1(context, templateUuid) {
48626
48658
  async function fromZone(context, domainUuid) {
48627
48659
  const company = await requireCompany(context.flags);
48628
48660
  const name = context.flags.get("--name")?.trim() ?? "";
48629
- if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$36}`);
48661
+ if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$37}`);
48630
48662
  const zone = (await domainsDnsShow({ path: {
48631
48663
  company,
48632
48664
  domainUuid
@@ -48696,7 +48728,7 @@ function recordSetsFromFile$1(document, subject) {
48696
48728
  }
48697
48729
  //#endregion
48698
48730
  //#region src/commands/dns-text.ts
48699
- var USAGE$35 = [
48731
+ var USAGE$36 = [
48700
48732
  "Usage: hostingctl dns <zone|export> <domain-uuid> --company <slug>",
48701
48733
  " hostingctl dns import <preview|apply> <domain-uuid> --company <slug> --file <path> [--confirm]",
48702
48734
  " hostingctl dns enable <domain-uuid> --company <slug>",
@@ -48767,7 +48799,7 @@ function applyText(result) {
48767
48799
  var DNS_METADATA = {
48768
48800
  name: "dns",
48769
48801
  summary: "A managed name's zone, its zone-file export, and the reviewed import write.",
48770
- usage: USAGE$35,
48802
+ usage: USAGE$36,
48771
48803
  flags: [
48772
48804
  {
48773
48805
  name: "--file",
@@ -48805,23 +48837,23 @@ var DNS_METADATA = {
48805
48837
  var DNS_TOPICS = [
48806
48838
  {
48807
48839
  path: ["enable"],
48808
- usage: USAGE$37
48840
+ usage: USAGE$38
48809
48841
  },
48810
48842
  {
48811
48843
  path: ["record"],
48812
- usage: USAGE$37
48844
+ usage: USAGE$38
48813
48845
  },
48814
48846
  {
48815
48847
  path: ["dnssec"],
48816
- usage: USAGE$37
48848
+ usage: USAGE$38
48817
48849
  },
48818
48850
  {
48819
48851
  path: ["handover"],
48820
- usage: USAGE$37
48852
+ usage: USAGE$38
48821
48853
  },
48822
48854
  {
48823
48855
  path: ["template"],
48824
- usage: USAGE$36
48856
+ usage: USAGE$37
48825
48857
  }
48826
48858
  ];
48827
48859
  //#endregion
@@ -48839,7 +48871,7 @@ var IMPORT_LINE = /^(\S+)\s+(\d+)\s+(\S+)\s+(.+)$/;
48839
48871
  * hold customer DNS data, so its contents are never printed; only the API's own answer is shown.
48840
48872
  */
48841
48873
  function recordSetsFromFile(file) {
48842
- if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$35}`);
48874
+ if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$36}`);
48843
48875
  const sets = /* @__PURE__ */ new Map();
48844
48876
  for (const [index, raw] of readBoundedImportFile(file, "import").split("\n").entries()) addLine(sets, raw.trim(), index + 1);
48845
48877
  if (sets.size === 0) throw new UsageError(`The import file [${file}] holds no record sets.`);
@@ -48933,7 +48965,7 @@ var dns = {
48933
48965
  if (subcommand === "import") return await importRecords(context, rest);
48934
48966
  if (subcommand === "template") return await dnsTemplates(context, rest);
48935
48967
  if (WRITE_SUBCOMMANDS$1.has(subcommand ?? "")) return await dnsWrites(context, subcommand ?? "", rest);
48936
- throw new UsageError(USAGE$35);
48968
+ throw new UsageError(USAGE$36);
48937
48969
  },
48938
48970
  human(report) {
48939
48971
  if ("sent" in report) return renderWriteOutcome(report, dnsWriteText);
@@ -48952,7 +48984,7 @@ async function readZone(context, rest, which) {
48952
48984
  /** `import preview|apply <uuid> --file <path>`: the review, or the reviewed write. */
48953
48985
  async function importRecords(context, rest) {
48954
48986
  const [action, ...tail] = rest;
48955
- if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$35);
48987
+ if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$36);
48956
48988
  const path = await domainPath$1(context, tail);
48957
48989
  const recordSets = recordSetsFromFile(context.flags.get("--file"));
48958
48990
  if (action === "preview") return (await domainsDnsImportPreview({
@@ -48989,7 +49021,7 @@ async function applyImport(context, path, recordSets) {
48989
49021
  /** The company and the one domain uuid a DNS subcommand needs, or a usage refusal. */
48990
49022
  async function domainPath$1(context, rest) {
48991
49023
  const [domainUuid, ...extra] = rest;
48992
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
49024
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$36);
48993
49025
  return {
48994
49026
  company: await requireCompany(context.flags),
48995
49027
  domainUuid
@@ -49158,7 +49190,7 @@ function checkText(check) {
49158
49190
  //#endregion
49159
49191
  //#region src/commands/email-alias.ts
49160
49192
  /** The one usage string this group refuses with, owned by the group it belongs to. */
49161
- var USAGE$34 = [
49193
+ var USAGE$35 = [
49162
49194
  "Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
49163
49195
  " hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
49164
49196
  " hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
@@ -49182,16 +49214,16 @@ async function aliasGroup(context, action, tail) {
49182
49214
  if (action === "set") return await aliasSet(context, tail);
49183
49215
  if (action === "remove") return await aliasRemove(context, tail);
49184
49216
  if (action === "unroute") return await aliasUnroute(context, tail);
49185
- throw new UsageError(USAGE$34);
49217
+ throw new UsageError(USAGE$35);
49186
49218
  }
49187
49219
  /** `alias add <domain> --local … --destinations …`: a new forwarding address. */
49188
49220
  async function aliasAdd(context, tail) {
49189
49221
  const [emailDomainUuid, ...extra] = tail;
49190
- if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
49222
+ if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
49191
49223
  const company = await requireCompany(context.flags);
49192
49224
  const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
49193
49225
  const list = destinations$1(context);
49194
- if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$34}`);
49226
+ if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$35}`);
49195
49227
  return await confirmableWrite(context, [`Create ${localPart}@… forwarding to:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
49196
49228
  return (await emailAliasesStore({
49197
49229
  path: {
@@ -49208,10 +49240,10 @@ async function aliasAdd(context, tail) {
49208
49240
  /** `alias set <domain> <alias> --destinations …`: replace the complete recipient list. */
49209
49241
  async function aliasSet(context, tail) {
49210
49242
  const [emailDomainUuid, aliasUuid, ...extra] = tail;
49211
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
49243
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
49212
49244
  const company = await requireCompany(context.flags);
49213
49245
  const list = destinations$1(context);
49214
- if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$34}`);
49246
+ if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$35}`);
49215
49247
  return await confirmableWrite(context, [`Replace ${aliasUuid}'s destinations with:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
49216
49248
  return (await emailAliasesUpdate({
49217
49249
  path: {
@@ -49226,7 +49258,7 @@ async function aliasSet(context, tail) {
49226
49258
  /** `alias remove <domain> <alias>`. */
49227
49259
  async function aliasRemove(context, tail) {
49228
49260
  const [emailDomainUuid, aliasUuid, ...extra] = tail;
49229
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
49261
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
49230
49262
  const company = await requireCompany(context.flags);
49231
49263
  return await confirmableWrite(context, `Remove alias ${aliasUuid}.`, async () => {
49232
49264
  return (await emailAliasesDestroy({ path: {
@@ -49239,7 +49271,7 @@ async function aliasRemove(context, tail) {
49239
49271
  /** `alias unroute <domain> <alias> <mailbox>`: drop one destination. */
49240
49272
  async function aliasUnroute(context, tail) {
49241
49273
  const [emailDomainUuid, aliasUuid, mailboxUuid, ...extra] = tail;
49242
- if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
49274
+ if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
49243
49275
  const company = await requireCompany(context.flags);
49244
49276
  return await confirmableWrite(context, `Stop forwarding ${aliasUuid} to mailbox ${mailboxUuid}.`, async () => {
49245
49277
  return (await emailAliasesDestinationsDestroy({ path: {
@@ -49252,7 +49284,7 @@ async function aliasUnroute(context, tail) {
49252
49284
  }
49253
49285
  //#endregion
49254
49286
  //#region src/commands/email-address.ts
49255
- var USAGE$33 = [
49287
+ var USAGE$34 = [
49256
49288
  "Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
49257
49289
  " hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
49258
49290
  " hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
@@ -49278,13 +49310,13 @@ async function emailAddresses(context, subcommand, rest) {
49278
49310
  if (subcommand === "alias") return await aliasGroup(context, action, tail);
49279
49311
  if (subcommand === "app-token") return await appToken(context, action, tail);
49280
49312
  if (subcommand === "send-as") return await sendAs(context, action, tail);
49281
- throw new UsageError(USAGE$33);
49313
+ throw new UsageError(USAGE$34);
49282
49314
  }
49283
49315
  /** `app-token list|issue|revoke|deliver`. */
49284
49316
  async function appToken(context, action, tail) {
49285
49317
  const company = await requireCompany(context.flags);
49286
49318
  const [emailDomainUuid, mailboxUuid, third, ...extra] = tail;
49287
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$33);
49319
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
49288
49320
  const path = {
49289
49321
  company,
49290
49322
  emailDomainUuid,
@@ -49312,7 +49344,7 @@ async function appToken(context, action, tail) {
49312
49344
  }
49313
49345
  if (action === "issue" && third === void 0) {
49314
49346
  const label = context.flags.get("--label")?.trim() ?? "";
49315
- if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$33}`);
49347
+ if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$34}`);
49316
49348
  return await confirmableWrite(context, `Create an application password labelled "${label}".`, async () => {
49317
49349
  return (await emailAppTokensStore({
49318
49350
  path,
@@ -49320,7 +49352,7 @@ async function appToken(context, action, tail) {
49320
49352
  })).data;
49321
49353
  });
49322
49354
  }
49323
- if (third === void 0) throw new UsageError(USAGE$33);
49355
+ if (third === void 0) throw new UsageError(USAGE$34);
49324
49356
  const tokenPath = {
49325
49357
  ...path,
49326
49358
  tokenUuid: third
@@ -49329,14 +49361,14 @@ async function appToken(context, action, tail) {
49329
49361
  return (await emailAppTokensRevoke({ path: tokenPath })).data;
49330
49362
  });
49331
49363
  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);
49332
- throw new UsageError(USAGE$33);
49364
+ throw new UsageError(USAGE$34);
49333
49365
  }
49334
49366
  /** `send-as list|grant|revoke`. */
49335
49367
  async function sendAs(context, action, tail) {
49336
49368
  const company = await requireCompany(context.flags);
49337
49369
  if (action === "revoke") {
49338
49370
  const [grantUuid, ...extra] = tail;
49339
- if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$33);
49371
+ if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
49340
49372
  return await confirmableWrite(context, `Revoke send-as grant ${grantUuid}.`, async () => {
49341
49373
  return (await emailSendAsGrantsDestroy({ path: {
49342
49374
  company,
@@ -49345,7 +49377,7 @@ async function sendAs(context, action, tail) {
49345
49377
  });
49346
49378
  }
49347
49379
  const [emailDomainUuid, mailboxUuid, ...extra] = tail;
49348
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$33);
49380
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
49349
49381
  const path = {
49350
49382
  company,
49351
49383
  emailDomainUuid,
@@ -49372,7 +49404,7 @@ async function sendAs(context, action, tail) {
49372
49404
  }
49373
49405
  if (action === "grant") {
49374
49406
  const grantedAddressUuid = context.flags.get("--address") ?? "";
49375
- if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$33}`);
49407
+ if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$34}`);
49376
49408
  return await confirmableWrite(context, `Allow this mailbox to send as address ${grantedAddressUuid}.`, async () => {
49377
49409
  return (await emailSendAsGrantsStore({
49378
49410
  path,
@@ -49380,7 +49412,7 @@ async function sendAs(context, action, tail) {
49380
49412
  })).data;
49381
49413
  });
49382
49414
  }
49383
- throw new UsageError(USAGE$33);
49415
+ throw new UsageError(USAGE$34);
49384
49416
  }
49385
49417
  //#endregion
49386
49418
  //#region src/commands/email-write-text.ts
@@ -49449,7 +49481,7 @@ function emailAddressText(report) {
49449
49481
  }
49450
49482
  //#endregion
49451
49483
  //#region src/commands/email-domain.ts
49452
- var USAGE$32 = [
49484
+ var USAGE$33 = [
49453
49485
  "Usage: hostingctl email offer",
49454
49486
  " hostingctl email enroll --company <slug>",
49455
49487
  " hostingctl email agree --company <slug> --term <package-term-uuid>",
@@ -49470,7 +49502,7 @@ var USAGE$32 = [
49470
49502
  /** `email offer|agree|provision|domain|catch-all`, dispatched from the `email` command. */
49471
49503
  async function emailDomains(context, subcommand, rest) {
49472
49504
  if (subcommand === "offer") {
49473
- if (rest.length > 0) throw new UsageError(USAGE$32);
49505
+ if (rest.length > 0) throw new UsageError(USAGE$33);
49474
49506
  return {
49475
49507
  kind: "offers",
49476
49508
  offers: (await emailOffers({ path: { company: await requireCompany(context.flags) } })).data
@@ -49481,11 +49513,11 @@ async function emailDomains(context, subcommand, rest) {
49481
49513
  if (subcommand === "provision") return await provision(context, rest);
49482
49514
  if (subcommand === "domain") return await domain(context, rest);
49483
49515
  if (subcommand === "catch-all") return await catchAll(context, rest);
49484
- throw new UsageError(USAGE$32);
49516
+ throw new UsageError(USAGE$33);
49485
49517
  }
49486
49518
  /** A company-wide command takes no positionals. */
49487
49519
  function noExtra$14(rest) {
49488
- if (rest.length > 0) throw new UsageError(USAGE$32);
49520
+ if (rest.length > 0) throw new UsageError(USAGE$33);
49489
49521
  }
49490
49522
  /** `enroll`: create the service record and start provisioning, which is the API's own create. */
49491
49523
  async function enroll(context, rest) {
@@ -49498,7 +49530,7 @@ async function agree(context, rest) {
49498
49530
  noExtra$14(rest);
49499
49531
  const company = await requireCompany(context.flags);
49500
49532
  const packageTermUuid = context.flags.get("--term") ?? "";
49501
- if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$32}`);
49533
+ if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$33}`);
49502
49534
  return await confirmableWrite(context, `Accept email package term ${packageTermUuid} for ${company}.`, async () => (await emailAgreement({
49503
49535
  path: { company },
49504
49536
  body: { packageTermUuid }
@@ -49517,7 +49549,7 @@ async function domain(context, rest) {
49517
49549
  if (action === "add") {
49518
49550
  noExtra$14(tail);
49519
49551
  const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
49520
- if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$32}`);
49552
+ if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$33}`);
49521
49553
  return await confirmableWrite(context, `Attach ${hostname} to ${company}'s mail service.`, async () => {
49522
49554
  return (await emailDomainsStore({
49523
49555
  path: { company },
@@ -49527,7 +49559,7 @@ async function domain(context, rest) {
49527
49559
  }
49528
49560
  const path = {
49529
49561
  company,
49530
- emailDomainUuid: oneUuid$7(tail, USAGE$32)
49562
+ emailDomainUuid: oneUuid$7(tail, USAGE$33)
49531
49563
  };
49532
49564
  if (action === "recheck") return await confirmableWrite(context, "Re-observe this name's DNS now.", async () => {
49533
49565
  return (await emailDomainsRecheck({ path })).data;
@@ -49547,14 +49579,14 @@ async function domain(context, rest) {
49547
49579
  body
49548
49580
  })).data;
49549
49581
  });
49550
- throw new UsageError(USAGE$32);
49582
+ throw new UsageError(USAGE$33);
49551
49583
  }
49552
49584
  /** `catch-all show|set|clear`. */
49553
49585
  async function catchAll(context, rest) {
49554
49586
  const [action, ...tail] = rest;
49555
49587
  const path = {
49556
49588
  company: await requireCompany(context.flags),
49557
- emailDomainUuid: oneUuid$7(tail, USAGE$32)
49589
+ emailDomainUuid: oneUuid$7(tail, USAGE$33)
49558
49590
  };
49559
49591
  if (action === "show") return {
49560
49592
  kind: "catch-all",
@@ -49562,7 +49594,7 @@ async function catchAll(context, rest) {
49562
49594
  };
49563
49595
  if (action === "set") {
49564
49596
  const destinations = destinationList(context);
49565
- if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$32}`);
49597
+ if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$33}`);
49566
49598
  return await confirmableWrite(context, [`Enable the catch-all for this name, forwarding to:`, ...destinations.map((one) => ` ${one}`)].join("\n"), async () => {
49567
49599
  return (await emailCatchAllUpdate({
49568
49600
  path,
@@ -49574,7 +49606,7 @@ async function catchAll(context, rest) {
49574
49606
  });
49575
49607
  }
49576
49608
  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);
49577
- throw new UsageError(USAGE$32);
49609
+ throw new UsageError(USAGE$33);
49578
49610
  }
49579
49611
  /**
49580
49612
  * The comma-separated `--destinations`.
@@ -49606,7 +49638,7 @@ function catchAllText(one) {
49606
49638
  }
49607
49639
  //#endregion
49608
49640
  //#region src/commands/email-holds.ts
49609
- var USAGE$31 = [
49641
+ var USAGE$32 = [
49610
49642
  "Usage: hostingctl email hold list --company <slug>",
49611
49643
  " hostingctl email hold create --company <slug> --reason <compromise|abuse|operator> [--mailbox <uuid>]",
49612
49644
  " hostingctl email hold release <hold-uuid> --company <slug>",
@@ -49629,21 +49661,21 @@ async function emailHolds(context, rest) {
49629
49661
  const [action, ...tail] = rest;
49630
49662
  const company = await requireCompany(context.flags);
49631
49663
  if (action === "list") {
49632
- if (tail.length > 0) throw new UsageError(USAGE$31);
49664
+ if (tail.length > 0) throw new UsageError(USAGE$32);
49633
49665
  return {
49634
49666
  kind: "holds",
49635
49667
  holds: (await emailHoldsIndex({ path: { company } })).data.holds
49636
49668
  };
49637
49669
  }
49638
49670
  if (action === "create") return await create$3(context, tail, company);
49639
- if (action === "release") return await release(context, oneUuid$7(tail, USAGE$31), company);
49640
- throw new UsageError(USAGE$31);
49671
+ if (action === "release") return await release(context, oneUuid$7(tail, USAGE$32), company);
49672
+ throw new UsageError(USAGE$32);
49641
49673
  }
49642
49674
  /** `create --reason … [--mailbox …]`. */
49643
49675
  async function create$3(context, tail, company) {
49644
- if (tail.length > 0) throw new UsageError(USAGE$31);
49676
+ if (tail.length > 0) throw new UsageError(USAGE$32);
49645
49677
  const raw = context.flags.get("--reason")?.trim() ?? "";
49646
- if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$31}`);
49678
+ if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$32}`);
49647
49679
  const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
49648
49680
  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 () => {
49649
49681
  return (await emailHoldsStore({
@@ -49679,7 +49711,7 @@ function emailHoldText(report) {
49679
49711
  }
49680
49712
  //#endregion
49681
49713
  //#region src/commands/email-mailbox-admin.ts
49682
- var USAGE$30 = [
49714
+ var USAGE$31 = [
49683
49715
  "Usage: hostingctl email mailbox add <email-domain-uuid> --company <slug> --local <name> --quota <gb-5|gb-10|gb-20>",
49684
49716
  " hostingctl email mailbox change <email-domain-uuid> <mailbox-uuid> --company <slug> [--status enabled|suspended] [--quota <size>]",
49685
49717
  " hostingctl email mailbox remove <email-domain-uuid> <mailbox-uuid> --company <slug>",
@@ -49711,7 +49743,7 @@ var STATUSES = /* @__PURE__ */ new Set(["enabled", "suspended"]);
49711
49743
  async function emailMailboxAdmin(context, action, tail) {
49712
49744
  if (action === "add") return await add$8(context, tail);
49713
49745
  const [emailDomainUuid, mailboxUuid, ...extra] = tail;
49714
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
49746
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$31);
49715
49747
  const path = {
49716
49748
  company: await requireCompany(context.flags),
49717
49749
  emailDomainUuid,
@@ -49729,7 +49761,7 @@ async function emailMailboxAdmin(context, action, tail) {
49729
49761
  if (action === "preferences-set") return await preferences(context, path);
49730
49762
  if (action === "credential") return await revealCredential(context, path, false);
49731
49763
  if (action === "reset-credential") return await revealCredential(context, path, true);
49732
- throw new UsageError(USAGE$30);
49764
+ throw new UsageError(USAGE$31);
49733
49765
  }
49734
49766
  /** A quota flag from the API's own values. */
49735
49767
  function quota(context) {
@@ -49745,11 +49777,11 @@ function destinations(context) {
49745
49777
  /** `add <domain> --local … --quota …`. */
49746
49778
  async function add$8(context, tail) {
49747
49779
  const [emailDomainUuid, ...extra] = tail;
49748
- if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
49780
+ if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$31);
49749
49781
  const company = await requireCompany(context.flags);
49750
49782
  const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
49751
49783
  const size = quota(context);
49752
- if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$30}`);
49784
+ if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$31}`);
49753
49785
  return await confirmableWrite(context, `Create mailbox ${localPart}@… with a ${size} quota.`, async () => {
49754
49786
  return (await emailMailboxesStore({
49755
49787
  path: {
@@ -49774,7 +49806,7 @@ function statusFlag(context) {
49774
49806
  async function change$1(context, path) {
49775
49807
  const status = statusFlag(context);
49776
49808
  const size = quota(context);
49777
- if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$30}`);
49809
+ if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$31}`);
49778
49810
  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 () => {
49779
49811
  return (await emailMailboxesUpdate({
49780
49812
  path,
@@ -49802,7 +49834,7 @@ async function preferences(context, path) {
49802
49834
  const markRead = onOff$4(context, "--spam-mark-read");
49803
49835
  const threshold = context.flags.get("--spam-threshold");
49804
49836
  const summary = context.flags.get("--vacation-subject");
49805
- 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$30}`);
49837
+ 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$31}`);
49806
49838
  const body = {
49807
49839
  vacationEnabled: vacation ?? current.vacationEnabled,
49808
49840
  vacationSubject: context.flags.get("--vacation-subject") ?? current.vacationSubject,
@@ -49857,7 +49889,7 @@ function emailMailboxAdminText(report) {
49857
49889
  }
49858
49890
  //#endregion
49859
49891
  //#region src/commands/email-service.ts
49860
- var USAGE$29 = [
49892
+ var USAGE$30 = [
49861
49893
  "Usage: hostingctl email service <suspend|resume> --company <slug>",
49862
49894
  " hostingctl email service cancellation --company <slug>",
49863
49895
  " hostingctl email service cancel --company <slug> --ends-at <iso-date>",
@@ -49884,11 +49916,11 @@ async function emailService(context, subcommand, rest) {
49884
49916
  if (subcommand === "dmarc-set") return await dmarcSet$1(context, rest);
49885
49917
  if (subcommand === "blocklist-set") return await blocklistSet(context, rest);
49886
49918
  if (subcommand === "service") return await service(context, rest);
49887
- throw new UsageError(USAGE$29);
49919
+ throw new UsageError(USAGE$30);
49888
49920
  }
49889
49921
  /** A company-wide command takes no positionals. */
49890
49922
  function noExtra$13(rest) {
49891
- if (rest.length > 0) throw new UsageError(USAGE$29);
49923
+ if (rest.length > 0) throw new UsageError(USAGE$30);
49892
49924
  }
49893
49925
  /** `service suspend|resume|cancellation|cancel|cancel-withdraw`. */
49894
49926
  async function service(context, rest) {
@@ -49914,7 +49946,7 @@ async function service(context, rest) {
49914
49946
  if (action === "cancel") {
49915
49947
  noExtra$13(tail);
49916
49948
  const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
49917
- if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$29}`);
49949
+ if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$30}`);
49918
49950
  if (Number.isNaN(Date.parse(endsAt))) throw new UsageError(`--ends-at must be an ISO date (got "${endsAt}").`);
49919
49951
  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({
49920
49952
  path: { company },
@@ -49927,7 +49959,7 @@ async function service(context, rest) {
49927
49959
  return (await emailCancellationWithdraw({ path: { company } })).data;
49928
49960
  });
49929
49961
  }
49930
- throw new UsageError(USAGE$29);
49962
+ throw new UsageError(USAGE$30);
49931
49963
  }
49932
49964
  /** `dmarc`: DMARC reporting for every attached name. */
49933
49965
  async function dmarc$1(context, rest) {
@@ -49947,7 +49979,7 @@ async function blocklist$1(context, rest) {
49947
49979
  }
49948
49980
  /** `dmarc-set <name> --enabled on|off`. */
49949
49981
  async function dmarcSet$1(context, rest) {
49950
- const emailDomainUuid = oneUuid$7(rest, USAGE$29);
49982
+ const emailDomainUuid = oneUuid$7(rest, USAGE$30);
49951
49983
  const company = await requireCompany(context.flags);
49952
49984
  const enabled = onOff$3(context);
49953
49985
  return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} DMARC reporting for this name.`, async () => {
@@ -49962,7 +49994,7 @@ async function dmarcSet$1(context, rest) {
49962
49994
  }
49963
49995
  /** `blocklist-set <name> --enabled on|off`. */
49964
49996
  async function blocklistSet(context, rest) {
49965
- const emailDomainUuid = oneUuid$7(rest, USAGE$29);
49997
+ const emailDomainUuid = oneUuid$7(rest, USAGE$30);
49966
49998
  const company = await requireCompany(context.flags);
49967
49999
  const enabled = onOff$3(context);
49968
50000
  return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} blocklist monitoring for this name.`, async () => {
@@ -49979,7 +50011,7 @@ async function blocklistSet(context, rest) {
49979
50011
  async function importSchema(context, rest) {
49980
50012
  noExtra$13(rest);
49981
50013
  const version = context.flags.get("--version")?.trim() ?? "";
49982
- if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$29}`);
50014
+ if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$30}`);
49983
50015
  return {
49984
50016
  kind: "schema",
49985
50017
  version,
@@ -49991,7 +50023,7 @@ function onOff$3(context) {
49991
50023
  const raw = context.flags.get("--enabled")?.trim() ?? "";
49992
50024
  if (raw === "on" || raw === "true") return true;
49993
50025
  if (raw === "off" || raw === "false") return false;
49994
- throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$29}`);
50026
+ throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$30}`);
49995
50027
  }
49996
50028
  /** The `email service|dmarc|blocklist|import-schema` renderer. */
49997
50029
  function emailServiceText(report) {
@@ -50004,7 +50036,7 @@ function emailServiceText(report) {
50004
50036
  //#endregion
50005
50037
  //#region src/commands/email-sync-csv.ts
50006
50038
  /** The usage this group refuses with, owned by the command it belongs to. */
50007
- var USAGE$28 = [
50039
+ var USAGE$29 = [
50008
50040
  "Usage: hostingctl email sync csv <preview|commit> <email-domain-uuid> --company <slug> --file <path>",
50009
50041
  "",
50010
50042
  " preview What the file's rows would become. Writes nothing.",
@@ -50015,7 +50047,7 @@ var USAGE$28 = [
50015
50047
  /** One named uuid, or a usage refusal. */
50016
50048
  function one$2(rest) {
50017
50049
  const [uuid, ...extra] = rest;
50018
- if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$28);
50050
+ if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$29);
50019
50051
  return uuid;
50020
50052
  }
50021
50053
  /** `csv preview|commit <domain> --file <path>`: one multipart upload of the CSV itself. */
@@ -50023,7 +50055,7 @@ async function csv(context, tail) {
50023
50055
  const [action, ...args] = tail;
50024
50056
  const path = await domainPath(context, one$2(args));
50025
50057
  const file = context.flags.get("--file") ?? "";
50026
- if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$28}`);
50058
+ if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$29}`);
50027
50059
  if (action === "preview") return {
50028
50060
  kind: "csv-preview",
50029
50061
  rows: (await emailMailboxSyncCsvPreview({
@@ -50031,10 +50063,10 @@ async function csv(context, tail) {
50031
50063
  body: await csvPreviewBody(file)
50032
50064
  })).data.rows
50033
50065
  };
50034
- if (action !== "commit") throw new UsageError(USAGE$28);
50066
+ if (action !== "commit") throw new UsageError(USAGE$29);
50035
50067
  const recurrence = recurrenceFlag(context) ?? "once";
50036
50068
  const endsAt = context.flags.get("--ends-at")?.trim() || null;
50037
- if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$28}`);
50069
+ if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$29}`);
50038
50070
  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 () => {
50039
50071
  const accepted = (await emailMailboxSyncCsvPreview({
50040
50072
  path,
@@ -50083,7 +50115,7 @@ async function csvCommitBody(file, accepted, recurrence, endsAt) {
50083
50115
  }
50084
50116
  //#endregion
50085
50117
  //#region src/commands/email-sync.ts
50086
- var USAGE$27 = [
50118
+ var USAGE$28 = [
50087
50119
  "Usage: hostingctl email sync show <email-domain-uuid> --company <slug>",
50088
50120
  " hostingctl email sync server <email-domain-uuid> --company <slug> --host <host> --port <n> --encryption <tls|starttls>",
50089
50121
  " 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>]",
@@ -50108,12 +50140,12 @@ async function emailSync(context, rest) {
50108
50140
  if (action === "server") return await server(context, tail);
50109
50141
  if (action === "account") return await account(context, tail);
50110
50142
  if (action === "csv") return await csv(context, tail);
50111
- throw new UsageError(USAGE$27);
50143
+ throw new UsageError(USAGE$28);
50112
50144
  }
50113
50145
  /** One named uuid, or a usage refusal. */
50114
50146
  function one$1(rest) {
50115
50147
  const [uuid, ...extra] = rest;
50116
- if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$27);
50148
+ if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$28);
50117
50149
  return uuid;
50118
50150
  }
50119
50151
  /** `show`: the server and every account. */
@@ -50129,9 +50161,9 @@ async function server(context, tail) {
50129
50161
  const host = context.flags.get("--host")?.trim() ?? "";
50130
50162
  const port = Number(context.flags.get("--port") ?? "");
50131
50163
  const encryption = context.flags.get("--encryption")?.trim() ?? "";
50132
- if (host === "") throw new UsageError(`sync server needs --host.\n\n${USAGE$27}`);
50133
- if (!Number.isInteger(port) || port < 1 || port > 65535) throw new UsageError(`--port must be a whole number between 1 and 65535.\n\n${USAGE$27}`);
50134
- if (!ENCRYPTIONS.has(encryption)) throw new UsageError(`--encryption must be tls or starttls (got "${encryption}").\n\n${USAGE$27}`);
50164
+ if (host === "") throw new UsageError(`sync server needs --host.\n\n${USAGE$28}`);
50165
+ if (!Number.isInteger(port) || port < 1 || port > 65535) throw new UsageError(`--port must be a whole number between 1 and 65535.\n\n${USAGE$28}`);
50166
+ if (!ENCRYPTIONS.has(encryption)) throw new UsageError(`--encryption must be tls or starttls (got "${encryption}").\n\n${USAGE$28}`);
50135
50167
  return await confirmableWrite(context, `Point the mailbox sync source at ${host}:${String(port)} over ${encryption}.`, async () => {
50136
50168
  return (await emailMailboxSyncServerUpdate({
50137
50169
  path,
@@ -50155,9 +50187,9 @@ async function account(context, tail) {
50155
50187
  const [action, ...args] = tail;
50156
50188
  if (action === "add") return await accountAdd(context, args);
50157
50189
  if (action === "change") return await accountChange(context, args);
50158
- if (action === void 0) throw new UsageError(USAGE$27);
50190
+ if (action === void 0) throw new UsageError(USAGE$28);
50159
50191
  const [emailDomainUuid, accountUuid, ...extra] = args;
50160
- if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
50192
+ if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
50161
50193
  return await accountAction(context, action, {
50162
50194
  ...await domainPath(context, emailDomainUuid),
50163
50195
  accountUuid
@@ -50176,13 +50208,13 @@ async function accountAction(context, action, path) {
50176
50208
  if (action === "start") return await startAccount(context, path);
50177
50209
  if (action === "stop") return await confirmableWrite(context, "Stop this account's scheduled sync. The source credential is kept.", async () => (await emailMailboxSyncAccountsStop({ path })).data);
50178
50210
  if (action === "forget") return await confirmableWrite(context, "Forget this account's source credential and stop future work.", async () => (await emailMailboxSyncAccountsForget({ path })).data);
50179
- throw new UsageError(USAGE$27);
50211
+ throw new UsageError(USAGE$28);
50180
50212
  }
50181
50213
  /** `start`: the schedule the account should run on from now. */
50182
50214
  async function startAccount(context, path) {
50183
50215
  const recurrence = recurrenceFlag(context) ?? "once";
50184
50216
  const endsAt = context.flags.get("--ends-at")?.trim() || null;
50185
- if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$27}`);
50217
+ if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$28}`);
50186
50218
  return await confirmableWrite(context, `Start this account's scheduled sync (${recurrence}${endsAt === null ? "" : ` until ${endsAt}`}).`, async () => (await emailMailboxSyncAccountsStart({
50187
50219
  path,
50188
50220
  body: {
@@ -50195,7 +50227,7 @@ async function startAccount(context, path) {
50195
50227
  async function accountAdd(context, args) {
50196
50228
  const path = await domainPath(context, one$1(args));
50197
50229
  const body = accountBody(context);
50198
- const sourcePassword = readSecret(context, "password", 4096, USAGE$27);
50230
+ const sourcePassword = readSecret(context, "password", 4096, USAGE$28);
50199
50231
  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({
50200
50232
  path,
50201
50233
  body: {
@@ -50207,7 +50239,7 @@ async function accountAdd(context, args) {
50207
50239
  /** `account change <domain> <account> [fields]`: only the fields named are sent. */
50208
50240
  async function accountChange(context, args) {
50209
50241
  const [emailDomainUuid, accountUuid, ...extra] = args;
50210
- if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
50242
+ if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
50211
50243
  const path = {
50212
50244
  ...await domainPath(context, emailDomainUuid),
50213
50245
  accountUuid
@@ -50221,8 +50253,8 @@ async function accountChange(context, args) {
50221
50253
  if (mailbox !== "") body.mailboxUuid = mailbox;
50222
50254
  if (recurrence !== null) body.recurrence = recurrence;
50223
50255
  if (endsAt !== "") body.endsAt = endsAt;
50224
- if (context.flags.has("--password-file") || context.flags.has("--password-stdin")) body.sourcePassword = readSecret(context, "password", 4096, USAGE$27);
50225
- if (Object.keys(body).length === 0) throw new UsageError(`account change needs at least one field.\n\n${USAGE$27}`);
50256
+ if (context.flags.has("--password-file") || context.flags.has("--password-stdin")) body.sourcePassword = readSecret(context, "password", 4096, USAGE$28);
50257
+ if (Object.keys(body).length === 0) throw new UsageError(`account change needs at least one field.\n\n${USAGE$28}`);
50226
50258
  return await confirmableWrite(context, "Change this sync account.", async () => {
50227
50259
  return (await emailMailboxSyncAccountsUpdate({
50228
50260
  path,
@@ -50236,8 +50268,8 @@ function accountBody(context) {
50236
50268
  const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
50237
50269
  const recurrence = recurrenceFlag(context) ?? "once";
50238
50270
  const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
50239
- if (sourceUsername === "" || mailboxUuid === "") throw new UsageError(`account add needs --username and --mailbox.\n\n${USAGE$27}`);
50240
- if (recurrence === "until" && endsAt === "") throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$27}`);
50271
+ if (sourceUsername === "" || mailboxUuid === "") throw new UsageError(`account add needs --username and --mailbox.\n\n${USAGE$28}`);
50272
+ if (recurrence === "until" && endsAt === "") throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$28}`);
50241
50273
  return {
50242
50274
  sourceUsername,
50243
50275
  mailboxUuid,
@@ -50254,7 +50286,7 @@ function recurrenceFlag(context) {
50254
50286
  }
50255
50287
  //#endregion
50256
50288
  //#region src/commands/email-text.ts
50257
- var USAGE$26 = [
50289
+ var USAGE$27 = [
50258
50290
  "Usage: hostingctl email <show|names> --company <slug>",
50259
50291
  " hostingctl email <mailboxes|aliases> <email-domain-uuid> --company <slug>",
50260
50292
  " hostingctl email mailbox <email-domain-uuid> <mailbox-uuid> --company <slug>",
@@ -50337,7 +50369,7 @@ function count(shown, total) {
50337
50369
  var EMAIL_METADATA = {
50338
50370
  name: "email",
50339
50371
  summary: "A company's email service, its attached names, their mailboxes and aliases.",
50340
- usage: USAGE$26,
50372
+ usage: USAGE$27,
50341
50373
  flags: [
50342
50374
  {
50343
50375
  name: "--address",
@@ -50517,75 +50549,75 @@ var EMAIL_METADATA = {
50517
50549
  var EMAIL_TOPICS = [
50518
50550
  {
50519
50551
  path: ["alias"],
50520
- usage: USAGE$34
50552
+ usage: USAGE$35
50521
50553
  },
50522
50554
  {
50523
50555
  path: ["app-token"],
50524
- usage: USAGE$33
50556
+ usage: USAGE$34
50525
50557
  },
50526
50558
  {
50527
50559
  path: ["send-as"],
50528
- usage: USAGE$33
50560
+ usage: USAGE$34
50529
50561
  },
50530
50562
  {
50531
50563
  path: ["offer"],
50532
- usage: USAGE$32
50564
+ usage: USAGE$33
50533
50565
  },
50534
50566
  {
50535
50567
  path: ["enroll"],
50536
- usage: USAGE$32
50568
+ usage: USAGE$33
50537
50569
  },
50538
50570
  {
50539
50571
  path: ["agree"],
50540
- usage: USAGE$32
50572
+ usage: USAGE$33
50541
50573
  },
50542
50574
  {
50543
50575
  path: ["provision"],
50544
- usage: USAGE$32
50576
+ usage: USAGE$33
50545
50577
  },
50546
50578
  {
50547
50579
  path: ["domain"],
50548
- usage: USAGE$32
50580
+ usage: USAGE$33
50549
50581
  },
50550
50582
  {
50551
50583
  path: ["catch-all"],
50552
- usage: USAGE$32
50584
+ usage: USAGE$33
50553
50585
  },
50554
50586
  {
50555
50587
  path: ["service"],
50556
- usage: USAGE$29
50588
+ usage: USAGE$30
50557
50589
  },
50558
50590
  {
50559
50591
  path: ["dmarc"],
50560
- usage: USAGE$29
50592
+ usage: USAGE$30
50561
50593
  },
50562
50594
  {
50563
50595
  path: ["dmarc-set"],
50564
- usage: USAGE$29
50596
+ usage: USAGE$30
50565
50597
  },
50566
50598
  {
50567
50599
  path: ["blocklist"],
50568
- usage: USAGE$29
50600
+ usage: USAGE$30
50569
50601
  },
50570
50602
  {
50571
50603
  path: ["blocklist-set"],
50572
- usage: USAGE$29
50604
+ usage: USAGE$30
50573
50605
  },
50574
50606
  {
50575
50607
  path: ["import-schema"],
50576
- usage: USAGE$29
50608
+ usage: USAGE$30
50577
50609
  },
50578
50610
  {
50579
50611
  path: ["sync"],
50580
- usage: USAGE$27
50612
+ usage: USAGE$28
50581
50613
  },
50582
50614
  {
50583
50615
  path: ["hold"],
50584
- usage: USAGE$31
50616
+ usage: USAGE$32
50585
50617
  },
50586
50618
  {
50587
50619
  path: ["mailbox"],
50588
- usage: USAGE$30
50620
+ usage: USAGE$31
50589
50621
  }
50590
50622
  ];
50591
50623
  //#endregion
@@ -50627,7 +50659,7 @@ async function companyRead(context, subcommand, rest) {
50627
50659
  if (subcommand === "mailboxes") return await mailboxes(company, rest);
50628
50660
  if (subcommand === "mailbox") return await mailbox(company, rest);
50629
50661
  if (subcommand === "aliases") return await aliases(company, rest);
50630
- throw new UsageError(USAGE$26);
50662
+ throw new UsageError(USAGE$27);
50631
50663
  }
50632
50664
  /** The renderer for a tagged feature read, or null when this command renders the answer itself. */
50633
50665
  function taggedText(report) {
@@ -50712,7 +50744,7 @@ var email$2 = {
50712
50744
  ...EMAIL_METADATA,
50713
50745
  async run(context) {
50714
50746
  const [subcommand, ...rest] = context.positional;
50715
- if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$26);
50747
+ if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$27);
50716
50748
  const feature = dispatched$1(context, subcommand, rest);
50717
50749
  if (feature !== null) return await feature;
50718
50750
  return await companyRead(context, subcommand, rest);
@@ -50797,7 +50829,7 @@ async function aliases(company, rest) {
50797
50829
  /** `mailbox <email-domain-uuid> <mailbox-uuid>`: one record, independent of index pagination. */
50798
50830
  async function mailbox(company, rest) {
50799
50831
  const [emailDomainUuid, mailboxUuid, ...extra] = rest;
50800
- if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$26);
50832
+ if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
50801
50833
  return (await emailMailboxesShow({ path: {
50802
50834
  company,
50803
50835
  emailDomainUuid,
@@ -50807,16 +50839,16 @@ async function mailbox(company, rest) {
50807
50839
  /** The one uuid a collection read names, or a usage refusal. */
50808
50840
  function oneUuid$4(rest) {
50809
50841
  const [uuid, ...extra] = rest;
50810
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$26);
50842
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
50811
50843
  return uuid;
50812
50844
  }
50813
50845
  /** A company-wide read takes no positional arguments. */
50814
50846
  function noExtra$12(rest) {
50815
- if (rest.length > 0) throw new UsageError(USAGE$26);
50847
+ if (rest.length > 0) throw new UsageError(USAGE$27);
50816
50848
  }
50817
50849
  //#endregion
50818
50850
  //#region src/commands/environment-admin.ts
50819
- var USAGE$25 = [
50851
+ var USAGE$26 = [
50820
50852
  "Usage: hostingctl environment retention <environment-uuid> --company <slug>",
50821
50853
  " hostingctl environment retention-set <environment-uuid> --company <slug> --extra-days <n> --effective-at <iso> --agreement <uuid> [--package <key>]",
50822
50854
  " hostingctl environment database-show <environment-uuid> <database-uuid> --company <slug>",
@@ -50840,9 +50872,9 @@ async function environmentAdmin(context, subcommand, rest) {
50840
50872
  if (subcommand === "retention") return await retention(context, first);
50841
50873
  if (subcommand === "retention-set") return await retentionSet(context, first);
50842
50874
  if (subcommand === "database-show" || subcommand === "database-reveal") {
50843
- if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$25);
50875
+ if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$26);
50844
50876
  const path = {
50845
- ...await environmentPath(context, first, USAGE$25),
50877
+ ...await environmentPath(context, first, USAGE$26),
50846
50878
  databaseUuid: tail[0] ?? ""
50847
50879
  };
50848
50880
  if (subcommand === "database-show") return {
@@ -50852,24 +50884,24 @@ async function environmentAdmin(context, subcommand, rest) {
50852
50884
  return await revealDatabase(context, path);
50853
50885
  }
50854
50886
  if (subcommand === "tuning") return await tuning(context, first, tail);
50855
- throw new UsageError(USAGE$25);
50887
+ throw new UsageError(USAGE$26);
50856
50888
  }
50857
50889
  /** `retention <env>`. */
50858
50890
  async function retention(context, environmentUuid) {
50859
50891
  return {
50860
50892
  kind: "retention",
50861
- retention: (await hostingRetentionShow({ path: await environmentPath(context, environmentUuid, USAGE$25) })).data
50893
+ retention: (await hostingRetentionShow({ path: await environmentPath(context, environmentUuid, USAGE$26) })).data
50862
50894
  };
50863
50895
  }
50864
50896
  /** `retention-set <env> --extra-days … --effective-at … --agreement …`. */
50865
50897
  async function retentionSet(context, environmentUuid) {
50866
- const path = await environmentPath(context, environmentUuid, USAGE$25);
50898
+ const path = await environmentPath(context, environmentUuid, USAGE$26);
50867
50899
  const extraDays = Number(context.flags.get("--extra-days") ?? "");
50868
50900
  const effectiveAt = context.flags.get("--effective-at")?.trim() ?? "";
50869
50901
  const baselineAgreementUuid = context.flags.get("--agreement")?.trim() ?? "";
50870
- 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$25}`);
50871
- if (effectiveAt === "" || Number.isNaN(Date.parse(effectiveAt))) throw new UsageError(`retention-set needs --effective-at as an ISO date.\n\n${USAGE$25}`);
50872
- if (baselineAgreementUuid === "") throw new UsageError(`retention-set needs --agreement.\n\n${USAGE$25}`);
50902
+ 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$26}`);
50903
+ if (effectiveAt === "" || Number.isNaN(Date.parse(effectiveAt))) throw new UsageError(`retention-set needs --effective-at as an ISO date.\n\n${USAGE$26}`);
50904
+ if (baselineAgreementUuid === "") throw new UsageError(`retention-set needs --agreement.\n\n${USAGE$26}`);
50873
50905
  const packageKey = context.flags.get("--package")?.trim();
50874
50906
  return {
50875
50907
  kind: "write",
@@ -50896,7 +50928,7 @@ async function revealDatabase(context, path) {
50896
50928
  /** `tuning preview|restore <env>`. */
50897
50929
  async function tuning(context, action, rest) {
50898
50930
  const environmentUuid = rest[0];
50899
- const path = await environmentPath(context, environmentUuid, USAGE$25);
50931
+ const path = await environmentPath(context, environmentUuid, USAGE$26);
50900
50932
  if (action === "preview" && rest.length === 1) {
50901
50933
  const body = (await hostingEnvironmentShow({ path })).data;
50902
50934
  return {
@@ -50909,7 +50941,7 @@ async function tuning(context, action, rest) {
50909
50941
  }
50910
50942
  if (action === "restore" && rest.length === 1) {
50911
50943
  const generation = Number(context.flags.get("--generation") ?? "");
50912
- if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$25}`);
50944
+ if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$26}`);
50913
50945
  return {
50914
50946
  kind: "write",
50915
50947
  outcome: await confirmableWrite(context, `Restore the recorded tuning for generation ${String(generation)}.`, async () => (await hostingTuningRestore({
@@ -50918,7 +50950,7 @@ async function tuning(context, action, rest) {
50918
50950
  })).data)
50919
50951
  };
50920
50952
  }
50921
- throw new UsageError(USAGE$25);
50953
+ throw new UsageError(USAGE$26);
50922
50954
  }
50923
50955
  /** One retention window as one line, and the write receipt for it. */
50924
50956
  function retentionText(one) {
@@ -50991,7 +51023,7 @@ async function cacheSet(context, path) {
50991
51023
  }
50992
51024
  //#endregion
50993
51025
  //#region src/commands/environment-component-version.ts
50994
- var USAGE$24 = [
51026
+ var USAGE$25 = [
50995
51027
  "Usage: hostingctl environment component-version <environment-uuid> <workload-uuid> <version> --company <slug>",
50996
51028
  "",
50997
51029
  " component-version Move one curated component instance to another version this platform pins an image",
@@ -51009,7 +51041,7 @@ var USAGE$24 = [
51009
51041
  */
51010
51042
  async function environmentComponentVersion(context, rest) {
51011
51043
  const [uuid, workloadUuid, version, ...extra] = rest;
51012
- if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$24);
51044
+ if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$25);
51013
51045
  const path = {
51014
51046
  company: await requireCompany(context.flags),
51015
51047
  environmentUuid: uuid,
@@ -51410,7 +51442,7 @@ function stated(flags, flag, usage) {
51410
51442
  }
51411
51443
  //#endregion
51412
51444
  //#region src/commands/environment-create.ts
51413
- var USAGE$23 = [
51445
+ var USAGE$24 = [
51414
51446
  "Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
51415
51447
  " hostingctl environment create --client <slug> --name <name> [--slug <slug>] [--package <key>]",
51416
51448
  " [--cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
@@ -51465,11 +51497,11 @@ var CREATE_FLAG_SPECS = [
51465
51497
  * not.
51466
51498
  */
51467
51499
  async function create$2(context, rest) {
51468
- if (rest.length > 0) throw new UsageError(USAGE$23);
51500
+ if (rest.length > 0) throw new UsageError(USAGE$24);
51469
51501
  const name = context.flags.get("--name")?.trim() ?? "";
51470
- if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$23}`);
51471
- const slug = slugFor(context.flags.get("--slug"), name, USAGE$23);
51472
- const slice = sliceFor(context.flags, USAGE$23);
51502
+ if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$24}`);
51503
+ const slug = slugFor(context.flags.get("--slug"), name, USAGE$24);
51504
+ const slice = sliceFor(context.flags, USAGE$24);
51473
51505
  const scope = await scopeFor(context.flags);
51474
51506
  const chosen = chosenPackage(await catalogFor(scope), context.flags.get("--package")?.trim() ?? "");
51475
51507
  const body = {
@@ -51484,12 +51516,12 @@ async function create$2(context, rest) {
51484
51516
  async function scopeFor(flags) {
51485
51517
  const client = flags.get("--client")?.trim() ?? "";
51486
51518
  const company = flags.get("--company")?.trim() ?? "";
51487
- if (client !== "" && company !== "") throw new UsageError(`Pass --company or --client, not both.\n\n${USAGE$23}`);
51519
+ if (client !== "" && company !== "") throw new UsageError(`Pass --company or --client, not both.\n\n${USAGE$24}`);
51488
51520
  if (client !== "") return {
51489
51521
  mode: "client",
51490
51522
  client
51491
51523
  };
51492
- if (company === "") throw new UsageError(`create needs --company <slug> or --client <slug>.\n\n${USAGE$23}`);
51524
+ if (company === "") throw new UsageError(`create needs --company <slug> or --client <slug>.\n\n${USAGE$24}`);
51493
51525
  return {
51494
51526
  mode: "company",
51495
51527
  company: await requireCompany(flags)
@@ -51503,7 +51535,7 @@ async function catalogFor(scope) {
51503
51535
  /** The package the create sends: the one named, or the catalog's first, refused when the catalog does not carry it. */
51504
51536
  function chosenPackage(packages, requested) {
51505
51537
  const chosen = requested === "" ? packages[0] : packages.find((one) => one.key === requested);
51506
- if (chosen === void 0) throw new UsageError(`--package must be one of ${packages.map((one) => one.key).join(", ")} (got ${requested}).\n\n${USAGE$23}`);
51538
+ if (chosen === void 0) throw new UsageError(`--package must be one of ${packages.map((one) => one.key).join(", ")} (got ${requested}).\n\n${USAGE$24}`);
51507
51539
  return chosen;
51508
51540
  }
51509
51541
  /** The create itself, through the route that addressee is reached by. */
@@ -51861,7 +51893,7 @@ function oneUuid$2(rest) {
51861
51893
  }
51862
51894
  //#endregion
51863
51895
  //#region src/commands/environment-domains.ts
51864
- var USAGE$22 = [
51896
+ var USAGE$23 = [
51865
51897
  "Usage: hostingctl environment domains <environment-uuid> --company <slug>",
51866
51898
  " hostingctl environment domain-add <environment-uuid> --company <slug> --hostname <host> --workload <uuid> [--intended on|off]",
51867
51899
  " hostingctl environment domain-verify|domain-check-routing|domain-intended|domain-primary|domain-remove <environment-uuid> <domain-uuid> --company <slug>",
@@ -51892,7 +51924,7 @@ var DOMAIN_ACTIONS = {
51892
51924
  /** `environment domains|domain-add|domain-*|redirects|redirect-set|redirect-remove`. */
51893
51925
  async function environmentDomains(context, subcommand, rest) {
51894
51926
  const [environmentUuid, ...tail] = rest;
51895
- const path = await environmentPath(context, environmentUuid, USAGE$22);
51927
+ const path = await environmentPath(context, environmentUuid, USAGE$23);
51896
51928
  if (subcommand === "domains") return await domains(path, tail);
51897
51929
  if (subcommand === "redirects") return await redirects(path, tail);
51898
51930
  if (subcommand === "domain-add") return await add$7(context, path, tail);
@@ -51901,7 +51933,7 @@ async function environmentDomains(context, subcommand, rest) {
51901
51933
  if (subcommand === "domain-remove") return await removeDomain(context, path, tail);
51902
51934
  const action = DOMAIN_ACTIONS[subcommand];
51903
51935
  if (action !== void 0) return await domainAction(context, subcommand, action, path, tail);
51904
- throw new UsageError(USAGE$22);
51936
+ throw new UsageError(USAGE$23);
51905
51937
  }
51906
51938
  /** `domains <env>`. */
51907
51939
  async function domains(path, rest) {
@@ -51924,7 +51956,7 @@ async function add$7(context, path, rest) {
51924
51956
  noExtra$11(rest);
51925
51957
  const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
51926
51958
  const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
51927
- if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --workload.\n\n${USAGE$22}`);
51959
+ if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --workload.\n\n${USAGE$23}`);
51928
51960
  const intended = onOffFlag(context, "--intended") ?? false;
51929
51961
  return await written$2(confirmableWrite(context, `Serve ${hostname} from workload ${workloadUuid}${intended ? " as an intended name" : ""}.`, async () => {
51930
51962
  return (await hostingDomainStore({
@@ -51940,7 +51972,7 @@ async function add$7(context, path, rest) {
51940
51972
  /** The five actions that take only the environment and the name. */
51941
51973
  async function domainAction(context, subcommand, action, path, rest) {
51942
51974
  const [domainUuid, ...extra] = rest;
51943
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
51975
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
51944
51976
  const described = {
51945
51977
  "domain-verify": "Check this name's routing now.",
51946
51978
  "domain-check-routing": "Check this name's routing now.",
@@ -51958,7 +51990,7 @@ async function domainAction(context, subcommand, action, path, rest) {
51958
51990
  /** `domain-remove <env> <domain>`: stop serving a name. */
51959
51991
  async function removeDomain(context, path, rest) {
51960
51992
  const [domainUuid, ...extra] = rest;
51961
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
51993
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
51962
51994
  const fallBackToGenerated = onOffFlag(context, "--fall-back-to-generated") ?? true;
51963
51995
  return await written$2(confirmableWrite(context, "Stop serving this name. Its record stays readable, and the environment keeps its generated hostname.", async () => {
51964
51996
  const body = { fallBackToGenerated };
@@ -51974,13 +52006,13 @@ async function removeDomain(context, path, rest) {
51974
52006
  /** `redirect-set <env> <domain> --target … --mode … [--destination …]`. */
51975
52007
  async function setRedirect(context, path, rest) {
51976
52008
  const [domainUuid, ...extra] = rest;
51977
- if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
52009
+ if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
51978
52010
  const target = context.flags.get("--target")?.trim() ?? "";
51979
52011
  const mode = context.flags.get("--mode")?.trim() ?? "";
51980
52012
  const destinationUrl = context.flags.get("--destination")?.trim() ?? "";
51981
- if (!TARGETS.has(target)) throw new UsageError(`--target must be application or fixed.\n\n${USAGE$22}`);
51982
- if (!MODES$1.has(mode)) throw new UsageError(`--mode must be temporary or permanent.\n\n${USAGE$22}`);
51983
- if (target === "fixed" && destinationUrl === "") throw new UsageError(`--target fixed needs --destination <url>.\n\n${USAGE$22}`);
52013
+ if (!TARGETS.has(target)) throw new UsageError(`--target must be application or fixed.\n\n${USAGE$23}`);
52014
+ if (!MODES$1.has(mode)) throw new UsageError(`--mode must be temporary or permanent.\n\n${USAGE$23}`);
52015
+ if (target === "fixed" && destinationUrl === "") throw new UsageError(`--target fixed needs --destination <url>.\n\n${USAGE$23}`);
51984
52016
  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 () => {
51985
52017
  const body = {
51986
52018
  target,
@@ -52000,7 +52032,7 @@ async function setRedirect(context, path, rest) {
52000
52032
  /** `redirect-remove <env> <redirect-uuid>`. */
52001
52033
  async function removeRedirect(context, path, rest) {
52002
52034
  const [redirectUuid, ...extra] = rest;
52003
- if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
52035
+ if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
52004
52036
  return await written$2(confirmableWrite(context, `Remove redirect ${redirectUuid}.`, async () => {
52005
52037
  return (await hostingDomainRedirectDestroy({ path: {
52006
52038
  ...path,
@@ -52017,11 +52049,11 @@ async function written$2(pending) {
52017
52049
  }
52018
52050
  /** No positional arguments, or a usage refusal. */
52019
52051
  function noExtra$11(rest) {
52020
- if (rest.length > 0) throw new UsageError(USAGE$22);
52052
+ if (rest.length > 0) throw new UsageError(USAGE$23);
52021
52053
  }
52022
52054
  //#endregion
52023
52055
  //#region src/commands/environment-exports.ts
52024
- var USAGE$21 = [
52056
+ var USAGE$22 = [
52025
52057
  "Usage: hostingctl environment database-exports <environment-uuid> --company <slug>",
52026
52058
  " hostingctl environment database-export-create <environment-uuid> <database-uuid> --company <slug>",
52027
52059
  " hostingctl environment database-export-download <environment-uuid> <export-uuid> --company <slug>",
@@ -52041,7 +52073,7 @@ var USAGE$21 = [
52041
52073
  async function environmentExports(context, subcommand, rest) {
52042
52074
  if (subcommand === "release-bundle") {
52043
52075
  const [releaseUuid, ...extra] = rest;
52044
- if (releaseUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$21);
52076
+ if (releaseUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
52045
52077
  return {
52046
52078
  kind: "bundle",
52047
52079
  releaseUuid,
@@ -52049,7 +52081,7 @@ async function environmentExports(context, subcommand, rest) {
52049
52081
  };
52050
52082
  }
52051
52083
  const [environmentUuid, ...tail] = rest;
52052
- const path = await environmentPath(context, environmentUuid, USAGE$21);
52084
+ const path = await environmentPath(context, environmentUuid, USAGE$22);
52053
52085
  if (subcommand === "database-exports") {
52054
52086
  noExtra$10(tail);
52055
52087
  return {
@@ -52060,11 +52092,11 @@ async function environmentExports(context, subcommand, rest) {
52060
52092
  if (subcommand === "database-export-create") return await create(context, path, tail);
52061
52093
  if (subcommand === "database-export-download") return await download(path, tail);
52062
52094
  if (subcommand === "database-export-remove") return await remove$1(context, path, tail);
52063
- throw new UsageError(USAGE$21);
52095
+ throw new UsageError(USAGE$22);
52064
52096
  }
52065
52097
  /** `database-export-create <env> <db>`. */
52066
52098
  async function create(context, path, rest) {
52067
- const databaseUuid = oneUuid$7(rest, USAGE$21);
52099
+ const databaseUuid = oneUuid$7(rest, USAGE$22);
52068
52100
  return {
52069
52101
  kind: "export-write",
52070
52102
  outcome: await confirmableWrite(context, "Take a portable export of this database now. It is downloadable until its expiry.", async () => {
@@ -52080,7 +52112,7 @@ async function create(context, path, rest) {
52080
52112
  }
52081
52113
  /** `database-export-download <env> <export>`: a time-limited URL, which is the customer's copy. */
52082
52114
  async function download(path, rest) {
52083
- const exportUuid = oneUuid$7(rest, USAGE$21);
52115
+ const exportUuid = oneUuid$7(rest, USAGE$22);
52084
52116
  return {
52085
52117
  kind: "download",
52086
52118
  download: (await hostingDatabaseExportDownload({ path: {
@@ -52091,7 +52123,7 @@ async function download(path, rest) {
52091
52123
  }
52092
52124
  /** `database-export-remove <env> <export>`. */
52093
52125
  async function remove$1(context, path, rest) {
52094
- const exportUuid = oneUuid$7(rest, USAGE$21);
52126
+ const exportUuid = oneUuid$7(rest, USAGE$22);
52095
52127
  return {
52096
52128
  kind: "export-write",
52097
52129
  outcome: await confirmableWrite(context, `Retire export ${exportUuid}. Its URL stops working once it is gone.`, async () => (await hostingDatabaseExportDestroy({ path: {
@@ -52102,7 +52134,7 @@ async function remove$1(context, path, rest) {
52102
52134
  }
52103
52135
  /** No positional arguments, or a usage refusal. */
52104
52136
  function noExtra$10(rest) {
52105
- if (rest.length > 0) throw new UsageError(USAGE$21);
52137
+ if (rest.length > 0) throw new UsageError(USAGE$22);
52106
52138
  }
52107
52139
  /** One export as one line. */
52108
52140
  function exportLine(one) {
@@ -52171,7 +52203,7 @@ var RUNTIME_VERSION_GRANT_FLAG_SPECS = [
52171
52203
  description: "The grant UUID to revoke."
52172
52204
  }
52173
52205
  ];
52174
- var USAGE$20 = [
52206
+ var USAGE$21 = [
52175
52207
  "Usage:",
52176
52208
  " hostingctl environment runtime-version-grants --company <slug>",
52177
52209
  " hostingctl environment runtime-version-grants grant --company <slug> --type <type> --line <line>",
@@ -52199,18 +52231,18 @@ async function environmentRuntimeVersionGrants(context, rest) {
52199
52231
  kind: "runtime-version-grants",
52200
52232
  grants: (await hostingRuntimeVersionGrantsIndex({ path: { company } })).data
52201
52233
  };
52202
- if (tail.length > 0) throw new UsageError(USAGE$20);
52234
+ if (tail.length > 0) throw new UsageError(USAGE$21);
52203
52235
  if (action === "grant") return grant(context, company);
52204
52236
  if (action === "revoke") return revoke$3(context, company);
52205
- throw new UsageError(USAGE$20);
52237
+ throw new UsageError(USAGE$21);
52206
52238
  }
52207
52239
  async function grant(context, company) {
52208
52240
  const type = required$5(context, "--type");
52209
52241
  const line = required$5(context, "--line");
52210
52242
  const scope = required$5(context, "--scope");
52211
- if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$20}`);
52243
+ if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$21}`);
52212
52244
  const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
52213
- if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$20}`);
52245
+ if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$21}`);
52214
52246
  const reason = required$5(context, "--reason");
52215
52247
  const expiresAt = required$5(context, "--expires");
52216
52248
  return {
@@ -52243,7 +52275,7 @@ async function revoke$3(context, company) {
52243
52275
  /** One flag's value, refused by name when it was not given. */
52244
52276
  function required$5(context, flag) {
52245
52277
  const value = context.flags.get(flag)?.trim() ?? "";
52246
- if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$20}`);
52278
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$21}`);
52247
52279
  return value;
52248
52280
  }
52249
52281
  /** One line per grant: the line it names, who it covers, why, and when it ends. */
@@ -52439,7 +52471,7 @@ var ENVIRONMENT_USAGE = [
52439
52471
  ].join("\n");
52440
52472
  //#endregion
52441
52473
  //#region src/commands/environment-runtime-versions.ts
52442
- var USAGE$19 = [
52474
+ var USAGE$20 = [
52443
52475
  "Usage: hostingctl environment runtime-versions --company <slug>",
52444
52476
  "",
52445
52477
  " runtime-versions The version lines each application type offers, which may be chosen now, and why the",
@@ -52456,7 +52488,7 @@ var USAGE$19 = [
52456
52488
  * will accept, and one reported as unavailable says which image is missing.
52457
52489
  */
52458
52490
  async function environmentRuntimeVersions(context, rest) {
52459
- if (rest.length > 0) throw new UsageError(USAGE$19);
52491
+ if (rest.length > 0) throw new UsageError(USAGE$20);
52460
52492
  return {
52461
52493
  kind: "runtime-versions",
52462
52494
  types: (await hostingRuntimeVersionsIndex({ path: { company: await requireCompany(context.flags) } })).data
@@ -52769,7 +52801,7 @@ function oneUuid$1(rest) {
52769
52801
  }
52770
52802
  //#endregion
52771
52803
  //#region src/commands/environment-services.ts
52772
- var USAGE$18 = [
52804
+ var USAGE$19 = [
52773
52805
  "Usage: hostingctl environment service-add-review <environment-uuid> <type> --company <slug> [--name <n>] [--replicas <n>]",
52774
52806
  " hostingctl environment service-add <environment-uuid> <type> --company <slug> --name <n> [--replicas <n>]",
52775
52807
  " hostingctl environment service-runtime <environment-uuid> <type> --company <slug> --running <on|off>",
@@ -52798,8 +52830,8 @@ var SERVICE_TYPES = /* @__PURE__ */ new Set([
52798
52830
  /** `environment service-*`, from the `environment` command. */
52799
52831
  async function environmentServices(context, subcommand, rest) {
52800
52832
  const [environmentUuid, type, ...tail] = rest;
52801
- const path = await environmentPath(context, environmentUuid, USAGE$18);
52802
- if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$18);
52833
+ const path = await environmentPath(context, environmentUuid, USAGE$19);
52834
+ if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$19);
52803
52835
  if (subcommand === "service-add-review") return await reviewAddition(context, path, type);
52804
52836
  if (subcommand === "service-retirement") return {
52805
52837
  kind: "service-retirement",
@@ -52812,7 +52844,7 @@ async function environmentServices(context, subcommand, rest) {
52812
52844
  if (subcommand === "service-runtime") return await runtime$1(context, path, type);
52813
52845
  if (subcommand === "service-protect") return await protect(context, path, type);
52814
52846
  if (subcommand === "service-retire") return await retire$1(context, path, type);
52815
- throw new UsageError(USAGE$18);
52847
+ throw new UsageError(USAGE$19);
52816
52848
  }
52817
52849
  /** `service-add-review <type> [--name …] [--replicas …]`. */
52818
52850
  async function reviewAddition(context, path, type) {
@@ -52835,9 +52867,9 @@ async function reviewAddition(context, path, type) {
52835
52867
  /** `service-add <type> --name … [--replicas …]`. */
52836
52868
  async function add$6(context, path, type) {
52837
52869
  const name = context.flags.get("--name")?.trim() ?? "";
52838
- if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$18}`);
52870
+ if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$19}`);
52839
52871
  const replicas = wholeNumber(context, "--replicas") ?? 1;
52840
- if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$18}`);
52872
+ if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$19}`);
52841
52873
  const serviceType = type;
52842
52874
  return await written$1(confirmableWrite(context, `Add the ${type} service "${name}" with ${String(replicas)} replica(s).`, async () => {
52843
52875
  const desiredGeneration = await environmentGeneration(path);
@@ -52854,7 +52886,7 @@ async function add$6(context, path, type) {
52854
52886
  }
52855
52887
  /** `service-runtime <type> --running …`. */
52856
52888
  async function runtime$1(context, path, type) {
52857
- const running = onOff$5(context, "--running", USAGE$18);
52889
+ const running = onOff$5(context, "--running", USAGE$19);
52858
52890
  return await written$1(confirmableWrite(context, `${running ? "Start" : "Stop"} the ${type} service. Its data is kept either way.`, async () => {
52859
52891
  const desiredGeneration = await environmentGeneration(path);
52860
52892
  const body = {
@@ -52872,7 +52904,7 @@ async function runtime$1(context, path, type) {
52872
52904
  }
52873
52905
  /** `service-protect <type> --locked …`. */
52874
52906
  async function protect(context, path, type) {
52875
- const locked = onOff$5(context, "--locked", USAGE$18);
52907
+ const locked = onOff$5(context, "--locked", USAGE$19);
52876
52908
  return await written$1(confirmableWrite(context, locked ? `Lock the ${type} service, so no removal path may delete it.` : `Unlock the ${type} service.`, async () => {
52877
52909
  const desiredGeneration = await environmentGeneration(path);
52878
52910
  const body = {
@@ -52891,7 +52923,7 @@ async function protect(context, path, type) {
52891
52923
  /** `service-retire <type> --digest …`: the review's digest is the confirmation. */
52892
52924
  async function retire$1(context, path, type) {
52893
52925
  const digest = context.flags.get("--digest")?.trim() ?? "";
52894
- if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$18}`);
52926
+ if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$19}`);
52895
52927
  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 () => {
52896
52928
  const desiredGeneration = await environmentGeneration(path);
52897
52929
  const body = {
@@ -52919,7 +52951,7 @@ function wholeNumber(context, flag) {
52919
52951
  const raw = context.flags.get(flag)?.trim() ?? "";
52920
52952
  if (raw === "") return null;
52921
52953
  const value = Number(raw);
52922
- if (!Number.isInteger(value) || value < 1) throw new UsageError(`${flag} must be a whole number of at least 1 (got ${raw}).\n\n${USAGE$18}`);
52954
+ if (!Number.isInteger(value) || value < 1) throw new UsageError(`${flag} must be a whole number of at least 1 (got ${raw}).\n\n${USAGE$19}`);
52923
52955
  return value;
52924
52956
  }
52925
52957
  /** The write receipt, by the shape the API answered with. */
@@ -52957,7 +52989,7 @@ function environmentServicesText(report) {
52957
52989
  }
52958
52990
  //#endregion
52959
52991
  //#region src/commands/environment-shared.ts
52960
- var USAGE$17 = [
52992
+ var USAGE$18 = [
52961
52993
  "Usage: hostingctl environment shared-runtime <environment-uuid> --company <slug>",
52962
52994
  " hostingctl environment shared-runtime-adopt|shared-runtime-release <environment-uuid> --company <slug>",
52963
52995
  " hostingctl environment shared-app <environment-uuid> --company <slug>",
@@ -52974,7 +53006,7 @@ var USAGE$17 = [
52974
53006
  /** `environment shared-runtime|shared-app|shared-adopt`, from the `environment` command. */
52975
53007
  async function environmentShared(context, subcommand, rest) {
52976
53008
  const [environmentUuid, ...tail] = rest;
52977
- const path = await environmentPath(context, environmentUuid, USAGE$17);
53009
+ const path = await environmentPath(context, environmentUuid, USAGE$18);
52978
53010
  noExtra$9(tail);
52979
53011
  if (subcommand === "shared-runtime") return {
52980
53012
  kind: "shared-runtime",
@@ -52989,7 +53021,7 @@ async function environmentShared(context, subcommand, rest) {
52989
53021
  if (subcommand === "shared-app-adopt") return await app(context, "adopt", path);
52990
53022
  if (subcommand === "shared-app-release") return await app(context, "release", path);
52991
53023
  if (subcommand === "shared-adopt") return await environment$1(context, path);
52992
- throw new UsageError(USAGE$17);
53024
+ throw new UsageError(USAGE$18);
52993
53025
  }
52994
53026
  /** `shared-runtime-adopt|release`: one runtime, adopted or given back. */
52995
53027
  async function runtime(context, kind, path) {
@@ -53017,7 +53049,7 @@ async function environment$1(context, path) {
53017
53049
  }
53018
53050
  /** No positional arguments, or a usage refusal. */
53019
53051
  function noExtra$9(rest) {
53020
- if (rest.length > 0) throw new UsageError(USAGE$17);
53052
+ if (rest.length > 0) throw new UsageError(USAGE$18);
53021
53053
  }
53022
53054
  /** The line shared by both shared states: adopted, with whom, and the ceiling it lives inside. */
53023
53055
  function sharedLine(one) {
@@ -53041,7 +53073,7 @@ function environmentSharedText(report) {
53041
53073
  }
53042
53074
  //#endregion
53043
53075
  //#region src/commands/environment-site-access.ts
53044
- var USAGE$16 = [
53076
+ var USAGE$17 = [
53045
53077
  "Usage: hostingctl environment site-access <environment-uuid> --company <slug>",
53046
53078
  " hostingctl environment site-access-set <environment-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
53047
53079
  " hostingctl environment site-users <environment-uuid> --company <slug>",
@@ -53087,16 +53119,16 @@ var flow = siteAccessFlow({
53087
53119
  refresh: async (path) => (await hostingSiteAccessUsersRefresh({ path })).data,
53088
53120
  destroy: async (path) => (await hostingSiteAccessUsersDestroy({ path })).data,
53089
53121
  rotate: null
53090
- }, USAGE$16);
53122
+ }, USAGE$17);
53091
53123
  /** `environment site-access*|site-user*`: resolve the environment, then run the shared flow. */
53092
53124
  async function environmentSiteAccess(context, action, rest) {
53093
53125
  const [environmentUuid, ...tail] = rest;
53094
- if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$16);
53095
- return await flow(context, action, await environmentPath(context, environmentUuid, USAGE$16), tail);
53126
+ if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$17);
53127
+ return await flow(context, action, await environmentPath(context, environmentUuid, USAGE$17), tail);
53096
53128
  }
53097
53129
  //#endregion
53098
53130
  //#region src/commands/environment-tools.ts
53099
- var USAGE$15 = [
53131
+ var USAGE$16 = [
53100
53132
  "Usage: hostingctl environment tools verify <environment-uuid> <tool> --company <slug>",
53101
53133
  " hostingctl environment tools select <environment-uuid> <tool> --company <slug> --enabled <on|off>",
53102
53134
  "",
@@ -53110,8 +53142,8 @@ var USAGE$15 = [
53110
53142
  /** `environment tools verify|select`. */
53111
53143
  async function environmentTools(context, rest) {
53112
53144
  const [action, environmentUuid, tool, ...extra] = rest;
53113
- if (action === void 0 || tool === void 0 || extra.length > 0) throw new UsageError(USAGE$15);
53114
- const path = await environmentPath(context, environmentUuid, USAGE$15);
53145
+ if (action === void 0 || tool === void 0 || extra.length > 0) throw new UsageError(USAGE$16);
53146
+ const path = await environmentPath(context, environmentUuid, USAGE$16);
53115
53147
  if (action === "verify") return {
53116
53148
  kind: "tool",
53117
53149
  tool,
@@ -53121,11 +53153,11 @@ async function environmentTools(context, rest) {
53121
53153
  } })).data
53122
53154
  };
53123
53155
  if (action === "select") return await select$1(context, path, tool);
53124
- throw new UsageError(USAGE$15);
53156
+ throw new UsageError(USAGE$16);
53125
53157
  }
53126
53158
  /** `select --enabled …`: one tool's presence, echoed with the environment's generation. */
53127
53159
  async function select$1(context, path, tool) {
53128
- const enabled = onOff$5(context, "--enabled", USAGE$15);
53160
+ const enabled = onOff$5(context, "--enabled", USAGE$16);
53129
53161
  return {
53130
53162
  kind: "tools-write",
53131
53163
  outcome: await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} the ${tool} tool for this environment.`, async () => {
@@ -53245,23 +53277,23 @@ function list$4(values) {
53245
53277
  var ENVIRONMENT_TOPICS = [
53246
53278
  {
53247
53279
  path: ["retention"],
53248
- usage: USAGE$25
53280
+ usage: USAGE$26
53249
53281
  },
53250
53282
  {
53251
53283
  path: ["retention-set"],
53252
- usage: USAGE$25
53284
+ usage: USAGE$26
53253
53285
  },
53254
53286
  {
53255
53287
  path: ["database-show"],
53256
- usage: USAGE$25
53288
+ usage: USAGE$26
53257
53289
  },
53258
53290
  {
53259
53291
  path: ["database-reveal"],
53260
- usage: USAGE$25
53292
+ usage: USAGE$26
53261
53293
  },
53262
53294
  {
53263
53295
  path: ["tuning"],
53264
- usage: USAGE$25
53296
+ usage: USAGE$26
53265
53297
  },
53266
53298
  {
53267
53299
  path: ["configuration"],
@@ -53285,143 +53317,143 @@ var ENVIRONMENT_TOPICS = [
53285
53317
  },
53286
53318
  {
53287
53319
  path: ["domains"],
53288
- usage: USAGE$22
53320
+ usage: USAGE$23
53289
53321
  },
53290
53322
  {
53291
53323
  path: ["domain-add"],
53292
- usage: USAGE$22
53324
+ usage: USAGE$23
53293
53325
  },
53294
53326
  {
53295
53327
  path: ["domain-verify"],
53296
- usage: USAGE$22
53328
+ usage: USAGE$23
53297
53329
  },
53298
53330
  {
53299
53331
  path: ["domain-check-routing"],
53300
- usage: USAGE$22
53332
+ usage: USAGE$23
53301
53333
  },
53302
53334
  {
53303
53335
  path: ["domain-intended"],
53304
- usage: USAGE$22
53336
+ usage: USAGE$23
53305
53337
  },
53306
53338
  {
53307
53339
  path: ["domain-primary"],
53308
- usage: USAGE$22
53340
+ usage: USAGE$23
53309
53341
  },
53310
53342
  {
53311
53343
  path: ["domain-remove"],
53312
- usage: USAGE$22
53344
+ usage: USAGE$23
53313
53345
  },
53314
53346
  {
53315
53347
  path: ["redirects"],
53316
- usage: USAGE$22
53348
+ usage: USAGE$23
53317
53349
  },
53318
53350
  {
53319
53351
  path: ["redirect-set"],
53320
- usage: USAGE$22
53352
+ usage: USAGE$23
53321
53353
  },
53322
53354
  {
53323
53355
  path: ["redirect-remove"],
53324
- usage: USAGE$22
53356
+ usage: USAGE$23
53325
53357
  },
53326
53358
  {
53327
53359
  path: ["database-exports"],
53328
- usage: USAGE$21
53360
+ usage: USAGE$22
53329
53361
  },
53330
53362
  {
53331
53363
  path: ["database-export-create"],
53332
- usage: USAGE$21
53364
+ usage: USAGE$22
53333
53365
  },
53334
53366
  {
53335
53367
  path: ["database-export-download"],
53336
- usage: USAGE$21
53368
+ usage: USAGE$22
53337
53369
  },
53338
53370
  {
53339
53371
  path: ["database-export-remove"],
53340
- usage: USAGE$21
53372
+ usage: USAGE$22
53341
53373
  },
53342
53374
  {
53343
53375
  path: ["release-bundle"],
53344
- usage: USAGE$21
53376
+ usage: USAGE$22
53345
53377
  },
53346
53378
  {
53347
53379
  path: ["service-add-review"],
53348
- usage: USAGE$18
53380
+ usage: USAGE$19
53349
53381
  },
53350
53382
  {
53351
53383
  path: ["service-add"],
53352
- usage: USAGE$18
53384
+ usage: USAGE$19
53353
53385
  },
53354
53386
  {
53355
53387
  path: ["service-runtime"],
53356
- usage: USAGE$18
53388
+ usage: USAGE$19
53357
53389
  },
53358
53390
  {
53359
53391
  path: ["service-protect"],
53360
- usage: USAGE$18
53392
+ usage: USAGE$19
53361
53393
  },
53362
53394
  {
53363
53395
  path: ["service-retirement"],
53364
- usage: USAGE$18
53396
+ usage: USAGE$19
53365
53397
  },
53366
53398
  {
53367
53399
  path: ["service-retire"],
53368
- usage: USAGE$18
53400
+ usage: USAGE$19
53369
53401
  },
53370
53402
  {
53371
53403
  path: ["shared-runtime"],
53372
- usage: USAGE$17
53404
+ usage: USAGE$18
53373
53405
  },
53374
53406
  {
53375
53407
  path: ["shared-runtime-adopt"],
53376
- usage: USAGE$17
53408
+ usage: USAGE$18
53377
53409
  },
53378
53410
  {
53379
53411
  path: ["shared-runtime-release"],
53380
- usage: USAGE$17
53412
+ usage: USAGE$18
53381
53413
  },
53382
53414
  {
53383
53415
  path: ["shared-app"],
53384
- usage: USAGE$17
53416
+ usage: USAGE$18
53385
53417
  },
53386
53418
  {
53387
53419
  path: ["shared-app-adopt"],
53388
- usage: USAGE$17
53420
+ usage: USAGE$18
53389
53421
  },
53390
53422
  {
53391
53423
  path: ["shared-app-release"],
53392
- usage: USAGE$17
53424
+ usage: USAGE$18
53393
53425
  },
53394
53426
  {
53395
53427
  path: ["shared-adopt"],
53396
- usage: USAGE$17
53428
+ usage: USAGE$18
53397
53429
  },
53398
53430
  {
53399
53431
  path: ["site-access"],
53400
- usage: USAGE$16
53432
+ usage: USAGE$17
53401
53433
  },
53402
53434
  {
53403
53435
  path: ["site-access-set"],
53404
- usage: USAGE$16
53436
+ usage: USAGE$17
53405
53437
  },
53406
53438
  {
53407
53439
  path: ["site-users"],
53408
- usage: USAGE$16
53440
+ usage: USAGE$17
53409
53441
  },
53410
53442
  {
53411
53443
  path: ["site-user"],
53412
- usage: USAGE$16
53444
+ usage: USAGE$17
53413
53445
  },
53414
53446
  {
53415
53447
  path: ["tools"],
53416
- usage: USAGE$15
53448
+ usage: USAGE$16
53417
53449
  },
53418
53450
  {
53419
53451
  path: ["runtime-versions"],
53420
- usage: USAGE$19
53452
+ usage: USAGE$20
53421
53453
  },
53422
53454
  {
53423
53455
  path: ["runtime-version-grants"],
53424
- usage: USAGE$20
53456
+ usage: USAGE$21
53425
53457
  }
53426
53458
  ];
53427
53459
  //#endregion
@@ -53710,7 +53742,7 @@ async function objectCacheSet(context, path, usage) {
53710
53742
  }
53711
53743
  //#endregion
53712
53744
  //#region src/commands/environment-references.ts
53713
- var USAGE$14 = [
53745
+ var USAGE$15 = [
53714
53746
  "Usage: hostingctl environment references <environment-uuid> --company <slug>",
53715
53747
  "",
53716
53748
  " references Every producer a configuration document for this environment may reference, the kind",
@@ -53729,7 +53761,7 @@ var USAGE$14 = [
53729
53761
  */
53730
53762
  async function environmentReferences(context, rest) {
53731
53763
  const [uuid, ...extra] = rest;
53732
- if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$14);
53764
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$15);
53733
53765
  return (await hostingEnvironmentsReferences({ path: {
53734
53766
  company: await requireCompany(context.flags),
53735
53767
  environmentUuid: uuid
@@ -61539,10 +61571,12 @@ var confirmHostingApplicationRecoveryRequestSchema = object({
61539
61571
  })
61540
61572
  }).describe("Confirming one application's reset or restore against the inventory that was reviewed.\n\n`confirmation` is the digest the review returned, and it is required rather than optional: it is\nwhat makes the confirmation an approval of an exact inventory instead of an approval of a label.\n`desiredGeneration` is the same idea at the environment level, so a request composed before\nanother change is a conflict rather than a reset of something else.\n\nThe reviewed figures travel as one typed `intake` object rather than flat fields, so the HTTP\nboundary and the domain contract cannot drift into two shapes with the same names. The intake\nitself is validated by the DTO's own types when it is hydrated.");
61541
61573
  var confirmHostingSshHostKeyRequestSchema = object({ fingerprint: string().max(120) }).describe("The fingerprint the client obtained independently for a source's server host key.\n\nIt is compared with the discovered value by the service, so only its shape belongs here. It is\nrequired rather than inferred: a confirmation that echoed what the platform already held would not\nbe a confirmation at all.");
61574
+ var hostingStorageObjectEncryptionEnumSchema = _enum(["none", "sse_c"]);
61542
61575
  var confirmHostingStorageAdoptionRequestSchema = object({
61543
61576
  operationId: string().regex(/^[a-z0-9][a-z0-9-]{3,40}$/),
61544
61577
  bindingGeneration: int().min(0),
61545
- captureDigest: string().regex(/^[a-f0-9]{64}$/)
61578
+ captureDigest: string().regex(/^[a-f0-9]{64}$/),
61579
+ targetEncryption: union([hostingStorageObjectEncryptionEnumSchema, _null()]).optional()
61546
61580
  }).describe("One exact capture a client confirms before it may become the bucket's physical binding.\n\nThe operation, the binding generation and the digest are all required and matched together: the same captured\nrepresentations can recur in a later operation, so a payload carrying only a digest could approve a cutover the\nclient never reviewed. Whether these name the capture currently frozen is answered by the recorded adoption, which\nrefuses a stale or foreign identity.");
61547
61581
  object({
61548
61582
  confirmation: string().min(64).max(64).regex(/^[a-f0-9]+$/),
@@ -65576,7 +65610,10 @@ var hostingStorageAdoptionDataSchema = object({
65576
65610
  requestedAction: string().nullable(),
65577
65611
  updatedAt: string(),
65578
65612
  disposal: union([hostingStorageAdoptionDisposalDataSchema, _null()]),
65579
- restore: union([hostingStorageAdoptionRestoreDataSchema, _null()])
65613
+ restore: union([hostingStorageAdoptionRestoreDataSchema, _null()]),
65614
+ sourceEncryption: string().nullable().describe("The mode this operation observed for its source; null means unobserved, never plaintext."),
65615
+ targetEncryption: string().nullable().describe("The mode this operation will leave the bucket in."),
65616
+ retainedSourceMayBeUnencrypted: boolean().nullable().describe("True only when an observed plaintext source is replaced by an encrypted candidate.")
65580
65617
  });
65581
65618
  var hostingStorageGatewayObjectDataSchema = object({
65582
65619
  key: string(),
@@ -65609,7 +65646,8 @@ var hostingStorageGatewayRetainedDataSchema = object({
65609
65646
  epoch: int(),
65610
65647
  captureDigest: string(),
65611
65648
  captureObjectCount: int(),
65612
- captureBytes: int()
65649
+ captureBytes: int(),
65650
+ objectEncryption: string().nullable().describe("The mode this retained namespace's objects were written with; null when the record predates it.")
65613
65651
  });
65614
65652
  object({
65615
65653
  bucket: string(),
@@ -65652,6 +65690,10 @@ var hostingStorageBucketDataSchema = object({
65652
65690
  bucket: string(),
65653
65691
  billingMode: string().describe("`native` bills measured usage; `allocated` bills the whole purchased allocation."),
65654
65692
  billingModeLabel: string().describe("The client-facing name of that basis, so no surface has to invent its own wording."),
65693
+ encryption: string().describe("The encryption product this bucket was sold: `none` or `sse_c`. It is declared, not inferred, because the two products behave differently in one visible way: the platform\nsupplies the key for an `sse_c` bucket, so no client or download carries one."),
65694
+ encryptionLabel: string().describe("The client-facing name of that product, so the panel and the CLI cannot word it two ways."),
65695
+ contentFormat: string().describe("How this bucket's bytes are represented: `native` or `rclone_crypt`. It is declared at purchase and never changed, because reinterpreting objects nothing has re-encrypted would\nmake them unreadable. A crypt bucket keeps the native endpoint but its bytes are encrypted content and names,\nso it is only read through the platform's crypt mount."),
65696
+ contentFormatLabel: string().describe("The client-facing name of that format, from the same catalogue the format itself comes from."),
65655
65697
  capacityBytes: int(),
65656
65698
  subscriptionCapacityBytes: int().describe("How much of the company's package storage this bucket holds, in bytes; zero when it holds none. It is usable capacity and it is not billed: the package's unit price already contains it, so it never\nappears as a storage line. `capacityBytes` remains the purchased allocation the monthly run prices."),
65657
65699
  totalCapacityBytes: int().describe("What the bucket can actually hold: purchased capacity plus the package storage assigned to it."),
@@ -65661,7 +65703,7 @@ var hostingStorageBucketDataSchema = object({
65661
65703
  status: string(),
65662
65704
  statusMessage: string(),
65663
65705
  hardQuotaEnforced: boolean(),
65664
- connection: hostingStorageConnectionDataSchema,
65706
+ connection: union([hostingStorageConnectionDataSchema, _null()]),
65665
65707
  accessKeyHint: string().nullable(),
65666
65708
  usage: hostingStorageObservationDataSchema,
65667
65709
  bindings: array(hostingStorageBindingDataSchema),
@@ -65790,7 +65832,8 @@ var hostingStorageQuoteDataSchema = object({
65790
65832
  vatBasisPoints: int().describe("The VAT rate at the current month's tax point, which the prorated figure uses."),
65791
65833
  monthlyVatBasisPoints: int().describe("The VAT rate at the next month's tax point, which the monthly figures use."),
65792
65834
  generatedAt: string(),
65793
- reviewToken: string().describe("The confirmation token a purchase or increase must send back. Every answer a client can act on is signed;\nonly the internal pre-sign construction behind it carries an empty string.")
65835
+ reviewToken: string().describe("The confirmation token a purchase or increase must send back. Every answer a client can act on is signed;\nonly the internal pre-sign construction behind it carries an empty string."),
65836
+ contentFormat: string().describe("How the purchased bucket's bytes will be represented: `native` or `rclone_crypt`. It is part of the priced decision because it is part of what is bought, and it is defaulted so a quote issued\nbefore the format existed still reads as the native product it was.")
65794
65837
  });
65795
65838
  object({
65796
65839
  rows: array(object({
@@ -65803,6 +65846,36 @@ object({
65803
65846
  })),
65804
65847
  unreadable: string().nullable()
65805
65848
  });
65849
+ var hostingSystemDatabasePoolDataSchema = object({
65850
+ environmentUuid: string(),
65851
+ name: string(),
65852
+ eligibleIntent: boolean(),
65853
+ serving: boolean(),
65854
+ initialized: boolean(),
65855
+ retained: boolean(),
65856
+ dependentEnvironmentCount: int(),
65857
+ retainedPlacementCount: int(),
65858
+ unretiredIdentityCount: int(),
65859
+ desiredGeneration: int(),
65860
+ observedGeneration: int().nullable(),
65861
+ observedAt: string().nullable(),
65862
+ fresh: boolean(),
65863
+ reason: string(),
65864
+ action: string()
65865
+ });
65866
+ var hostingSystemDatabasePoolsDataSchema = object({
65867
+ clusterUuid: string(),
65868
+ clusterName: string(),
65869
+ automaticManagementScope: boolean(),
65870
+ enabled: boolean(),
65871
+ minimumServing: int(),
65872
+ pendingCount: int(),
65873
+ servingCount: int(),
65874
+ freshnessSeconds: int(),
65875
+ reason: string(),
65876
+ action: string(),
65877
+ pools: array(hostingSystemDatabasePoolDataSchema)
65878
+ });
65806
65879
  var hostingTagDecisionEnumSchema = _enum([
65807
65880
  "adopted",
65808
65881
  "already_recorded",
@@ -66074,7 +66147,8 @@ object({
66074
66147
  failingBackups: diagnosticsFailingBackupsDataSchema.describe("The backup tracks that are not succeeding, and the environments this installation could not read. Beside readiness for the same reason `incompleteProfiles` is: a broken backup leaves its environment\nfully ready, so nothing in `unready` can see it — measured 2026-10-20, when every file backup on Home\nstaging failed for fifteen hours and the only surface that showed it was a panel nobody opened, and\n2026-10-29, when a database dump that stopped succeeding had no platform-level surface at all. Each row\nnames the track it is about and carries the failure's class, never its message, so an access problem is\ndistinguishable from a refused read without carrying a host, a path or a body."),
66075
66148
  operations: hostingOperationsDataSchema.describe("What is running, what is late and what recently finished, read from Hosting's own timing\nprojection. Beside readiness because the two answer different questions: readiness says whether an\nenvironment converged, and this says what the reconcile that was supposed to converge it is\ndoing right now, in which stage, and for how long. It is deliberately the last answer to lose\nits dependencies — it reads nothing outside this application — so a surface an operator opens\nduring an outage still answers."),
66076
66149
  failedStages: array(string()),
66077
- failedStagesSource: string().describe("Where those lines came from, or why this installation has none to give.")
66150
+ failedStagesSource: string().describe("Where those lines came from, or why this installation has none to give."),
66151
+ systemDatabasePools: union([hostingSystemDatabasePoolsDataSchema, _null()])
66078
66152
  });
66079
66153
  object({
66080
66154
  amountCents: int().nullable(),
@@ -66777,6 +66851,10 @@ var setHostingServiceRuntimeRequestSchema = object({
66777
66851
  }).describe("Stopping or starting one shared service.\n\nThe service is addressed by its route type slug inside the authorized environment, so this request\ncannot reach a different service, and neither a status nor a retirement state can be sent here: this\nendpoint changes whether a service is serving, and nothing else.");
66778
66852
  var setHostingStorageClassEnabledRequestSchema = object({ enabled: boolean() }).describe("Switch one registered class's enabled state.");
66779
66853
  var setHostingStorageSubscriptionAllocationRequestSchema = object({ gigabytes: int().min(0).max(1e5) }).describe("Set how much of the company's included package storage one bucket holds.\n\nThe body is the desired quantity, not a delta, so a retry is not a second change. Zero is a real instruction: it\nreleases the storage back to the pool, which is why the value is validated as \"at least nothing\" rather than \"at\n * least one\".");
66854
+ object({
66855
+ enabled: boolean(),
66856
+ reason: string().min(3).max(512)
66857
+ });
66780
66858
  var startEmailMailboxSyncActionRequestSchema = object({
66781
66859
  recurrence: emailMailboxSyncRecurrenceModeEnumSchema,
66782
66860
  endsAt: datetime().nullish()
@@ -67016,7 +67094,8 @@ var storeHostingSshSourceRequestSchema = object({
67016
67094
  }).describe("A new Git-over-SSH source: a label, a repository address and the ref to read.\n\nOnly shape is checked here. Whether the address is an accepted SSH Git URL, whether the server\nanswers and whether the ref exists are the service's answers, because each requires a decision\nabout the world rather than about the submitted string.");
67017
67095
  var storeHostingStorageAdoptionRequestSchema = object({
67018
67096
  maintenanceConfirmed: boolean(),
67019
- retainedDataAcknowledged: boolean()
67097
+ retainedDataAcknowledged: boolean(),
67098
+ targetEncryption: union([hostingStorageObjectEncryptionEnumSchema, _null()]).optional()
67020
67099
  }).describe("The two acknowledgments required before a bucket is held for adoption.\n\nBoth are required statements rather than optional flags. A hold stops the client's applications writing, and the\nprevious contents stay as retained data instead of being deleted, so an adoption must never begin because someone\nomitted to disagree. They are recorded on the activity entry, which is where the consent that authorised the hold is\naudited.");
67021
67100
  var storeHostingStorageBindingRequestSchema = object({
67022
67101
  path: string().max(255).optional(),
@@ -67025,6 +67104,8 @@ var storeHostingStorageBindingRequestSchema = object({
67025
67104
  var storeHostingStorageBucketRequestSchema = object({
67026
67105
  name: string().min(1).max(64).regex(/^[\pL\pN][\pL\pN ._-]*$/),
67027
67106
  mode: _enum(["native", "allocated"]).optional(),
67107
+ encryption: string().optional(),
67108
+ contentFormat: _enum(["native", "rclone_crypt"]).optional(),
67028
67109
  quote: object({
67029
67110
  bucketUuid: string().nullish(),
67030
67111
  bucketName: string().nullish(),
@@ -67077,8 +67158,10 @@ var storeHostingStorageObjectGrantRequestSchema = object({
67077
67158
  var storeNativeHostingStorageBucketRequestSchema = object({
67078
67159
  name: string().min(1).max(64).regex(/^[\pL\pN][\pL\pN ._-]*$/).describe("The client's own label, so they can tell two purchases apart."),
67079
67160
  purchaseKey: uuid().nullish().describe("There is no token to replay, so the caller's own key is what makes a retry return the bucket it already\ncreated instead of buying a second one."),
67080
- maximumBytes: int().min(0).max(0x5af3107a4000).nullish().describe("The same ceiling the maximum endpoint applies, from the same owner: a purchase may not buy a maximum\nthat could not be set on a bucket that already exists.")
67081
- }).describe("One purchase of storage that pays for what it stores.\n\nIts own request rather than a mode flag on the allocation purchase, because the two answers have different shapes: an\nallocation purchase confirms a priced quote, and this one carries no quote at all. Keeping them apart means a\ngenerated client can tell which body an endpoint takes instead of being handed an object whose required fields\ndepend on another field.\n\nThe optional maximum may be stated here so a bucket starts protected instead of being limited after it has already\nserved. It is optional in the other direction from the maximum endpoint: that one owns a change to an existing\nbucket, where omission would be an ambiguous removal, while a purchase has no previous value to remove, so an absent\nkey and an explicit null both mean \"no maximum\".");
67161
+ maximumBytes: int().min(0).max(0x5af3107a4000).nullish().describe("The same ceiling the maximum endpoint applies, from the same owner: a purchase may not buy a maximum\nthat could not be set on a bucket that already exists."),
67162
+ encryption: hostingStorageObjectEncryptionEnumSchema.optional().describe("A closed vocabulary, because the value is persisted, printed to the client and used to decide whether object\ntraffic may be served at all: free text would turn a typo into a silently unencrypted bucket."),
67163
+ contentFormat: string().optional().describe("A bucket that pays for what it stores is read through the native S3 endpoint, which cannot read encrypted\ncontent and names. The format is refused by name rather than silently ignored.")
67164
+ }).describe("One purchase of storage that pays for what it stores.\n\nIts own request rather than a mode flag on the allocation purchase, because the two answers have different shapes: an\nallocation purchase confirms a priced quote, and this one carries no quote at all. Keeping them apart means a\ngenerated client can tell which body an endpoint takes instead of being handed an object whose required fields\ndepend on another field.\n\nThe optional maximum may be stated here so a bucket starts protected instead of being limited after it has already\nserved. It is optional in the other direction from the maximum endpoint: that one owns a change to an existing\nbucket, where omission would be an ambiguous removal, while a purchase has no previous value to remove, so an absent\nkey and an explicit null both mean \"no maximum\".\n\nThe encryption product is stated here and nowhere else, for the same reason: it belongs to the purchase. A bucket that\nalready holds objects cannot have its encryption changed by a flag, because nothing has re-encrypted them. Omission\nmeans `none`, so every existing purchase path keeps writing exactly what it wrote before.");
67082
67165
  var storePackageHostingStorageBucketRequestSchema = object({
67083
67166
  name: string().min(1).max(64).regex(/^[\pL\pN][\pL\pN ._-]*$/).describe("The client's own label, so they can tell two purchases apart."),
67084
67167
  purchaseKey: uuid().describe("There is no token to replay, so the caller's own key is what makes a retry return the bucket it already\ncreated instead of reserving the same GiB twice."),
@@ -67086,7 +67169,9 @@ var storePackageHostingStorageBucketRequestSchema = object({
67086
67169
  quote: string().optional().describe("Nothing below belongs to this product. Refusing them by name keeps a client from sending a priced or\nusage-billed purchase here and being surprised by what it bought."),
67087
67170
  reviewToken: string().optional(),
67088
67171
  mode: string().optional(),
67089
- maximumBytes: string().optional()
67172
+ maximumBytes: string().optional(),
67173
+ encryption: string().optional().describe("Encryption belongs to the pay-for-what-you-store product, which delivers the platform key. Refusing it by\nname keeps a package purchase from silently ignoring the product that was asked for."),
67174
+ contentFormat: _enum(["native", "rclone_crypt"]).optional().describe("Package storage buys the same allocated product, so it may carry the same content format.")
67090
67175
  }).describe("One bucket funded by the storage the company's package already includes.\n\nIt is its own request rather than another mode of a purchase, because nothing on it is priced: the package's unit\nprice already contains the included GiB, so this request only names a bucket, states a quantity in whole GiB and\ncarries the caller's own idempotency key. The priced fields are therefore prohibited instead of optional — a quote\nhere would charge for storage the company has already paid for, and a native maximum or product would buy a\ndifferent thing than the package storage being assigned.");
67091
67176
  var storePlatformAlertRecipientRequestSchema = object({ email: email().max(254) }).describe("Add one system-admin address to the platform alert recipient list.\n\nSyntax is the request's (`email:rfc|max:254`); normalization to the canonical value is the\nexisting `emails` owner's, never a second normalizer here. The route's `can:` middleware owns the\npermission check, so authorization is not repeated.");
67092
67177
  var storePlatformCompanyNvmeBlocksRequestSchema = object({
@@ -69990,7 +70075,7 @@ union([
69990
70075
  hostingStorageStoreNativeStatus403Schema,
69991
70076
  hostingStorageStoreNativeStatus422Schema
69992
70077
  ]);
69993
- storeNativeHostingStorageBucketRequestSchema.describe("One purchase of storage that pays for what it stores.\n\nIts own request rather than a mode flag on the allocation purchase, because the two answers have different shapes: an\nallocation purchase confirms a priced quote, and this one carries no quote at all. Keeping them apart means a\ngenerated client can tell which body an endpoint takes instead of being handed an object whose required fields\ndepend on another field.\n\nThe optional maximum may be stated here so a bucket starts protected instead of being limited after it has already\nserved. It is optional in the other direction from the maximum endpoint: that one owns a change to an existing\nbucket, where omission would be an ambiguous removal, while a purchase has no previous value to remove, so an absent\nkey and an explicit null both mean \"no maximum\".");
70078
+ storeNativeHostingStorageBucketRequestSchema.describe("One purchase of storage that pays for what it stores.\n\nIts own request rather than a mode flag on the allocation purchase, because the two answers have different shapes: an\nallocation purchase confirms a priced quote, and this one carries no quote at all. Keeping them apart means a\ngenerated client can tell which body an endpoint takes instead of being handed an object whose required fields\ndepend on another field.\n\nThe optional maximum may be stated here so a bucket starts protected instead of being limited after it has already\nserved. It is optional in the other direction from the maximum endpoint: that one owns a change to an existing\nbucket, where omission would be an ambiguous removal, while a purchase has no previous value to remove, so an absent\nkey and an explicit null both mean \"no maximum\".\n\nThe encryption product is stated here and nowhere else, for the same reason: it belongs to the purchase. A bucket that\nalready holds objects cannot have its encryption changed by a flag, because nothing has re-encrypted them. Omission\nmeans `none`, so every existing purchase path keeps writing exactly what it wrote before.");
69994
70079
  var hostingStorageStorePackageStatus200Schema = hostingStorageBucketDataSchema;
69995
70080
  var hostingStorageStorePackageStatus201Schema = hostingStorageBucketDataSchema;
69996
70081
  var hostingStorageStorePackageStatus401Schema = object({ message: string().describe("Error overview.") });
@@ -70203,6 +70288,7 @@ storeHostingStorageObjectGrantRequestSchema.describe("Asking for one short-lived
70203
70288
  int().min(10).max(1e5);
70204
70289
  uuid().nullish();
70205
70290
  boolean().optional().describe("Asking to price the allocation a usage-billed bucket would move to, rather than an increase to one it\nalready holds. The intent changes which refusals apply, so it is asked for rather than guessed.");
70291
+ _enum(["native", "rclone_crypt"]).optional().describe("A new purchase may choose how its bytes are represented; a quote for an existing bucket prices the format\nthat bucket already has, because nothing reinterprets its bytes later.");
70206
70292
  union([
70207
70293
  object({ message: string().describe("Error overview.") }),
70208
70294
  object({ message: string().describe("Error overview.") }),
@@ -71105,6 +71191,15 @@ union([
71105
71191
  })
71106
71192
  ]);
71107
71193
  setHostingClusterStorageDefaultRequestSchema.describe("Choose the class a cluster allocates a claim type from when an environment names no choice.\n\nIt is desired state for future allocation only: a volume already bound keeps its recorded class.");
71194
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
71195
+ union([
71196
+ object({ message: string().describe("Error overview.") }),
71197
+ object({ message: string().describe("Error overview.") }),
71198
+ object({
71199
+ message: string().describe("Errors overview."),
71200
+ errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
71201
+ })
71202
+ ]);
71108
71203
  union([
71109
71204
  object({ message: string().describe("Error overview.") }),
71110
71205
  messageDataSchema,
@@ -71968,7 +72063,7 @@ function windowQuery(context) {
71968
72063
  }
71969
72064
  //#endregion
71970
72065
  //#region src/commands/platform-directory.ts
71971
- var USAGE$13 = [
72066
+ var USAGE$14 = [
71972
72067
  "Usage: hostingctl platform users [--search <text>] [--company <slug>]",
71973
72068
  " hostingctl platform user-closure <user-uuid>",
71974
72069
  " hostingctl platform user-close <user-uuid> --reason <text>",
@@ -71985,12 +72080,12 @@ var USAGE$13 = [
71985
72080
  async function platformDirectory(context, group, args) {
71986
72081
  if (group === "users") return await users(context, args);
71987
72082
  const [subject, ...rest] = args;
71988
- if (subject === void 0) throw new UsageError(USAGE$13);
72083
+ if (subject === void 0) throw new UsageError(USAGE$14);
71989
72084
  if (group === "company-activity") return await companyActivity(context, subject, rest);
71990
72085
  if (group === "company-activity-show") return await activityOne(subject, rest);
71991
72086
  if (group === "user-closure") return await userClosure(subject, rest);
71992
72087
  if (group === "user-close") return await closeUser(context, subject, rest);
71993
- throw new UsageError(USAGE$13);
72088
+ throw new UsageError(USAGE$14);
71994
72089
  }
71995
72090
  /** `users`, filtered by the API's own query keys. */
71996
72091
  async function users(context, args) {
@@ -72043,7 +72138,7 @@ async function companyActivity(context, slug, rest) {
72043
72138
  /** `company-activity-show <slug> <uuid>`. */
72044
72139
  async function activityOne(slug, rest) {
72045
72140
  const [activityUuid, ...extra] = rest;
72046
- if (activityUuid === void 0 || extra.length > 0) throw new UsageError(`Expected one activity uuid.\n\n${USAGE$13}`);
72141
+ if (activityUuid === void 0 || extra.length > 0) throw new UsageError(`Expected one activity uuid.\n\n${USAGE$14}`);
72047
72142
  return {
72048
72143
  kind: "activity-one",
72049
72144
  activity: (await platformCompanyActivityShow({ path: {
@@ -72064,7 +72159,7 @@ async function userClosure(uuid, rest) {
72064
72159
  async function closeUser(context, uuid, rest) {
72065
72160
  noExtra$8(rest);
72066
72161
  const reason = context.flags.get("--reason")?.trim() ?? "";
72067
- if (reason === "") throw new UsageError(`user-close needs --reason.\n\n${USAGE$13}`);
72162
+ if (reason === "") throw new UsageError(`user-close needs --reason.\n\n${USAGE$14}`);
72068
72163
  const review = (await platformUserClosureShow({ path: { userUuid: uuid } })).data;
72069
72164
  if (review.blockingReasons.length > 0) throw new UsageError(`Closing ${review.email} is blocked: ${review.blockingReasons.join("; ")}.`);
72070
72165
  return {
@@ -72080,11 +72175,11 @@ async function closeUser(context, uuid, rest) {
72080
72175
  }
72081
72176
  /** No positional arguments, or a usage refusal. */
72082
72177
  function noExtra$8(rest) {
72083
- if (rest.length > 0) throw new UsageError(USAGE$13);
72178
+ if (rest.length > 0) throw new UsageError(USAGE$14);
72084
72179
  }
72085
72180
  //#endregion
72086
72181
  //#region src/commands/platform-admin.ts
72087
- var USAGE$12 = [
72182
+ var USAGE$13 = [
72088
72183
  "Usage: hostingctl platform companies [--search <text>] [--state <state>]",
72089
72184
  " hostingctl platform company-add --name <name> --slug <slug> --admin-email <address>",
72090
72185
  " hostingctl platform company-member-add --company <slug> --email <address> --role <admin|member>",
@@ -72122,11 +72217,11 @@ async function platformAdmin(context, group, args) {
72122
72217
  if (group === "company-member-add") return await addCompanyMember(context, args);
72123
72218
  if (group === "domain-lookup") return await lookup(context, args);
72124
72219
  const [subject, ...rest] = args;
72125
- if (subject === void 0) throw new UsageError(USAGE$12);
72220
+ if (subject === void 0) throw new UsageError(USAGE$13);
72126
72221
  if (group === "company-closure") return await companyClosure(subject, rest);
72127
72222
  if (group === "company-close") return await closeCompany(context, subject, rest);
72128
72223
  if (group === "company-close-accept") return await acceptCompany(context, subject, rest);
72129
- throw new UsageError(USAGE$12);
72224
+ throw new UsageError(USAGE$13);
72130
72225
  }
72131
72226
  /** `companies`, filtered by the API's own query keys. */
72132
72227
  async function companies(context, args) {
@@ -72154,9 +72249,9 @@ async function companies(context, args) {
72154
72249
  async function addCompany(context, args) {
72155
72250
  noExtra$7(args);
72156
72251
  const body = {
72157
- name: requiredFlag$3(context, "--name", USAGE$12),
72158
- slug: requiredFlag$3(context, "--slug", USAGE$12).toLowerCase(),
72159
- adminEmail: requiredFlag$3(context, "--admin-email", USAGE$12).toLowerCase()
72252
+ name: requiredFlag$3(context, "--name", USAGE$13),
72253
+ slug: requiredFlag$3(context, "--slug", USAGE$13).toLowerCase(),
72254
+ adminEmail: requiredFlag$3(context, "--admin-email", USAGE$13).toLowerCase()
72160
72255
  };
72161
72256
  return {
72162
72257
  kind: "admin-write",
@@ -72166,9 +72261,9 @@ async function addCompany(context, args) {
72166
72261
  /** `company-member-add --company … --email … --role …`: attach an account that already exists. */
72167
72262
  async function addCompanyMember(context, args) {
72168
72263
  noExtra$7(args);
72169
- const company = requiredFlag$3(context, "--company", USAGE$12);
72170
- const email = requiredFlag$3(context, "--email", USAGE$12).toLowerCase();
72171
- const role = companyRole(context.flags.get("--role"), USAGE$12);
72264
+ const company = requiredFlag$3(context, "--company", USAGE$13);
72265
+ const email = requiredFlag$3(context, "--email", USAGE$13).toLowerCase();
72266
+ const role = companyRole(context.flags.get("--role"), USAGE$13);
72172
72267
  return {
72173
72268
  kind: "admin-write",
72174
72269
  outcome: await confirmableWrite(context, `Attach ${email} to ${company} as ${role}.`, async () => (await platformCompanyMemberStore({
@@ -72185,7 +72280,7 @@ async function lookup(context, args) {
72185
72280
  noExtra$7(args);
72186
72281
  return {
72187
72282
  kind: "domain-claim",
72188
- claim: (await platformDomainOwnershipLookup({ query: { "filter[hostname]": requiredFlag$3(context, "--hostname", USAGE$12).toLowerCase() } })).data
72283
+ claim: (await platformDomainOwnershipLookup({ query: { "filter[hostname]": requiredFlag$3(context, "--hostname", USAGE$13).toLowerCase() } })).data
72189
72284
  };
72190
72285
  }
72191
72286
  /** `company-closure <slug>`: what closing the company would do. */
@@ -72199,7 +72294,7 @@ async function companyClosure(slug, rest) {
72199
72294
  /** `company-close <slug> --reason …`: request the closure the review described. */
72200
72295
  async function closeCompany(context, slug, rest) {
72201
72296
  noExtra$7(rest);
72202
- const reason = requiredFlag$3(context, "--reason", USAGE$12);
72297
+ const reason = requiredFlag$3(context, "--reason", USAGE$13);
72203
72298
  const review = (await platformCompanyClosureShow({ path: { company: slug } })).data;
72204
72299
  if (!review.canFinalise) throw new UsageError(`Closing ${slug} is blocked: ${review.blockingReasons.join("; ") || "the review cannot be finalised"}.`);
72205
72300
  return {
@@ -72227,7 +72322,7 @@ async function acceptCompany(context, slug, rest) {
72227
72322
  }
72228
72323
  /** No positional arguments, or a usage refusal. */
72229
72324
  function noExtra$7(rest) {
72230
- if (rest.length > 0) throw new UsageError(USAGE$12);
72325
+ if (rest.length > 0) throw new UsageError(USAGE$13);
72231
72326
  }
72232
72327
  //#endregion
72233
72328
  //#region src/commands/platform-admin-text.ts
@@ -72317,7 +72412,7 @@ function platformAdministrationText(report) {
72317
72412
  }
72318
72413
  //#endregion
72319
72414
  //#region src/commands/platform-alerts.ts
72320
- var USAGE$11 = [
72415
+ var USAGE$12 = [
72321
72416
  "Usage: hostingctl platform alerts",
72322
72417
  " hostingctl platform alert-add --email <address>",
72323
72418
  " hostingctl platform alert <enable|disable|remove> <recipient-uuid>",
@@ -72367,13 +72462,13 @@ async function platformAlerts(context, group, args) {
72367
72462
  };
72368
72463
  }
72369
72464
  if (group === "yahoo-feedback-set") return await feedback(context, args);
72370
- throw new UsageError(USAGE$11);
72465
+ throw new UsageError(USAGE$12);
72371
72466
  }
72372
72467
  /** `alert-add --email …`. */
72373
72468
  async function add$4(context, args) {
72374
72469
  noExtra$6(args);
72375
72470
  const email = context.flags.get("--email")?.trim().toLowerCase() ?? "";
72376
- if (email === "") throw new UsageError(`alert-add needs --email.\n\n${USAGE$11}`);
72471
+ if (email === "") throw new UsageError(`alert-add needs --email.\n\n${USAGE$12}`);
72377
72472
  return {
72378
72473
  kind: "alert-write",
72379
72474
  outcome: await confirmableWrite(context, `Add ${email} as a platform alert recipient.`, async () => {
@@ -72393,7 +72488,7 @@ async function test(context, args) {
72393
72488
  async function settings(context, args) {
72394
72489
  noExtra$6(args);
72395
72490
  const monitoringEnabled = onOffFlag(context, "--monitoring");
72396
- if (monitoringEnabled === null) throw new UsageError(`alert-settings needs --monitoring.\n\n${USAGE$11}`);
72491
+ if (monitoringEnabled === null) throw new UsageError(`alert-settings needs --monitoring.\n\n${USAGE$12}`);
72397
72492
  const outcome = await confirmableWrite(context, `Turn platform monitoring ${monitoringEnabled ? "on" : "off"}.`, async () => (await platformAlertUpdateSettings({ body: { monitoringEnabled } })).data);
72398
72493
  return outcome.sent ? {
72399
72494
  kind: "alert-settings",
@@ -72406,7 +72501,7 @@ async function settings(context, args) {
72406
72501
  /** `alert enable|disable|remove <recipient-uuid>`. */
72407
72502
  async function alert(context, args) {
72408
72503
  const [action, recipientUuid, ...extra] = args;
72409
- if (action === void 0 || recipientUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$11);
72504
+ if (action === void 0 || recipientUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$12);
72410
72505
  const path = { recipientUuid };
72411
72506
  if (action === "enable" || action === "disable") {
72412
72507
  const enabled = action === "enable";
@@ -72429,13 +72524,13 @@ async function alert(context, args) {
72429
72524
  description: `Removed recipient ${recipientUuid}.`
72430
72525
  };
72431
72526
  }
72432
- throw new UsageError(USAGE$11);
72527
+ throw new UsageError(USAGE$12);
72433
72528
  }
72434
72529
  /** `yahoo-feedback-set --enabled … [--mailbox …]`. */
72435
72530
  async function feedback(context, args) {
72436
72531
  noExtra$6(args);
72437
72532
  const enabled = onOffFlag(context, "--enabled");
72438
- if (enabled === null) throw new UsageError(`yahoo-feedback-set needs --enabled.\n\n${USAGE$11}`);
72533
+ if (enabled === null) throw new UsageError(`yahoo-feedback-set needs --enabled.\n\n${USAGE$12}`);
72439
72534
  const mailbox = context.flags.get("--mailbox")?.trim() ?? "";
72440
72535
  return {
72441
72536
  kind: "yahoo-write",
@@ -72451,7 +72546,7 @@ async function current() {
72451
72546
  }
72452
72547
  /** No positional arguments, or a usage refusal. */
72453
72548
  function noExtra$6(args) {
72454
- if (args.length > 0) throw new UsageError(USAGE$11);
72549
+ if (args.length > 0) throw new UsageError(USAGE$12);
72455
72550
  }
72456
72551
  /** The `platform alerts|alert-*|github-app|yahoo-feedback*` renderer. */
72457
72552
  function platformAlertText(report) {
@@ -72509,7 +72604,7 @@ function feedbackLines(feedback) {
72509
72604
  }
72510
72605
  //#endregion
72511
72606
  //#region src/commands/platform-consumer-declarations.ts
72512
- var USAGE$10 = [
72607
+ var USAGE$11 = [
72513
72608
  "Usage: hostingctl platform consumer-declarations [--json]",
72514
72609
  "",
72515
72610
  " consumer-declarations Every consumer the platform declares for: its own process roles, the environment",
@@ -72530,7 +72625,7 @@ var USAGE$10 = [
72530
72625
  * silently dropped.
72531
72626
  */
72532
72627
  async function platformConsumerDeclarations(args) {
72533
- if (args.length > 0) throw new UsageError(USAGE$10);
72628
+ if (args.length > 0) throw new UsageError(USAGE$11);
72534
72629
  return {
72535
72630
  kind: "consumer-declarations",
72536
72631
  listing: (await platformHostingConsumerDeclarations({})).data
@@ -72612,6 +72707,80 @@ function refusalLines(refusals) {
72612
72707
  ];
72613
72708
  }
72614
72709
  //#endregion
72710
+ //#region src/commands/platform-database-pools.ts
72711
+ var USAGE$10 = [
72712
+ "Usage: hostingctl platform database-pools show <cluster-uuid>",
72713
+ " hostingctl platform database-pools set <cluster-uuid> --enabled <on|off> --reason <text>",
72714
+ "",
72715
+ " show This cluster's system shared MariaDB pools: whether automatic management is on, how many pools",
72716
+ " are serving against the minimum, and each pool's readiness, freshness and occupants.",
72717
+ " set Turn automatic system-pool management on or off for one cluster.",
72718
+ "",
72719
+ "Automatic management is development's own decision, so `show` reports it READ-ONLY on a cluster outside",
72720
+ "that scope; `set` is refused there rather than pretending to switch something it does not control.",
72721
+ "Turning it off creates and restores nothing. It never removes a pool: the pools already serving keep",
72722
+ "serving, and the last serving pool still cannot be cancelled.",
72723
+ "",
72724
+ "These are platform-only operations; the API refuses a company or impersonated token. `set` needs --confirm,",
72725
+ "and --dry-run describes the change without sending it."
72726
+ ].join("\n");
72727
+ /** `platform database-pools …`, dispatched from the `platform` command. */
72728
+ async function platformDatabasePools(context, rest) {
72729
+ const [action, ...tail] = rest;
72730
+ if (action === "show") return {
72731
+ kind: "database-pools",
72732
+ pools: (await platformSystemDatabasePoolShow({ path: { clusterUuid: oneUuid$7(tail, USAGE$10) } })).data
72733
+ };
72734
+ if (action === "set") {
72735
+ const clusterUuid = oneUuid$7(tail, USAGE$10);
72736
+ const enabled = onOff$5(context, "--enabled", USAGE$10);
72737
+ const reason = context.flags.get("--reason")?.trim() ?? "";
72738
+ if (reason.length < 3 || reason.length > 512) throw new UsageError(`--reason must be 3 to 512 characters (got ${String(reason.length)}).\n\n${USAGE$10}`);
72739
+ return {
72740
+ kind: "database-pool-write",
72741
+ outcome: await confirmableWrite(context, [
72742
+ `${enabled ? "Enable" : "Disable"} automatic system database-pool management on cluster ${clusterUuid}.`,
72743
+ enabled ? " The clock may then create or restore the pool this cluster's tenants need." : " No pool is created or restored. The pools serving now keep serving, and the last one cannot be cancelled.",
72744
+ ` Reason recorded: ${reason}`
72745
+ ].join("\n"), async () => (await platformSystemDatabasePoolUpdate({
72746
+ path: { clusterUuid },
72747
+ body: {
72748
+ enabled,
72749
+ reason
72750
+ }
72751
+ })).data)
72752
+ };
72753
+ }
72754
+ throw new UsageError(USAGE$10);
72755
+ }
72756
+ /** One pool, as the operator reads it. */
72757
+ function poolLine(pool) {
72758
+ const state = pool.serving ? "serving" : pool.retained ? "retained" : "not serving";
72759
+ return [
72760
+ ` ${pool.name.padEnd(28)} ${state.padEnd(12)} ${pool.fresh ? "fresh" : "stale"}`,
72761
+ ` desired ${String(pool.desiredGeneration)} observed ${pool.observedAt ?? "never"}`,
72762
+ ` tenants ${String(pool.dependentEnvironmentCount)} unretired identities ${String(pool.unretiredIdentityCount)}`,
72763
+ ` ${pool.reason}${pool.action === "" ? "" : ` — ${pool.action}`}`
72764
+ ].join("\n");
72765
+ }
72766
+ /** The `platform database-pools …` renderer. */
72767
+ function platformDatabasePoolsText(report) {
72768
+ if (report.kind === "database-pool-write") {
72769
+ const { outcome } = report;
72770
+ if (!outcome.sent) return `Would: ${outcome.description}\nNothing was sent (--dry-run).`;
72771
+ const status = outcome.result;
72772
+ return [outcome.description, ` management is now ${status.enabled ? "on" : "off"}; ${String(status.servingCount)} serving against a minimum of ${String(status.minimumServing)}.`].join("\n");
72773
+ }
72774
+ const { pools: status } = report;
72775
+ return [
72776
+ `${status.clusterName} (${status.clusterUuid})`,
72777
+ ` management ${status.enabled ? "on" : "off"}${status.automaticManagementScope ? "" : " (outside this deployment's automatic scope)"}`,
72778
+ ` serving ${String(status.servingCount)} pending ${String(status.pendingCount)} minimum ${String(status.minimumServing)}`,
72779
+ ` ${status.reason}${status.action === "" ? "" : ` — ${status.action}`}`,
72780
+ ...status.pools.length === 0 ? [" No system pool exists on this cluster."] : status.pools.map(poolLine)
72781
+ ].join("\n");
72782
+ }
72783
+ //#endregion
72615
72784
  //#region src/commands/platform-dns-purge.ts
72616
72785
  /**
72617
72786
  * The platform's own record that a zone's records are gone at the provider, and its withdrawal.
@@ -73091,6 +73260,7 @@ var PLATFORM_SUBCOMMANDS = [
73091
73260
  "yahoo-feedback",
73092
73261
  "yahoo-feedback-set",
73093
73262
  "consumer-declarations",
73263
+ "database-pools",
73094
73264
  "email",
73095
73265
  "seed",
73096
73266
  "schema",
@@ -73774,6 +73944,7 @@ var PLATFORM_USAGE = [
73774
73944
  " hostingctl platform sent-email [--company <slug>] [--kind <kind>] [--tag <tag>]",
73775
73945
  " hostingctl platform sent-email-show <uuid>",
73776
73946
  " hostingctl platform consumer-declarations",
73947
+ " hostingctl platform database-pools show|set <cluster-uuid>",
73777
73948
  " hostingctl platform email <command> (see `platform email --help`)",
73778
73949
  " hostingctl platform seed <command> (see `platform seed --help`)",
73779
73950
  " hostingctl platform schema --kind <hosting|portable-site> [--version <v>]",
@@ -73787,6 +73958,7 @@ var PLATFORM_USAGE = [
73787
73958
  " consumer-declarations What the platform composes for each consumer it serves: roles, delivered",
73788
73959
  " environment names, the migration need and the consumers it cannot describe.",
73789
73960
  " email Mail monitoring: deliverability, blocklists and postmaster reputation.",
73961
+ " database-pools This cluster's system shared MariaDB pools, and whether the clock may ensure one.",
73790
73962
  " seed Prepared content: definitions, versions and their per-cluster placements.",
73791
73963
  " schema The published documents a client authors against, by version.",
73792
73964
  " purchases What every environment was sold, at what size, and for how long.",
@@ -73805,83 +73977,83 @@ var PLATFORM_METADATA = {
73805
73977
  var PLATFORM_TOPICS = [
73806
73978
  {
73807
73979
  path: ["companies"],
73808
- usage: USAGE$12
73980
+ usage: USAGE$13
73809
73981
  },
73810
73982
  {
73811
73983
  path: ["company-add"],
73812
- usage: USAGE$12
73984
+ usage: USAGE$13
73813
73985
  },
73814
73986
  {
73815
73987
  path: ["company-member-add"],
73816
- usage: USAGE$12
73988
+ usage: USAGE$13
73817
73989
  },
73818
73990
  {
73819
73991
  path: ["company-closure"],
73820
- usage: USAGE$12
73992
+ usage: USAGE$13
73821
73993
  },
73822
73994
  {
73823
73995
  path: ["company-close"],
73824
- usage: USAGE$12
73996
+ usage: USAGE$13
73825
73997
  },
73826
73998
  {
73827
73999
  path: ["company-close-accept"],
73828
- usage: USAGE$12
74000
+ usage: USAGE$13
73829
74001
  },
73830
74002
  {
73831
74003
  path: ["company-activity"],
73832
- usage: USAGE$12
74004
+ usage: USAGE$13
73833
74005
  },
73834
74006
  {
73835
74007
  path: ["company-activity-show"],
73836
- usage: USAGE$12
74008
+ usage: USAGE$13
73837
74009
  },
73838
74010
  {
73839
74011
  path: ["users"],
73840
- usage: USAGE$12
74012
+ usage: USAGE$13
73841
74013
  },
73842
74014
  {
73843
74015
  path: ["user-closure"],
73844
- usage: USAGE$12
74016
+ usage: USAGE$13
73845
74017
  },
73846
74018
  {
73847
74019
  path: ["user-close"],
73848
- usage: USAGE$12
74020
+ usage: USAGE$13
73849
74021
  },
73850
74022
  {
73851
74023
  path: ["domain-lookup"],
73852
- usage: USAGE$12
74024
+ usage: USAGE$13
73853
74025
  },
73854
74026
  {
73855
74027
  path: ["alerts"],
73856
- usage: USAGE$11
74028
+ usage: USAGE$12
73857
74029
  },
73858
74030
  {
73859
74031
  path: ["alert"],
73860
- usage: USAGE$11
74032
+ usage: USAGE$12
73861
74033
  },
73862
74034
  {
73863
74035
  path: ["alert-add"],
73864
- usage: USAGE$11
74036
+ usage: USAGE$12
73865
74037
  },
73866
74038
  {
73867
74039
  path: ["alert-test"],
73868
- usage: USAGE$11
74040
+ usage: USAGE$12
73869
74041
  },
73870
74042
  {
73871
74043
  path: ["alert-settings"],
73872
- usage: USAGE$11
74044
+ usage: USAGE$12
73873
74045
  },
73874
74046
  {
73875
74047
  path: ["github-app"],
73876
- usage: USAGE$11
74048
+ usage: USAGE$12
73877
74049
  },
73878
74050
  {
73879
74051
  path: ["yahoo-feedback"],
73880
- usage: USAGE$11
74052
+ usage: USAGE$12
73881
74053
  },
73882
74054
  {
73883
74055
  path: ["yahoo-feedback-set"],
73884
- usage: USAGE$11
74056
+ usage: USAGE$12
73885
74057
  },
73886
74058
  {
73887
74059
  path: ["sent-email"],
@@ -73893,12 +74065,16 @@ var PLATFORM_TOPICS = [
73893
74065
  },
73894
74066
  {
73895
74067
  path: ["consumer-declarations"],
73896
- usage: USAGE$10
74068
+ usage: USAGE$11
73897
74069
  },
73898
74070
  {
73899
74071
  path: ["email"],
73900
74072
  usage: USAGE$8
73901
74073
  },
74074
+ {
74075
+ path: ["database-pools"],
74076
+ usage: USAGE$10
74077
+ },
73902
74078
  {
73903
74079
  path: ["seed"],
73904
74080
  usage: USAGE$4
@@ -74181,6 +74357,7 @@ var platform = {
74181
74357
  if (ALERT_GROUPS.has(group)) return await platformAlerts(context, group, args);
74182
74358
  if (group === "consumer-declarations") return await platformConsumerDeclarations(args);
74183
74359
  if (group === "seed") return await platformSeeds(context, args);
74360
+ if (group === "database-pools") return await platformDatabasePools(context, args);
74184
74361
  if (group === "schema") {
74185
74362
  const request = schemaRequest(context.flags, PLATFORM_USAGE);
74186
74363
  return await readSchema(request.document, request.version);
@@ -74201,6 +74378,7 @@ var platform = {
74201
74378
  if (report.kind === "runtime-version-preview" || report.kind === "runtime-version-evacuation" || report.kind === "runtime-version-write") return platformRuntimeVersionText(report);
74202
74379
  if (report.kind === "consumer-declarations") return platformConsumerDeclarationsText(report.listing);
74203
74380
  if (report.kind === "sent-emails" || report.kind === "sent-email") return sentEmailText(report);
74381
+ if (report.kind === "database-pools" || report.kind === "database-pool-write") return platformDatabasePoolsText(report);
74204
74382
  if (isAdminReport(report)) return platformAdministrationText(report);
74205
74383
  if (isSeedReport(report)) return platformSeedsText(report);
74206
74384
  return isAlertReport(report) ? platformAlertText(report) : platformEmailText(report);
@@ -77920,10 +78098,12 @@ function bucketText(bucket) {
77920
78098
  const connection = bucket.connection;
77921
78099
  return [
77922
78100
  ` name ${bucket.name}`,
77923
- ` bucket ${connection.bucket}`,
77924
- ` endpoint ${connection.endpoint}`,
77925
- ` region ${connection.region}`,
77926
- ` addressing ${connection.pathStyle ? "path-style" : "virtual-hosted-style"}`,
78101
+ ...connection === null ? [` bucket ${bucket.bucket}`, " connection none: this bucket has no native S3 endpoint; reach it through its crypt mount"] : [
78102
+ ` bucket ${connection.bucket}`,
78103
+ ` endpoint ${connection.endpoint}`,
78104
+ ` region ${connection.region}`,
78105
+ ` addressing ${connection.pathStyle ? "path-style" : "virtual-hosted-style"}`
78106
+ ],
77927
78107
  ` billing ${bucket.billingModeLabel}`,
77928
78108
  ` capacity ${readableBytes(bucket.capacityBytes)}`,
77929
78109
  ` included download ${readableBytes(bucket.includedDownloadBytes)} a month`,
@@ -79739,7 +79919,7 @@ function writeUpdateState(state, env = process.env) {
79739
79919
  }
79740
79920
  //#endregion
79741
79921
  //#region src/version.ts
79742
- var VERSION = "1.0.689";
79922
+ var VERSION = "1.0.695";
79743
79923
  //#endregion
79744
79924
  //#region src/commands/update.ts
79745
79925
  /**
@@ -79814,7 +79994,7 @@ var update = {
79814
79994
  }, process.env);
79815
79995
  return {
79816
79996
  ...known,
79817
- current: after ?? "1.0.689",
79997
+ current: after ?? "1.0.695",
79818
79998
  latest: after ?? latest,
79819
79999
  upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
79820
80000
  action: "run",
@@ -80096,7 +80276,7 @@ async function printUpdateNotice(options) {
80096
80276
  }, env, { waitMs: NOTICE_LOCK_WAIT_MS });
80097
80277
  } catch {}
80098
80278
  if (latest === null) return;
80099
- if (!isNewerVersion(latest, "1.0.689")) return;
80279
+ if (!isNewerVersion(latest, "1.0.695")) return;
80100
80280
  process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
80101
80281
  }
80102
80282
  /** Whether an environment variable is set to something, which is how CI and the opt-out are read. */