@haakco/hostingctl 1.0.688 → 1.0.691
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 +672 -511
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/platform/darwin-arm64/hostingctl +0 -0
- package/platform/darwin-x64/hostingctl +0 -0
- package/platform/linux-arm64/hostingctl +0 -0
- package/platform/linux-x64/hostingctl +0 -0
- package/platform/windows-x64/hostingctl.exe +0 -0
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
38973
|
-
...passwordBody(readSecret(context, "new-password", MAX_PASSWORD_BYTES, USAGE$
|
|
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$
|
|
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$
|
|
39001
|
-
const password = readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$
|
|
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$
|
|
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$
|
|
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$
|
|
39059
|
-
if (storeAs === "") throw new UsageError(`start needs --store-as <profile>.\n\n${USAGE$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
39431
|
+
usage: USAGE$59
|
|
39400
39432
|
},
|
|
39401
39433
|
{
|
|
39402
39434
|
path: ["password"],
|
|
39403
|
-
usage: USAGE$
|
|
39435
|
+
usage: USAGE$59
|
|
39404
39436
|
},
|
|
39405
39437
|
{
|
|
39406
39438
|
path: ["register"],
|
|
39407
|
-
usage: USAGE$
|
|
39439
|
+
usage: USAGE$59
|
|
39408
39440
|
},
|
|
39409
39441
|
{
|
|
39410
39442
|
path: ["forgot-password"],
|
|
39411
|
-
usage: USAGE$
|
|
39443
|
+
usage: USAGE$59
|
|
39412
39444
|
},
|
|
39413
39445
|
{
|
|
39414
39446
|
path: ["reset-password"],
|
|
39415
|
-
usage: USAGE$
|
|
39447
|
+
usage: USAGE$59
|
|
39416
39448
|
},
|
|
39417
39449
|
{
|
|
39418
39450
|
path: ["verify-email"],
|
|
39419
|
-
usage: USAGE$
|
|
39451
|
+
usage: USAGE$59
|
|
39420
39452
|
},
|
|
39421
39453
|
{
|
|
39422
39454
|
path: ["closure"],
|
|
39423
|
-
usage: USAGE$
|
|
39455
|
+
usage: USAGE$60
|
|
39424
39456
|
},
|
|
39425
39457
|
{
|
|
39426
39458
|
path: ["picture"],
|
|
39427
|
-
usage: USAGE$
|
|
39459
|
+
usage: USAGE$60
|
|
39428
39460
|
},
|
|
39429
39461
|
{
|
|
39430
39462
|
path: ["notifications"],
|
|
39431
|
-
usage: USAGE$
|
|
39463
|
+
usage: USAGE$60
|
|
39432
39464
|
},
|
|
39433
39465
|
{
|
|
39434
39466
|
path: ["push-token"],
|
|
39435
|
-
usage: USAGE$
|
|
39467
|
+
usage: USAGE$57
|
|
39436
39468
|
},
|
|
39437
39469
|
{
|
|
39438
39470
|
path: ["impersonate"],
|
|
39439
|
-
usage: USAGE$
|
|
39471
|
+
usage: USAGE$58
|
|
39440
39472
|
}
|
|
39441
39473
|
];
|
|
39442
39474
|
//#endregion
|
|
39443
39475
|
//#region src/commands/auth-sessions.ts
|
|
39444
|
-
var USAGE$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
40464
|
-
const sftpOnly = onOff$5(context, "--sftp-only", USAGE$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
40724
|
+
usage: USAGE$53
|
|
40693
40725
|
},
|
|
40694
40726
|
{
|
|
40695
40727
|
path: ["settings-set"],
|
|
40696
|
-
usage: USAGE$
|
|
40728
|
+
usage: USAGE$53
|
|
40697
40729
|
},
|
|
40698
40730
|
{
|
|
40699
40731
|
path: ["grants"],
|
|
40700
|
-
usage: USAGE$
|
|
40732
|
+
usage: USAGE$53
|
|
40701
40733
|
},
|
|
40702
40734
|
{
|
|
40703
40735
|
path: ["grant"],
|
|
40704
|
-
usage: USAGE$
|
|
40736
|
+
usage: USAGE$53
|
|
40705
40737
|
},
|
|
40706
40738
|
{
|
|
40707
40739
|
path: ["un-grant"],
|
|
40708
|
-
usage: USAGE$
|
|
40740
|
+
usage: USAGE$53
|
|
40709
40741
|
},
|
|
40710
40742
|
{
|
|
40711
40743
|
path: ["user-show"],
|
|
40712
|
-
usage: USAGE$
|
|
40744
|
+
usage: USAGE$53
|
|
40713
40745
|
},
|
|
40714
40746
|
{
|
|
40715
40747
|
path: ["user-set"],
|
|
40716
|
-
usage: USAGE$
|
|
40748
|
+
usage: USAGE$53
|
|
40717
40749
|
},
|
|
40718
40750
|
{
|
|
40719
40751
|
path: ["received"],
|
|
40720
|
-
usage: USAGE$
|
|
40752
|
+
usage: USAGE$53
|
|
40721
40753
|
},
|
|
40722
40754
|
{
|
|
40723
40755
|
path: ["key"],
|
|
40724
|
-
usage: USAGE$
|
|
40756
|
+
usage: USAGE$54
|
|
40725
40757
|
},
|
|
40726
40758
|
{
|
|
40727
40759
|
path: ["password"],
|
|
40728
|
-
usage: USAGE$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
41807
|
-
if (value !== implied) throw new UsageError(`--source-kind ${value} does not match the ${implied} reference named.\n\n${USAGE$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
43268
|
+
usage: USAGE$42
|
|
43237
43269
|
},
|
|
43238
43270
|
{
|
|
43239
43271
|
path: ["source-uploads"],
|
|
43240
|
-
usage: USAGE$
|
|
43272
|
+
usage: USAGE$42
|
|
43241
43273
|
},
|
|
43242
43274
|
{
|
|
43243
43275
|
path: ["source-upload-show"],
|
|
43244
|
-
usage: USAGE$
|
|
43276
|
+
usage: USAGE$42
|
|
43245
43277
|
},
|
|
43246
43278
|
{
|
|
43247
43279
|
path: ["source-upload-discard"],
|
|
43248
|
-
usage: USAGE$
|
|
43280
|
+
usage: USAGE$42
|
|
43249
43281
|
},
|
|
43250
43282
|
{
|
|
43251
43283
|
path: ["source-ssh-list"],
|
|
43252
|
-
usage: USAGE$
|
|
43284
|
+
usage: USAGE$43
|
|
43253
43285
|
},
|
|
43254
43286
|
{
|
|
43255
43287
|
path: ["source-ssh-show"],
|
|
43256
|
-
usage: USAGE$
|
|
43288
|
+
usage: USAGE$43
|
|
43257
43289
|
},
|
|
43258
43290
|
{
|
|
43259
43291
|
path: ["source-ssh-create"],
|
|
43260
|
-
usage: USAGE$
|
|
43292
|
+
usage: USAGE$43
|
|
43261
43293
|
},
|
|
43262
43294
|
{
|
|
43263
43295
|
path: ["source-ssh-update"],
|
|
43264
|
-
usage: USAGE$
|
|
43296
|
+
usage: USAGE$43
|
|
43265
43297
|
},
|
|
43266
43298
|
{
|
|
43267
43299
|
path: ["source-ssh-confirm-host-key"],
|
|
43268
|
-
usage: USAGE$
|
|
43300
|
+
usage: USAGE$43
|
|
43269
43301
|
},
|
|
43270
43302
|
{
|
|
43271
43303
|
path: ["source-ssh-verify"],
|
|
43272
|
-
usage: USAGE$
|
|
43304
|
+
usage: USAGE$43
|
|
43273
43305
|
},
|
|
43274
43306
|
{
|
|
43275
43307
|
path: ["source-ssh-rotate-key"],
|
|
43276
|
-
usage: USAGE$
|
|
43308
|
+
usage: USAGE$43
|
|
43277
43309
|
},
|
|
43278
43310
|
{
|
|
43279
43311
|
path: ["source-ssh-revoke"],
|
|
43280
|
-
usage: USAGE$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
43628
|
+
usage: USAGE$48
|
|
43597
43629
|
},
|
|
43598
43630
|
{
|
|
43599
43631
|
path: ["build-log"],
|
|
43600
|
-
usage: USAGE$
|
|
43632
|
+
usage: USAGE$50
|
|
43601
43633
|
},
|
|
43602
43634
|
{
|
|
43603
43635
|
path: ["build-retry"],
|
|
43604
|
-
usage: USAGE$
|
|
43636
|
+
usage: USAGE$50
|
|
43605
43637
|
},
|
|
43606
43638
|
{
|
|
43607
43639
|
path: ["build-cancel"],
|
|
43608
|
-
usage: USAGE$
|
|
43640
|
+
usage: USAGE$50
|
|
43609
43641
|
},
|
|
43610
43642
|
{
|
|
43611
43643
|
path: ["source-bind"],
|
|
43612
|
-
usage: USAGE$
|
|
43644
|
+
usage: USAGE$50
|
|
43613
43645
|
},
|
|
43614
43646
|
{
|
|
43615
43647
|
path: ["source-unbind"],
|
|
43616
|
-
usage: USAGE$
|
|
43648
|
+
usage: USAGE$50
|
|
43617
43649
|
},
|
|
43618
43650
|
...SOURCE_TOPICS,
|
|
43619
43651
|
{
|
|
43620
43652
|
path: ["cache"],
|
|
43621
|
-
usage: USAGE$
|
|
43653
|
+
usage: USAGE$49
|
|
43622
43654
|
},
|
|
43623
43655
|
{
|
|
43624
43656
|
path: ["cache-set"],
|
|
43625
|
-
usage: USAGE$
|
|
43657
|
+
usage: USAGE$49
|
|
43626
43658
|
},
|
|
43627
43659
|
{
|
|
43628
43660
|
path: ["cache-purge"],
|
|
43629
|
-
usage: USAGE$
|
|
43661
|
+
usage: USAGE$49
|
|
43630
43662
|
},
|
|
43631
43663
|
{
|
|
43632
43664
|
path: ["routes"],
|
|
43633
|
-
usage: USAGE$
|
|
43665
|
+
usage: USAGE$49
|
|
43634
43666
|
},
|
|
43635
43667
|
{
|
|
43636
43668
|
path: ["route-add"],
|
|
43637
|
-
usage: USAGE$
|
|
43669
|
+
usage: USAGE$49
|
|
43638
43670
|
},
|
|
43639
43671
|
{
|
|
43640
43672
|
path: ["route-remove"],
|
|
43641
|
-
usage: USAGE$
|
|
43673
|
+
usage: USAGE$49
|
|
43642
43674
|
},
|
|
43643
43675
|
{
|
|
43644
43676
|
path: ["canonical"],
|
|
43645
|
-
usage: USAGE$
|
|
43677
|
+
usage: USAGE$49
|
|
43646
43678
|
},
|
|
43647
43679
|
{
|
|
43648
43680
|
path: ["import"],
|
|
43649
|
-
usage: USAGE$
|
|
43681
|
+
usage: USAGE$46
|
|
43650
43682
|
},
|
|
43651
43683
|
{
|
|
43652
43684
|
path: ["import-upload"],
|
|
43653
|
-
usage: USAGE$
|
|
43685
|
+
usage: USAGE$47
|
|
43654
43686
|
},
|
|
43655
43687
|
{
|
|
43656
43688
|
path: ["import-discard"],
|
|
43657
|
-
usage: USAGE$
|
|
43689
|
+
usage: USAGE$46
|
|
43658
43690
|
},
|
|
43659
43691
|
{
|
|
43660
43692
|
path: ["url-repair-preview"],
|
|
43661
|
-
usage: USAGE$
|
|
43693
|
+
usage: USAGE$46
|
|
43662
43694
|
},
|
|
43663
43695
|
{
|
|
43664
43696
|
path: ["url-repair-confirm"],
|
|
43665
|
-
usage: USAGE$
|
|
43697
|
+
usage: USAGE$46
|
|
43666
43698
|
},
|
|
43667
43699
|
{
|
|
43668
43700
|
path: ["recovery-review"],
|
|
43669
|
-
usage: USAGE$
|
|
43701
|
+
usage: USAGE$45
|
|
43670
43702
|
},
|
|
43671
43703
|
{
|
|
43672
43704
|
path: ["recovery-confirm"],
|
|
43673
|
-
usage: USAGE$
|
|
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$
|
|
43717
|
+
usage: USAGE$44
|
|
43686
43718
|
},
|
|
43687
43719
|
{
|
|
43688
43720
|
path: ["site-access-set"],
|
|
43689
|
-
usage: USAGE$
|
|
43721
|
+
usage: USAGE$44
|
|
43690
43722
|
},
|
|
43691
43723
|
{
|
|
43692
43724
|
path: ["site-access-rotate"],
|
|
43693
|
-
usage: USAGE$
|
|
43725
|
+
usage: USAGE$44
|
|
43694
43726
|
},
|
|
43695
43727
|
{
|
|
43696
43728
|
path: ["site-users"],
|
|
43697
|
-
usage: USAGE$
|
|
43729
|
+
usage: USAGE$44
|
|
43698
43730
|
},
|
|
43699
43731
|
{
|
|
43700
43732
|
path: ["site-user"],
|
|
43701
|
-
usage: USAGE$
|
|
43733
|
+
usage: USAGE$44
|
|
43702
43734
|
},
|
|
43703
43735
|
{
|
|
43704
43736
|
path: ["updates"],
|
|
43705
|
-
usage: USAGE$
|
|
43737
|
+
usage: USAGE$41
|
|
43706
43738
|
},
|
|
43707
43739
|
{
|
|
43708
43740
|
path: ["updates-pause"],
|
|
43709
|
-
usage: USAGE$
|
|
43741
|
+
usage: USAGE$41
|
|
43710
43742
|
},
|
|
43711
43743
|
{
|
|
43712
43744
|
path: ["updates-resume"],
|
|
43713
|
-
usage: USAGE$
|
|
43745
|
+
usage: USAGE$41
|
|
43714
43746
|
},
|
|
43715
43747
|
{
|
|
43716
43748
|
path: ["administrator"],
|
|
43717
|
-
usage: USAGE$
|
|
43749
|
+
usage: USAGE$51
|
|
43718
43750
|
},
|
|
43719
43751
|
{
|
|
43720
43752
|
path: ["administrator-reset"],
|
|
43721
|
-
usage: USAGE$
|
|
43753
|
+
usage: USAGE$51
|
|
43722
43754
|
},
|
|
43723
43755
|
{
|
|
43724
43756
|
path: ["administrator-reveal"],
|
|
43725
|
-
usage: USAGE$
|
|
43757
|
+
usage: USAGE$51
|
|
43726
43758
|
},
|
|
43727
43759
|
{
|
|
43728
43760
|
path: ["recovery-status"],
|
|
43729
|
-
usage: USAGE$
|
|
43761
|
+
usage: USAGE$51
|
|
43730
43762
|
},
|
|
43731
43763
|
{
|
|
43732
43764
|
path: ["recovery-retry"],
|
|
43733
|
-
usage: USAGE$
|
|
43765
|
+
usage: USAGE$51
|
|
43734
43766
|
},
|
|
43735
43767
|
{
|
|
43736
43768
|
path: ["recovery-cancel"],
|
|
43737
|
-
usage: USAGE$
|
|
43769
|
+
usage: USAGE$51
|
|
43738
43770
|
}
|
|
43739
43771
|
];
|
|
43740
43772
|
//#endregion
|
|
@@ -46788,8 +46820,8 @@ var CANCELLATION_USAGE = [
|
|
|
46788
46820
|
"so a value read from the cancellation would be stale. --digest is the review's inventoryDigest.",
|
|
46789
46821
|
"Every write needs --confirm; --dry-run describes the change and sends nothing at all.",
|
|
46790
46822
|
"",
|
|
46791
|
-
"
|
|
46792
|
-
"
|
|
46823
|
+
"Any cancellation's deletion destroys the environment, its applications, its databases and its volumes, so its",
|
|
46824
|
+
"live persistent storage is irreversibly removed rather than retained; the retained restore points are the only way back, and purge destroys those too."
|
|
46793
46825
|
].join("\n");
|
|
46794
46826
|
/** Render one `cancellation` answer to a person, never to a value the payload does not carry. */
|
|
46795
46827
|
function cancellationText(report) {
|
|
@@ -46823,8 +46855,9 @@ function requestDescription(terms) {
|
|
|
46823
46855
|
].join("\n");
|
|
46824
46856
|
return [
|
|
46825
46857
|
`${opening} — service ends ${terms.serviceEnd ?? "(no date)"}.`,
|
|
46826
|
-
" The environment keeps serving until that date
|
|
46827
|
-
"
|
|
46858
|
+
" The environment keeps serving until that date. When deletion runs, its live persistent storage is",
|
|
46859
|
+
" irreversibly removed rather than retained; the retained restore points are the only way back, and they are",
|
|
46860
|
+
" gone after the review's recoverable-until date. The request can still be withdrawn until deletion starts."
|
|
46828
46861
|
].join("\n");
|
|
46829
46862
|
}
|
|
46830
46863
|
/** What a withdrawal does, including the case where service had already ended. */
|
|
@@ -46852,8 +46885,8 @@ function reconfirmDescription(environmentUuid, cancellationUuid, reviewGeneratio
|
|
|
46852
46885
|
`Re-confirm the approved deletion scope of environment ${environmentUuid} (cancellation ${cancellationUuid}) at generation ${String(reviewGeneration)}, digest ${inventoryDigest}.`,
|
|
46853
46886
|
" Deletion was approved against a scope that no longer describes this environment, so this states that the",
|
|
46854
46887
|
" scope as it now stands is the scope to delete; the ordinary deletion then continues against it.",
|
|
46855
|
-
" The
|
|
46856
|
-
" recoverable-until date. This cannot be withdrawn."
|
|
46888
|
+
" The environment, its applications, its databases and its volumes are destroyed, so its live persistent storage is irreversibly removed rather than retained;",
|
|
46889
|
+
" the retained restore points are the only way back, and they are gone after the review's recoverable-until date. This cannot be withdrawn."
|
|
46857
46890
|
].join("\n");
|
|
46858
46891
|
}
|
|
46859
46892
|
/** The recorded status in the API's own words, or the absence of an episode said plainly. */
|
|
@@ -47146,6 +47179,7 @@ async function request(context, environmentUuid) {
|
|
|
47146
47179
|
reviewGeneration,
|
|
47147
47180
|
effectiveAt: serviceEnd ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
47148
47181
|
accepted: true,
|
|
47182
|
+
liveStorageDisposalAcknowledged: true,
|
|
47149
47183
|
...timing === "now" ? { deletionAcknowledged: true } : {},
|
|
47150
47184
|
deletionTiming: timing
|
|
47151
47185
|
};
|
|
@@ -47244,7 +47278,7 @@ function episode(rest) {
|
|
|
47244
47278
|
}
|
|
47245
47279
|
//#endregion
|
|
47246
47280
|
//#region src/commands/company-assets.ts
|
|
47247
|
-
var USAGE$
|
|
47281
|
+
var USAGE$40 = [
|
|
47248
47282
|
"Usage: hostingctl company logo|favicon set --image-file <path> --company <slug>",
|
|
47249
47283
|
" hostingctl company logo|favicon remove --company <slug>",
|
|
47250
47284
|
"",
|
|
@@ -47259,17 +47293,17 @@ var USAGE$39 = [
|
|
|
47259
47293
|
*/
|
|
47260
47294
|
async function companyAssets(context, asset, rest) {
|
|
47261
47295
|
const [action, ...tail] = rest;
|
|
47262
|
-
if (tail.length > 0) throw new UsageError(USAGE$
|
|
47296
|
+
if (tail.length > 0) throw new UsageError(USAGE$40);
|
|
47263
47297
|
const company = await requireCompany(context.flags);
|
|
47264
47298
|
if (action === "set") return await set$1(context, asset, company);
|
|
47265
47299
|
if (action === "remove") return await remove$2(context, asset, company);
|
|
47266
|
-
throw new UsageError(USAGE$
|
|
47300
|
+
throw new UsageError(USAGE$40);
|
|
47267
47301
|
}
|
|
47268
47302
|
/** `set --image-file …`: one multipart upload of the asset. */
|
|
47269
47303
|
async function set$1(context, asset, company) {
|
|
47270
47304
|
const file = context.flags.get("--image-file") ?? "";
|
|
47271
47305
|
return await confirmableWrite(context, file === "" ? `Set ${company}'s ${asset}.` : `Set ${company}'s ${asset} to ${file}.`, async () => {
|
|
47272
|
-
const body = await imageUpload(file, USAGE$
|
|
47306
|
+
const body = await imageUpload(file, USAGE$40);
|
|
47273
47307
|
return asset === "logo" ? (await companyAssetStoreLogo({
|
|
47274
47308
|
path: { company },
|
|
47275
47309
|
body
|
|
@@ -47307,7 +47341,7 @@ function companyRole(raw, usage) {
|
|
|
47307
47341
|
}
|
|
47308
47342
|
//#endregion
|
|
47309
47343
|
//#region src/commands/company-invitations.ts
|
|
47310
|
-
var USAGE$
|
|
47344
|
+
var USAGE$39 = [
|
|
47311
47345
|
"Usage: hostingctl company invitations --company <slug>",
|
|
47312
47346
|
" hostingctl company invite --company <slug> --email <email> --name <name> --role <admin|member>",
|
|
47313
47347
|
" hostingctl company cancel-invitation <invitation-uuid> --company <slug>",
|
|
@@ -47331,7 +47365,7 @@ var MAX_INVITATION_TOKEN_BYTES = 4096;
|
|
|
47331
47365
|
*/
|
|
47332
47366
|
async function companyInvitations(context, subcommand, rest) {
|
|
47333
47367
|
if (subcommand === "invitations") {
|
|
47334
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
47368
|
+
if (rest.length > 0) throw new UsageError(USAGE$39);
|
|
47335
47369
|
const company = await requireCompany(context.flags);
|
|
47336
47370
|
return {
|
|
47337
47371
|
kind: "invitations",
|
|
@@ -47342,20 +47376,20 @@ async function companyInvitations(context, subcommand, rest) {
|
|
|
47342
47376
|
if (subcommand === "invite") return await invite(context, rest);
|
|
47343
47377
|
if (subcommand === "cancel-invitation") return await cancel$1(context, rest);
|
|
47344
47378
|
if (subcommand === "invitation-preview") return (await companyInvitationPreview({
|
|
47345
|
-
path: { invitationUuid: oneUuid$7(rest, USAGE$
|
|
47346
|
-
body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$
|
|
47379
|
+
path: { invitationUuid: oneUuid$7(rest, USAGE$39) },
|
|
47380
|
+
body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$39) }
|
|
47347
47381
|
})).data;
|
|
47348
47382
|
if (subcommand === "invitation-accept") return await accept(context, rest);
|
|
47349
|
-
throw new UsageError(USAGE$
|
|
47383
|
+
throw new UsageError(USAGE$39);
|
|
47350
47384
|
}
|
|
47351
47385
|
/** `invite --email … --name … --role …`. */
|
|
47352
47386
|
async function invite(context, rest) {
|
|
47353
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
47387
|
+
if (rest.length > 0) throw new UsageError(USAGE$39);
|
|
47354
47388
|
const company = await requireCompany(context.flags);
|
|
47355
47389
|
const email = context.flags.get("--email")?.trim() ?? "";
|
|
47356
47390
|
const name = context.flags.get("--name")?.trim() ?? "";
|
|
47357
|
-
const role = companyRole(context.flags.get("--role"), USAGE$
|
|
47358
|
-
if (email === "" || name === "") throw new UsageError(`invite needs --email and --name.\n\n${USAGE$
|
|
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}`);
|
|
47359
47393
|
return await confirmableWrite(context, `Invite ${name} <${email}> into ${company} as ${role}.`, async () => (await companyInvitationStore({
|
|
47360
47394
|
path: { company },
|
|
47361
47395
|
body: {
|
|
@@ -47367,7 +47401,7 @@ async function invite(context, rest) {
|
|
|
47367
47401
|
}
|
|
47368
47402
|
/** `cancel-invitation <uuid> --company …`. */
|
|
47369
47403
|
async function cancel$1(context, rest) {
|
|
47370
|
-
const invitationUuid = oneUuid$7(rest, USAGE$
|
|
47404
|
+
const invitationUuid = oneUuid$7(rest, USAGE$39);
|
|
47371
47405
|
const company = await requireCompany(context.flags);
|
|
47372
47406
|
return await confirmableWrite(context, `Cancel invitation ${invitationUuid}.`, async () => {
|
|
47373
47407
|
return (await companyInvitationDestroy({ path: {
|
|
@@ -47378,11 +47412,11 @@ async function cancel$1(context, rest) {
|
|
|
47378
47412
|
}
|
|
47379
47413
|
/** `invitation-accept <uuid>`: join the company the invitation names. */
|
|
47380
47414
|
async function accept(context, rest) {
|
|
47381
|
-
const invitationUuid = oneUuid$7(rest, USAGE$
|
|
47415
|
+
const invitationUuid = oneUuid$7(rest, USAGE$39);
|
|
47382
47416
|
return await confirmableWrite(context, `Accept invitation ${invitationUuid}.`, async () => {
|
|
47383
47417
|
return (await companyInvitationAccept({
|
|
47384
47418
|
path: { invitationUuid },
|
|
47385
|
-
body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$
|
|
47419
|
+
body: { token: readSecret(context, "token", MAX_INVITATION_TOKEN_BYTES, USAGE$39) }
|
|
47386
47420
|
})).data;
|
|
47387
47421
|
});
|
|
47388
47422
|
}
|
|
@@ -47499,31 +47533,31 @@ var COMPANY_TOPICS = [
|
|
|
47499
47533
|
},
|
|
47500
47534
|
{
|
|
47501
47535
|
path: ["logo"],
|
|
47502
|
-
usage: USAGE$
|
|
47536
|
+
usage: USAGE$40
|
|
47503
47537
|
},
|
|
47504
47538
|
{
|
|
47505
47539
|
path: ["favicon"],
|
|
47506
|
-
usage: USAGE$
|
|
47540
|
+
usage: USAGE$40
|
|
47507
47541
|
},
|
|
47508
47542
|
{
|
|
47509
47543
|
path: ["invitations"],
|
|
47510
|
-
usage: USAGE$
|
|
47544
|
+
usage: USAGE$39
|
|
47511
47545
|
},
|
|
47512
47546
|
{
|
|
47513
47547
|
path: ["invite"],
|
|
47514
|
-
usage: USAGE$
|
|
47548
|
+
usage: USAGE$39
|
|
47515
47549
|
},
|
|
47516
47550
|
{
|
|
47517
47551
|
path: ["cancel-invitation"],
|
|
47518
|
-
usage: USAGE$
|
|
47552
|
+
usage: USAGE$39
|
|
47519
47553
|
},
|
|
47520
47554
|
{
|
|
47521
47555
|
path: ["invitation-preview"],
|
|
47522
|
-
usage: USAGE$
|
|
47556
|
+
usage: USAGE$39
|
|
47523
47557
|
},
|
|
47524
47558
|
{
|
|
47525
47559
|
path: ["invitation-accept"],
|
|
47526
|
-
usage: USAGE$
|
|
47560
|
+
usage: USAGE$39
|
|
47527
47561
|
}
|
|
47528
47562
|
];
|
|
47529
47563
|
//#endregion
|
|
@@ -48349,7 +48383,7 @@ function readJsonObject(file, subject) {
|
|
|
48349
48383
|
}
|
|
48350
48384
|
//#endregion
|
|
48351
48385
|
//#region src/commands/dns-records.ts
|
|
48352
|
-
var USAGE$
|
|
48386
|
+
var USAGE$38 = [
|
|
48353
48387
|
"Usage: hostingctl dns enable <domain-uuid> --company <slug>",
|
|
48354
48388
|
" hostingctl dns record set <domain-uuid> --company <slug> --file <set.json>",
|
|
48355
48389
|
" hostingctl dns record remove <domain-uuid> --company <slug> --name <relative> --type <type>",
|
|
@@ -48388,7 +48422,7 @@ async function dnsWrites(context, subcommand, rest) {
|
|
|
48388
48422
|
if (subcommand === "record") return await record$4(context, rest);
|
|
48389
48423
|
if (subcommand === "dnssec") return await changeDnssec(context, rest);
|
|
48390
48424
|
if (subcommand === "handover") return await handover(context, rest);
|
|
48391
|
-
throw new UsageError(USAGE$
|
|
48425
|
+
throw new UsageError(USAGE$38);
|
|
48392
48426
|
}
|
|
48393
48427
|
/** The zone's current desired generation, which every write must name. */
|
|
48394
48428
|
async function generation(company, domainUuid) {
|
|
@@ -48399,7 +48433,7 @@ async function generation(company, domainUuid) {
|
|
|
48399
48433
|
}
|
|
48400
48434
|
/** `dns enable <uuid>`: take the zone over into managed DNS. */
|
|
48401
48435
|
async function enable(context, rest) {
|
|
48402
|
-
const domainUuid = oneUuid$7(rest, USAGE$
|
|
48436
|
+
const domainUuid = oneUuid$7(rest, USAGE$38);
|
|
48403
48437
|
const company = await requireCompany(context.flags);
|
|
48404
48438
|
return await confirmableWrite(context, "Publish this name's zone in managed DNS.", async () => (await domainsDnsStore({ path: {
|
|
48405
48439
|
company,
|
|
@@ -48409,16 +48443,16 @@ async function enable(context, rest) {
|
|
|
48409
48443
|
/** `dns record set|remove`. */
|
|
48410
48444
|
async function record$4(context, rest) {
|
|
48411
48445
|
const [action, ...tail] = rest;
|
|
48412
|
-
const domainUuid = oneUuid$7(tail, USAGE$
|
|
48446
|
+
const domainUuid = oneUuid$7(tail, USAGE$38);
|
|
48413
48447
|
const company = await requireCompany(context.flags);
|
|
48414
48448
|
if (action === "set") return await setRecord(context, company, domainUuid);
|
|
48415
48449
|
if (action === "remove") return await removeRecord(context, company, domainUuid);
|
|
48416
|
-
throw new UsageError(USAGE$
|
|
48450
|
+
throw new UsageError(USAGE$38);
|
|
48417
48451
|
}
|
|
48418
48452
|
/** `record set --file`: replace one set with the file's own values. */
|
|
48419
48453
|
async function setRecord(context, company, domainUuid) {
|
|
48420
48454
|
const file = context.flags.get("--file") ?? "";
|
|
48421
|
-
if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$
|
|
48455
|
+
if (file === "") throw new UsageError(`record set needs --file <set.json>.\n\n${USAGE$38}`);
|
|
48422
48456
|
const set = recordSetFromFile(file);
|
|
48423
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 () => {
|
|
48424
48458
|
const body = {
|
|
@@ -48438,7 +48472,7 @@ async function setRecord(context, company, domainUuid) {
|
|
|
48438
48472
|
async function removeRecord(context, company, domainUuid) {
|
|
48439
48473
|
const relativeName = context.flags.get("--name") ?? "";
|
|
48440
48474
|
const recordType = recordTypeFlag(context);
|
|
48441
|
-
if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$
|
|
48475
|
+
if (relativeName === "") throw new UsageError(`record remove needs --name.\n\n${USAGE$38}`);
|
|
48442
48476
|
return await confirmableWrite(context, `Remove the ${recordType.toUpperCase()} set "${relativeName}".`, async () => {
|
|
48443
48477
|
const query = {
|
|
48444
48478
|
relativeName,
|
|
@@ -48457,8 +48491,8 @@ async function removeRecord(context, company, domainUuid) {
|
|
|
48457
48491
|
/** `dns dnssec <signed|unsigned> <uuid>`: the signing mode, with the confirmation the API requires. */
|
|
48458
48492
|
async function changeDnssec(context, rest) {
|
|
48459
48493
|
const [mode, uuid, ...extra] = rest;
|
|
48460
|
-
if (mode === void 0 || mode !== "signed" && mode !== "unsigned" || extra.length > 0) throw new UsageError(USAGE$
|
|
48461
|
-
const domainUuid = oneUuid$7(uuid === void 0 ? [] : [uuid], USAGE$
|
|
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);
|
|
48462
48496
|
const company = await requireCompany(context.flags);
|
|
48463
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 () => {
|
|
48464
48498
|
const body = {
|
|
@@ -48477,7 +48511,7 @@ async function changeDnssec(context, rest) {
|
|
|
48477
48511
|
}
|
|
48478
48512
|
/** `dns handover <uuid>`: hand the zone back, dropping what this platform publishes. */
|
|
48479
48513
|
async function handover(context, rest) {
|
|
48480
|
-
const domainUuid = oneUuid$7(rest, USAGE$
|
|
48514
|
+
const domainUuid = oneUuid$7(rest, USAGE$38);
|
|
48481
48515
|
const company = await requireCompany(context.flags);
|
|
48482
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 () => {
|
|
48483
48517
|
const body = {
|
|
@@ -48496,7 +48530,7 @@ async function handover(context, rest) {
|
|
|
48496
48530
|
/** A record type flag, refused when it is not one of the API's own values. */
|
|
48497
48531
|
function recordTypeFlag(context) {
|
|
48498
48532
|
const raw = (context.flags.get("--type") ?? "").trim().toLowerCase();
|
|
48499
|
-
if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$
|
|
48533
|
+
if (!RECORD_TYPES.has(raw)) throw new UsageError(`--type must be one of ${[...RECORD_TYPES].join(", ")} (got "${raw}").\n\n${USAGE$38}`);
|
|
48500
48534
|
return raw;
|
|
48501
48535
|
}
|
|
48502
48536
|
/**
|
|
@@ -48530,7 +48564,7 @@ function recordSetFromValue(value, subject) {
|
|
|
48530
48564
|
}
|
|
48531
48565
|
//#endregion
|
|
48532
48566
|
//#region src/commands/dns-templates.ts
|
|
48533
|
-
var USAGE$
|
|
48567
|
+
var USAGE$37 = [
|
|
48534
48568
|
"Usage: hostingctl dns template list --company <slug>",
|
|
48535
48569
|
" hostingctl dns template show <template-uuid> --company <slug>",
|
|
48536
48570
|
" hostingctl dns template save [<template-uuid>] --company <slug> --file <template.json>",
|
|
@@ -48552,24 +48586,24 @@ var USAGE$36 = [
|
|
|
48552
48586
|
async function dnsTemplates(context, rest) {
|
|
48553
48587
|
const [action, ...tail] = rest;
|
|
48554
48588
|
if (action === "list") {
|
|
48555
|
-
if (tail.length > 0) throw new UsageError(USAGE$
|
|
48589
|
+
if (tail.length > 0) throw new UsageError(USAGE$37);
|
|
48556
48590
|
return {
|
|
48557
48591
|
kind: "templates",
|
|
48558
48592
|
templates: (await dnsTemplatesIndex({ path: { company: await requireCompany(context.flags) } })).data.templates
|
|
48559
48593
|
};
|
|
48560
48594
|
}
|
|
48561
|
-
if (action === "show") return await show$5(context, oneUuid$7(tail, USAGE$
|
|
48595
|
+
if (action === "show") return await show$5(context, oneUuid$7(tail, USAGE$37));
|
|
48562
48596
|
if (action === "save") return await save$1(context, tail[0]);
|
|
48563
|
-
if (action === "delete") return await destroy$1(context, oneUuid$7(tail, USAGE$
|
|
48564
|
-
if (action === "from-zone") return await fromZone(context, oneUuid$7(tail, USAGE$
|
|
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));
|
|
48565
48599
|
if (action === "preview") return await preview$1(context, tail);
|
|
48566
48600
|
if (action === "apply") return await apply(context, tail);
|
|
48567
|
-
throw new UsageError(USAGE$
|
|
48601
|
+
throw new UsageError(USAGE$37);
|
|
48568
48602
|
}
|
|
48569
48603
|
/** Two uuids: the template, then the zone it applies to. */
|
|
48570
48604
|
function templateAndZone(rest) {
|
|
48571
48605
|
const [templateUuid, domainUuid, ...extra] = rest;
|
|
48572
|
-
if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$
|
|
48606
|
+
if (templateUuid === void 0 || templateUuid === "" || domainUuid === void 0 || domainUuid === "" || extra.length > 0) throw new UsageError(USAGE$37);
|
|
48573
48607
|
return {
|
|
48574
48608
|
templateUuid,
|
|
48575
48609
|
domainUuid
|
|
@@ -48588,7 +48622,7 @@ async function show$5(context, templateUuid) {
|
|
|
48588
48622
|
/** `save [<uuid>] --file …`: record a new template, or replace the one named. */
|
|
48589
48623
|
async function save$1(context, templateUuid) {
|
|
48590
48624
|
const file = context.flags.get("--file") ?? "";
|
|
48591
|
-
if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$
|
|
48625
|
+
if (file === "") throw new UsageError(`template save needs --file <template.json>.\n\n${USAGE$37}`);
|
|
48592
48626
|
const company = await requireCompany(context.flags);
|
|
48593
48627
|
const document = readJsonObject(file, "template");
|
|
48594
48628
|
const name = typeof document.name === "string" ? document.name.trim() : "";
|
|
@@ -48624,7 +48658,7 @@ async function destroy$1(context, templateUuid) {
|
|
|
48624
48658
|
async function fromZone(context, domainUuid) {
|
|
48625
48659
|
const company = await requireCompany(context.flags);
|
|
48626
48660
|
const name = context.flags.get("--name")?.trim() ?? "";
|
|
48627
|
-
if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$
|
|
48661
|
+
if (name === "") throw new UsageError(`template from-zone needs --name.\n\n${USAGE$37}`);
|
|
48628
48662
|
const zone = (await domainsDnsShow({ path: {
|
|
48629
48663
|
company,
|
|
48630
48664
|
domainUuid
|
|
@@ -48694,7 +48728,7 @@ function recordSetsFromFile$1(document, subject) {
|
|
|
48694
48728
|
}
|
|
48695
48729
|
//#endregion
|
|
48696
48730
|
//#region src/commands/dns-text.ts
|
|
48697
|
-
var USAGE$
|
|
48731
|
+
var USAGE$36 = [
|
|
48698
48732
|
"Usage: hostingctl dns <zone|export> <domain-uuid> --company <slug>",
|
|
48699
48733
|
" hostingctl dns import <preview|apply> <domain-uuid> --company <slug> --file <path> [--confirm]",
|
|
48700
48734
|
" hostingctl dns enable <domain-uuid> --company <slug>",
|
|
@@ -48765,7 +48799,7 @@ function applyText(result) {
|
|
|
48765
48799
|
var DNS_METADATA = {
|
|
48766
48800
|
name: "dns",
|
|
48767
48801
|
summary: "A managed name's zone, its zone-file export, and the reviewed import write.",
|
|
48768
|
-
usage: USAGE$
|
|
48802
|
+
usage: USAGE$36,
|
|
48769
48803
|
flags: [
|
|
48770
48804
|
{
|
|
48771
48805
|
name: "--file",
|
|
@@ -48803,23 +48837,23 @@ var DNS_METADATA = {
|
|
|
48803
48837
|
var DNS_TOPICS = [
|
|
48804
48838
|
{
|
|
48805
48839
|
path: ["enable"],
|
|
48806
|
-
usage: USAGE$
|
|
48840
|
+
usage: USAGE$38
|
|
48807
48841
|
},
|
|
48808
48842
|
{
|
|
48809
48843
|
path: ["record"],
|
|
48810
|
-
usage: USAGE$
|
|
48844
|
+
usage: USAGE$38
|
|
48811
48845
|
},
|
|
48812
48846
|
{
|
|
48813
48847
|
path: ["dnssec"],
|
|
48814
|
-
usage: USAGE$
|
|
48848
|
+
usage: USAGE$38
|
|
48815
48849
|
},
|
|
48816
48850
|
{
|
|
48817
48851
|
path: ["handover"],
|
|
48818
|
-
usage: USAGE$
|
|
48852
|
+
usage: USAGE$38
|
|
48819
48853
|
},
|
|
48820
48854
|
{
|
|
48821
48855
|
path: ["template"],
|
|
48822
|
-
usage: USAGE$
|
|
48856
|
+
usage: USAGE$37
|
|
48823
48857
|
}
|
|
48824
48858
|
];
|
|
48825
48859
|
//#endregion
|
|
@@ -48837,7 +48871,7 @@ var IMPORT_LINE = /^(\S+)\s+(\d+)\s+(\S+)\s+(.+)$/;
|
|
|
48837
48871
|
* hold customer DNS data, so its contents are never printed; only the API's own answer is shown.
|
|
48838
48872
|
*/
|
|
48839
48873
|
function recordSetsFromFile(file) {
|
|
48840
|
-
if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$
|
|
48874
|
+
if (file === void 0 || file === "") throw new UsageError(`Importing needs the record sets from disk: pass --file <path>.\n\n${USAGE$36}`);
|
|
48841
48875
|
const sets = /* @__PURE__ */ new Map();
|
|
48842
48876
|
for (const [index, raw] of readBoundedImportFile(file, "import").split("\n").entries()) addLine(sets, raw.trim(), index + 1);
|
|
48843
48877
|
if (sets.size === 0) throw new UsageError(`The import file [${file}] holds no record sets.`);
|
|
@@ -48931,7 +48965,7 @@ var dns = {
|
|
|
48931
48965
|
if (subcommand === "import") return await importRecords(context, rest);
|
|
48932
48966
|
if (subcommand === "template") return await dnsTemplates(context, rest);
|
|
48933
48967
|
if (WRITE_SUBCOMMANDS$1.has(subcommand ?? "")) return await dnsWrites(context, subcommand ?? "", rest);
|
|
48934
|
-
throw new UsageError(USAGE$
|
|
48968
|
+
throw new UsageError(USAGE$36);
|
|
48935
48969
|
},
|
|
48936
48970
|
human(report) {
|
|
48937
48971
|
if ("sent" in report) return renderWriteOutcome(report, dnsWriteText);
|
|
@@ -48950,7 +48984,7 @@ async function readZone(context, rest, which) {
|
|
|
48950
48984
|
/** `import preview|apply <uuid> --file <path>`: the review, or the reviewed write. */
|
|
48951
48985
|
async function importRecords(context, rest) {
|
|
48952
48986
|
const [action, ...tail] = rest;
|
|
48953
|
-
if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$
|
|
48987
|
+
if (action !== "preview" && action !== "apply") throw new UsageError(USAGE$36);
|
|
48954
48988
|
const path = await domainPath$1(context, tail);
|
|
48955
48989
|
const recordSets = recordSetsFromFile(context.flags.get("--file"));
|
|
48956
48990
|
if (action === "preview") return (await domainsDnsImportPreview({
|
|
@@ -48987,7 +49021,7 @@ async function applyImport(context, path, recordSets) {
|
|
|
48987
49021
|
/** The company and the one domain uuid a DNS subcommand needs, or a usage refusal. */
|
|
48988
49022
|
async function domainPath$1(context, rest) {
|
|
48989
49023
|
const [domainUuid, ...extra] = rest;
|
|
48990
|
-
if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49024
|
+
if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$36);
|
|
48991
49025
|
return {
|
|
48992
49026
|
company: await requireCompany(context.flags),
|
|
48993
49027
|
domainUuid
|
|
@@ -49156,7 +49190,7 @@ function checkText(check) {
|
|
|
49156
49190
|
//#endregion
|
|
49157
49191
|
//#region src/commands/email-alias.ts
|
|
49158
49192
|
/** The one usage string this group refuses with, owned by the group it belongs to. */
|
|
49159
|
-
var USAGE$
|
|
49193
|
+
var USAGE$35 = [
|
|
49160
49194
|
"Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
|
|
49161
49195
|
" hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
|
|
49162
49196
|
" hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
|
|
@@ -49180,16 +49214,16 @@ async function aliasGroup(context, action, tail) {
|
|
|
49180
49214
|
if (action === "set") return await aliasSet(context, tail);
|
|
49181
49215
|
if (action === "remove") return await aliasRemove(context, tail);
|
|
49182
49216
|
if (action === "unroute") return await aliasUnroute(context, tail);
|
|
49183
|
-
throw new UsageError(USAGE$
|
|
49217
|
+
throw new UsageError(USAGE$35);
|
|
49184
49218
|
}
|
|
49185
49219
|
/** `alias add <domain> --local … --destinations …`: a new forwarding address. */
|
|
49186
49220
|
async function aliasAdd(context, tail) {
|
|
49187
49221
|
const [emailDomainUuid, ...extra] = tail;
|
|
49188
|
-
if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49222
|
+
if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
|
|
49189
49223
|
const company = await requireCompany(context.flags);
|
|
49190
49224
|
const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
|
|
49191
49225
|
const list = destinations$1(context);
|
|
49192
|
-
if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$
|
|
49226
|
+
if (localPart === "" || list.length === 0) throw new UsageError(`alias add needs --local and --destinations.\n\n${USAGE$35}`);
|
|
49193
49227
|
return await confirmableWrite(context, [`Create ${localPart}@… forwarding to:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
|
|
49194
49228
|
return (await emailAliasesStore({
|
|
49195
49229
|
path: {
|
|
@@ -49206,10 +49240,10 @@ async function aliasAdd(context, tail) {
|
|
|
49206
49240
|
/** `alias set <domain> <alias> --destinations …`: replace the complete recipient list. */
|
|
49207
49241
|
async function aliasSet(context, tail) {
|
|
49208
49242
|
const [emailDomainUuid, aliasUuid, ...extra] = tail;
|
|
49209
|
-
if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49243
|
+
if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
|
|
49210
49244
|
const company = await requireCompany(context.flags);
|
|
49211
49245
|
const list = destinations$1(context);
|
|
49212
|
-
if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$
|
|
49246
|
+
if (list.length === 0) throw new UsageError(`alias set needs --destinations.\n\n${USAGE$35}`);
|
|
49213
49247
|
return await confirmableWrite(context, [`Replace ${aliasUuid}'s destinations with:`, ...list.map((one) => ` ${one}`)].join("\n"), async () => {
|
|
49214
49248
|
return (await emailAliasesUpdate({
|
|
49215
49249
|
path: {
|
|
@@ -49224,7 +49258,7 @@ async function aliasSet(context, tail) {
|
|
|
49224
49258
|
/** `alias remove <domain> <alias>`. */
|
|
49225
49259
|
async function aliasRemove(context, tail) {
|
|
49226
49260
|
const [emailDomainUuid, aliasUuid, ...extra] = tail;
|
|
49227
|
-
if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49261
|
+
if (emailDomainUuid === void 0 || aliasUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
|
|
49228
49262
|
const company = await requireCompany(context.flags);
|
|
49229
49263
|
return await confirmableWrite(context, `Remove alias ${aliasUuid}.`, async () => {
|
|
49230
49264
|
return (await emailAliasesDestroy({ path: {
|
|
@@ -49237,7 +49271,7 @@ async function aliasRemove(context, tail) {
|
|
|
49237
49271
|
/** `alias unroute <domain> <alias> <mailbox>`: drop one destination. */
|
|
49238
49272
|
async function aliasUnroute(context, tail) {
|
|
49239
49273
|
const [emailDomainUuid, aliasUuid, mailboxUuid, ...extra] = tail;
|
|
49240
|
-
if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49274
|
+
if (emailDomainUuid === void 0 || aliasUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$35);
|
|
49241
49275
|
const company = await requireCompany(context.flags);
|
|
49242
49276
|
return await confirmableWrite(context, `Stop forwarding ${aliasUuid} to mailbox ${mailboxUuid}.`, async () => {
|
|
49243
49277
|
return (await emailAliasesDestinationsDestroy({ path: {
|
|
@@ -49250,7 +49284,7 @@ async function aliasUnroute(context, tail) {
|
|
|
49250
49284
|
}
|
|
49251
49285
|
//#endregion
|
|
49252
49286
|
//#region src/commands/email-address.ts
|
|
49253
|
-
var USAGE$
|
|
49287
|
+
var USAGE$34 = [
|
|
49254
49288
|
"Usage: hostingctl email alias add <email-domain-uuid> --company <slug> --local <name> --destinations a@x,b@y",
|
|
49255
49289
|
" hostingctl email alias set <email-domain-uuid> <alias-uuid> --company <slug> --destinations a@x,b@y",
|
|
49256
49290
|
" hostingctl email alias remove <email-domain-uuid> <alias-uuid> --company <slug>",
|
|
@@ -49276,13 +49310,13 @@ async function emailAddresses(context, subcommand, rest) {
|
|
|
49276
49310
|
if (subcommand === "alias") return await aliasGroup(context, action, tail);
|
|
49277
49311
|
if (subcommand === "app-token") return await appToken(context, action, tail);
|
|
49278
49312
|
if (subcommand === "send-as") return await sendAs(context, action, tail);
|
|
49279
|
-
throw new UsageError(USAGE$
|
|
49313
|
+
throw new UsageError(USAGE$34);
|
|
49280
49314
|
}
|
|
49281
49315
|
/** `app-token list|issue|revoke|deliver`. */
|
|
49282
49316
|
async function appToken(context, action, tail) {
|
|
49283
49317
|
const company = await requireCompany(context.flags);
|
|
49284
49318
|
const [emailDomainUuid, mailboxUuid, third, ...extra] = tail;
|
|
49285
|
-
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49319
|
+
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
|
|
49286
49320
|
const path = {
|
|
49287
49321
|
company,
|
|
49288
49322
|
emailDomainUuid,
|
|
@@ -49310,7 +49344,7 @@ async function appToken(context, action, tail) {
|
|
|
49310
49344
|
}
|
|
49311
49345
|
if (action === "issue" && third === void 0) {
|
|
49312
49346
|
const label = context.flags.get("--label")?.trim() ?? "";
|
|
49313
|
-
if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$
|
|
49347
|
+
if (label === "") throw new UsageError(`app-token issue needs --label.\n\n${USAGE$34}`);
|
|
49314
49348
|
return await confirmableWrite(context, `Create an application password labelled "${label}".`, async () => {
|
|
49315
49349
|
return (await emailAppTokensStore({
|
|
49316
49350
|
path,
|
|
@@ -49318,7 +49352,7 @@ async function appToken(context, action, tail) {
|
|
|
49318
49352
|
})).data;
|
|
49319
49353
|
});
|
|
49320
49354
|
}
|
|
49321
|
-
if (third === void 0) throw new UsageError(USAGE$
|
|
49355
|
+
if (third === void 0) throw new UsageError(USAGE$34);
|
|
49322
49356
|
const tokenPath = {
|
|
49323
49357
|
...path,
|
|
49324
49358
|
tokenUuid: third
|
|
@@ -49327,14 +49361,14 @@ async function appToken(context, action, tail) {
|
|
|
49327
49361
|
return (await emailAppTokensRevoke({ path: tokenPath })).data;
|
|
49328
49362
|
});
|
|
49329
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);
|
|
49330
|
-
throw new UsageError(USAGE$
|
|
49364
|
+
throw new UsageError(USAGE$34);
|
|
49331
49365
|
}
|
|
49332
49366
|
/** `send-as list|grant|revoke`. */
|
|
49333
49367
|
async function sendAs(context, action, tail) {
|
|
49334
49368
|
const company = await requireCompany(context.flags);
|
|
49335
49369
|
if (action === "revoke") {
|
|
49336
49370
|
const [grantUuid, ...extra] = tail;
|
|
49337
|
-
if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49371
|
+
if (grantUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
|
|
49338
49372
|
return await confirmableWrite(context, `Revoke send-as grant ${grantUuid}.`, async () => {
|
|
49339
49373
|
return (await emailSendAsGrantsDestroy({ path: {
|
|
49340
49374
|
company,
|
|
@@ -49343,7 +49377,7 @@ async function sendAs(context, action, tail) {
|
|
|
49343
49377
|
});
|
|
49344
49378
|
}
|
|
49345
49379
|
const [emailDomainUuid, mailboxUuid, ...extra] = tail;
|
|
49346
|
-
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49380
|
+
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$34);
|
|
49347
49381
|
const path = {
|
|
49348
49382
|
company,
|
|
49349
49383
|
emailDomainUuid,
|
|
@@ -49370,7 +49404,7 @@ async function sendAs(context, action, tail) {
|
|
|
49370
49404
|
}
|
|
49371
49405
|
if (action === "grant") {
|
|
49372
49406
|
const grantedAddressUuid = context.flags.get("--address") ?? "";
|
|
49373
|
-
if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$
|
|
49407
|
+
if (grantedAddressUuid === "") throw new UsageError(`send-as grant needs --address.\n\n${USAGE$34}`);
|
|
49374
49408
|
return await confirmableWrite(context, `Allow this mailbox to send as address ${grantedAddressUuid}.`, async () => {
|
|
49375
49409
|
return (await emailSendAsGrantsStore({
|
|
49376
49410
|
path,
|
|
@@ -49378,7 +49412,7 @@ async function sendAs(context, action, tail) {
|
|
|
49378
49412
|
})).data;
|
|
49379
49413
|
});
|
|
49380
49414
|
}
|
|
49381
|
-
throw new UsageError(USAGE$
|
|
49415
|
+
throw new UsageError(USAGE$34);
|
|
49382
49416
|
}
|
|
49383
49417
|
//#endregion
|
|
49384
49418
|
//#region src/commands/email-write-text.ts
|
|
@@ -49447,7 +49481,7 @@ function emailAddressText(report) {
|
|
|
49447
49481
|
}
|
|
49448
49482
|
//#endregion
|
|
49449
49483
|
//#region src/commands/email-domain.ts
|
|
49450
|
-
var USAGE$
|
|
49484
|
+
var USAGE$33 = [
|
|
49451
49485
|
"Usage: hostingctl email offer",
|
|
49452
49486
|
" hostingctl email enroll --company <slug>",
|
|
49453
49487
|
" hostingctl email agree --company <slug> --term <package-term-uuid>",
|
|
@@ -49468,7 +49502,7 @@ var USAGE$32 = [
|
|
|
49468
49502
|
/** `email offer|agree|provision|domain|catch-all`, dispatched from the `email` command. */
|
|
49469
49503
|
async function emailDomains(context, subcommand, rest) {
|
|
49470
49504
|
if (subcommand === "offer") {
|
|
49471
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
49505
|
+
if (rest.length > 0) throw new UsageError(USAGE$33);
|
|
49472
49506
|
return {
|
|
49473
49507
|
kind: "offers",
|
|
49474
49508
|
offers: (await emailOffers({ path: { company: await requireCompany(context.flags) } })).data
|
|
@@ -49479,11 +49513,11 @@ async function emailDomains(context, subcommand, rest) {
|
|
|
49479
49513
|
if (subcommand === "provision") return await provision(context, rest);
|
|
49480
49514
|
if (subcommand === "domain") return await domain(context, rest);
|
|
49481
49515
|
if (subcommand === "catch-all") return await catchAll(context, rest);
|
|
49482
|
-
throw new UsageError(USAGE$
|
|
49516
|
+
throw new UsageError(USAGE$33);
|
|
49483
49517
|
}
|
|
49484
49518
|
/** A company-wide command takes no positionals. */
|
|
49485
49519
|
function noExtra$14(rest) {
|
|
49486
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
49520
|
+
if (rest.length > 0) throw new UsageError(USAGE$33);
|
|
49487
49521
|
}
|
|
49488
49522
|
/** `enroll`: create the service record and start provisioning, which is the API's own create. */
|
|
49489
49523
|
async function enroll(context, rest) {
|
|
@@ -49496,7 +49530,7 @@ async function agree(context, rest) {
|
|
|
49496
49530
|
noExtra$14(rest);
|
|
49497
49531
|
const company = await requireCompany(context.flags);
|
|
49498
49532
|
const packageTermUuid = context.flags.get("--term") ?? "";
|
|
49499
|
-
if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$
|
|
49533
|
+
if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$33}`);
|
|
49500
49534
|
return await confirmableWrite(context, `Accept email package term ${packageTermUuid} for ${company}.`, async () => (await emailAgreement({
|
|
49501
49535
|
path: { company },
|
|
49502
49536
|
body: { packageTermUuid }
|
|
@@ -49515,7 +49549,7 @@ async function domain(context, rest) {
|
|
|
49515
49549
|
if (action === "add") {
|
|
49516
49550
|
noExtra$14(tail);
|
|
49517
49551
|
const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
|
|
49518
|
-
if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$
|
|
49552
|
+
if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$33}`);
|
|
49519
49553
|
return await confirmableWrite(context, `Attach ${hostname} to ${company}'s mail service.`, async () => {
|
|
49520
49554
|
return (await emailDomainsStore({
|
|
49521
49555
|
path: { company },
|
|
@@ -49525,7 +49559,7 @@ async function domain(context, rest) {
|
|
|
49525
49559
|
}
|
|
49526
49560
|
const path = {
|
|
49527
49561
|
company,
|
|
49528
|
-
emailDomainUuid: oneUuid$7(tail, USAGE$
|
|
49562
|
+
emailDomainUuid: oneUuid$7(tail, USAGE$33)
|
|
49529
49563
|
};
|
|
49530
49564
|
if (action === "recheck") return await confirmableWrite(context, "Re-observe this name's DNS now.", async () => {
|
|
49531
49565
|
return (await emailDomainsRecheck({ path })).data;
|
|
@@ -49545,14 +49579,14 @@ async function domain(context, rest) {
|
|
|
49545
49579
|
body
|
|
49546
49580
|
})).data;
|
|
49547
49581
|
});
|
|
49548
|
-
throw new UsageError(USAGE$
|
|
49582
|
+
throw new UsageError(USAGE$33);
|
|
49549
49583
|
}
|
|
49550
49584
|
/** `catch-all show|set|clear`. */
|
|
49551
49585
|
async function catchAll(context, rest) {
|
|
49552
49586
|
const [action, ...tail] = rest;
|
|
49553
49587
|
const path = {
|
|
49554
49588
|
company: await requireCompany(context.flags),
|
|
49555
|
-
emailDomainUuid: oneUuid$7(tail, USAGE$
|
|
49589
|
+
emailDomainUuid: oneUuid$7(tail, USAGE$33)
|
|
49556
49590
|
};
|
|
49557
49591
|
if (action === "show") return {
|
|
49558
49592
|
kind: "catch-all",
|
|
@@ -49560,7 +49594,7 @@ async function catchAll(context, rest) {
|
|
|
49560
49594
|
};
|
|
49561
49595
|
if (action === "set") {
|
|
49562
49596
|
const destinations = destinationList(context);
|
|
49563
|
-
if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$
|
|
49597
|
+
if (destinations.length === 0) throw new UsageError(`catch-all set needs --destinations a@x,b@y.\n\n${USAGE$33}`);
|
|
49564
49598
|
return await confirmableWrite(context, [`Enable the catch-all for this name, forwarding to:`, ...destinations.map((one) => ` ${one}`)].join("\n"), async () => {
|
|
49565
49599
|
return (await emailCatchAllUpdate({
|
|
49566
49600
|
path,
|
|
@@ -49572,7 +49606,7 @@ async function catchAll(context, rest) {
|
|
|
49572
49606
|
});
|
|
49573
49607
|
}
|
|
49574
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);
|
|
49575
|
-
throw new UsageError(USAGE$
|
|
49609
|
+
throw new UsageError(USAGE$33);
|
|
49576
49610
|
}
|
|
49577
49611
|
/**
|
|
49578
49612
|
* The comma-separated `--destinations`.
|
|
@@ -49604,7 +49638,7 @@ function catchAllText(one) {
|
|
|
49604
49638
|
}
|
|
49605
49639
|
//#endregion
|
|
49606
49640
|
//#region src/commands/email-holds.ts
|
|
49607
|
-
var USAGE$
|
|
49641
|
+
var USAGE$32 = [
|
|
49608
49642
|
"Usage: hostingctl email hold list --company <slug>",
|
|
49609
49643
|
" hostingctl email hold create --company <slug> --reason <compromise|abuse|operator> [--mailbox <uuid>]",
|
|
49610
49644
|
" hostingctl email hold release <hold-uuid> --company <slug>",
|
|
@@ -49627,21 +49661,21 @@ async function emailHolds(context, rest) {
|
|
|
49627
49661
|
const [action, ...tail] = rest;
|
|
49628
49662
|
const company = await requireCompany(context.flags);
|
|
49629
49663
|
if (action === "list") {
|
|
49630
|
-
if (tail.length > 0) throw new UsageError(USAGE$
|
|
49664
|
+
if (tail.length > 0) throw new UsageError(USAGE$32);
|
|
49631
49665
|
return {
|
|
49632
49666
|
kind: "holds",
|
|
49633
49667
|
holds: (await emailHoldsIndex({ path: { company } })).data.holds
|
|
49634
49668
|
};
|
|
49635
49669
|
}
|
|
49636
49670
|
if (action === "create") return await create$3(context, tail, company);
|
|
49637
|
-
if (action === "release") return await release(context, oneUuid$7(tail, USAGE$
|
|
49638
|
-
throw new UsageError(USAGE$
|
|
49671
|
+
if (action === "release") return await release(context, oneUuid$7(tail, USAGE$32), company);
|
|
49672
|
+
throw new UsageError(USAGE$32);
|
|
49639
49673
|
}
|
|
49640
49674
|
/** `create --reason … [--mailbox …]`. */
|
|
49641
49675
|
async function create$3(context, tail, company) {
|
|
49642
|
-
if (tail.length > 0) throw new UsageError(USAGE$
|
|
49676
|
+
if (tail.length > 0) throw new UsageError(USAGE$32);
|
|
49643
49677
|
const raw = context.flags.get("--reason")?.trim() ?? "";
|
|
49644
|
-
if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$
|
|
49678
|
+
if (!REASONS.has(raw)) throw new UsageError(`--reason must be compromise, abuse or operator (got "${raw}").\n\n${USAGE$32}`);
|
|
49645
49679
|
const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
|
|
49646
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 () => {
|
|
49647
49681
|
return (await emailHoldsStore({
|
|
@@ -49677,7 +49711,7 @@ function emailHoldText(report) {
|
|
|
49677
49711
|
}
|
|
49678
49712
|
//#endregion
|
|
49679
49713
|
//#region src/commands/email-mailbox-admin.ts
|
|
49680
|
-
var USAGE$
|
|
49714
|
+
var USAGE$31 = [
|
|
49681
49715
|
"Usage: hostingctl email mailbox add <email-domain-uuid> --company <slug> --local <name> --quota <gb-5|gb-10|gb-20>",
|
|
49682
49716
|
" hostingctl email mailbox change <email-domain-uuid> <mailbox-uuid> --company <slug> [--status enabled|suspended] [--quota <size>]",
|
|
49683
49717
|
" hostingctl email mailbox remove <email-domain-uuid> <mailbox-uuid> --company <slug>",
|
|
@@ -49709,7 +49743,7 @@ var STATUSES = /* @__PURE__ */ new Set(["enabled", "suspended"]);
|
|
|
49709
49743
|
async function emailMailboxAdmin(context, action, tail) {
|
|
49710
49744
|
if (action === "add") return await add$8(context, tail);
|
|
49711
49745
|
const [emailDomainUuid, mailboxUuid, ...extra] = tail;
|
|
49712
|
-
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49746
|
+
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$31);
|
|
49713
49747
|
const path = {
|
|
49714
49748
|
company: await requireCompany(context.flags),
|
|
49715
49749
|
emailDomainUuid,
|
|
@@ -49727,7 +49761,7 @@ async function emailMailboxAdmin(context, action, tail) {
|
|
|
49727
49761
|
if (action === "preferences-set") return await preferences(context, path);
|
|
49728
49762
|
if (action === "credential") return await revealCredential(context, path, false);
|
|
49729
49763
|
if (action === "reset-credential") return await revealCredential(context, path, true);
|
|
49730
|
-
throw new UsageError(USAGE$
|
|
49764
|
+
throw new UsageError(USAGE$31);
|
|
49731
49765
|
}
|
|
49732
49766
|
/** A quota flag from the API's own values. */
|
|
49733
49767
|
function quota(context) {
|
|
@@ -49743,11 +49777,11 @@ function destinations(context) {
|
|
|
49743
49777
|
/** `add <domain> --local … --quota …`. */
|
|
49744
49778
|
async function add$8(context, tail) {
|
|
49745
49779
|
const [emailDomainUuid, ...extra] = tail;
|
|
49746
|
-
if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
49780
|
+
if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$31);
|
|
49747
49781
|
const company = await requireCompany(context.flags);
|
|
49748
49782
|
const localPart = context.flags.get("--local")?.trim().toLowerCase() ?? "";
|
|
49749
49783
|
const size = quota(context);
|
|
49750
|
-
if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$
|
|
49784
|
+
if (localPart === "" || size === null) throw new UsageError(`mailbox add needs --local and --quota.\n\n${USAGE$31}`);
|
|
49751
49785
|
return await confirmableWrite(context, `Create mailbox ${localPart}@… with a ${size} quota.`, async () => {
|
|
49752
49786
|
return (await emailMailboxesStore({
|
|
49753
49787
|
path: {
|
|
@@ -49772,7 +49806,7 @@ function statusFlag(context) {
|
|
|
49772
49806
|
async function change$1(context, path) {
|
|
49773
49807
|
const status = statusFlag(context);
|
|
49774
49808
|
const size = quota(context);
|
|
49775
|
-
if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$
|
|
49809
|
+
if (status === null && size === null) throw new UsageError(`mailbox change needs --status, --quota or both.\n\n${USAGE$31}`);
|
|
49776
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 () => {
|
|
49777
49811
|
return (await emailMailboxesUpdate({
|
|
49778
49812
|
path,
|
|
@@ -49800,7 +49834,7 @@ async function preferences(context, path) {
|
|
|
49800
49834
|
const markRead = onOff$4(context, "--spam-mark-read");
|
|
49801
49835
|
const threshold = context.flags.get("--spam-threshold");
|
|
49802
49836
|
const summary = context.flags.get("--vacation-subject");
|
|
49803
|
-
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$
|
|
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}`);
|
|
49804
49838
|
const body = {
|
|
49805
49839
|
vacationEnabled: vacation ?? current.vacationEnabled,
|
|
49806
49840
|
vacationSubject: context.flags.get("--vacation-subject") ?? current.vacationSubject,
|
|
@@ -49855,7 +49889,7 @@ function emailMailboxAdminText(report) {
|
|
|
49855
49889
|
}
|
|
49856
49890
|
//#endregion
|
|
49857
49891
|
//#region src/commands/email-service.ts
|
|
49858
|
-
var USAGE$
|
|
49892
|
+
var USAGE$30 = [
|
|
49859
49893
|
"Usage: hostingctl email service <suspend|resume> --company <slug>",
|
|
49860
49894
|
" hostingctl email service cancellation --company <slug>",
|
|
49861
49895
|
" hostingctl email service cancel --company <slug> --ends-at <iso-date>",
|
|
@@ -49882,11 +49916,11 @@ async function emailService(context, subcommand, rest) {
|
|
|
49882
49916
|
if (subcommand === "dmarc-set") return await dmarcSet$1(context, rest);
|
|
49883
49917
|
if (subcommand === "blocklist-set") return await blocklistSet(context, rest);
|
|
49884
49918
|
if (subcommand === "service") return await service(context, rest);
|
|
49885
|
-
throw new UsageError(USAGE$
|
|
49919
|
+
throw new UsageError(USAGE$30);
|
|
49886
49920
|
}
|
|
49887
49921
|
/** A company-wide command takes no positionals. */
|
|
49888
49922
|
function noExtra$13(rest) {
|
|
49889
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
49923
|
+
if (rest.length > 0) throw new UsageError(USAGE$30);
|
|
49890
49924
|
}
|
|
49891
49925
|
/** `service suspend|resume|cancellation|cancel|cancel-withdraw`. */
|
|
49892
49926
|
async function service(context, rest) {
|
|
@@ -49912,7 +49946,7 @@ async function service(context, rest) {
|
|
|
49912
49946
|
if (action === "cancel") {
|
|
49913
49947
|
noExtra$13(tail);
|
|
49914
49948
|
const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
|
|
49915
|
-
if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$
|
|
49949
|
+
if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$30}`);
|
|
49916
49950
|
if (Number.isNaN(Date.parse(endsAt))) throw new UsageError(`--ends-at must be an ISO date (got "${endsAt}").`);
|
|
49917
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({
|
|
49918
49952
|
path: { company },
|
|
@@ -49925,7 +49959,7 @@ async function service(context, rest) {
|
|
|
49925
49959
|
return (await emailCancellationWithdraw({ path: { company } })).data;
|
|
49926
49960
|
});
|
|
49927
49961
|
}
|
|
49928
|
-
throw new UsageError(USAGE$
|
|
49962
|
+
throw new UsageError(USAGE$30);
|
|
49929
49963
|
}
|
|
49930
49964
|
/** `dmarc`: DMARC reporting for every attached name. */
|
|
49931
49965
|
async function dmarc$1(context, rest) {
|
|
@@ -49945,7 +49979,7 @@ async function blocklist$1(context, rest) {
|
|
|
49945
49979
|
}
|
|
49946
49980
|
/** `dmarc-set <name> --enabled on|off`. */
|
|
49947
49981
|
async function dmarcSet$1(context, rest) {
|
|
49948
|
-
const emailDomainUuid = oneUuid$7(rest, USAGE$
|
|
49982
|
+
const emailDomainUuid = oneUuid$7(rest, USAGE$30);
|
|
49949
49983
|
const company = await requireCompany(context.flags);
|
|
49950
49984
|
const enabled = onOff$3(context);
|
|
49951
49985
|
return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} DMARC reporting for this name.`, async () => {
|
|
@@ -49960,7 +49994,7 @@ async function dmarcSet$1(context, rest) {
|
|
|
49960
49994
|
}
|
|
49961
49995
|
/** `blocklist-set <name> --enabled on|off`. */
|
|
49962
49996
|
async function blocklistSet(context, rest) {
|
|
49963
|
-
const emailDomainUuid = oneUuid$7(rest, USAGE$
|
|
49997
|
+
const emailDomainUuid = oneUuid$7(rest, USAGE$30);
|
|
49964
49998
|
const company = await requireCompany(context.flags);
|
|
49965
49999
|
const enabled = onOff$3(context);
|
|
49966
50000
|
return await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} blocklist monitoring for this name.`, async () => {
|
|
@@ -49977,7 +50011,7 @@ async function blocklistSet(context, rest) {
|
|
|
49977
50011
|
async function importSchema(context, rest) {
|
|
49978
50012
|
noExtra$13(rest);
|
|
49979
50013
|
const version = context.flags.get("--version")?.trim() ?? "";
|
|
49980
|
-
if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$
|
|
50014
|
+
if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$30}`);
|
|
49981
50015
|
return {
|
|
49982
50016
|
kind: "schema",
|
|
49983
50017
|
version,
|
|
@@ -49989,7 +50023,7 @@ function onOff$3(context) {
|
|
|
49989
50023
|
const raw = context.flags.get("--enabled")?.trim() ?? "";
|
|
49990
50024
|
if (raw === "on" || raw === "true") return true;
|
|
49991
50025
|
if (raw === "off" || raw === "false") return false;
|
|
49992
|
-
throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$
|
|
50026
|
+
throw new UsageError(`--enabled must be on or off (got "${raw}").\n\n${USAGE$30}`);
|
|
49993
50027
|
}
|
|
49994
50028
|
/** The `email service|dmarc|blocklist|import-schema` renderer. */
|
|
49995
50029
|
function emailServiceText(report) {
|
|
@@ -50002,7 +50036,7 @@ function emailServiceText(report) {
|
|
|
50002
50036
|
//#endregion
|
|
50003
50037
|
//#region src/commands/email-sync-csv.ts
|
|
50004
50038
|
/** The usage this group refuses with, owned by the command it belongs to. */
|
|
50005
|
-
var USAGE$
|
|
50039
|
+
var USAGE$29 = [
|
|
50006
50040
|
"Usage: hostingctl email sync csv <preview|commit> <email-domain-uuid> --company <slug> --file <path>",
|
|
50007
50041
|
"",
|
|
50008
50042
|
" preview What the file's rows would become. Writes nothing.",
|
|
@@ -50013,7 +50047,7 @@ var USAGE$28 = [
|
|
|
50013
50047
|
/** One named uuid, or a usage refusal. */
|
|
50014
50048
|
function one$2(rest) {
|
|
50015
50049
|
const [uuid, ...extra] = rest;
|
|
50016
|
-
if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$
|
|
50050
|
+
if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$29);
|
|
50017
50051
|
return uuid;
|
|
50018
50052
|
}
|
|
50019
50053
|
/** `csv preview|commit <domain> --file <path>`: one multipart upload of the CSV itself. */
|
|
@@ -50021,7 +50055,7 @@ async function csv(context, tail) {
|
|
|
50021
50055
|
const [action, ...args] = tail;
|
|
50022
50056
|
const path = await domainPath(context, one$2(args));
|
|
50023
50057
|
const file = context.flags.get("--file") ?? "";
|
|
50024
|
-
if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$
|
|
50058
|
+
if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$29}`);
|
|
50025
50059
|
if (action === "preview") return {
|
|
50026
50060
|
kind: "csv-preview",
|
|
50027
50061
|
rows: (await emailMailboxSyncCsvPreview({
|
|
@@ -50029,10 +50063,10 @@ async function csv(context, tail) {
|
|
|
50029
50063
|
body: await csvPreviewBody(file)
|
|
50030
50064
|
})).data.rows
|
|
50031
50065
|
};
|
|
50032
|
-
if (action !== "commit") throw new UsageError(USAGE$
|
|
50066
|
+
if (action !== "commit") throw new UsageError(USAGE$29);
|
|
50033
50067
|
const recurrence = recurrenceFlag(context) ?? "once";
|
|
50034
50068
|
const endsAt = context.flags.get("--ends-at")?.trim() || null;
|
|
50035
|
-
if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$
|
|
50069
|
+
if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$29}`);
|
|
50036
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 () => {
|
|
50037
50071
|
const accepted = (await emailMailboxSyncCsvPreview({
|
|
50038
50072
|
path,
|
|
@@ -50081,7 +50115,7 @@ async function csvCommitBody(file, accepted, recurrence, endsAt) {
|
|
|
50081
50115
|
}
|
|
50082
50116
|
//#endregion
|
|
50083
50117
|
//#region src/commands/email-sync.ts
|
|
50084
|
-
var USAGE$
|
|
50118
|
+
var USAGE$28 = [
|
|
50085
50119
|
"Usage: hostingctl email sync show <email-domain-uuid> --company <slug>",
|
|
50086
50120
|
" hostingctl email sync server <email-domain-uuid> --company <slug> --host <host> --port <n> --encryption <tls|starttls>",
|
|
50087
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>]",
|
|
@@ -50106,12 +50140,12 @@ async function emailSync(context, rest) {
|
|
|
50106
50140
|
if (action === "server") return await server(context, tail);
|
|
50107
50141
|
if (action === "account") return await account(context, tail);
|
|
50108
50142
|
if (action === "csv") return await csv(context, tail);
|
|
50109
|
-
throw new UsageError(USAGE$
|
|
50143
|
+
throw new UsageError(USAGE$28);
|
|
50110
50144
|
}
|
|
50111
50145
|
/** One named uuid, or a usage refusal. */
|
|
50112
50146
|
function one$1(rest) {
|
|
50113
50147
|
const [uuid, ...extra] = rest;
|
|
50114
|
-
if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$
|
|
50148
|
+
if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$28);
|
|
50115
50149
|
return uuid;
|
|
50116
50150
|
}
|
|
50117
50151
|
/** `show`: the server and every account. */
|
|
@@ -50127,9 +50161,9 @@ async function server(context, tail) {
|
|
|
50127
50161
|
const host = context.flags.get("--host")?.trim() ?? "";
|
|
50128
50162
|
const port = Number(context.flags.get("--port") ?? "");
|
|
50129
50163
|
const encryption = context.flags.get("--encryption")?.trim() ?? "";
|
|
50130
|
-
if (host === "") throw new UsageError(`sync server needs --host.\n\n${USAGE$
|
|
50131
|
-
if (!Number.isInteger(port) || port < 1 || port > 65535) throw new UsageError(`--port must be a whole number between 1 and 65535.\n\n${USAGE$
|
|
50132
|
-
if (!ENCRYPTIONS.has(encryption)) throw new UsageError(`--encryption must be tls or starttls (got "${encryption}").\n\n${USAGE$
|
|
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}`);
|
|
50133
50167
|
return await confirmableWrite(context, `Point the mailbox sync source at ${host}:${String(port)} over ${encryption}.`, async () => {
|
|
50134
50168
|
return (await emailMailboxSyncServerUpdate({
|
|
50135
50169
|
path,
|
|
@@ -50153,9 +50187,9 @@ async function account(context, tail) {
|
|
|
50153
50187
|
const [action, ...args] = tail;
|
|
50154
50188
|
if (action === "add") return await accountAdd(context, args);
|
|
50155
50189
|
if (action === "change") return await accountChange(context, args);
|
|
50156
|
-
if (action === void 0) throw new UsageError(USAGE$
|
|
50190
|
+
if (action === void 0) throw new UsageError(USAGE$28);
|
|
50157
50191
|
const [emailDomainUuid, accountUuid, ...extra] = args;
|
|
50158
|
-
if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
50192
|
+
if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
|
|
50159
50193
|
return await accountAction(context, action, {
|
|
50160
50194
|
...await domainPath(context, emailDomainUuid),
|
|
50161
50195
|
accountUuid
|
|
@@ -50174,13 +50208,13 @@ async function accountAction(context, action, path) {
|
|
|
50174
50208
|
if (action === "start") return await startAccount(context, path);
|
|
50175
50209
|
if (action === "stop") return await confirmableWrite(context, "Stop this account's scheduled sync. The source credential is kept.", async () => (await emailMailboxSyncAccountsStop({ path })).data);
|
|
50176
50210
|
if (action === "forget") return await confirmableWrite(context, "Forget this account's source credential and stop future work.", async () => (await emailMailboxSyncAccountsForget({ path })).data);
|
|
50177
|
-
throw new UsageError(USAGE$
|
|
50211
|
+
throw new UsageError(USAGE$28);
|
|
50178
50212
|
}
|
|
50179
50213
|
/** `start`: the schedule the account should run on from now. */
|
|
50180
50214
|
async function startAccount(context, path) {
|
|
50181
50215
|
const recurrence = recurrenceFlag(context) ?? "once";
|
|
50182
50216
|
const endsAt = context.flags.get("--ends-at")?.trim() || null;
|
|
50183
|
-
if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$
|
|
50217
|
+
if (recurrence === "until" && endsAt === null) throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$28}`);
|
|
50184
50218
|
return await confirmableWrite(context, `Start this account's scheduled sync (${recurrence}${endsAt === null ? "" : ` until ${endsAt}`}).`, async () => (await emailMailboxSyncAccountsStart({
|
|
50185
50219
|
path,
|
|
50186
50220
|
body: {
|
|
@@ -50193,7 +50227,7 @@ async function startAccount(context, path) {
|
|
|
50193
50227
|
async function accountAdd(context, args) {
|
|
50194
50228
|
const path = await domainPath(context, one$1(args));
|
|
50195
50229
|
const body = accountBody(context);
|
|
50196
|
-
const sourcePassword = readSecret(context, "password", 4096, USAGE$
|
|
50230
|
+
const sourcePassword = readSecret(context, "password", 4096, USAGE$28);
|
|
50197
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({
|
|
50198
50232
|
path,
|
|
50199
50233
|
body: {
|
|
@@ -50205,7 +50239,7 @@ async function accountAdd(context, args) {
|
|
|
50205
50239
|
/** `account change <domain> <account> [fields]`: only the fields named are sent. */
|
|
50206
50240
|
async function accountChange(context, args) {
|
|
50207
50241
|
const [emailDomainUuid, accountUuid, ...extra] = args;
|
|
50208
|
-
if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
50242
|
+
if (emailDomainUuid === void 0 || accountUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$28);
|
|
50209
50243
|
const path = {
|
|
50210
50244
|
...await domainPath(context, emailDomainUuid),
|
|
50211
50245
|
accountUuid
|
|
@@ -50219,8 +50253,8 @@ async function accountChange(context, args) {
|
|
|
50219
50253
|
if (mailbox !== "") body.mailboxUuid = mailbox;
|
|
50220
50254
|
if (recurrence !== null) body.recurrence = recurrence;
|
|
50221
50255
|
if (endsAt !== "") body.endsAt = endsAt;
|
|
50222
|
-
if (context.flags.has("--password-file") || context.flags.has("--password-stdin")) body.sourcePassword = readSecret(context, "password", 4096, USAGE$
|
|
50223
|
-
if (Object.keys(body).length === 0) throw new UsageError(`account change needs at least one field.\n\n${USAGE$
|
|
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}`);
|
|
50224
50258
|
return await confirmableWrite(context, "Change this sync account.", async () => {
|
|
50225
50259
|
return (await emailMailboxSyncAccountsUpdate({
|
|
50226
50260
|
path,
|
|
@@ -50234,8 +50268,8 @@ function accountBody(context) {
|
|
|
50234
50268
|
const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
|
|
50235
50269
|
const recurrence = recurrenceFlag(context) ?? "once";
|
|
50236
50270
|
const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
|
|
50237
|
-
if (sourceUsername === "" || mailboxUuid === "") throw new UsageError(`account add needs --username and --mailbox.\n\n${USAGE$
|
|
50238
|
-
if (recurrence === "until" && endsAt === "") throw new UsageError(`--recurrence until needs --ends-at.\n\n${USAGE$
|
|
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}`);
|
|
50239
50273
|
return {
|
|
50240
50274
|
sourceUsername,
|
|
50241
50275
|
mailboxUuid,
|
|
@@ -50252,7 +50286,7 @@ function recurrenceFlag(context) {
|
|
|
50252
50286
|
}
|
|
50253
50287
|
//#endregion
|
|
50254
50288
|
//#region src/commands/email-text.ts
|
|
50255
|
-
var USAGE$
|
|
50289
|
+
var USAGE$27 = [
|
|
50256
50290
|
"Usage: hostingctl email <show|names> --company <slug>",
|
|
50257
50291
|
" hostingctl email <mailboxes|aliases> <email-domain-uuid> --company <slug>",
|
|
50258
50292
|
" hostingctl email mailbox <email-domain-uuid> <mailbox-uuid> --company <slug>",
|
|
@@ -50335,7 +50369,7 @@ function count(shown, total) {
|
|
|
50335
50369
|
var EMAIL_METADATA = {
|
|
50336
50370
|
name: "email",
|
|
50337
50371
|
summary: "A company's email service, its attached names, their mailboxes and aliases.",
|
|
50338
|
-
usage: USAGE$
|
|
50372
|
+
usage: USAGE$27,
|
|
50339
50373
|
flags: [
|
|
50340
50374
|
{
|
|
50341
50375
|
name: "--address",
|
|
@@ -50515,75 +50549,75 @@ var EMAIL_METADATA = {
|
|
|
50515
50549
|
var EMAIL_TOPICS = [
|
|
50516
50550
|
{
|
|
50517
50551
|
path: ["alias"],
|
|
50518
|
-
usage: USAGE$
|
|
50552
|
+
usage: USAGE$35
|
|
50519
50553
|
},
|
|
50520
50554
|
{
|
|
50521
50555
|
path: ["app-token"],
|
|
50522
|
-
usage: USAGE$
|
|
50556
|
+
usage: USAGE$34
|
|
50523
50557
|
},
|
|
50524
50558
|
{
|
|
50525
50559
|
path: ["send-as"],
|
|
50526
|
-
usage: USAGE$
|
|
50560
|
+
usage: USAGE$34
|
|
50527
50561
|
},
|
|
50528
50562
|
{
|
|
50529
50563
|
path: ["offer"],
|
|
50530
|
-
usage: USAGE$
|
|
50564
|
+
usage: USAGE$33
|
|
50531
50565
|
},
|
|
50532
50566
|
{
|
|
50533
50567
|
path: ["enroll"],
|
|
50534
|
-
usage: USAGE$
|
|
50568
|
+
usage: USAGE$33
|
|
50535
50569
|
},
|
|
50536
50570
|
{
|
|
50537
50571
|
path: ["agree"],
|
|
50538
|
-
usage: USAGE$
|
|
50572
|
+
usage: USAGE$33
|
|
50539
50573
|
},
|
|
50540
50574
|
{
|
|
50541
50575
|
path: ["provision"],
|
|
50542
|
-
usage: USAGE$
|
|
50576
|
+
usage: USAGE$33
|
|
50543
50577
|
},
|
|
50544
50578
|
{
|
|
50545
50579
|
path: ["domain"],
|
|
50546
|
-
usage: USAGE$
|
|
50580
|
+
usage: USAGE$33
|
|
50547
50581
|
},
|
|
50548
50582
|
{
|
|
50549
50583
|
path: ["catch-all"],
|
|
50550
|
-
usage: USAGE$
|
|
50584
|
+
usage: USAGE$33
|
|
50551
50585
|
},
|
|
50552
50586
|
{
|
|
50553
50587
|
path: ["service"],
|
|
50554
|
-
usage: USAGE$
|
|
50588
|
+
usage: USAGE$30
|
|
50555
50589
|
},
|
|
50556
50590
|
{
|
|
50557
50591
|
path: ["dmarc"],
|
|
50558
|
-
usage: USAGE$
|
|
50592
|
+
usage: USAGE$30
|
|
50559
50593
|
},
|
|
50560
50594
|
{
|
|
50561
50595
|
path: ["dmarc-set"],
|
|
50562
|
-
usage: USAGE$
|
|
50596
|
+
usage: USAGE$30
|
|
50563
50597
|
},
|
|
50564
50598
|
{
|
|
50565
50599
|
path: ["blocklist"],
|
|
50566
|
-
usage: USAGE$
|
|
50600
|
+
usage: USAGE$30
|
|
50567
50601
|
},
|
|
50568
50602
|
{
|
|
50569
50603
|
path: ["blocklist-set"],
|
|
50570
|
-
usage: USAGE$
|
|
50604
|
+
usage: USAGE$30
|
|
50571
50605
|
},
|
|
50572
50606
|
{
|
|
50573
50607
|
path: ["import-schema"],
|
|
50574
|
-
usage: USAGE$
|
|
50608
|
+
usage: USAGE$30
|
|
50575
50609
|
},
|
|
50576
50610
|
{
|
|
50577
50611
|
path: ["sync"],
|
|
50578
|
-
usage: USAGE$
|
|
50612
|
+
usage: USAGE$28
|
|
50579
50613
|
},
|
|
50580
50614
|
{
|
|
50581
50615
|
path: ["hold"],
|
|
50582
|
-
usage: USAGE$
|
|
50616
|
+
usage: USAGE$32
|
|
50583
50617
|
},
|
|
50584
50618
|
{
|
|
50585
50619
|
path: ["mailbox"],
|
|
50586
|
-
usage: USAGE$
|
|
50620
|
+
usage: USAGE$31
|
|
50587
50621
|
}
|
|
50588
50622
|
];
|
|
50589
50623
|
//#endregion
|
|
@@ -50625,7 +50659,7 @@ async function companyRead(context, subcommand, rest) {
|
|
|
50625
50659
|
if (subcommand === "mailboxes") return await mailboxes(company, rest);
|
|
50626
50660
|
if (subcommand === "mailbox") return await mailbox(company, rest);
|
|
50627
50661
|
if (subcommand === "aliases") return await aliases(company, rest);
|
|
50628
|
-
throw new UsageError(USAGE$
|
|
50662
|
+
throw new UsageError(USAGE$27);
|
|
50629
50663
|
}
|
|
50630
50664
|
/** The renderer for a tagged feature read, or null when this command renders the answer itself. */
|
|
50631
50665
|
function taggedText(report) {
|
|
@@ -50710,7 +50744,7 @@ var email$2 = {
|
|
|
50710
50744
|
...EMAIL_METADATA,
|
|
50711
50745
|
async run(context) {
|
|
50712
50746
|
const [subcommand, ...rest] = context.positional;
|
|
50713
|
-
if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$
|
|
50747
|
+
if (subcommand === void 0 || !SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE$27);
|
|
50714
50748
|
const feature = dispatched$1(context, subcommand, rest);
|
|
50715
50749
|
if (feature !== null) return await feature;
|
|
50716
50750
|
return await companyRead(context, subcommand, rest);
|
|
@@ -50795,7 +50829,7 @@ async function aliases(company, rest) {
|
|
|
50795
50829
|
/** `mailbox <email-domain-uuid> <mailbox-uuid>`: one record, independent of index pagination. */
|
|
50796
50830
|
async function mailbox(company, rest) {
|
|
50797
50831
|
const [emailDomainUuid, mailboxUuid, ...extra] = rest;
|
|
50798
|
-
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
50832
|
+
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
|
|
50799
50833
|
return (await emailMailboxesShow({ path: {
|
|
50800
50834
|
company,
|
|
50801
50835
|
emailDomainUuid,
|
|
@@ -50805,16 +50839,16 @@ async function mailbox(company, rest) {
|
|
|
50805
50839
|
/** The one uuid a collection read names, or a usage refusal. */
|
|
50806
50840
|
function oneUuid$4(rest) {
|
|
50807
50841
|
const [uuid, ...extra] = rest;
|
|
50808
|
-
if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
50842
|
+
if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$27);
|
|
50809
50843
|
return uuid;
|
|
50810
50844
|
}
|
|
50811
50845
|
/** A company-wide read takes no positional arguments. */
|
|
50812
50846
|
function noExtra$12(rest) {
|
|
50813
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
50847
|
+
if (rest.length > 0) throw new UsageError(USAGE$27);
|
|
50814
50848
|
}
|
|
50815
50849
|
//#endregion
|
|
50816
50850
|
//#region src/commands/environment-admin.ts
|
|
50817
|
-
var USAGE$
|
|
50851
|
+
var USAGE$26 = [
|
|
50818
50852
|
"Usage: hostingctl environment retention <environment-uuid> --company <slug>",
|
|
50819
50853
|
" hostingctl environment retention-set <environment-uuid> --company <slug> --extra-days <n> --effective-at <iso> --agreement <uuid> [--package <key>]",
|
|
50820
50854
|
" hostingctl environment database-show <environment-uuid> <database-uuid> --company <slug>",
|
|
@@ -50838,9 +50872,9 @@ async function environmentAdmin(context, subcommand, rest) {
|
|
|
50838
50872
|
if (subcommand === "retention") return await retention(context, first);
|
|
50839
50873
|
if (subcommand === "retention-set") return await retentionSet(context, first);
|
|
50840
50874
|
if (subcommand === "database-show" || subcommand === "database-reveal") {
|
|
50841
|
-
if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$
|
|
50875
|
+
if (first === void 0 || tail.length !== 1) throw new UsageError(USAGE$26);
|
|
50842
50876
|
const path = {
|
|
50843
|
-
...await environmentPath(context, first, USAGE$
|
|
50877
|
+
...await environmentPath(context, first, USAGE$26),
|
|
50844
50878
|
databaseUuid: tail[0] ?? ""
|
|
50845
50879
|
};
|
|
50846
50880
|
if (subcommand === "database-show") return {
|
|
@@ -50850,24 +50884,24 @@ async function environmentAdmin(context, subcommand, rest) {
|
|
|
50850
50884
|
return await revealDatabase(context, path);
|
|
50851
50885
|
}
|
|
50852
50886
|
if (subcommand === "tuning") return await tuning(context, first, tail);
|
|
50853
|
-
throw new UsageError(USAGE$
|
|
50887
|
+
throw new UsageError(USAGE$26);
|
|
50854
50888
|
}
|
|
50855
50889
|
/** `retention <env>`. */
|
|
50856
50890
|
async function retention(context, environmentUuid) {
|
|
50857
50891
|
return {
|
|
50858
50892
|
kind: "retention",
|
|
50859
|
-
retention: (await hostingRetentionShow({ path: await environmentPath(context, environmentUuid, USAGE$
|
|
50893
|
+
retention: (await hostingRetentionShow({ path: await environmentPath(context, environmentUuid, USAGE$26) })).data
|
|
50860
50894
|
};
|
|
50861
50895
|
}
|
|
50862
50896
|
/** `retention-set <env> --extra-days … --effective-at … --agreement …`. */
|
|
50863
50897
|
async function retentionSet(context, environmentUuid) {
|
|
50864
|
-
const path = await environmentPath(context, environmentUuid, USAGE$
|
|
50898
|
+
const path = await environmentPath(context, environmentUuid, USAGE$26);
|
|
50865
50899
|
const extraDays = Number(context.flags.get("--extra-days") ?? "");
|
|
50866
50900
|
const effectiveAt = context.flags.get("--effective-at")?.trim() ?? "";
|
|
50867
50901
|
const baselineAgreementUuid = context.flags.get("--agreement")?.trim() ?? "";
|
|
50868
|
-
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$
|
|
50869
|
-
if (effectiveAt === "" || Number.isNaN(Date.parse(effectiveAt))) throw new UsageError(`retention-set needs --effective-at as an ISO date.\n\n${USAGE$
|
|
50870
|
-
if (baselineAgreementUuid === "") throw new UsageError(`retention-set needs --agreement.\n\n${USAGE$
|
|
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}`);
|
|
50871
50905
|
const packageKey = context.flags.get("--package")?.trim();
|
|
50872
50906
|
return {
|
|
50873
50907
|
kind: "write",
|
|
@@ -50894,7 +50928,7 @@ async function revealDatabase(context, path) {
|
|
|
50894
50928
|
/** `tuning preview|restore <env>`. */
|
|
50895
50929
|
async function tuning(context, action, rest) {
|
|
50896
50930
|
const environmentUuid = rest[0];
|
|
50897
|
-
const path = await environmentPath(context, environmentUuid, USAGE$
|
|
50931
|
+
const path = await environmentPath(context, environmentUuid, USAGE$26);
|
|
50898
50932
|
if (action === "preview" && rest.length === 1) {
|
|
50899
50933
|
const body = (await hostingEnvironmentShow({ path })).data;
|
|
50900
50934
|
return {
|
|
@@ -50907,7 +50941,7 @@ async function tuning(context, action, rest) {
|
|
|
50907
50941
|
}
|
|
50908
50942
|
if (action === "restore" && rest.length === 1) {
|
|
50909
50943
|
const generation = Number(context.flags.get("--generation") ?? "");
|
|
50910
|
-
if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$
|
|
50944
|
+
if (!Number.isInteger(generation) || generation < 1) throw new UsageError(`tuning restore needs --generation.\n\n${USAGE$26}`);
|
|
50911
50945
|
return {
|
|
50912
50946
|
kind: "write",
|
|
50913
50947
|
outcome: await confirmableWrite(context, `Restore the recorded tuning for generation ${String(generation)}.`, async () => (await hostingTuningRestore({
|
|
@@ -50916,7 +50950,7 @@ async function tuning(context, action, rest) {
|
|
|
50916
50950
|
})).data)
|
|
50917
50951
|
};
|
|
50918
50952
|
}
|
|
50919
|
-
throw new UsageError(USAGE$
|
|
50953
|
+
throw new UsageError(USAGE$26);
|
|
50920
50954
|
}
|
|
50921
50955
|
/** One retention window as one line, and the write receipt for it. */
|
|
50922
50956
|
function retentionText(one) {
|
|
@@ -50989,7 +51023,7 @@ async function cacheSet(context, path) {
|
|
|
50989
51023
|
}
|
|
50990
51024
|
//#endregion
|
|
50991
51025
|
//#region src/commands/environment-component-version.ts
|
|
50992
|
-
var USAGE$
|
|
51026
|
+
var USAGE$25 = [
|
|
50993
51027
|
"Usage: hostingctl environment component-version <environment-uuid> <workload-uuid> <version> --company <slug>",
|
|
50994
51028
|
"",
|
|
50995
51029
|
" component-version Move one curated component instance to another version this platform pins an image",
|
|
@@ -51007,7 +51041,7 @@ var USAGE$24 = [
|
|
|
51007
51041
|
*/
|
|
51008
51042
|
async function environmentComponentVersion(context, rest) {
|
|
51009
51043
|
const [uuid, workloadUuid, version, ...extra] = rest;
|
|
51010
|
-
if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
51044
|
+
if (uuid === void 0 || workloadUuid === void 0 || version === void 0 || extra.length > 0) throw new UsageError(USAGE$25);
|
|
51011
51045
|
const path = {
|
|
51012
51046
|
company: await requireCompany(context.flags),
|
|
51013
51047
|
environmentUuid: uuid,
|
|
@@ -51408,7 +51442,7 @@ function stated(flags, flag, usage) {
|
|
|
51408
51442
|
}
|
|
51409
51443
|
//#endregion
|
|
51410
51444
|
//#region src/commands/environment-create.ts
|
|
51411
|
-
var USAGE$
|
|
51445
|
+
var USAGE$24 = [
|
|
51412
51446
|
"Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
|
|
51413
51447
|
" hostingctl environment create --client <slug> --name <name> [--slug <slug>] [--package <key>]",
|
|
51414
51448
|
" [--cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
|
|
@@ -51463,11 +51497,11 @@ var CREATE_FLAG_SPECS = [
|
|
|
51463
51497
|
* not.
|
|
51464
51498
|
*/
|
|
51465
51499
|
async function create$2(context, rest) {
|
|
51466
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
51500
|
+
if (rest.length > 0) throw new UsageError(USAGE$24);
|
|
51467
51501
|
const name = context.flags.get("--name")?.trim() ?? "";
|
|
51468
|
-
if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$
|
|
51469
|
-
const slug = slugFor(context.flags.get("--slug"), name, USAGE$
|
|
51470
|
-
const slice = sliceFor(context.flags, USAGE$
|
|
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);
|
|
51471
51505
|
const scope = await scopeFor(context.flags);
|
|
51472
51506
|
const chosen = chosenPackage(await catalogFor(scope), context.flags.get("--package")?.trim() ?? "");
|
|
51473
51507
|
const body = {
|
|
@@ -51482,12 +51516,12 @@ async function create$2(context, rest) {
|
|
|
51482
51516
|
async function scopeFor(flags) {
|
|
51483
51517
|
const client = flags.get("--client")?.trim() ?? "";
|
|
51484
51518
|
const company = flags.get("--company")?.trim() ?? "";
|
|
51485
|
-
if (client !== "" && company !== "") throw new UsageError(`Pass --company or --client, not both.\n\n${USAGE$
|
|
51519
|
+
if (client !== "" && company !== "") throw new UsageError(`Pass --company or --client, not both.\n\n${USAGE$24}`);
|
|
51486
51520
|
if (client !== "") return {
|
|
51487
51521
|
mode: "client",
|
|
51488
51522
|
client
|
|
51489
51523
|
};
|
|
51490
|
-
if (company === "") throw new UsageError(`create needs --company <slug> or --client <slug>.\n\n${USAGE$
|
|
51524
|
+
if (company === "") throw new UsageError(`create needs --company <slug> or --client <slug>.\n\n${USAGE$24}`);
|
|
51491
51525
|
return {
|
|
51492
51526
|
mode: "company",
|
|
51493
51527
|
company: await requireCompany(flags)
|
|
@@ -51501,7 +51535,7 @@ async function catalogFor(scope) {
|
|
|
51501
51535
|
/** The package the create sends: the one named, or the catalog's first, refused when the catalog does not carry it. */
|
|
51502
51536
|
function chosenPackage(packages, requested) {
|
|
51503
51537
|
const chosen = requested === "" ? packages[0] : packages.find((one) => one.key === requested);
|
|
51504
|
-
if (chosen === void 0) throw new UsageError(`--package must be one of ${packages.map((one) => one.key).join(", ")} (got ${requested}).\n\n${USAGE$
|
|
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}`);
|
|
51505
51539
|
return chosen;
|
|
51506
51540
|
}
|
|
51507
51541
|
/** The create itself, through the route that addressee is reached by. */
|
|
@@ -51859,7 +51893,7 @@ function oneUuid$2(rest) {
|
|
|
51859
51893
|
}
|
|
51860
51894
|
//#endregion
|
|
51861
51895
|
//#region src/commands/environment-domains.ts
|
|
51862
|
-
var USAGE$
|
|
51896
|
+
var USAGE$23 = [
|
|
51863
51897
|
"Usage: hostingctl environment domains <environment-uuid> --company <slug>",
|
|
51864
51898
|
" hostingctl environment domain-add <environment-uuid> --company <slug> --hostname <host> --workload <uuid> [--intended on|off]",
|
|
51865
51899
|
" hostingctl environment domain-verify|domain-check-routing|domain-intended|domain-primary|domain-remove <environment-uuid> <domain-uuid> --company <slug>",
|
|
@@ -51890,7 +51924,7 @@ var DOMAIN_ACTIONS = {
|
|
|
51890
51924
|
/** `environment domains|domain-add|domain-*|redirects|redirect-set|redirect-remove`. */
|
|
51891
51925
|
async function environmentDomains(context, subcommand, rest) {
|
|
51892
51926
|
const [environmentUuid, ...tail] = rest;
|
|
51893
|
-
const path = await environmentPath(context, environmentUuid, USAGE$
|
|
51927
|
+
const path = await environmentPath(context, environmentUuid, USAGE$23);
|
|
51894
51928
|
if (subcommand === "domains") return await domains(path, tail);
|
|
51895
51929
|
if (subcommand === "redirects") return await redirects(path, tail);
|
|
51896
51930
|
if (subcommand === "domain-add") return await add$7(context, path, tail);
|
|
@@ -51899,7 +51933,7 @@ async function environmentDomains(context, subcommand, rest) {
|
|
|
51899
51933
|
if (subcommand === "domain-remove") return await removeDomain(context, path, tail);
|
|
51900
51934
|
const action = DOMAIN_ACTIONS[subcommand];
|
|
51901
51935
|
if (action !== void 0) return await domainAction(context, subcommand, action, path, tail);
|
|
51902
|
-
throw new UsageError(USAGE$
|
|
51936
|
+
throw new UsageError(USAGE$23);
|
|
51903
51937
|
}
|
|
51904
51938
|
/** `domains <env>`. */
|
|
51905
51939
|
async function domains(path, rest) {
|
|
@@ -51922,7 +51956,7 @@ async function add$7(context, path, rest) {
|
|
|
51922
51956
|
noExtra$11(rest);
|
|
51923
51957
|
const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
|
|
51924
51958
|
const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
|
|
51925
|
-
if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --workload.\n\n${USAGE$
|
|
51959
|
+
if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --workload.\n\n${USAGE$23}`);
|
|
51926
51960
|
const intended = onOffFlag(context, "--intended") ?? false;
|
|
51927
51961
|
return await written$2(confirmableWrite(context, `Serve ${hostname} from workload ${workloadUuid}${intended ? " as an intended name" : ""}.`, async () => {
|
|
51928
51962
|
return (await hostingDomainStore({
|
|
@@ -51938,7 +51972,7 @@ async function add$7(context, path, rest) {
|
|
|
51938
51972
|
/** The five actions that take only the environment and the name. */
|
|
51939
51973
|
async function domainAction(context, subcommand, action, path, rest) {
|
|
51940
51974
|
const [domainUuid, ...extra] = rest;
|
|
51941
|
-
if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
51975
|
+
if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
|
|
51942
51976
|
const described = {
|
|
51943
51977
|
"domain-verify": "Check this name's routing now.",
|
|
51944
51978
|
"domain-check-routing": "Check this name's routing now.",
|
|
@@ -51956,7 +51990,7 @@ async function domainAction(context, subcommand, action, path, rest) {
|
|
|
51956
51990
|
/** `domain-remove <env> <domain>`: stop serving a name. */
|
|
51957
51991
|
async function removeDomain(context, path, rest) {
|
|
51958
51992
|
const [domainUuid, ...extra] = rest;
|
|
51959
|
-
if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
51993
|
+
if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
|
|
51960
51994
|
const fallBackToGenerated = onOffFlag(context, "--fall-back-to-generated") ?? true;
|
|
51961
51995
|
return await written$2(confirmableWrite(context, "Stop serving this name. Its record stays readable, and the environment keeps its generated hostname.", async () => {
|
|
51962
51996
|
const body = { fallBackToGenerated };
|
|
@@ -51972,13 +52006,13 @@ async function removeDomain(context, path, rest) {
|
|
|
51972
52006
|
/** `redirect-set <env> <domain> --target … --mode … [--destination …]`. */
|
|
51973
52007
|
async function setRedirect(context, path, rest) {
|
|
51974
52008
|
const [domainUuid, ...extra] = rest;
|
|
51975
|
-
if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
52009
|
+
if (domainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
|
|
51976
52010
|
const target = context.flags.get("--target")?.trim() ?? "";
|
|
51977
52011
|
const mode = context.flags.get("--mode")?.trim() ?? "";
|
|
51978
52012
|
const destinationUrl = context.flags.get("--destination")?.trim() ?? "";
|
|
51979
|
-
if (!TARGETS.has(target)) throw new UsageError(`--target must be application or fixed.\n\n${USAGE$
|
|
51980
|
-
if (!MODES$1.has(mode)) throw new UsageError(`--mode must be temporary or permanent.\n\n${USAGE$
|
|
51981
|
-
if (target === "fixed" && destinationUrl === "") throw new UsageError(`--target fixed needs --destination <url>.\n\n${USAGE$
|
|
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}`);
|
|
51982
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 () => {
|
|
51983
52017
|
const body = {
|
|
51984
52018
|
target,
|
|
@@ -51998,7 +52032,7 @@ async function setRedirect(context, path, rest) {
|
|
|
51998
52032
|
/** `redirect-remove <env> <redirect-uuid>`. */
|
|
51999
52033
|
async function removeRedirect(context, path, rest) {
|
|
52000
52034
|
const [redirectUuid, ...extra] = rest;
|
|
52001
|
-
if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
52035
|
+
if (redirectUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$23);
|
|
52002
52036
|
return await written$2(confirmableWrite(context, `Remove redirect ${redirectUuid}.`, async () => {
|
|
52003
52037
|
return (await hostingDomainRedirectDestroy({ path: {
|
|
52004
52038
|
...path,
|
|
@@ -52015,11 +52049,11 @@ async function written$2(pending) {
|
|
|
52015
52049
|
}
|
|
52016
52050
|
/** No positional arguments, or a usage refusal. */
|
|
52017
52051
|
function noExtra$11(rest) {
|
|
52018
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
52052
|
+
if (rest.length > 0) throw new UsageError(USAGE$23);
|
|
52019
52053
|
}
|
|
52020
52054
|
//#endregion
|
|
52021
52055
|
//#region src/commands/environment-exports.ts
|
|
52022
|
-
var USAGE$
|
|
52056
|
+
var USAGE$22 = [
|
|
52023
52057
|
"Usage: hostingctl environment database-exports <environment-uuid> --company <slug>",
|
|
52024
52058
|
" hostingctl environment database-export-create <environment-uuid> <database-uuid> --company <slug>",
|
|
52025
52059
|
" hostingctl environment database-export-download <environment-uuid> <export-uuid> --company <slug>",
|
|
@@ -52039,7 +52073,7 @@ var USAGE$21 = [
|
|
|
52039
52073
|
async function environmentExports(context, subcommand, rest) {
|
|
52040
52074
|
if (subcommand === "release-bundle") {
|
|
52041
52075
|
const [releaseUuid, ...extra] = rest;
|
|
52042
|
-
if (releaseUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
52076
|
+
if (releaseUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$22);
|
|
52043
52077
|
return {
|
|
52044
52078
|
kind: "bundle",
|
|
52045
52079
|
releaseUuid,
|
|
@@ -52047,7 +52081,7 @@ async function environmentExports(context, subcommand, rest) {
|
|
|
52047
52081
|
};
|
|
52048
52082
|
}
|
|
52049
52083
|
const [environmentUuid, ...tail] = rest;
|
|
52050
|
-
const path = await environmentPath(context, environmentUuid, USAGE$
|
|
52084
|
+
const path = await environmentPath(context, environmentUuid, USAGE$22);
|
|
52051
52085
|
if (subcommand === "database-exports") {
|
|
52052
52086
|
noExtra$10(tail);
|
|
52053
52087
|
return {
|
|
@@ -52058,11 +52092,11 @@ async function environmentExports(context, subcommand, rest) {
|
|
|
52058
52092
|
if (subcommand === "database-export-create") return await create(context, path, tail);
|
|
52059
52093
|
if (subcommand === "database-export-download") return await download(path, tail);
|
|
52060
52094
|
if (subcommand === "database-export-remove") return await remove$1(context, path, tail);
|
|
52061
|
-
throw new UsageError(USAGE$
|
|
52095
|
+
throw new UsageError(USAGE$22);
|
|
52062
52096
|
}
|
|
52063
52097
|
/** `database-export-create <env> <db>`. */
|
|
52064
52098
|
async function create(context, path, rest) {
|
|
52065
|
-
const databaseUuid = oneUuid$7(rest, USAGE$
|
|
52099
|
+
const databaseUuid = oneUuid$7(rest, USAGE$22);
|
|
52066
52100
|
return {
|
|
52067
52101
|
kind: "export-write",
|
|
52068
52102
|
outcome: await confirmableWrite(context, "Take a portable export of this database now. It is downloadable until its expiry.", async () => {
|
|
@@ -52078,7 +52112,7 @@ async function create(context, path, rest) {
|
|
|
52078
52112
|
}
|
|
52079
52113
|
/** `database-export-download <env> <export>`: a time-limited URL, which is the customer's copy. */
|
|
52080
52114
|
async function download(path, rest) {
|
|
52081
|
-
const exportUuid = oneUuid$7(rest, USAGE$
|
|
52115
|
+
const exportUuid = oneUuid$7(rest, USAGE$22);
|
|
52082
52116
|
return {
|
|
52083
52117
|
kind: "download",
|
|
52084
52118
|
download: (await hostingDatabaseExportDownload({ path: {
|
|
@@ -52089,7 +52123,7 @@ async function download(path, rest) {
|
|
|
52089
52123
|
}
|
|
52090
52124
|
/** `database-export-remove <env> <export>`. */
|
|
52091
52125
|
async function remove$1(context, path, rest) {
|
|
52092
|
-
const exportUuid = oneUuid$7(rest, USAGE$
|
|
52126
|
+
const exportUuid = oneUuid$7(rest, USAGE$22);
|
|
52093
52127
|
return {
|
|
52094
52128
|
kind: "export-write",
|
|
52095
52129
|
outcome: await confirmableWrite(context, `Retire export ${exportUuid}. Its URL stops working once it is gone.`, async () => (await hostingDatabaseExportDestroy({ path: {
|
|
@@ -52100,7 +52134,7 @@ async function remove$1(context, path, rest) {
|
|
|
52100
52134
|
}
|
|
52101
52135
|
/** No positional arguments, or a usage refusal. */
|
|
52102
52136
|
function noExtra$10(rest) {
|
|
52103
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
52137
|
+
if (rest.length > 0) throw new UsageError(USAGE$22);
|
|
52104
52138
|
}
|
|
52105
52139
|
/** One export as one line. */
|
|
52106
52140
|
function exportLine(one) {
|
|
@@ -52169,7 +52203,7 @@ var RUNTIME_VERSION_GRANT_FLAG_SPECS = [
|
|
|
52169
52203
|
description: "The grant UUID to revoke."
|
|
52170
52204
|
}
|
|
52171
52205
|
];
|
|
52172
|
-
var USAGE$
|
|
52206
|
+
var USAGE$21 = [
|
|
52173
52207
|
"Usage:",
|
|
52174
52208
|
" hostingctl environment runtime-version-grants --company <slug>",
|
|
52175
52209
|
" hostingctl environment runtime-version-grants grant --company <slug> --type <type> --line <line>",
|
|
@@ -52197,18 +52231,18 @@ async function environmentRuntimeVersionGrants(context, rest) {
|
|
|
52197
52231
|
kind: "runtime-version-grants",
|
|
52198
52232
|
grants: (await hostingRuntimeVersionGrantsIndex({ path: { company } })).data
|
|
52199
52233
|
};
|
|
52200
|
-
if (tail.length > 0) throw new UsageError(USAGE$
|
|
52234
|
+
if (tail.length > 0) throw new UsageError(USAGE$21);
|
|
52201
52235
|
if (action === "grant") return grant(context, company);
|
|
52202
52236
|
if (action === "revoke") return revoke$3(context, company);
|
|
52203
|
-
throw new UsageError(USAGE$
|
|
52237
|
+
throw new UsageError(USAGE$21);
|
|
52204
52238
|
}
|
|
52205
52239
|
async function grant(context, company) {
|
|
52206
52240
|
const type = required$5(context, "--type");
|
|
52207
52241
|
const line = required$5(context, "--line");
|
|
52208
52242
|
const scope = required$5(context, "--scope");
|
|
52209
|
-
if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$
|
|
52243
|
+
if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$21}`);
|
|
52210
52244
|
const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
|
|
52211
|
-
if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$
|
|
52245
|
+
if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$21}`);
|
|
52212
52246
|
const reason = required$5(context, "--reason");
|
|
52213
52247
|
const expiresAt = required$5(context, "--expires");
|
|
52214
52248
|
return {
|
|
@@ -52241,7 +52275,7 @@ async function revoke$3(context, company) {
|
|
|
52241
52275
|
/** One flag's value, refused by name when it was not given. */
|
|
52242
52276
|
function required$5(context, flag) {
|
|
52243
52277
|
const value = context.flags.get(flag)?.trim() ?? "";
|
|
52244
|
-
if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$
|
|
52278
|
+
if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$21}`);
|
|
52245
52279
|
return value;
|
|
52246
52280
|
}
|
|
52247
52281
|
/** One line per grant: the line it names, who it covers, why, and when it ends. */
|
|
@@ -52437,7 +52471,7 @@ var ENVIRONMENT_USAGE = [
|
|
|
52437
52471
|
].join("\n");
|
|
52438
52472
|
//#endregion
|
|
52439
52473
|
//#region src/commands/environment-runtime-versions.ts
|
|
52440
|
-
var USAGE$
|
|
52474
|
+
var USAGE$20 = [
|
|
52441
52475
|
"Usage: hostingctl environment runtime-versions --company <slug>",
|
|
52442
52476
|
"",
|
|
52443
52477
|
" runtime-versions The version lines each application type offers, which may be chosen now, and why the",
|
|
@@ -52454,7 +52488,7 @@ var USAGE$19 = [
|
|
|
52454
52488
|
* will accept, and one reported as unavailable says which image is missing.
|
|
52455
52489
|
*/
|
|
52456
52490
|
async function environmentRuntimeVersions(context, rest) {
|
|
52457
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
52491
|
+
if (rest.length > 0) throw new UsageError(USAGE$20);
|
|
52458
52492
|
return {
|
|
52459
52493
|
kind: "runtime-versions",
|
|
52460
52494
|
types: (await hostingRuntimeVersionsIndex({ path: { company: await requireCompany(context.flags) } })).data
|
|
@@ -52767,7 +52801,7 @@ function oneUuid$1(rest) {
|
|
|
52767
52801
|
}
|
|
52768
52802
|
//#endregion
|
|
52769
52803
|
//#region src/commands/environment-services.ts
|
|
52770
|
-
var USAGE$
|
|
52804
|
+
var USAGE$19 = [
|
|
52771
52805
|
"Usage: hostingctl environment service-add-review <environment-uuid> <type> --company <slug> [--name <n>] [--replicas <n>]",
|
|
52772
52806
|
" hostingctl environment service-add <environment-uuid> <type> --company <slug> --name <n> [--replicas <n>]",
|
|
52773
52807
|
" hostingctl environment service-runtime <environment-uuid> <type> --company <slug> --running <on|off>",
|
|
@@ -52796,8 +52830,8 @@ var SERVICE_TYPES = /* @__PURE__ */ new Set([
|
|
|
52796
52830
|
/** `environment service-*`, from the `environment` command. */
|
|
52797
52831
|
async function environmentServices(context, subcommand, rest) {
|
|
52798
52832
|
const [environmentUuid, type, ...tail] = rest;
|
|
52799
|
-
const path = await environmentPath(context, environmentUuid, USAGE$
|
|
52800
|
-
if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$
|
|
52833
|
+
const path = await environmentPath(context, environmentUuid, USAGE$19);
|
|
52834
|
+
if (type === void 0 || type === "" || tail.length > 0) throw new UsageError(USAGE$19);
|
|
52801
52835
|
if (subcommand === "service-add-review") return await reviewAddition(context, path, type);
|
|
52802
52836
|
if (subcommand === "service-retirement") return {
|
|
52803
52837
|
kind: "service-retirement",
|
|
@@ -52810,7 +52844,7 @@ async function environmentServices(context, subcommand, rest) {
|
|
|
52810
52844
|
if (subcommand === "service-runtime") return await runtime$1(context, path, type);
|
|
52811
52845
|
if (subcommand === "service-protect") return await protect(context, path, type);
|
|
52812
52846
|
if (subcommand === "service-retire") return await retire$1(context, path, type);
|
|
52813
|
-
throw new UsageError(USAGE$
|
|
52847
|
+
throw new UsageError(USAGE$19);
|
|
52814
52848
|
}
|
|
52815
52849
|
/** `service-add-review <type> [--name …] [--replicas …]`. */
|
|
52816
52850
|
async function reviewAddition(context, path, type) {
|
|
@@ -52833,9 +52867,9 @@ async function reviewAddition(context, path, type) {
|
|
|
52833
52867
|
/** `service-add <type> --name … [--replicas …]`. */
|
|
52834
52868
|
async function add$6(context, path, type) {
|
|
52835
52869
|
const name = context.flags.get("--name")?.trim() ?? "";
|
|
52836
|
-
if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$
|
|
52870
|
+
if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$19}`);
|
|
52837
52871
|
const replicas = wholeNumber(context, "--replicas") ?? 1;
|
|
52838
|
-
if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$
|
|
52872
|
+
if (!SERVICE_TYPES.has(type)) throw new UsageError(`--type must be one of ${[...SERVICE_TYPES].join(", ")} (got "${type}").\n\n${USAGE$19}`);
|
|
52839
52873
|
const serviceType = type;
|
|
52840
52874
|
return await written$1(confirmableWrite(context, `Add the ${type} service "${name}" with ${String(replicas)} replica(s).`, async () => {
|
|
52841
52875
|
const desiredGeneration = await environmentGeneration(path);
|
|
@@ -52852,7 +52886,7 @@ async function add$6(context, path, type) {
|
|
|
52852
52886
|
}
|
|
52853
52887
|
/** `service-runtime <type> --running …`. */
|
|
52854
52888
|
async function runtime$1(context, path, type) {
|
|
52855
|
-
const running = onOff$5(context, "--running", USAGE$
|
|
52889
|
+
const running = onOff$5(context, "--running", USAGE$19);
|
|
52856
52890
|
return await written$1(confirmableWrite(context, `${running ? "Start" : "Stop"} the ${type} service. Its data is kept either way.`, async () => {
|
|
52857
52891
|
const desiredGeneration = await environmentGeneration(path);
|
|
52858
52892
|
const body = {
|
|
@@ -52870,7 +52904,7 @@ async function runtime$1(context, path, type) {
|
|
|
52870
52904
|
}
|
|
52871
52905
|
/** `service-protect <type> --locked …`. */
|
|
52872
52906
|
async function protect(context, path, type) {
|
|
52873
|
-
const locked = onOff$5(context, "--locked", USAGE$
|
|
52907
|
+
const locked = onOff$5(context, "--locked", USAGE$19);
|
|
52874
52908
|
return await written$1(confirmableWrite(context, locked ? `Lock the ${type} service, so no removal path may delete it.` : `Unlock the ${type} service.`, async () => {
|
|
52875
52909
|
const desiredGeneration = await environmentGeneration(path);
|
|
52876
52910
|
const body = {
|
|
@@ -52889,7 +52923,7 @@ async function protect(context, path, type) {
|
|
|
52889
52923
|
/** `service-retire <type> --digest …`: the review's digest is the confirmation. */
|
|
52890
52924
|
async function retire$1(context, path, type) {
|
|
52891
52925
|
const digest = context.flags.get("--digest")?.trim() ?? "";
|
|
52892
|
-
if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$
|
|
52926
|
+
if (digest === "") throw new UsageError(`service-retire needs --digest.\n\n${USAGE$19}`);
|
|
52893
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 () => {
|
|
52894
52928
|
const desiredGeneration = await environmentGeneration(path);
|
|
52895
52929
|
const body = {
|
|
@@ -52917,7 +52951,7 @@ function wholeNumber(context, flag) {
|
|
|
52917
52951
|
const raw = context.flags.get(flag)?.trim() ?? "";
|
|
52918
52952
|
if (raw === "") return null;
|
|
52919
52953
|
const value = Number(raw);
|
|
52920
|
-
if (!Number.isInteger(value) || value < 1) throw new UsageError(`${flag} must be a whole number of at least 1 (got ${raw}).\n\n${USAGE$
|
|
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}`);
|
|
52921
52955
|
return value;
|
|
52922
52956
|
}
|
|
52923
52957
|
/** The write receipt, by the shape the API answered with. */
|
|
@@ -52955,7 +52989,7 @@ function environmentServicesText(report) {
|
|
|
52955
52989
|
}
|
|
52956
52990
|
//#endregion
|
|
52957
52991
|
//#region src/commands/environment-shared.ts
|
|
52958
|
-
var USAGE$
|
|
52992
|
+
var USAGE$18 = [
|
|
52959
52993
|
"Usage: hostingctl environment shared-runtime <environment-uuid> --company <slug>",
|
|
52960
52994
|
" hostingctl environment shared-runtime-adopt|shared-runtime-release <environment-uuid> --company <slug>",
|
|
52961
52995
|
" hostingctl environment shared-app <environment-uuid> --company <slug>",
|
|
@@ -52972,7 +53006,7 @@ var USAGE$17 = [
|
|
|
52972
53006
|
/** `environment shared-runtime|shared-app|shared-adopt`, from the `environment` command. */
|
|
52973
53007
|
async function environmentShared(context, subcommand, rest) {
|
|
52974
53008
|
const [environmentUuid, ...tail] = rest;
|
|
52975
|
-
const path = await environmentPath(context, environmentUuid, USAGE$
|
|
53009
|
+
const path = await environmentPath(context, environmentUuid, USAGE$18);
|
|
52976
53010
|
noExtra$9(tail);
|
|
52977
53011
|
if (subcommand === "shared-runtime") return {
|
|
52978
53012
|
kind: "shared-runtime",
|
|
@@ -52987,7 +53021,7 @@ async function environmentShared(context, subcommand, rest) {
|
|
|
52987
53021
|
if (subcommand === "shared-app-adopt") return await app(context, "adopt", path);
|
|
52988
53022
|
if (subcommand === "shared-app-release") return await app(context, "release", path);
|
|
52989
53023
|
if (subcommand === "shared-adopt") return await environment$1(context, path);
|
|
52990
|
-
throw new UsageError(USAGE$
|
|
53024
|
+
throw new UsageError(USAGE$18);
|
|
52991
53025
|
}
|
|
52992
53026
|
/** `shared-runtime-adopt|release`: one runtime, adopted or given back. */
|
|
52993
53027
|
async function runtime(context, kind, path) {
|
|
@@ -53015,7 +53049,7 @@ async function environment$1(context, path) {
|
|
|
53015
53049
|
}
|
|
53016
53050
|
/** No positional arguments, or a usage refusal. */
|
|
53017
53051
|
function noExtra$9(rest) {
|
|
53018
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
53052
|
+
if (rest.length > 0) throw new UsageError(USAGE$18);
|
|
53019
53053
|
}
|
|
53020
53054
|
/** The line shared by both shared states: adopted, with whom, and the ceiling it lives inside. */
|
|
53021
53055
|
function sharedLine(one) {
|
|
@@ -53039,7 +53073,7 @@ function environmentSharedText(report) {
|
|
|
53039
53073
|
}
|
|
53040
53074
|
//#endregion
|
|
53041
53075
|
//#region src/commands/environment-site-access.ts
|
|
53042
|
-
var USAGE$
|
|
53076
|
+
var USAGE$17 = [
|
|
53043
53077
|
"Usage: hostingctl environment site-access <environment-uuid> --company <slug>",
|
|
53044
53078
|
" hostingctl environment site-access-set <environment-uuid> --company <slug> --sign-in <on|off> [--audience <name>]",
|
|
53045
53079
|
" hostingctl environment site-users <environment-uuid> --company <slug>",
|
|
@@ -53085,16 +53119,16 @@ var flow = siteAccessFlow({
|
|
|
53085
53119
|
refresh: async (path) => (await hostingSiteAccessUsersRefresh({ path })).data,
|
|
53086
53120
|
destroy: async (path) => (await hostingSiteAccessUsersDestroy({ path })).data,
|
|
53087
53121
|
rotate: null
|
|
53088
|
-
}, USAGE$
|
|
53122
|
+
}, USAGE$17);
|
|
53089
53123
|
/** `environment site-access*|site-user*`: resolve the environment, then run the shared flow. */
|
|
53090
53124
|
async function environmentSiteAccess(context, action, rest) {
|
|
53091
53125
|
const [environmentUuid, ...tail] = rest;
|
|
53092
|
-
if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$
|
|
53093
|
-
return await flow(context, action, await environmentPath(context, environmentUuid, USAGE$
|
|
53126
|
+
if (environmentUuid === void 0 || environmentUuid === "") throw new UsageError(USAGE$17);
|
|
53127
|
+
return await flow(context, action, await environmentPath(context, environmentUuid, USAGE$17), tail);
|
|
53094
53128
|
}
|
|
53095
53129
|
//#endregion
|
|
53096
53130
|
//#region src/commands/environment-tools.ts
|
|
53097
|
-
var USAGE$
|
|
53131
|
+
var USAGE$16 = [
|
|
53098
53132
|
"Usage: hostingctl environment tools verify <environment-uuid> <tool> --company <slug>",
|
|
53099
53133
|
" hostingctl environment tools select <environment-uuid> <tool> --company <slug> --enabled <on|off>",
|
|
53100
53134
|
"",
|
|
@@ -53108,8 +53142,8 @@ var USAGE$15 = [
|
|
|
53108
53142
|
/** `environment tools verify|select`. */
|
|
53109
53143
|
async function environmentTools(context, rest) {
|
|
53110
53144
|
const [action, environmentUuid, tool, ...extra] = rest;
|
|
53111
|
-
if (action === void 0 || tool === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
53112
|
-
const path = await environmentPath(context, environmentUuid, USAGE$
|
|
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);
|
|
53113
53147
|
if (action === "verify") return {
|
|
53114
53148
|
kind: "tool",
|
|
53115
53149
|
tool,
|
|
@@ -53119,11 +53153,11 @@ async function environmentTools(context, rest) {
|
|
|
53119
53153
|
} })).data
|
|
53120
53154
|
};
|
|
53121
53155
|
if (action === "select") return await select$1(context, path, tool);
|
|
53122
|
-
throw new UsageError(USAGE$
|
|
53156
|
+
throw new UsageError(USAGE$16);
|
|
53123
53157
|
}
|
|
53124
53158
|
/** `select --enabled …`: one tool's presence, echoed with the environment's generation. */
|
|
53125
53159
|
async function select$1(context, path, tool) {
|
|
53126
|
-
const enabled = onOff$5(context, "--enabled", USAGE$
|
|
53160
|
+
const enabled = onOff$5(context, "--enabled", USAGE$16);
|
|
53127
53161
|
return {
|
|
53128
53162
|
kind: "tools-write",
|
|
53129
53163
|
outcome: await confirmableWrite(context, `${enabled ? "Enable" : "Disable"} the ${tool} tool for this environment.`, async () => {
|
|
@@ -53243,23 +53277,23 @@ function list$4(values) {
|
|
|
53243
53277
|
var ENVIRONMENT_TOPICS = [
|
|
53244
53278
|
{
|
|
53245
53279
|
path: ["retention"],
|
|
53246
|
-
usage: USAGE$
|
|
53280
|
+
usage: USAGE$26
|
|
53247
53281
|
},
|
|
53248
53282
|
{
|
|
53249
53283
|
path: ["retention-set"],
|
|
53250
|
-
usage: USAGE$
|
|
53284
|
+
usage: USAGE$26
|
|
53251
53285
|
},
|
|
53252
53286
|
{
|
|
53253
53287
|
path: ["database-show"],
|
|
53254
|
-
usage: USAGE$
|
|
53288
|
+
usage: USAGE$26
|
|
53255
53289
|
},
|
|
53256
53290
|
{
|
|
53257
53291
|
path: ["database-reveal"],
|
|
53258
|
-
usage: USAGE$
|
|
53292
|
+
usage: USAGE$26
|
|
53259
53293
|
},
|
|
53260
53294
|
{
|
|
53261
53295
|
path: ["tuning"],
|
|
53262
|
-
usage: USAGE$
|
|
53296
|
+
usage: USAGE$26
|
|
53263
53297
|
},
|
|
53264
53298
|
{
|
|
53265
53299
|
path: ["configuration"],
|
|
@@ -53283,143 +53317,143 @@ var ENVIRONMENT_TOPICS = [
|
|
|
53283
53317
|
},
|
|
53284
53318
|
{
|
|
53285
53319
|
path: ["domains"],
|
|
53286
|
-
usage: USAGE$
|
|
53320
|
+
usage: USAGE$23
|
|
53287
53321
|
},
|
|
53288
53322
|
{
|
|
53289
53323
|
path: ["domain-add"],
|
|
53290
|
-
usage: USAGE$
|
|
53324
|
+
usage: USAGE$23
|
|
53291
53325
|
},
|
|
53292
53326
|
{
|
|
53293
53327
|
path: ["domain-verify"],
|
|
53294
|
-
usage: USAGE$
|
|
53328
|
+
usage: USAGE$23
|
|
53295
53329
|
},
|
|
53296
53330
|
{
|
|
53297
53331
|
path: ["domain-check-routing"],
|
|
53298
|
-
usage: USAGE$
|
|
53332
|
+
usage: USAGE$23
|
|
53299
53333
|
},
|
|
53300
53334
|
{
|
|
53301
53335
|
path: ["domain-intended"],
|
|
53302
|
-
usage: USAGE$
|
|
53336
|
+
usage: USAGE$23
|
|
53303
53337
|
},
|
|
53304
53338
|
{
|
|
53305
53339
|
path: ["domain-primary"],
|
|
53306
|
-
usage: USAGE$
|
|
53340
|
+
usage: USAGE$23
|
|
53307
53341
|
},
|
|
53308
53342
|
{
|
|
53309
53343
|
path: ["domain-remove"],
|
|
53310
|
-
usage: USAGE$
|
|
53344
|
+
usage: USAGE$23
|
|
53311
53345
|
},
|
|
53312
53346
|
{
|
|
53313
53347
|
path: ["redirects"],
|
|
53314
|
-
usage: USAGE$
|
|
53348
|
+
usage: USAGE$23
|
|
53315
53349
|
},
|
|
53316
53350
|
{
|
|
53317
53351
|
path: ["redirect-set"],
|
|
53318
|
-
usage: USAGE$
|
|
53352
|
+
usage: USAGE$23
|
|
53319
53353
|
},
|
|
53320
53354
|
{
|
|
53321
53355
|
path: ["redirect-remove"],
|
|
53322
|
-
usage: USAGE$
|
|
53356
|
+
usage: USAGE$23
|
|
53323
53357
|
},
|
|
53324
53358
|
{
|
|
53325
53359
|
path: ["database-exports"],
|
|
53326
|
-
usage: USAGE$
|
|
53360
|
+
usage: USAGE$22
|
|
53327
53361
|
},
|
|
53328
53362
|
{
|
|
53329
53363
|
path: ["database-export-create"],
|
|
53330
|
-
usage: USAGE$
|
|
53364
|
+
usage: USAGE$22
|
|
53331
53365
|
},
|
|
53332
53366
|
{
|
|
53333
53367
|
path: ["database-export-download"],
|
|
53334
|
-
usage: USAGE$
|
|
53368
|
+
usage: USAGE$22
|
|
53335
53369
|
},
|
|
53336
53370
|
{
|
|
53337
53371
|
path: ["database-export-remove"],
|
|
53338
|
-
usage: USAGE$
|
|
53372
|
+
usage: USAGE$22
|
|
53339
53373
|
},
|
|
53340
53374
|
{
|
|
53341
53375
|
path: ["release-bundle"],
|
|
53342
|
-
usage: USAGE$
|
|
53376
|
+
usage: USAGE$22
|
|
53343
53377
|
},
|
|
53344
53378
|
{
|
|
53345
53379
|
path: ["service-add-review"],
|
|
53346
|
-
usage: USAGE$
|
|
53380
|
+
usage: USAGE$19
|
|
53347
53381
|
},
|
|
53348
53382
|
{
|
|
53349
53383
|
path: ["service-add"],
|
|
53350
|
-
usage: USAGE$
|
|
53384
|
+
usage: USAGE$19
|
|
53351
53385
|
},
|
|
53352
53386
|
{
|
|
53353
53387
|
path: ["service-runtime"],
|
|
53354
|
-
usage: USAGE$
|
|
53388
|
+
usage: USAGE$19
|
|
53355
53389
|
},
|
|
53356
53390
|
{
|
|
53357
53391
|
path: ["service-protect"],
|
|
53358
|
-
usage: USAGE$
|
|
53392
|
+
usage: USAGE$19
|
|
53359
53393
|
},
|
|
53360
53394
|
{
|
|
53361
53395
|
path: ["service-retirement"],
|
|
53362
|
-
usage: USAGE$
|
|
53396
|
+
usage: USAGE$19
|
|
53363
53397
|
},
|
|
53364
53398
|
{
|
|
53365
53399
|
path: ["service-retire"],
|
|
53366
|
-
usage: USAGE$
|
|
53400
|
+
usage: USAGE$19
|
|
53367
53401
|
},
|
|
53368
53402
|
{
|
|
53369
53403
|
path: ["shared-runtime"],
|
|
53370
|
-
usage: USAGE$
|
|
53404
|
+
usage: USAGE$18
|
|
53371
53405
|
},
|
|
53372
53406
|
{
|
|
53373
53407
|
path: ["shared-runtime-adopt"],
|
|
53374
|
-
usage: USAGE$
|
|
53408
|
+
usage: USAGE$18
|
|
53375
53409
|
},
|
|
53376
53410
|
{
|
|
53377
53411
|
path: ["shared-runtime-release"],
|
|
53378
|
-
usage: USAGE$
|
|
53412
|
+
usage: USAGE$18
|
|
53379
53413
|
},
|
|
53380
53414
|
{
|
|
53381
53415
|
path: ["shared-app"],
|
|
53382
|
-
usage: USAGE$
|
|
53416
|
+
usage: USAGE$18
|
|
53383
53417
|
},
|
|
53384
53418
|
{
|
|
53385
53419
|
path: ["shared-app-adopt"],
|
|
53386
|
-
usage: USAGE$
|
|
53420
|
+
usage: USAGE$18
|
|
53387
53421
|
},
|
|
53388
53422
|
{
|
|
53389
53423
|
path: ["shared-app-release"],
|
|
53390
|
-
usage: USAGE$
|
|
53424
|
+
usage: USAGE$18
|
|
53391
53425
|
},
|
|
53392
53426
|
{
|
|
53393
53427
|
path: ["shared-adopt"],
|
|
53394
|
-
usage: USAGE$
|
|
53428
|
+
usage: USAGE$18
|
|
53395
53429
|
},
|
|
53396
53430
|
{
|
|
53397
53431
|
path: ["site-access"],
|
|
53398
|
-
usage: USAGE$
|
|
53432
|
+
usage: USAGE$17
|
|
53399
53433
|
},
|
|
53400
53434
|
{
|
|
53401
53435
|
path: ["site-access-set"],
|
|
53402
|
-
usage: USAGE$
|
|
53436
|
+
usage: USAGE$17
|
|
53403
53437
|
},
|
|
53404
53438
|
{
|
|
53405
53439
|
path: ["site-users"],
|
|
53406
|
-
usage: USAGE$
|
|
53440
|
+
usage: USAGE$17
|
|
53407
53441
|
},
|
|
53408
53442
|
{
|
|
53409
53443
|
path: ["site-user"],
|
|
53410
|
-
usage: USAGE$
|
|
53444
|
+
usage: USAGE$17
|
|
53411
53445
|
},
|
|
53412
53446
|
{
|
|
53413
53447
|
path: ["tools"],
|
|
53414
|
-
usage: USAGE$
|
|
53448
|
+
usage: USAGE$16
|
|
53415
53449
|
},
|
|
53416
53450
|
{
|
|
53417
53451
|
path: ["runtime-versions"],
|
|
53418
|
-
usage: USAGE$
|
|
53452
|
+
usage: USAGE$20
|
|
53419
53453
|
},
|
|
53420
53454
|
{
|
|
53421
53455
|
path: ["runtime-version-grants"],
|
|
53422
|
-
usage: USAGE$
|
|
53456
|
+
usage: USAGE$21
|
|
53423
53457
|
}
|
|
53424
53458
|
];
|
|
53425
53459
|
//#endregion
|
|
@@ -53708,7 +53742,7 @@ async function objectCacheSet(context, path, usage) {
|
|
|
53708
53742
|
}
|
|
53709
53743
|
//#endregion
|
|
53710
53744
|
//#region src/commands/environment-references.ts
|
|
53711
|
-
var USAGE$
|
|
53745
|
+
var USAGE$15 = [
|
|
53712
53746
|
"Usage: hostingctl environment references <environment-uuid> --company <slug>",
|
|
53713
53747
|
"",
|
|
53714
53748
|
" references Every producer a configuration document for this environment may reference, the kind",
|
|
@@ -53727,7 +53761,7 @@ var USAGE$14 = [
|
|
|
53727
53761
|
*/
|
|
53728
53762
|
async function environmentReferences(context, rest) {
|
|
53729
53763
|
const [uuid, ...extra] = rest;
|
|
53730
|
-
if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
53764
|
+
if (uuid === void 0 || extra.length > 0) throw new UsageError(USAGE$15);
|
|
53731
53765
|
return (await hostingEnvironmentsReferences({ path: {
|
|
53732
53766
|
company: await requireCompany(context.flags),
|
|
53733
53767
|
environmentUuid: uuid
|
|
@@ -65801,6 +65835,36 @@ object({
|
|
|
65801
65835
|
})),
|
|
65802
65836
|
unreadable: string().nullable()
|
|
65803
65837
|
});
|
|
65838
|
+
var hostingSystemDatabasePoolDataSchema = object({
|
|
65839
|
+
environmentUuid: string(),
|
|
65840
|
+
name: string(),
|
|
65841
|
+
eligibleIntent: boolean(),
|
|
65842
|
+
serving: boolean(),
|
|
65843
|
+
initialized: boolean(),
|
|
65844
|
+
retained: boolean(),
|
|
65845
|
+
dependentEnvironmentCount: int(),
|
|
65846
|
+
retainedPlacementCount: int(),
|
|
65847
|
+
unretiredIdentityCount: int(),
|
|
65848
|
+
desiredGeneration: int(),
|
|
65849
|
+
observedGeneration: int().nullable(),
|
|
65850
|
+
observedAt: string().nullable(),
|
|
65851
|
+
fresh: boolean(),
|
|
65852
|
+
reason: string(),
|
|
65853
|
+
action: string()
|
|
65854
|
+
});
|
|
65855
|
+
var hostingSystemDatabasePoolsDataSchema = object({
|
|
65856
|
+
clusterUuid: string(),
|
|
65857
|
+
clusterName: string(),
|
|
65858
|
+
automaticManagementScope: boolean(),
|
|
65859
|
+
enabled: boolean(),
|
|
65860
|
+
minimumServing: int(),
|
|
65861
|
+
pendingCount: int(),
|
|
65862
|
+
servingCount: int(),
|
|
65863
|
+
freshnessSeconds: int(),
|
|
65864
|
+
reason: string(),
|
|
65865
|
+
action: string(),
|
|
65866
|
+
pools: array(hostingSystemDatabasePoolDataSchema)
|
|
65867
|
+
});
|
|
65804
65868
|
var hostingTagDecisionEnumSchema = _enum([
|
|
65805
65869
|
"adopted",
|
|
65806
65870
|
"already_recorded",
|
|
@@ -66072,7 +66136,8 @@ object({
|
|
|
66072
66136
|
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."),
|
|
66073
66137
|
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."),
|
|
66074
66138
|
failedStages: array(string()),
|
|
66075
|
-
failedStagesSource: string().describe("Where those lines came from, or why this installation has none to give.")
|
|
66139
|
+
failedStagesSource: string().describe("Where those lines came from, or why this installation has none to give."),
|
|
66140
|
+
systemDatabasePools: union([hostingSystemDatabasePoolsDataSchema, _null()])
|
|
66076
66141
|
});
|
|
66077
66142
|
object({
|
|
66078
66143
|
amountCents: int().nullable(),
|
|
@@ -66775,6 +66840,10 @@ var setHostingServiceRuntimeRequestSchema = object({
|
|
|
66775
66840
|
}).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.");
|
|
66776
66841
|
var setHostingStorageClassEnabledRequestSchema = object({ enabled: boolean() }).describe("Switch one registered class's enabled state.");
|
|
66777
66842
|
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\".");
|
|
66843
|
+
object({
|
|
66844
|
+
enabled: boolean(),
|
|
66845
|
+
reason: string().min(3).max(512)
|
|
66846
|
+
});
|
|
66778
66847
|
var startEmailMailboxSyncActionRequestSchema = object({
|
|
66779
66848
|
recurrence: emailMailboxSyncRecurrenceModeEnumSchema,
|
|
66780
66849
|
endsAt: datetime().nullish()
|
|
@@ -71103,6 +71172,15 @@ union([
|
|
|
71103
71172
|
})
|
|
71104
71173
|
]);
|
|
71105
71174
|
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.");
|
|
71175
|
+
union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
|
|
71176
|
+
union([
|
|
71177
|
+
object({ message: string().describe("Error overview.") }),
|
|
71178
|
+
object({ message: string().describe("Error overview.") }),
|
|
71179
|
+
object({
|
|
71180
|
+
message: string().describe("Errors overview."),
|
|
71181
|
+
errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
71182
|
+
})
|
|
71183
|
+
]);
|
|
71106
71184
|
union([
|
|
71107
71185
|
object({ message: string().describe("Error overview.") }),
|
|
71108
71186
|
messageDataSchema,
|
|
@@ -71966,7 +72044,7 @@ function windowQuery(context) {
|
|
|
71966
72044
|
}
|
|
71967
72045
|
//#endregion
|
|
71968
72046
|
//#region src/commands/platform-directory.ts
|
|
71969
|
-
var USAGE$
|
|
72047
|
+
var USAGE$14 = [
|
|
71970
72048
|
"Usage: hostingctl platform users [--search <text>] [--company <slug>]",
|
|
71971
72049
|
" hostingctl platform user-closure <user-uuid>",
|
|
71972
72050
|
" hostingctl platform user-close <user-uuid> --reason <text>",
|
|
@@ -71983,12 +72061,12 @@ var USAGE$13 = [
|
|
|
71983
72061
|
async function platformDirectory(context, group, args) {
|
|
71984
72062
|
if (group === "users") return await users(context, args);
|
|
71985
72063
|
const [subject, ...rest] = args;
|
|
71986
|
-
if (subject === void 0) throw new UsageError(USAGE$
|
|
72064
|
+
if (subject === void 0) throw new UsageError(USAGE$14);
|
|
71987
72065
|
if (group === "company-activity") return await companyActivity(context, subject, rest);
|
|
71988
72066
|
if (group === "company-activity-show") return await activityOne(subject, rest);
|
|
71989
72067
|
if (group === "user-closure") return await userClosure(subject, rest);
|
|
71990
72068
|
if (group === "user-close") return await closeUser(context, subject, rest);
|
|
71991
|
-
throw new UsageError(USAGE$
|
|
72069
|
+
throw new UsageError(USAGE$14);
|
|
71992
72070
|
}
|
|
71993
72071
|
/** `users`, filtered by the API's own query keys. */
|
|
71994
72072
|
async function users(context, args) {
|
|
@@ -72041,7 +72119,7 @@ async function companyActivity(context, slug, rest) {
|
|
|
72041
72119
|
/** `company-activity-show <slug> <uuid>`. */
|
|
72042
72120
|
async function activityOne(slug, rest) {
|
|
72043
72121
|
const [activityUuid, ...extra] = rest;
|
|
72044
|
-
if (activityUuid === void 0 || extra.length > 0) throw new UsageError(`Expected one activity uuid.\n\n${USAGE$
|
|
72122
|
+
if (activityUuid === void 0 || extra.length > 0) throw new UsageError(`Expected one activity uuid.\n\n${USAGE$14}`);
|
|
72045
72123
|
return {
|
|
72046
72124
|
kind: "activity-one",
|
|
72047
72125
|
activity: (await platformCompanyActivityShow({ path: {
|
|
@@ -72062,7 +72140,7 @@ async function userClosure(uuid, rest) {
|
|
|
72062
72140
|
async function closeUser(context, uuid, rest) {
|
|
72063
72141
|
noExtra$8(rest);
|
|
72064
72142
|
const reason = context.flags.get("--reason")?.trim() ?? "";
|
|
72065
|
-
if (reason === "") throw new UsageError(`user-close needs --reason.\n\n${USAGE$
|
|
72143
|
+
if (reason === "") throw new UsageError(`user-close needs --reason.\n\n${USAGE$14}`);
|
|
72066
72144
|
const review = (await platformUserClosureShow({ path: { userUuid: uuid } })).data;
|
|
72067
72145
|
if (review.blockingReasons.length > 0) throw new UsageError(`Closing ${review.email} is blocked: ${review.blockingReasons.join("; ")}.`);
|
|
72068
72146
|
return {
|
|
@@ -72078,11 +72156,11 @@ async function closeUser(context, uuid, rest) {
|
|
|
72078
72156
|
}
|
|
72079
72157
|
/** No positional arguments, or a usage refusal. */
|
|
72080
72158
|
function noExtra$8(rest) {
|
|
72081
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
72159
|
+
if (rest.length > 0) throw new UsageError(USAGE$14);
|
|
72082
72160
|
}
|
|
72083
72161
|
//#endregion
|
|
72084
72162
|
//#region src/commands/platform-admin.ts
|
|
72085
|
-
var USAGE$
|
|
72163
|
+
var USAGE$13 = [
|
|
72086
72164
|
"Usage: hostingctl platform companies [--search <text>] [--state <state>]",
|
|
72087
72165
|
" hostingctl platform company-add --name <name> --slug <slug> --admin-email <address>",
|
|
72088
72166
|
" hostingctl platform company-member-add --company <slug> --email <address> --role <admin|member>",
|
|
@@ -72120,11 +72198,11 @@ async function platformAdmin(context, group, args) {
|
|
|
72120
72198
|
if (group === "company-member-add") return await addCompanyMember(context, args);
|
|
72121
72199
|
if (group === "domain-lookup") return await lookup(context, args);
|
|
72122
72200
|
const [subject, ...rest] = args;
|
|
72123
|
-
if (subject === void 0) throw new UsageError(USAGE$
|
|
72201
|
+
if (subject === void 0) throw new UsageError(USAGE$13);
|
|
72124
72202
|
if (group === "company-closure") return await companyClosure(subject, rest);
|
|
72125
72203
|
if (group === "company-close") return await closeCompany(context, subject, rest);
|
|
72126
72204
|
if (group === "company-close-accept") return await acceptCompany(context, subject, rest);
|
|
72127
|
-
throw new UsageError(USAGE$
|
|
72205
|
+
throw new UsageError(USAGE$13);
|
|
72128
72206
|
}
|
|
72129
72207
|
/** `companies`, filtered by the API's own query keys. */
|
|
72130
72208
|
async function companies(context, args) {
|
|
@@ -72152,9 +72230,9 @@ async function companies(context, args) {
|
|
|
72152
72230
|
async function addCompany(context, args) {
|
|
72153
72231
|
noExtra$7(args);
|
|
72154
72232
|
const body = {
|
|
72155
|
-
name: requiredFlag$3(context, "--name", USAGE$
|
|
72156
|
-
slug: requiredFlag$3(context, "--slug", USAGE$
|
|
72157
|
-
adminEmail: requiredFlag$3(context, "--admin-email", USAGE$
|
|
72233
|
+
name: requiredFlag$3(context, "--name", USAGE$13),
|
|
72234
|
+
slug: requiredFlag$3(context, "--slug", USAGE$13).toLowerCase(),
|
|
72235
|
+
adminEmail: requiredFlag$3(context, "--admin-email", USAGE$13).toLowerCase()
|
|
72158
72236
|
};
|
|
72159
72237
|
return {
|
|
72160
72238
|
kind: "admin-write",
|
|
@@ -72164,9 +72242,9 @@ async function addCompany(context, args) {
|
|
|
72164
72242
|
/** `company-member-add --company … --email … --role …`: attach an account that already exists. */
|
|
72165
72243
|
async function addCompanyMember(context, args) {
|
|
72166
72244
|
noExtra$7(args);
|
|
72167
|
-
const company = requiredFlag$3(context, "--company", USAGE$
|
|
72168
|
-
const email = requiredFlag$3(context, "--email", USAGE$
|
|
72169
|
-
const role = companyRole(context.flags.get("--role"), USAGE$
|
|
72245
|
+
const company = requiredFlag$3(context, "--company", USAGE$13);
|
|
72246
|
+
const email = requiredFlag$3(context, "--email", USAGE$13).toLowerCase();
|
|
72247
|
+
const role = companyRole(context.flags.get("--role"), USAGE$13);
|
|
72170
72248
|
return {
|
|
72171
72249
|
kind: "admin-write",
|
|
72172
72250
|
outcome: await confirmableWrite(context, `Attach ${email} to ${company} as ${role}.`, async () => (await platformCompanyMemberStore({
|
|
@@ -72183,7 +72261,7 @@ async function lookup(context, args) {
|
|
|
72183
72261
|
noExtra$7(args);
|
|
72184
72262
|
return {
|
|
72185
72263
|
kind: "domain-claim",
|
|
72186
|
-
claim: (await platformDomainOwnershipLookup({ query: { "filter[hostname]": requiredFlag$3(context, "--hostname", USAGE$
|
|
72264
|
+
claim: (await platformDomainOwnershipLookup({ query: { "filter[hostname]": requiredFlag$3(context, "--hostname", USAGE$13).toLowerCase() } })).data
|
|
72187
72265
|
};
|
|
72188
72266
|
}
|
|
72189
72267
|
/** `company-closure <slug>`: what closing the company would do. */
|
|
@@ -72197,7 +72275,7 @@ async function companyClosure(slug, rest) {
|
|
|
72197
72275
|
/** `company-close <slug> --reason …`: request the closure the review described. */
|
|
72198
72276
|
async function closeCompany(context, slug, rest) {
|
|
72199
72277
|
noExtra$7(rest);
|
|
72200
|
-
const reason = requiredFlag$3(context, "--reason", USAGE$
|
|
72278
|
+
const reason = requiredFlag$3(context, "--reason", USAGE$13);
|
|
72201
72279
|
const review = (await platformCompanyClosureShow({ path: { company: slug } })).data;
|
|
72202
72280
|
if (!review.canFinalise) throw new UsageError(`Closing ${slug} is blocked: ${review.blockingReasons.join("; ") || "the review cannot be finalised"}.`);
|
|
72203
72281
|
return {
|
|
@@ -72225,7 +72303,7 @@ async function acceptCompany(context, slug, rest) {
|
|
|
72225
72303
|
}
|
|
72226
72304
|
/** No positional arguments, or a usage refusal. */
|
|
72227
72305
|
function noExtra$7(rest) {
|
|
72228
|
-
if (rest.length > 0) throw new UsageError(USAGE$
|
|
72306
|
+
if (rest.length > 0) throw new UsageError(USAGE$13);
|
|
72229
72307
|
}
|
|
72230
72308
|
//#endregion
|
|
72231
72309
|
//#region src/commands/platform-admin-text.ts
|
|
@@ -72315,7 +72393,7 @@ function platformAdministrationText(report) {
|
|
|
72315
72393
|
}
|
|
72316
72394
|
//#endregion
|
|
72317
72395
|
//#region src/commands/platform-alerts.ts
|
|
72318
|
-
var USAGE$
|
|
72396
|
+
var USAGE$12 = [
|
|
72319
72397
|
"Usage: hostingctl platform alerts",
|
|
72320
72398
|
" hostingctl platform alert-add --email <address>",
|
|
72321
72399
|
" hostingctl platform alert <enable|disable|remove> <recipient-uuid>",
|
|
@@ -72365,13 +72443,13 @@ async function platformAlerts(context, group, args) {
|
|
|
72365
72443
|
};
|
|
72366
72444
|
}
|
|
72367
72445
|
if (group === "yahoo-feedback-set") return await feedback(context, args);
|
|
72368
|
-
throw new UsageError(USAGE$
|
|
72446
|
+
throw new UsageError(USAGE$12);
|
|
72369
72447
|
}
|
|
72370
72448
|
/** `alert-add --email …`. */
|
|
72371
72449
|
async function add$4(context, args) {
|
|
72372
72450
|
noExtra$6(args);
|
|
72373
72451
|
const email = context.flags.get("--email")?.trim().toLowerCase() ?? "";
|
|
72374
|
-
if (email === "") throw new UsageError(`alert-add needs --email.\n\n${USAGE$
|
|
72452
|
+
if (email === "") throw new UsageError(`alert-add needs --email.\n\n${USAGE$12}`);
|
|
72375
72453
|
return {
|
|
72376
72454
|
kind: "alert-write",
|
|
72377
72455
|
outcome: await confirmableWrite(context, `Add ${email} as a platform alert recipient.`, async () => {
|
|
@@ -72391,7 +72469,7 @@ async function test(context, args) {
|
|
|
72391
72469
|
async function settings(context, args) {
|
|
72392
72470
|
noExtra$6(args);
|
|
72393
72471
|
const monitoringEnabled = onOffFlag(context, "--monitoring");
|
|
72394
|
-
if (monitoringEnabled === null) throw new UsageError(`alert-settings needs --monitoring.\n\n${USAGE$
|
|
72472
|
+
if (monitoringEnabled === null) throw new UsageError(`alert-settings needs --monitoring.\n\n${USAGE$12}`);
|
|
72395
72473
|
const outcome = await confirmableWrite(context, `Turn platform monitoring ${monitoringEnabled ? "on" : "off"}.`, async () => (await platformAlertUpdateSettings({ body: { monitoringEnabled } })).data);
|
|
72396
72474
|
return outcome.sent ? {
|
|
72397
72475
|
kind: "alert-settings",
|
|
@@ -72404,7 +72482,7 @@ async function settings(context, args) {
|
|
|
72404
72482
|
/** `alert enable|disable|remove <recipient-uuid>`. */
|
|
72405
72483
|
async function alert(context, args) {
|
|
72406
72484
|
const [action, recipientUuid, ...extra] = args;
|
|
72407
|
-
if (action === void 0 || recipientUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$
|
|
72485
|
+
if (action === void 0 || recipientUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$12);
|
|
72408
72486
|
const path = { recipientUuid };
|
|
72409
72487
|
if (action === "enable" || action === "disable") {
|
|
72410
72488
|
const enabled = action === "enable";
|
|
@@ -72427,13 +72505,13 @@ async function alert(context, args) {
|
|
|
72427
72505
|
description: `Removed recipient ${recipientUuid}.`
|
|
72428
72506
|
};
|
|
72429
72507
|
}
|
|
72430
|
-
throw new UsageError(USAGE$
|
|
72508
|
+
throw new UsageError(USAGE$12);
|
|
72431
72509
|
}
|
|
72432
72510
|
/** `yahoo-feedback-set --enabled … [--mailbox …]`. */
|
|
72433
72511
|
async function feedback(context, args) {
|
|
72434
72512
|
noExtra$6(args);
|
|
72435
72513
|
const enabled = onOffFlag(context, "--enabled");
|
|
72436
|
-
if (enabled === null) throw new UsageError(`yahoo-feedback-set needs --enabled.\n\n${USAGE$
|
|
72514
|
+
if (enabled === null) throw new UsageError(`yahoo-feedback-set needs --enabled.\n\n${USAGE$12}`);
|
|
72437
72515
|
const mailbox = context.flags.get("--mailbox")?.trim() ?? "";
|
|
72438
72516
|
return {
|
|
72439
72517
|
kind: "yahoo-write",
|
|
@@ -72449,7 +72527,7 @@ async function current() {
|
|
|
72449
72527
|
}
|
|
72450
72528
|
/** No positional arguments, or a usage refusal. */
|
|
72451
72529
|
function noExtra$6(args) {
|
|
72452
|
-
if (args.length > 0) throw new UsageError(USAGE$
|
|
72530
|
+
if (args.length > 0) throw new UsageError(USAGE$12);
|
|
72453
72531
|
}
|
|
72454
72532
|
/** The `platform alerts|alert-*|github-app|yahoo-feedback*` renderer. */
|
|
72455
72533
|
function platformAlertText(report) {
|
|
@@ -72507,7 +72585,7 @@ function feedbackLines(feedback) {
|
|
|
72507
72585
|
}
|
|
72508
72586
|
//#endregion
|
|
72509
72587
|
//#region src/commands/platform-consumer-declarations.ts
|
|
72510
|
-
var USAGE$
|
|
72588
|
+
var USAGE$11 = [
|
|
72511
72589
|
"Usage: hostingctl platform consumer-declarations [--json]",
|
|
72512
72590
|
"",
|
|
72513
72591
|
" consumer-declarations Every consumer the platform declares for: its own process roles, the environment",
|
|
@@ -72528,7 +72606,7 @@ var USAGE$10 = [
|
|
|
72528
72606
|
* silently dropped.
|
|
72529
72607
|
*/
|
|
72530
72608
|
async function platformConsumerDeclarations(args) {
|
|
72531
|
-
if (args.length > 0) throw new UsageError(USAGE$
|
|
72609
|
+
if (args.length > 0) throw new UsageError(USAGE$11);
|
|
72532
72610
|
return {
|
|
72533
72611
|
kind: "consumer-declarations",
|
|
72534
72612
|
listing: (await platformHostingConsumerDeclarations({})).data
|
|
@@ -72610,6 +72688,80 @@ function refusalLines(refusals) {
|
|
|
72610
72688
|
];
|
|
72611
72689
|
}
|
|
72612
72690
|
//#endregion
|
|
72691
|
+
//#region src/commands/platform-database-pools.ts
|
|
72692
|
+
var USAGE$10 = [
|
|
72693
|
+
"Usage: hostingctl platform database-pools show <cluster-uuid>",
|
|
72694
|
+
" hostingctl platform database-pools set <cluster-uuid> --enabled <on|off> --reason <text>",
|
|
72695
|
+
"",
|
|
72696
|
+
" show This cluster's system shared MariaDB pools: whether automatic management is on, how many pools",
|
|
72697
|
+
" are serving against the minimum, and each pool's readiness, freshness and occupants.",
|
|
72698
|
+
" set Turn automatic system-pool management on or off for one cluster.",
|
|
72699
|
+
"",
|
|
72700
|
+
"Automatic management is development's own decision, so `show` reports it READ-ONLY on a cluster outside",
|
|
72701
|
+
"that scope; `set` is refused there rather than pretending to switch something it does not control.",
|
|
72702
|
+
"Turning it off creates and restores nothing. It never removes a pool: the pools already serving keep",
|
|
72703
|
+
"serving, and the last serving pool still cannot be cancelled.",
|
|
72704
|
+
"",
|
|
72705
|
+
"These are platform-only operations; the API refuses a company or impersonated token. `set` needs --confirm,",
|
|
72706
|
+
"and --dry-run describes the change without sending it."
|
|
72707
|
+
].join("\n");
|
|
72708
|
+
/** `platform database-pools …`, dispatched from the `platform` command. */
|
|
72709
|
+
async function platformDatabasePools(context, rest) {
|
|
72710
|
+
const [action, ...tail] = rest;
|
|
72711
|
+
if (action === "show") return {
|
|
72712
|
+
kind: "database-pools",
|
|
72713
|
+
pools: (await platformSystemDatabasePoolShow({ path: { clusterUuid: oneUuid$7(tail, USAGE$10) } })).data
|
|
72714
|
+
};
|
|
72715
|
+
if (action === "set") {
|
|
72716
|
+
const clusterUuid = oneUuid$7(tail, USAGE$10);
|
|
72717
|
+
const enabled = onOff$5(context, "--enabled", USAGE$10);
|
|
72718
|
+
const reason = context.flags.get("--reason")?.trim() ?? "";
|
|
72719
|
+
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}`);
|
|
72720
|
+
return {
|
|
72721
|
+
kind: "database-pool-write",
|
|
72722
|
+
outcome: await confirmableWrite(context, [
|
|
72723
|
+
`${enabled ? "Enable" : "Disable"} automatic system database-pool management on cluster ${clusterUuid}.`,
|
|
72724
|
+
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.",
|
|
72725
|
+
` Reason recorded: ${reason}`
|
|
72726
|
+
].join("\n"), async () => (await platformSystemDatabasePoolUpdate({
|
|
72727
|
+
path: { clusterUuid },
|
|
72728
|
+
body: {
|
|
72729
|
+
enabled,
|
|
72730
|
+
reason
|
|
72731
|
+
}
|
|
72732
|
+
})).data)
|
|
72733
|
+
};
|
|
72734
|
+
}
|
|
72735
|
+
throw new UsageError(USAGE$10);
|
|
72736
|
+
}
|
|
72737
|
+
/** One pool, as the operator reads it. */
|
|
72738
|
+
function poolLine(pool) {
|
|
72739
|
+
const state = pool.serving ? "serving" : pool.retained ? "retained" : "not serving";
|
|
72740
|
+
return [
|
|
72741
|
+
` ${pool.name.padEnd(28)} ${state.padEnd(12)} ${pool.fresh ? "fresh" : "stale"}`,
|
|
72742
|
+
` desired ${String(pool.desiredGeneration)} observed ${pool.observedAt ?? "never"}`,
|
|
72743
|
+
` tenants ${String(pool.dependentEnvironmentCount)} unretired identities ${String(pool.unretiredIdentityCount)}`,
|
|
72744
|
+
` ${pool.reason}${pool.action === "" ? "" : ` — ${pool.action}`}`
|
|
72745
|
+
].join("\n");
|
|
72746
|
+
}
|
|
72747
|
+
/** The `platform database-pools …` renderer. */
|
|
72748
|
+
function platformDatabasePoolsText(report) {
|
|
72749
|
+
if (report.kind === "database-pool-write") {
|
|
72750
|
+
const { outcome } = report;
|
|
72751
|
+
if (!outcome.sent) return `Would: ${outcome.description}\nNothing was sent (--dry-run).`;
|
|
72752
|
+
const status = outcome.result;
|
|
72753
|
+
return [outcome.description, ` management is now ${status.enabled ? "on" : "off"}; ${String(status.servingCount)} serving against a minimum of ${String(status.minimumServing)}.`].join("\n");
|
|
72754
|
+
}
|
|
72755
|
+
const { pools: status } = report;
|
|
72756
|
+
return [
|
|
72757
|
+
`${status.clusterName} (${status.clusterUuid})`,
|
|
72758
|
+
` management ${status.enabled ? "on" : "off"}${status.automaticManagementScope ? "" : " (outside this deployment's automatic scope)"}`,
|
|
72759
|
+
` serving ${String(status.servingCount)} pending ${String(status.pendingCount)} minimum ${String(status.minimumServing)}`,
|
|
72760
|
+
` ${status.reason}${status.action === "" ? "" : ` — ${status.action}`}`,
|
|
72761
|
+
...status.pools.length === 0 ? [" No system pool exists on this cluster."] : status.pools.map(poolLine)
|
|
72762
|
+
].join("\n");
|
|
72763
|
+
}
|
|
72764
|
+
//#endregion
|
|
72613
72765
|
//#region src/commands/platform-dns-purge.ts
|
|
72614
72766
|
/**
|
|
72615
72767
|
* The platform's own record that a zone's records are gone at the provider, and its withdrawal.
|
|
@@ -73089,6 +73241,7 @@ var PLATFORM_SUBCOMMANDS = [
|
|
|
73089
73241
|
"yahoo-feedback",
|
|
73090
73242
|
"yahoo-feedback-set",
|
|
73091
73243
|
"consumer-declarations",
|
|
73244
|
+
"database-pools",
|
|
73092
73245
|
"email",
|
|
73093
73246
|
"seed",
|
|
73094
73247
|
"schema",
|
|
@@ -73772,6 +73925,7 @@ var PLATFORM_USAGE = [
|
|
|
73772
73925
|
" hostingctl platform sent-email [--company <slug>] [--kind <kind>] [--tag <tag>]",
|
|
73773
73926
|
" hostingctl platform sent-email-show <uuid>",
|
|
73774
73927
|
" hostingctl platform consumer-declarations",
|
|
73928
|
+
" hostingctl platform database-pools show|set <cluster-uuid>",
|
|
73775
73929
|
" hostingctl platform email <command> (see `platform email --help`)",
|
|
73776
73930
|
" hostingctl platform seed <command> (see `platform seed --help`)",
|
|
73777
73931
|
" hostingctl platform schema --kind <hosting|portable-site> [--version <v>]",
|
|
@@ -73785,6 +73939,7 @@ var PLATFORM_USAGE = [
|
|
|
73785
73939
|
" consumer-declarations What the platform composes for each consumer it serves: roles, delivered",
|
|
73786
73940
|
" environment names, the migration need and the consumers it cannot describe.",
|
|
73787
73941
|
" email Mail monitoring: deliverability, blocklists and postmaster reputation.",
|
|
73942
|
+
" database-pools This cluster's system shared MariaDB pools, and whether the clock may ensure one.",
|
|
73788
73943
|
" seed Prepared content: definitions, versions and their per-cluster placements.",
|
|
73789
73944
|
" schema The published documents a client authors against, by version.",
|
|
73790
73945
|
" purchases What every environment was sold, at what size, and for how long.",
|
|
@@ -73803,83 +73958,83 @@ var PLATFORM_METADATA = {
|
|
|
73803
73958
|
var PLATFORM_TOPICS = [
|
|
73804
73959
|
{
|
|
73805
73960
|
path: ["companies"],
|
|
73806
|
-
usage: USAGE$
|
|
73961
|
+
usage: USAGE$13
|
|
73807
73962
|
},
|
|
73808
73963
|
{
|
|
73809
73964
|
path: ["company-add"],
|
|
73810
|
-
usage: USAGE$
|
|
73965
|
+
usage: USAGE$13
|
|
73811
73966
|
},
|
|
73812
73967
|
{
|
|
73813
73968
|
path: ["company-member-add"],
|
|
73814
|
-
usage: USAGE$
|
|
73969
|
+
usage: USAGE$13
|
|
73815
73970
|
},
|
|
73816
73971
|
{
|
|
73817
73972
|
path: ["company-closure"],
|
|
73818
|
-
usage: USAGE$
|
|
73973
|
+
usage: USAGE$13
|
|
73819
73974
|
},
|
|
73820
73975
|
{
|
|
73821
73976
|
path: ["company-close"],
|
|
73822
|
-
usage: USAGE$
|
|
73977
|
+
usage: USAGE$13
|
|
73823
73978
|
},
|
|
73824
73979
|
{
|
|
73825
73980
|
path: ["company-close-accept"],
|
|
73826
|
-
usage: USAGE$
|
|
73981
|
+
usage: USAGE$13
|
|
73827
73982
|
},
|
|
73828
73983
|
{
|
|
73829
73984
|
path: ["company-activity"],
|
|
73830
|
-
usage: USAGE$
|
|
73985
|
+
usage: USAGE$13
|
|
73831
73986
|
},
|
|
73832
73987
|
{
|
|
73833
73988
|
path: ["company-activity-show"],
|
|
73834
|
-
usage: USAGE$
|
|
73989
|
+
usage: USAGE$13
|
|
73835
73990
|
},
|
|
73836
73991
|
{
|
|
73837
73992
|
path: ["users"],
|
|
73838
|
-
usage: USAGE$
|
|
73993
|
+
usage: USAGE$13
|
|
73839
73994
|
},
|
|
73840
73995
|
{
|
|
73841
73996
|
path: ["user-closure"],
|
|
73842
|
-
usage: USAGE$
|
|
73997
|
+
usage: USAGE$13
|
|
73843
73998
|
},
|
|
73844
73999
|
{
|
|
73845
74000
|
path: ["user-close"],
|
|
73846
|
-
usage: USAGE$
|
|
74001
|
+
usage: USAGE$13
|
|
73847
74002
|
},
|
|
73848
74003
|
{
|
|
73849
74004
|
path: ["domain-lookup"],
|
|
73850
|
-
usage: USAGE$
|
|
74005
|
+
usage: USAGE$13
|
|
73851
74006
|
},
|
|
73852
74007
|
{
|
|
73853
74008
|
path: ["alerts"],
|
|
73854
|
-
usage: USAGE$
|
|
74009
|
+
usage: USAGE$12
|
|
73855
74010
|
},
|
|
73856
74011
|
{
|
|
73857
74012
|
path: ["alert"],
|
|
73858
|
-
usage: USAGE$
|
|
74013
|
+
usage: USAGE$12
|
|
73859
74014
|
},
|
|
73860
74015
|
{
|
|
73861
74016
|
path: ["alert-add"],
|
|
73862
|
-
usage: USAGE$
|
|
74017
|
+
usage: USAGE$12
|
|
73863
74018
|
},
|
|
73864
74019
|
{
|
|
73865
74020
|
path: ["alert-test"],
|
|
73866
|
-
usage: USAGE$
|
|
74021
|
+
usage: USAGE$12
|
|
73867
74022
|
},
|
|
73868
74023
|
{
|
|
73869
74024
|
path: ["alert-settings"],
|
|
73870
|
-
usage: USAGE$
|
|
74025
|
+
usage: USAGE$12
|
|
73871
74026
|
},
|
|
73872
74027
|
{
|
|
73873
74028
|
path: ["github-app"],
|
|
73874
|
-
usage: USAGE$
|
|
74029
|
+
usage: USAGE$12
|
|
73875
74030
|
},
|
|
73876
74031
|
{
|
|
73877
74032
|
path: ["yahoo-feedback"],
|
|
73878
|
-
usage: USAGE$
|
|
74033
|
+
usage: USAGE$12
|
|
73879
74034
|
},
|
|
73880
74035
|
{
|
|
73881
74036
|
path: ["yahoo-feedback-set"],
|
|
73882
|
-
usage: USAGE$
|
|
74037
|
+
usage: USAGE$12
|
|
73883
74038
|
},
|
|
73884
74039
|
{
|
|
73885
74040
|
path: ["sent-email"],
|
|
@@ -73891,12 +74046,16 @@ var PLATFORM_TOPICS = [
|
|
|
73891
74046
|
},
|
|
73892
74047
|
{
|
|
73893
74048
|
path: ["consumer-declarations"],
|
|
73894
|
-
usage: USAGE$
|
|
74049
|
+
usage: USAGE$11
|
|
73895
74050
|
},
|
|
73896
74051
|
{
|
|
73897
74052
|
path: ["email"],
|
|
73898
74053
|
usage: USAGE$8
|
|
73899
74054
|
},
|
|
74055
|
+
{
|
|
74056
|
+
path: ["database-pools"],
|
|
74057
|
+
usage: USAGE$10
|
|
74058
|
+
},
|
|
73900
74059
|
{
|
|
73901
74060
|
path: ["seed"],
|
|
73902
74061
|
usage: USAGE$4
|
|
@@ -74179,6 +74338,7 @@ var platform = {
|
|
|
74179
74338
|
if (ALERT_GROUPS.has(group)) return await platformAlerts(context, group, args);
|
|
74180
74339
|
if (group === "consumer-declarations") return await platformConsumerDeclarations(args);
|
|
74181
74340
|
if (group === "seed") return await platformSeeds(context, args);
|
|
74341
|
+
if (group === "database-pools") return await platformDatabasePools(context, args);
|
|
74182
74342
|
if (group === "schema") {
|
|
74183
74343
|
const request = schemaRequest(context.flags, PLATFORM_USAGE);
|
|
74184
74344
|
return await readSchema(request.document, request.version);
|
|
@@ -74199,6 +74359,7 @@ var platform = {
|
|
|
74199
74359
|
if (report.kind === "runtime-version-preview" || report.kind === "runtime-version-evacuation" || report.kind === "runtime-version-write") return platformRuntimeVersionText(report);
|
|
74200
74360
|
if (report.kind === "consumer-declarations") return platformConsumerDeclarationsText(report.listing);
|
|
74201
74361
|
if (report.kind === "sent-emails" || report.kind === "sent-email") return sentEmailText(report);
|
|
74362
|
+
if (report.kind === "database-pools" || report.kind === "database-pool-write") return platformDatabasePoolsText(report);
|
|
74202
74363
|
if (isAdminReport(report)) return platformAdministrationText(report);
|
|
74203
74364
|
if (isSeedReport(report)) return platformSeedsText(report);
|
|
74204
74365
|
return isAlertReport(report) ? platformAlertText(report) : platformEmailText(report);
|
|
@@ -79737,7 +79898,7 @@ function writeUpdateState(state, env = process.env) {
|
|
|
79737
79898
|
}
|
|
79738
79899
|
//#endregion
|
|
79739
79900
|
//#region src/version.ts
|
|
79740
|
-
var VERSION = "1.0.
|
|
79901
|
+
var VERSION = "1.0.691";
|
|
79741
79902
|
//#endregion
|
|
79742
79903
|
//#region src/commands/update.ts
|
|
79743
79904
|
/**
|
|
@@ -79812,7 +79973,7 @@ var update = {
|
|
|
79812
79973
|
}, process.env);
|
|
79813
79974
|
return {
|
|
79814
79975
|
...known,
|
|
79815
|
-
current: after ?? "1.0.
|
|
79976
|
+
current: after ?? "1.0.691",
|
|
79816
79977
|
latest: after ?? latest,
|
|
79817
79978
|
upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
|
|
79818
79979
|
action: "run",
|
|
@@ -80094,7 +80255,7 @@ async function printUpdateNotice(options) {
|
|
|
80094
80255
|
}, env, { waitMs: NOTICE_LOCK_WAIT_MS });
|
|
80095
80256
|
} catch {}
|
|
80096
80257
|
if (latest === null) return;
|
|
80097
|
-
if (!isNewerVersion(latest, "1.0.
|
|
80258
|
+
if (!isNewerVersion(latest, "1.0.691")) return;
|
|
80098
80259
|
process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
|
|
80099
80260
|
}
|
|
80100
80261
|
/** Whether an environment variable is set to something, which is how CI and the opt-out are read. */
|