@haakco/hostingctl 1.0.659 → 1.0.669
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 +1245 -317
- 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
|
@@ -32541,6 +32541,22 @@ function hostingApplicationCachePurge(options) {
|
|
|
32541
32541
|
}));
|
|
32542
32542
|
}
|
|
32543
32543
|
/**
|
|
32544
|
+
* {@link /c/:company/hosting/environments/:environmentUuid/applications/:workloadUuid/capacity}
|
|
32545
|
+
*/
|
|
32546
|
+
function hostingApplicationCapacityShow(options) {
|
|
32547
|
+
const { client: request = client, ...config } = options;
|
|
32548
|
+
return withUnwrap(request({
|
|
32549
|
+
method: "GET",
|
|
32550
|
+
url: "/c/{company}/hosting/environments/{environmentUuid}/applications/{workloadUuid}/capacity",
|
|
32551
|
+
security: [{
|
|
32552
|
+
type: "http",
|
|
32553
|
+
scheme: "bearer"
|
|
32554
|
+
}],
|
|
32555
|
+
...config,
|
|
32556
|
+
throwOnError: config.throwOnError ?? true
|
|
32557
|
+
}));
|
|
32558
|
+
}
|
|
32559
|
+
/**
|
|
32544
32560
|
* {@link /c/:company/hosting/environments/:environmentUuid/applications/:workloadUuid/component-settings}
|
|
32545
32561
|
*/
|
|
32546
32562
|
function hostingApplicationsComponentSettings(options) {
|
|
@@ -33891,6 +33907,54 @@ function hostingEnvironmentsReferences(options) {
|
|
|
33891
33907
|
}));
|
|
33892
33908
|
}
|
|
33893
33909
|
/**
|
|
33910
|
+
* {@link /c/:company/hosting/environments/:environmentUuid/storage}
|
|
33911
|
+
*/
|
|
33912
|
+
function hostingEnvironmentStorageIndex(options) {
|
|
33913
|
+
const { client: request = client, ...config } = options;
|
|
33914
|
+
return withUnwrap(request({
|
|
33915
|
+
method: "GET",
|
|
33916
|
+
url: "/c/{company}/hosting/environments/{environmentUuid}/storage",
|
|
33917
|
+
security: [{
|
|
33918
|
+
type: "http",
|
|
33919
|
+
scheme: "bearer"
|
|
33920
|
+
}],
|
|
33921
|
+
...config,
|
|
33922
|
+
throwOnError: config.throwOnError ?? true
|
|
33923
|
+
}));
|
|
33924
|
+
}
|
|
33925
|
+
/**
|
|
33926
|
+
* {@link /c/:company/hosting/environments/:environmentUuid/storage}
|
|
33927
|
+
*/
|
|
33928
|
+
function hostingEnvironmentStorageUpdate(options) {
|
|
33929
|
+
const { client: request = client, ...config } = options;
|
|
33930
|
+
return withUnwrap(request({
|
|
33931
|
+
method: "PUT",
|
|
33932
|
+
url: "/c/{company}/hosting/environments/{environmentUuid}/storage",
|
|
33933
|
+
security: [{
|
|
33934
|
+
type: "http",
|
|
33935
|
+
scheme: "bearer"
|
|
33936
|
+
}],
|
|
33937
|
+
...config,
|
|
33938
|
+
throwOnError: config.throwOnError ?? true
|
|
33939
|
+
}));
|
|
33940
|
+
}
|
|
33941
|
+
/**
|
|
33942
|
+
* {@link /c/:company/hosting/environments/:environmentUuid/storage/:volumeType}
|
|
33943
|
+
*/
|
|
33944
|
+
function hostingEnvironmentStorageDestroy(options) {
|
|
33945
|
+
const { client: request = client, ...config } = options;
|
|
33946
|
+
return withUnwrap(request({
|
|
33947
|
+
method: "DELETE",
|
|
33948
|
+
url: "/c/{company}/hosting/environments/{environmentUuid}/storage/{volumeType}",
|
|
33949
|
+
security: [{
|
|
33950
|
+
type: "http",
|
|
33951
|
+
scheme: "bearer"
|
|
33952
|
+
}],
|
|
33953
|
+
...config,
|
|
33954
|
+
throwOnError: config.throwOnError ?? true
|
|
33955
|
+
}));
|
|
33956
|
+
}
|
|
33957
|
+
/**
|
|
33894
33958
|
* {@link /c/:company/hosting/environments/:environmentUuid/secret-connections}
|
|
33895
33959
|
*/
|
|
33896
33960
|
function hostingExternalSecretIndex(options) {
|
|
@@ -37559,6 +37623,22 @@ function platformCompanyMemberStore(options) {
|
|
|
37559
37623
|
}));
|
|
37560
37624
|
}
|
|
37561
37625
|
/**
|
|
37626
|
+
* {@link /platform/companies/:company/hosting/pool/allowance}
|
|
37627
|
+
*/
|
|
37628
|
+
function platformHostingPoolAllowance(options) {
|
|
37629
|
+
const { client: request = client, ...config } = options;
|
|
37630
|
+
return withUnwrap(request({
|
|
37631
|
+
method: "PUT",
|
|
37632
|
+
url: "/platform/companies/{company}/hosting/pool/allowance",
|
|
37633
|
+
security: [{
|
|
37634
|
+
type: "http",
|
|
37635
|
+
scheme: "bearer"
|
|
37636
|
+
}],
|
|
37637
|
+
...config,
|
|
37638
|
+
throwOnError: config.throwOnError ?? true
|
|
37639
|
+
}));
|
|
37640
|
+
}
|
|
37641
|
+
/**
|
|
37562
37642
|
* {@link /platform/hosting/environments/:environmentUuid/realm}
|
|
37563
37643
|
*/
|
|
37564
37644
|
function platformHostingRealmStore(options) {
|
|
@@ -37874,6 +37954,118 @@ function platformSentEmailShow(options) {
|
|
|
37874
37954
|
}));
|
|
37875
37955
|
}
|
|
37876
37956
|
/**
|
|
37957
|
+
* {@link /platform/hosting/storage/classes}
|
|
37958
|
+
*/
|
|
37959
|
+
function platformStorageClassIndex(options = {}) {
|
|
37960
|
+
const { client: request = client, ...config } = options;
|
|
37961
|
+
return withUnwrap(request({
|
|
37962
|
+
method: "GET",
|
|
37963
|
+
url: "/platform/hosting/storage/classes",
|
|
37964
|
+
security: [{
|
|
37965
|
+
type: "http",
|
|
37966
|
+
scheme: "bearer"
|
|
37967
|
+
}],
|
|
37968
|
+
...config,
|
|
37969
|
+
throwOnError: config.throwOnError ?? true
|
|
37970
|
+
}));
|
|
37971
|
+
}
|
|
37972
|
+
/**
|
|
37973
|
+
* {@link /platform/hosting/storage/classes}
|
|
37974
|
+
*/
|
|
37975
|
+
function platformStorageClassStore(options) {
|
|
37976
|
+
const { client: request = client, ...config } = options;
|
|
37977
|
+
return withUnwrap(request({
|
|
37978
|
+
method: "POST",
|
|
37979
|
+
url: "/platform/hosting/storage/classes",
|
|
37980
|
+
security: [{
|
|
37981
|
+
type: "http",
|
|
37982
|
+
scheme: "bearer"
|
|
37983
|
+
}],
|
|
37984
|
+
...config,
|
|
37985
|
+
throwOnError: config.throwOnError ?? true
|
|
37986
|
+
}));
|
|
37987
|
+
}
|
|
37988
|
+
/**
|
|
37989
|
+
* {@link /platform/hosting/storage/classes/:storageClassUuid/observation}
|
|
37990
|
+
*/
|
|
37991
|
+
function platformStorageClassObservation(options) {
|
|
37992
|
+
const { client: request = client, ...config } = options;
|
|
37993
|
+
return withUnwrap(request({
|
|
37994
|
+
method: "GET",
|
|
37995
|
+
url: "/platform/hosting/storage/classes/{storageClassUuid}/observation",
|
|
37996
|
+
security: [{
|
|
37997
|
+
type: "http",
|
|
37998
|
+
scheme: "bearer"
|
|
37999
|
+
}],
|
|
38000
|
+
...config,
|
|
38001
|
+
throwOnError: config.throwOnError ?? true
|
|
38002
|
+
}));
|
|
38003
|
+
}
|
|
38004
|
+
/**
|
|
38005
|
+
* {@link /platform/hosting/storage/classes/:storageClassUuid}
|
|
38006
|
+
*/
|
|
38007
|
+
function platformStorageClassUpdate(options) {
|
|
38008
|
+
const { client: request = client, ...config } = options;
|
|
38009
|
+
return withUnwrap(request({
|
|
38010
|
+
method: "PATCH",
|
|
38011
|
+
url: "/platform/hosting/storage/classes/{storageClassUuid}",
|
|
38012
|
+
security: [{
|
|
38013
|
+
type: "http",
|
|
38014
|
+
scheme: "bearer"
|
|
38015
|
+
}],
|
|
38016
|
+
...config,
|
|
38017
|
+
throwOnError: config.throwOnError ?? true
|
|
38018
|
+
}));
|
|
38019
|
+
}
|
|
38020
|
+
/**
|
|
38021
|
+
* {@link /platform/hosting/storage/classes/:storageClassUuid/enabled}
|
|
38022
|
+
*/
|
|
38023
|
+
function platformStorageClassSetEnabled(options) {
|
|
38024
|
+
const { client: request = client, ...config } = options;
|
|
38025
|
+
return withUnwrap(request({
|
|
38026
|
+
method: "PATCH",
|
|
38027
|
+
url: "/platform/hosting/storage/classes/{storageClassUuid}/enabled",
|
|
38028
|
+
security: [{
|
|
38029
|
+
type: "http",
|
|
38030
|
+
scheme: "bearer"
|
|
38031
|
+
}],
|
|
38032
|
+
...config,
|
|
38033
|
+
throwOnError: config.throwOnError ?? true
|
|
38034
|
+
}));
|
|
38035
|
+
}
|
|
38036
|
+
/**
|
|
38037
|
+
* {@link /platform/hosting/storage/classes/:storageClassUuid/volume-types}
|
|
38038
|
+
*/
|
|
38039
|
+
function platformStorageClassUpdateVolumeTypes(options) {
|
|
38040
|
+
const { client: request = client, ...config } = options;
|
|
38041
|
+
return withUnwrap(request({
|
|
38042
|
+
method: "PUT",
|
|
38043
|
+
url: "/platform/hosting/storage/classes/{storageClassUuid}/volume-types",
|
|
38044
|
+
security: [{
|
|
38045
|
+
type: "http",
|
|
38046
|
+
scheme: "bearer"
|
|
38047
|
+
}],
|
|
38048
|
+
...config,
|
|
38049
|
+
throwOnError: config.throwOnError ?? true
|
|
38050
|
+
}));
|
|
38051
|
+
}
|
|
38052
|
+
/**
|
|
38053
|
+
* {@link /platform/hosting/storage/clusters/:clusterUuid/default}
|
|
38054
|
+
*/
|
|
38055
|
+
function platformStorageClassSetDefault(options) {
|
|
38056
|
+
const { client: request = client, ...config } = options;
|
|
38057
|
+
return withUnwrap(request({
|
|
38058
|
+
method: "PUT",
|
|
38059
|
+
url: "/platform/hosting/storage/clusters/{clusterUuid}/default",
|
|
38060
|
+
security: [{
|
|
38061
|
+
type: "http",
|
|
38062
|
+
scheme: "bearer"
|
|
38063
|
+
}],
|
|
38064
|
+
...config,
|
|
38065
|
+
throwOnError: config.throwOnError ?? true
|
|
38066
|
+
}));
|
|
38067
|
+
}
|
|
38068
|
+
/**
|
|
37877
38069
|
* {@link /platform/hosting/orphans}
|
|
37878
38070
|
*/
|
|
37879
38071
|
function platformHostingOrphans(options = {}) {
|
|
@@ -38382,12 +38574,12 @@ function usageFor(scope) {
|
|
|
38382
38574
|
/** `sent-email` and `sent-email-show`, answered by the one scope endpoint that owns them. */
|
|
38383
38575
|
async function sentEmail(context, scope, group, args) {
|
|
38384
38576
|
if (group === "sent-email") return await index$1(context, scope, args);
|
|
38385
|
-
if (group === "sent-email-show") return await one$
|
|
38577
|
+
if (group === "sent-email-show") return await one$3(scope, args);
|
|
38386
38578
|
throw new UsageError(usageFor(scope));
|
|
38387
38579
|
}
|
|
38388
38580
|
/** `sent-email`: every page the API reports for the filters named. */
|
|
38389
38581
|
async function index$1(context, scope, args) {
|
|
38390
|
-
noExtra$
|
|
38582
|
+
noExtra$23(args, usageFor(scope));
|
|
38391
38583
|
const query = filters(context);
|
|
38392
38584
|
let retentionDays = 0;
|
|
38393
38585
|
const { items, meta } = await allPages(async (page, perPage) => {
|
|
@@ -38422,7 +38614,7 @@ async function index$1(context, scope, args) {
|
|
|
38422
38614
|
};
|
|
38423
38615
|
}
|
|
38424
38616
|
/** `sent-email-show <uuid>`: the stored wording of one email. */
|
|
38425
|
-
async function one$
|
|
38617
|
+
async function one$3(scope, args) {
|
|
38426
38618
|
const uuid = oneUuid$7(args, usageFor(scope));
|
|
38427
38619
|
return {
|
|
38428
38620
|
kind: "sent-email",
|
|
@@ -38464,7 +38656,7 @@ function companyFilter(context) {
|
|
|
38464
38656
|
return company === "" ? void 0 : company;
|
|
38465
38657
|
}
|
|
38466
38658
|
/** No positional arguments, or a usage refusal. */
|
|
38467
|
-
function noExtra$
|
|
38659
|
+
function noExtra$23(args, usage) {
|
|
38468
38660
|
if (args.length > 0) throw new UsageError(usage);
|
|
38469
38661
|
}
|
|
38470
38662
|
/**
|
|
@@ -38672,7 +38864,7 @@ var USAGE$58 = [
|
|
|
38672
38864
|
var MAX_PASSWORD_BYTES = 1024;
|
|
38673
38865
|
var MAX_TOKEN_BYTES = 4096;
|
|
38674
38866
|
/** One required flag's value, or a refusal naming the flag. */
|
|
38675
|
-
function required$
|
|
38867
|
+
function required$8(context, flag) {
|
|
38676
38868
|
const value = context.flags.get(flag)?.trim() ?? "";
|
|
38677
38869
|
if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$58}`);
|
|
38678
38870
|
return value;
|
|
@@ -38734,8 +38926,8 @@ async function password$1(context) {
|
|
|
38734
38926
|
}
|
|
38735
38927
|
/** `auth register`: a new account, which needs no session. */
|
|
38736
38928
|
async function register$1(context) {
|
|
38737
|
-
const name = required$
|
|
38738
|
-
const email = required$
|
|
38929
|
+
const name = required$8(context, "--name");
|
|
38930
|
+
const email = required$8(context, "--email");
|
|
38739
38931
|
return await confirmableWrite(context, `Create the account ${email} for ${name}.`, async () => {
|
|
38740
38932
|
return (await authRegister({ body: {
|
|
38741
38933
|
name,
|
|
@@ -38746,14 +38938,14 @@ async function register$1(context) {
|
|
|
38746
38938
|
}
|
|
38747
38939
|
/** `auth forgot-password`: the API answers the same way for any address, so the output claims nothing more. */
|
|
38748
38940
|
async function forgotPassword(context) {
|
|
38749
|
-
const email = required$
|
|
38941
|
+
const email = required$8(context, "--email");
|
|
38750
38942
|
return await confirmableWrite(context, `Ask for a password reset mail for ${email}.`, async () => {
|
|
38751
38943
|
return (await authForgotPassword({ body: { email } })).data;
|
|
38752
38944
|
});
|
|
38753
38945
|
}
|
|
38754
38946
|
/** `auth reset-password`: the token from the mail, the address it was sent to, and the new password. */
|
|
38755
38947
|
async function resetPassword(context) {
|
|
38756
|
-
const email = required$
|
|
38948
|
+
const email = required$8(context, "--email");
|
|
38757
38949
|
return await confirmableWrite(context, `Reset the password for ${email}.`, async () => {
|
|
38758
38950
|
const token = readSecret(context, "token", MAX_TOKEN_BYTES, USAGE$58);
|
|
38759
38951
|
const password = readSecret(context, "password", MAX_PASSWORD_BYTES, USAGE$58);
|
|
@@ -40204,12 +40396,12 @@ async function written$9(pending) {
|
|
|
40204
40396
|
};
|
|
40205
40397
|
}
|
|
40206
40398
|
/** A company-wide read takes no positionals. */
|
|
40207
|
-
function noExtra$
|
|
40399
|
+
function noExtra$22(rest) {
|
|
40208
40400
|
if (rest.length > 0) throw new UsageError(USAGE$52);
|
|
40209
40401
|
}
|
|
40210
40402
|
/** `settings`. */
|
|
40211
40403
|
async function settings$1(path, rest) {
|
|
40212
|
-
noExtra$
|
|
40404
|
+
noExtra$22(rest);
|
|
40213
40405
|
return {
|
|
40214
40406
|
kind: "settings",
|
|
40215
40407
|
access: (await hostingAccessShow({ path })).data
|
|
@@ -40217,7 +40409,7 @@ async function settings$1(path, rest) {
|
|
|
40217
40409
|
}
|
|
40218
40410
|
/** `settings-set --password … --sftp-only …`. */
|
|
40219
40411
|
async function settingsSet(context, path, rest) {
|
|
40220
|
-
noExtra$
|
|
40412
|
+
noExtra$22(rest);
|
|
40221
40413
|
const passwordEnabled = onOff$5(context, "--password", USAGE$52);
|
|
40222
40414
|
const sftpOnly = onOff$5(context, "--sftp-only", USAGE$52);
|
|
40223
40415
|
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 () => {
|
|
@@ -40233,7 +40425,7 @@ async function settingsSet(context, path, rest) {
|
|
|
40233
40425
|
}
|
|
40234
40426
|
/** `grants`. */
|
|
40235
40427
|
async function grants(path, rest) {
|
|
40236
|
-
noExtra$
|
|
40428
|
+
noExtra$22(rest);
|
|
40237
40429
|
return {
|
|
40238
40430
|
kind: "grants",
|
|
40239
40431
|
grants: (await hostingAccessGrantIndex({ path })).data.items
|
|
@@ -40241,7 +40433,7 @@ async function grants(path, rest) {
|
|
|
40241
40433
|
}
|
|
40242
40434
|
/** `grant --user … --access-user …`. */
|
|
40243
40435
|
async function grant$1(context, path, rest) {
|
|
40244
|
-
noExtra$
|
|
40436
|
+
noExtra$22(rest);
|
|
40245
40437
|
const userUuid = context.flags.get("--user") ?? "";
|
|
40246
40438
|
const accessUserUuid = context.flags.get("--access-user") ?? "";
|
|
40247
40439
|
if (userUuid === "" || accessUserUuid === "") throw new UsageError(`grant needs --user and --access-user.\\n\\n${USAGE$52}`);
|
|
@@ -41340,7 +41532,7 @@ var USAGE$50 = [
|
|
|
41340
41532
|
/** `application administrator*|recovery-*`, from the `application` command. */
|
|
41341
41533
|
async function applicationAdmin(context, action, path, rest) {
|
|
41342
41534
|
if (action === "administrator") {
|
|
41343
|
-
noExtra$
|
|
41535
|
+
noExtra$21(rest);
|
|
41344
41536
|
return {
|
|
41345
41537
|
kind: "administrator",
|
|
41346
41538
|
administrator: (await hostingAdministratorShow({ path })).data
|
|
@@ -41366,7 +41558,7 @@ async function applicationAdmin(context, action, path, rest) {
|
|
|
41366
41558
|
}
|
|
41367
41559
|
/** `administrator-reset|reveal`: the one place the application's own password is printed. */
|
|
41368
41560
|
async function credential(context, path, rest, kind) {
|
|
41369
|
-
noExtra$
|
|
41561
|
+
noExtra$21(rest);
|
|
41370
41562
|
return await written$8(confirmableWrite(context, kind === "reset" ? ["Set a new administrator password and return it once.", " A password changed inside the application is not this one; this credential is the platform's."].join("\n") : "Return the current administrator password once, recorded as its own audited action.", async () => {
|
|
41371
41563
|
return kind === "reset" ? (await hostingAdministratorReset({
|
|
41372
41564
|
path,
|
|
@@ -41382,7 +41574,7 @@ async function written$8(pending) {
|
|
|
41382
41574
|
};
|
|
41383
41575
|
}
|
|
41384
41576
|
/** No positional arguments, or a usage refusal. */
|
|
41385
|
-
function noExtra$
|
|
41577
|
+
function noExtra$21(rest) {
|
|
41386
41578
|
if (rest.length > 0) throw new UsageError(USAGE$50);
|
|
41387
41579
|
}
|
|
41388
41580
|
/** One recovery as one line: what it is doing, how far, and what it holds. */
|
|
@@ -41426,6 +41618,7 @@ var APPLICATION_USAGE = [
|
|
|
41426
41618
|
" hostingctl application show <environment-uuid> <workload-uuid> --company <slug>",
|
|
41427
41619
|
" hostingctl application public-key <environment-uuid> <workload-uuid> --company <slug>",
|
|
41428
41620
|
" hostingctl application speed-check <environment-uuid> <workload-uuid> --company <slug>",
|
|
41621
|
+
" hostingctl application capacity <environment-uuid> <workload-uuid> --company <slug>",
|
|
41429
41622
|
" hostingctl application deployment <environment-uuid> <workload-uuid> --company <slug>",
|
|
41430
41623
|
" hostingctl application build <environment-uuid> <workload-uuid> --company <slug> [--source <selection-uuid> | --source-upload <upload-uuid> | --ssh-source <connection-uuid>] [--idempotency-key <key>]",
|
|
41431
41624
|
" hostingctl application source-upload <environment-uuid> <workload-uuid> --company <slug> --file <path-to.zip>",
|
|
@@ -41457,6 +41650,7 @@ var APPLICATION_USAGE = [
|
|
|
41457
41650
|
" list|show The applications in an environment, and one in detail.",
|
|
41458
41651
|
" public-key Read the component's publishable anonymous key (never its service/signing secrets).",
|
|
41459
41652
|
" speed-check Three bounded HEAD timing, TLS and cache-header checks; not a browser audit.",
|
|
41653
|
+
" capacity The red-line rung one application sits on, why, and the platform's next step.",
|
|
41460
41654
|
" deployment The running, requested and interrupted builds and releases of one application.",
|
|
41461
41655
|
" build Queue a build of the application's applied configuration from one source choice.",
|
|
41462
41656
|
" source-upload Stage a ZIP of the project, review what it measured, then build from it.",
|
|
@@ -41503,7 +41697,7 @@ var USAGE$49 = [
|
|
|
41503
41697
|
async function applicationBuilds(context, action, path, rest) {
|
|
41504
41698
|
if (action === "build") return await build$1(context, path, rest);
|
|
41505
41699
|
if (action === "source-unbind") {
|
|
41506
|
-
noExtra$
|
|
41700
|
+
noExtra$20(rest);
|
|
41507
41701
|
return await written$7(confirmableWrite(context, "Stop deploying this application from a repository. The running release stays.", async () => (await hostingDeploymentUnbindSource({ path })).data));
|
|
41508
41702
|
}
|
|
41509
41703
|
if (action === "source-bind") return await bind$2(context, path, rest);
|
|
@@ -41532,7 +41726,7 @@ async function applicationBuilds(context, action, path, rest) {
|
|
|
41532
41726
|
* meant ambiguous rather than merely surprising.
|
|
41533
41727
|
*/
|
|
41534
41728
|
async function bind$2(context, path, rest) {
|
|
41535
|
-
noExtra$
|
|
41729
|
+
noExtra$20(rest);
|
|
41536
41730
|
const repositorySelectionUuid = context.flags.get("--selection")?.trim() ?? "";
|
|
41537
41731
|
const sshSourceUuid = context.flags.get("--ssh-source")?.trim() ?? "";
|
|
41538
41732
|
if (repositorySelectionUuid === "" === (sshSourceUuid === "")) throw new UsageError(`source-bind needs exactly one of --selection or --ssh-source.\n\n${USAGE$49}`);
|
|
@@ -41571,7 +41765,7 @@ async function written$7(pending) {
|
|
|
41571
41765
|
};
|
|
41572
41766
|
}
|
|
41573
41767
|
/** No positional arguments, or a usage refusal. */
|
|
41574
|
-
function noExtra$
|
|
41768
|
+
function noExtra$20(rest) {
|
|
41575
41769
|
if (rest.length > 0) throw new UsageError(USAGE$49);
|
|
41576
41770
|
}
|
|
41577
41771
|
/**
|
|
@@ -41661,7 +41855,7 @@ var USAGE$48 = [
|
|
|
41661
41855
|
].join("\n");
|
|
41662
41856
|
/** `application cache*`, from the `application` command. */
|
|
41663
41857
|
async function applicationCache(context, action, path, rest) {
|
|
41664
|
-
noExtra$
|
|
41858
|
+
noExtra$19(rest);
|
|
41665
41859
|
if (action === "cache") return {
|
|
41666
41860
|
kind: "cache",
|
|
41667
41861
|
cache: (await hostingApplicationCacheShow({ path })).data
|
|
@@ -41695,7 +41889,7 @@ async function applicationCache(context, action, path, rest) {
|
|
|
41695
41889
|
/** `application routes|route-add|route-remove`, which are environment-scoped. */
|
|
41696
41890
|
async function applicationRoutes(context, action, path, rest) {
|
|
41697
41891
|
if (action === "routes") {
|
|
41698
|
-
noExtra$
|
|
41892
|
+
noExtra$19(rest);
|
|
41699
41893
|
return {
|
|
41700
41894
|
kind: "routes",
|
|
41701
41895
|
page: (await hostingApplicationRouteIndex({ path })).data
|
|
@@ -41720,7 +41914,7 @@ async function applicationRoutes(context, action, path, rest) {
|
|
|
41720
41914
|
}
|
|
41721
41915
|
/** `route-add --source … --target … --path …`. */
|
|
41722
41916
|
async function addRoute(context, path, rest) {
|
|
41723
|
-
noExtra$
|
|
41917
|
+
noExtra$19(rest);
|
|
41724
41918
|
const sourceWorkloadUuid = context.flags.get("--source") ?? "";
|
|
41725
41919
|
const targetWorkloadUuid = context.flags.get("--target") ?? "";
|
|
41726
41920
|
const routePath = context.flags.get("--path") ?? "";
|
|
@@ -41775,7 +41969,7 @@ async function written$6(pending) {
|
|
|
41775
41969
|
};
|
|
41776
41970
|
}
|
|
41777
41971
|
/** No positional arguments, or a usage refusal. */
|
|
41778
|
-
function noExtra$
|
|
41972
|
+
function noExtra$19(rest) {
|
|
41779
41973
|
if (rest.length > 0) throw new UsageError(USAGE$48);
|
|
41780
41974
|
}
|
|
41781
41975
|
/** The `application cache*|routes|route-*` renderer. */
|
|
@@ -41971,10 +42165,10 @@ async function applicationCreate(context, path, rest) {
|
|
|
41971
42165
|
const name = context.flags.get("--name")?.trim() ?? "";
|
|
41972
42166
|
if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$47}`);
|
|
41973
42167
|
const resources = {
|
|
41974
|
-
cpuRequestMillicores: required$
|
|
41975
|
-
cpuLimitMillicores: required$
|
|
41976
|
-
memoryRequestMib: required$
|
|
41977
|
-
memoryLimitMib: required$
|
|
42168
|
+
cpuRequestMillicores: required$7(context, "--cpu-request"),
|
|
42169
|
+
cpuLimitMillicores: required$7(context, "--cpu-limit"),
|
|
42170
|
+
memoryRequestMib: required$7(context, "--memory-request"),
|
|
42171
|
+
memoryLimitMib: required$7(context, "--memory-limit")
|
|
41978
42172
|
};
|
|
41979
42173
|
if (resources.cpuRequestMillicores > resources.cpuLimitMillicores) throw new UsageError("--cpu-request cannot exceed --cpu-limit.");
|
|
41980
42174
|
if (resources.memoryRequestMib > resources.memoryLimitMib) throw new UsageError("--memory-request cannot exceed --memory-limit.");
|
|
@@ -42003,7 +42197,7 @@ async function applicationCreate(context, path, rest) {
|
|
|
42003
42197
|
};
|
|
42004
42198
|
}
|
|
42005
42199
|
/** One required whole-number flag, or a usage refusal naming the flag. */
|
|
42006
|
-
function required$
|
|
42200
|
+
function required$7(context, flag) {
|
|
42007
42201
|
const value = wholeNumberFlag(context.flags, flag);
|
|
42008
42202
|
if (value === null) throw new UsageError(`create needs ${flag}.\n\n${USAGE$47}`);
|
|
42009
42203
|
return value;
|
|
@@ -42272,6 +42466,43 @@ function recoveryLines(one) {
|
|
|
42272
42466
|
].join("\n");
|
|
42273
42467
|
}
|
|
42274
42468
|
//#endregion
|
|
42469
|
+
//#region src/commands/application-capacity.ts
|
|
42470
|
+
var CAPACITY_USAGE = [
|
|
42471
|
+
"Usage: hostingctl application capacity <environment-uuid> <application-uuid> --company <slug> [--json]",
|
|
42472
|
+
"",
|
|
42473
|
+
"The rung one application sits on in the platform's red-line ladder, read from the application's own share",
|
|
42474
|
+
"of the capacity its environment shares: the reason it was placed there and the platform's next step.",
|
|
42475
|
+
"It names no neighbour and changes nothing, so no --confirm is needed."
|
|
42476
|
+
].join("\n");
|
|
42477
|
+
/** Each rung as the short title the heading carries, so an operator reads a verdict rather than a key. */
|
|
42478
|
+
var RUNG_TITLES = {
|
|
42479
|
+
healthy: "within its limits",
|
|
42480
|
+
unmeasured: "not measured",
|
|
42481
|
+
warn: "approaching a limit",
|
|
42482
|
+
throttle: "being throttled",
|
|
42483
|
+
memory: "near its memory limit",
|
|
42484
|
+
oom: "stopped by its memory limit"
|
|
42485
|
+
};
|
|
42486
|
+
/** `capacity <env> <workload>`: one application's own red-line state. */
|
|
42487
|
+
async function applicationCapacity(path) {
|
|
42488
|
+
return (await hostingApplicationCapacityShow({ path })).data;
|
|
42489
|
+
}
|
|
42490
|
+
/**
|
|
42491
|
+
* The finding as the API stated it: the rung as a title, then the reason and the recommendation verbatim.
|
|
42492
|
+
*
|
|
42493
|
+
* A signal the platform could not read is named on its own line, because a rung that no measurement established
|
|
42494
|
+
* is not a clean bill of health and must not be read as one.
|
|
42495
|
+
*/
|
|
42496
|
+
function applicationCapacityText(finding) {
|
|
42497
|
+
const { decision, signals } = finding;
|
|
42498
|
+
return [
|
|
42499
|
+
`${signals.application}: ${RUNG_TITLES[decision.rung]}`,
|
|
42500
|
+
` reason ${decision.reason}`,
|
|
42501
|
+
` next step ${decision.recommendation}`,
|
|
42502
|
+
...signals.unmeasured.length === 0 ? [] : [` not measured ${signals.unmeasured.join(", ")}: this is not the same as healthy.`]
|
|
42503
|
+
].join("\n");
|
|
42504
|
+
}
|
|
42505
|
+
//#endregion
|
|
42275
42506
|
//#region src/commands/application-recovery.ts
|
|
42276
42507
|
var USAGE$44 = [
|
|
42277
42508
|
"Usage: hostingctl application recovery-review <environment-uuid> <application-uuid> --company <slug> [--import <uuid>]",
|
|
@@ -42414,15 +42645,15 @@ function siteAccessFlow(callbacks, usage) {
|
|
|
42414
42645
|
});
|
|
42415
42646
|
return async (context, action, path, rest) => {
|
|
42416
42647
|
if (action === "site-access") {
|
|
42417
|
-
noExtra$
|
|
42648
|
+
noExtra$18(rest, usage);
|
|
42418
42649
|
return {
|
|
42419
42650
|
kind: "site-access",
|
|
42420
42651
|
access: await callbacks.show(path)
|
|
42421
42652
|
};
|
|
42422
42653
|
}
|
|
42423
|
-
if (action === "site-access-set") return await set$
|
|
42654
|
+
if (action === "site-access-set") return await set$3(context, path, rest, callbacks, usage);
|
|
42424
42655
|
if (action === "site-access-rotate") {
|
|
42425
|
-
noExtra$
|
|
42656
|
+
noExtra$18(rest, usage);
|
|
42426
42657
|
if (callbacks.rotate === null) throw new UsageError("This scope has no sign-in edge of its own to rotate.");
|
|
42427
42658
|
return await written(confirmableWrite(context, "Rotate the sign-in edge's credentials. The edge rolls, so a session may re-authenticate.", async () => await callbacks.rotate?.(path)));
|
|
42428
42659
|
}
|
|
@@ -42432,8 +42663,8 @@ function siteAccessFlow(callbacks, usage) {
|
|
|
42432
42663
|
};
|
|
42433
42664
|
}
|
|
42434
42665
|
/** `site-access-set --sign-in … [--audience …]`. */
|
|
42435
|
-
async function set$
|
|
42436
|
-
noExtra$
|
|
42666
|
+
async function set$3(context, path, rest, callbacks, usage) {
|
|
42667
|
+
noExtra$18(rest, usage);
|
|
42437
42668
|
const requiredSignIn = onOffFlag(context, "--sign-in");
|
|
42438
42669
|
if (requiredSignIn === null) throw new UsageError(`site-access-set needs --sign-in.\n\n${usage}`);
|
|
42439
42670
|
const current = await callbacks.show(path);
|
|
@@ -42445,7 +42676,7 @@ async function set$2(context, path, rest, callbacks, usage) {
|
|
|
42445
42676
|
}
|
|
42446
42677
|
/** `site-users`: every invited identity, across every page. */
|
|
42447
42678
|
async function users$1(path, rest, callbacks, usage) {
|
|
42448
|
-
noExtra$
|
|
42679
|
+
noExtra$18(rest, usage);
|
|
42449
42680
|
const items = [];
|
|
42450
42681
|
for (let page = 1; page <= 100; page += 1) {
|
|
42451
42682
|
const answer = await callbacks.usersIndex(path, page, 100);
|
|
@@ -42461,7 +42692,7 @@ async function users$1(path, rest, callbacks, usage) {
|
|
|
42461
42692
|
async function user(context, path, rest, callbacks, usage, written) {
|
|
42462
42693
|
const [action, ...args] = rest;
|
|
42463
42694
|
if (action === "invite") {
|
|
42464
|
-
noExtra$
|
|
42695
|
+
noExtra$18(args, usage);
|
|
42465
42696
|
const email = context.flags.get("--email")?.trim().toLowerCase() ?? "";
|
|
42466
42697
|
if (email === "") throw new UsageError(`site-user invite needs --email.\n\n${usage}`);
|
|
42467
42698
|
return await written(confirmableWrite(context, `Invite ${email} to sign in.`, async () => await callbacks.usersStore(path, email)));
|
|
@@ -42478,7 +42709,7 @@ async function user(context, path, rest, callbacks, usage, written) {
|
|
|
42478
42709
|
throw new UsageError(usage);
|
|
42479
42710
|
}
|
|
42480
42711
|
/** No positional arguments, or a usage refusal. */
|
|
42481
|
-
function noExtra$
|
|
42712
|
+
function noExtra$18(rest, usage) {
|
|
42482
42713
|
if (rest.length > 0) throw new UsageError(usage);
|
|
42483
42714
|
}
|
|
42484
42715
|
/** One invitation as one line. */
|
|
@@ -42601,7 +42832,7 @@ var SSH_SOURCE_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
42601
42832
|
/** `application source-ssh-*`, which is company-scoped and names no application. */
|
|
42602
42833
|
async function applicationSshSources(context, action, company, rest) {
|
|
42603
42834
|
if (action === "source-ssh-list") {
|
|
42604
|
-
noExtra$
|
|
42835
|
+
noExtra$17(rest);
|
|
42605
42836
|
return {
|
|
42606
42837
|
kind: "ssh-sources",
|
|
42607
42838
|
connections: (await hostingSshSourcesIndex({ path: { company } })).data
|
|
@@ -42635,10 +42866,10 @@ async function applicationSshSources(context, action, company, rest) {
|
|
|
42635
42866
|
}
|
|
42636
42867
|
/** `source-ssh-create --name … --repo … --ref … [--ref-kind …]`: one repository and the ref it reads. */
|
|
42637
42868
|
async function create$5(context, company, rest) {
|
|
42638
|
-
noExtra$
|
|
42639
|
-
const name = required$
|
|
42640
|
-
const repositoryUrl = required$
|
|
42641
|
-
const ref = required$
|
|
42869
|
+
noExtra$17(rest);
|
|
42870
|
+
const name = required$6(context, "--name");
|
|
42871
|
+
const repositoryUrl = required$6(context, "--repo");
|
|
42872
|
+
const ref = required$6(context, "--ref");
|
|
42642
42873
|
const refKind = refKindFlag(context) ?? "branch";
|
|
42643
42874
|
return await written$4(confirmableWrite(context, [
|
|
42644
42875
|
`Add the SSH source "${name}" for ${repositoryUrl} at ${refKind} ${ref}.`,
|
|
@@ -42680,7 +42911,7 @@ async function update$4(context, path) {
|
|
|
42680
42911
|
}
|
|
42681
42912
|
/** `source-ssh-confirm-host-key <connection> --fingerprint …`: the client's own out-of-band value. */
|
|
42682
42913
|
async function confirmHostKey(context, path) {
|
|
42683
|
-
const fingerprint = required$
|
|
42914
|
+
const fingerprint = required$6(context, "--fingerprint");
|
|
42684
42915
|
return await written$4(confirmableWrite(context, [
|
|
42685
42916
|
`Accept ${fingerprint} as the server host key of the SSH source ${path.connectionUuid}.`,
|
|
42686
42917
|
"The API compares it with the value it discovered; a fingerprint the platform supplied is refused, so this",
|
|
@@ -42691,7 +42922,7 @@ async function confirmHostKey(context, path) {
|
|
|
42691
42922
|
})).data));
|
|
42692
42923
|
}
|
|
42693
42924
|
/** A required flag's value, or a refusal naming the flag. */
|
|
42694
|
-
function required$
|
|
42925
|
+
function required$6(context, flag) {
|
|
42695
42926
|
const value = context.flags.get(flag)?.trim() ?? "";
|
|
42696
42927
|
if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$42}`);
|
|
42697
42928
|
return value;
|
|
@@ -42716,7 +42947,7 @@ async function written$4(pending) {
|
|
|
42716
42947
|
};
|
|
42717
42948
|
}
|
|
42718
42949
|
/** No positional arguments, or a usage refusal. */
|
|
42719
|
-
function noExtra$
|
|
42950
|
+
function noExtra$17(rest) {
|
|
42720
42951
|
if (rest.length > 0) throw new UsageError(USAGE$42);
|
|
42721
42952
|
}
|
|
42722
42953
|
//#endregion
|
|
@@ -42753,7 +42984,7 @@ var SOURCE_UPLOAD_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
42753
42984
|
async function applicationSourceUploads(context, action, path, rest) {
|
|
42754
42985
|
if (action === "source-upload") return await store(context, path, rest);
|
|
42755
42986
|
if (action === "source-uploads") {
|
|
42756
|
-
noExtra$
|
|
42987
|
+
noExtra$16(rest);
|
|
42757
42988
|
return {
|
|
42758
42989
|
kind: "source-uploads",
|
|
42759
42990
|
uploads: listed$1((await hostingSourceUploadsIndex({ path })).data)
|
|
@@ -42782,7 +43013,7 @@ async function applicationSourceUploads(context, action, path, rest) {
|
|
|
42782
43013
|
* sending anything.
|
|
42783
43014
|
*/
|
|
42784
43015
|
async function store(context, path, rest) {
|
|
42785
|
-
noExtra$
|
|
43016
|
+
noExtra$16(rest);
|
|
42786
43017
|
const file = context.flags.get("--file")?.trim() ?? "";
|
|
42787
43018
|
if (file === "") throw new UsageError(`source-upload needs --file.\n\n${USAGE$41}`);
|
|
42788
43019
|
return await written$3(confirmableWrite(context, [
|
|
@@ -42823,7 +43054,7 @@ async function written$3(pending) {
|
|
|
42823
43054
|
};
|
|
42824
43055
|
}
|
|
42825
43056
|
/** No positional arguments, or a usage refusal. */
|
|
42826
|
-
function noExtra$
|
|
43057
|
+
function noExtra$16(rest) {
|
|
42827
43058
|
if (rest.length > 0) throw new UsageError(USAGE$41);
|
|
42828
43059
|
}
|
|
42829
43060
|
/** One staged upload: what the platform measured, what the review found, and when staging expires. */
|
|
@@ -43246,6 +43477,7 @@ var APPLICATION_METADATA = {
|
|
|
43246
43477
|
subcommands: [
|
|
43247
43478
|
"public-key",
|
|
43248
43479
|
"speed-check",
|
|
43480
|
+
"capacity",
|
|
43249
43481
|
"list",
|
|
43250
43482
|
"show",
|
|
43251
43483
|
"deployment",
|
|
@@ -43305,6 +43537,10 @@ var APPLICATION_TOPICS = [
|
|
|
43305
43537
|
path: ["speed-check"],
|
|
43306
43538
|
usage: SPEED_USAGE
|
|
43307
43539
|
},
|
|
43540
|
+
{
|
|
43541
|
+
path: ["capacity"],
|
|
43542
|
+
usage: CAPACITY_USAGE
|
|
43543
|
+
},
|
|
43308
43544
|
{
|
|
43309
43545
|
path: ["create"],
|
|
43310
43546
|
usage: USAGE$47
|
|
@@ -43500,6 +43736,7 @@ async function reads(context, action, path, extra) {
|
|
|
43500
43736
|
if (extra.length > 0) throw new UsageError(APPLICATION_USAGE);
|
|
43501
43737
|
if (action === "public-key") return (await hostingApplicationsPublicKey({ path })).data;
|
|
43502
43738
|
if (action === "speed-check") return (await hostingApplicationSpeedShow({ path })).data;
|
|
43739
|
+
if (action === "capacity") return await applicationCapacity(path);
|
|
43503
43740
|
if (action === "deployment") return (await hostingDeploymentShow({ path })).data;
|
|
43504
43741
|
if (action === "runs") return (await hostingProcessRunIndex({ path })).data;
|
|
43505
43742
|
if (action === "removal") return (await hostingApplicationShowRemoval({ path })).data;
|
|
@@ -43794,12 +44031,12 @@ function deploymentImageText(releases) {
|
|
|
43794
44031
|
* What preparing an image did, and what it has not done yet.
|
|
43795
44032
|
*
|
|
43796
44033
|
* Preparing records and verifies the import. Scanning is informational and does not delay readiness.
|
|
43797
|
-
* The receipt identifies the release to activate through the existing deployment operation.
|
|
43798
|
-
*
|
|
44034
|
+
* The receipt identifies the release to activate through the existing deployment operation. A deployment
|
|
44035
|
+
* receipt without a status still says it is preparing, rather than printing an empty column.
|
|
43799
44036
|
*/
|
|
43800
44037
|
function prepareImageText(result) {
|
|
43801
44038
|
if (typeof result === "string") return ` ${result}`;
|
|
43802
|
-
const status = result.status
|
|
44039
|
+
const status = result.status === null || result.status === "" ? "preparing" : result.status;
|
|
43803
44040
|
return [` release ${result.releaseUuid} ${status}`, " Import and verification continue in the background. Scanning does not delay readiness. Deploy the ready release; this command deploys nothing."].join("\n");
|
|
43804
44041
|
}
|
|
43805
44042
|
//#endregion
|
|
@@ -43893,6 +44130,7 @@ function sourceGroupText(report) {
|
|
|
43893
44130
|
function applicationText(report) {
|
|
43894
44131
|
if ("anonymousKey" in report) return report.anonymousKey;
|
|
43895
44132
|
if ("measurement" in report) return applicationSpeedText(report);
|
|
44133
|
+
if ("signals" in report) return applicationCapacityText(report);
|
|
43896
44134
|
if ("kind" in report) return sourceGroupText(report) ?? taggedText$1(report);
|
|
43897
44135
|
if ("sent" in report) return renderWriteOutcome(report, writeAnyResultText);
|
|
43898
44136
|
if ("applications" in report) return listText(report);
|
|
@@ -44178,7 +44416,7 @@ var backupDestination = {
|
|
|
44178
44416
|
const [subcommand, ...rest] = context.positional;
|
|
44179
44417
|
const action = subcommand ?? "show";
|
|
44180
44418
|
if (action === "show") return await show$7(context, rest);
|
|
44181
|
-
if (action === "set") return await set$
|
|
44419
|
+
if (action === "set") return await set$2(context, rest);
|
|
44182
44420
|
if (action === "remove") return await remove$3(context, rest);
|
|
44183
44421
|
throw new UsageError(BACKUP_DESTINATION_USAGE);
|
|
44184
44422
|
},
|
|
@@ -44190,15 +44428,15 @@ var backupDestination = {
|
|
|
44190
44428
|
};
|
|
44191
44429
|
/** `show`, which is also what a bare `backup-destination` does. */
|
|
44192
44430
|
async function show$7(context, rest) {
|
|
44193
|
-
noExtra$
|
|
44431
|
+
noExtra$15(rest);
|
|
44194
44432
|
return {
|
|
44195
44433
|
kind: "destination",
|
|
44196
44434
|
destination: (await hostingBackupDestinationShow({ path: { company: await requireCompany(context.flags) } })).data
|
|
44197
44435
|
};
|
|
44198
44436
|
}
|
|
44199
44437
|
/** `set --endpoint … --bucket … --region … --access-key-id … --secret-key-file|stdin … [--prefix …] [--arm]`. */
|
|
44200
|
-
async function set$
|
|
44201
|
-
noExtra$
|
|
44438
|
+
async function set$2(context, rest) {
|
|
44439
|
+
noExtra$15(rest);
|
|
44202
44440
|
const company = await requireCompany(context.flags);
|
|
44203
44441
|
const endpoint = requiredFlag$3(context, "--endpoint", BACKUP_DESTINATION_USAGE);
|
|
44204
44442
|
const bucket = requiredFlag$3(context, "--bucket", BACKUP_DESTINATION_USAGE);
|
|
@@ -44227,7 +44465,7 @@ async function set$1(context, rest) {
|
|
|
44227
44465
|
}
|
|
44228
44466
|
/** `remove`. */
|
|
44229
44467
|
async function remove$3(context, rest) {
|
|
44230
|
-
noExtra$
|
|
44468
|
+
noExtra$15(rest);
|
|
44231
44469
|
const company = await requireCompany(context.flags);
|
|
44232
44470
|
const outcome = await confirmableWrite(context, "Remove this company's own backup destination. Copies already written there stay in the bucket; our own copy and its retention are unaffected.", async () => (await hostingBackupDestinationDestroy({ path: { company } })).data);
|
|
44233
44471
|
return {
|
|
@@ -44236,7 +44474,7 @@ async function remove$3(context, rest) {
|
|
|
44236
44474
|
};
|
|
44237
44475
|
}
|
|
44238
44476
|
/** No positional arguments, or a usage refusal. */
|
|
44239
|
-
function noExtra$
|
|
44477
|
+
function noExtra$15(rest) {
|
|
44240
44478
|
if (rest.length > 0) throw new UsageError(BACKUP_DESTINATION_USAGE);
|
|
44241
44479
|
}
|
|
44242
44480
|
/** The destination as a few readable lines, saying plainly when there is none. */
|
|
@@ -46880,12 +47118,12 @@ async function companyAssets(context, asset, rest) {
|
|
|
46880
47118
|
const [action, ...tail] = rest;
|
|
46881
47119
|
if (tail.length > 0) throw new UsageError(USAGE$39);
|
|
46882
47120
|
const company = await requireCompany(context.flags);
|
|
46883
|
-
if (action === "set") return await set(context, asset, company);
|
|
47121
|
+
if (action === "set") return await set$1(context, asset, company);
|
|
46884
47122
|
if (action === "remove") return await remove$2(context, asset, company);
|
|
46885
47123
|
throw new UsageError(USAGE$39);
|
|
46886
47124
|
}
|
|
46887
47125
|
/** `set --image-file …`: one multipart upload of the asset. */
|
|
46888
|
-
async function set(context, asset, company) {
|
|
47126
|
+
async function set$1(context, asset, company) {
|
|
46889
47127
|
const file = context.flags.get("--image-file") ?? "";
|
|
46890
47128
|
return await confirmableWrite(context, file === "" ? `Set ${company}'s ${asset}.` : `Set ${company}'s ${asset} to ${file}.`, async () => {
|
|
46891
47129
|
const body = await imageUpload(file, USAGE$39);
|
|
@@ -49101,18 +49339,18 @@ async function emailDomains(context, subcommand, rest) {
|
|
|
49101
49339
|
throw new UsageError(USAGE$32);
|
|
49102
49340
|
}
|
|
49103
49341
|
/** A company-wide command takes no positionals. */
|
|
49104
|
-
function noExtra$
|
|
49342
|
+
function noExtra$14(rest) {
|
|
49105
49343
|
if (rest.length > 0) throw new UsageError(USAGE$32);
|
|
49106
49344
|
}
|
|
49107
49345
|
/** `enroll`: create the service record and start provisioning, which is the API's own create. */
|
|
49108
49346
|
async function enroll(context, rest) {
|
|
49109
|
-
noExtra$
|
|
49347
|
+
noExtra$14(rest);
|
|
49110
49348
|
const company = await requireCompany(context.flags);
|
|
49111
49349
|
return await confirmableWrite(context, "Create this company's mail service record and start provisioning.", async () => (await emailStore({ path: { company } })).data);
|
|
49112
49350
|
}
|
|
49113
49351
|
/** `agree --term …`: accept one package's recorded term. */
|
|
49114
49352
|
async function agree(context, rest) {
|
|
49115
|
-
noExtra$
|
|
49353
|
+
noExtra$14(rest);
|
|
49116
49354
|
const company = await requireCompany(context.flags);
|
|
49117
49355
|
const packageTermUuid = context.flags.get("--term") ?? "";
|
|
49118
49356
|
if (packageTermUuid === "") throw new UsageError(`agree needs --term.\n\n${USAGE$32}`);
|
|
@@ -49123,7 +49361,7 @@ async function agree(context, rest) {
|
|
|
49123
49361
|
}
|
|
49124
49362
|
/** `provision`: build the mail service the agreement bought. */
|
|
49125
49363
|
async function provision(context, rest) {
|
|
49126
|
-
noExtra$
|
|
49364
|
+
noExtra$14(rest);
|
|
49127
49365
|
const company = await requireCompany(context.flags);
|
|
49128
49366
|
return await confirmableWrite(context, "Provision the mail service this company's agreement bought.", async () => (await emailProvision({ path: { company } })).data);
|
|
49129
49367
|
}
|
|
@@ -49132,7 +49370,7 @@ async function domain(context, rest) {
|
|
|
49132
49370
|
const [action, ...tail] = rest;
|
|
49133
49371
|
const company = await requireCompany(context.flags);
|
|
49134
49372
|
if (action === "add") {
|
|
49135
|
-
noExtra$
|
|
49373
|
+
noExtra$14(tail);
|
|
49136
49374
|
const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
|
|
49137
49375
|
if (hostname === "") throw new UsageError(`domain add needs --hostname.\n\n${USAGE$32}`);
|
|
49138
49376
|
return await confirmableWrite(context, `Attach ${hostname} to ${company}'s mail service.`, async () => {
|
|
@@ -49326,7 +49564,7 @@ var QUOTAS = /* @__PURE__ */ new Set([
|
|
|
49326
49564
|
var STATUSES = /* @__PURE__ */ new Set(["enabled", "suspended"]);
|
|
49327
49565
|
/** `email mailbox add|change|remove|forward|preferences|preferences-set|credential|reset-credential`. */
|
|
49328
49566
|
async function emailMailboxAdmin(context, action, tail) {
|
|
49329
|
-
if (action === "add") return await add$
|
|
49567
|
+
if (action === "add") return await add$8(context, tail);
|
|
49330
49568
|
const [emailDomainUuid, mailboxUuid, ...extra] = tail;
|
|
49331
49569
|
if (emailDomainUuid === void 0 || mailboxUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
|
|
49332
49570
|
const path = {
|
|
@@ -49360,7 +49598,7 @@ function destinations(context) {
|
|
|
49360
49598
|
return (context.flags.get("--destinations") ?? "").split(",").map((one) => one.trim().toLowerCase()).filter((one) => one !== "");
|
|
49361
49599
|
}
|
|
49362
49600
|
/** `add <domain> --local … --quota …`. */
|
|
49363
|
-
async function add$
|
|
49601
|
+
async function add$8(context, tail) {
|
|
49364
49602
|
const [emailDomainUuid, ...extra] = tail;
|
|
49365
49603
|
if (emailDomainUuid === void 0 || extra.length > 0) throw new UsageError(USAGE$30);
|
|
49366
49604
|
const company = await requireCompany(context.flags);
|
|
@@ -49504,7 +49742,7 @@ async function emailService(context, subcommand, rest) {
|
|
|
49504
49742
|
throw new UsageError(USAGE$29);
|
|
49505
49743
|
}
|
|
49506
49744
|
/** A company-wide command takes no positionals. */
|
|
49507
|
-
function noExtra$
|
|
49745
|
+
function noExtra$13(rest) {
|
|
49508
49746
|
if (rest.length > 0) throw new UsageError(USAGE$29);
|
|
49509
49747
|
}
|
|
49510
49748
|
/** `service suspend|resume|cancellation|cancel|cancel-withdraw`. */
|
|
@@ -49512,24 +49750,24 @@ async function service(context, rest) {
|
|
|
49512
49750
|
const [action, ...tail] = rest;
|
|
49513
49751
|
const company = await requireCompany(context.flags);
|
|
49514
49752
|
if (action === "cancellation") {
|
|
49515
|
-
noExtra$
|
|
49753
|
+
noExtra$13(tail);
|
|
49516
49754
|
return {
|
|
49517
49755
|
kind: "cancellation",
|
|
49518
49756
|
cancellation: (await emailCancellationShow({ path: { company } })).data
|
|
49519
49757
|
};
|
|
49520
49758
|
}
|
|
49521
49759
|
if (action === "suspend") {
|
|
49522
|
-
noExtra$
|
|
49760
|
+
noExtra$13(tail);
|
|
49523
49761
|
return await confirmableWrite(context, "Suspend delivery for the whole mail service. Mail is refused while suspended.", async () => (await emailSuspend({ path: { company } })).data);
|
|
49524
49762
|
}
|
|
49525
49763
|
if (action === "resume") {
|
|
49526
|
-
noExtra$
|
|
49764
|
+
noExtra$13(tail);
|
|
49527
49765
|
return await confirmableWrite(context, "Resume delivery for the mail service.", async () => {
|
|
49528
49766
|
return (await emailResume({ path: { company } })).data;
|
|
49529
49767
|
});
|
|
49530
49768
|
}
|
|
49531
49769
|
if (action === "cancel") {
|
|
49532
|
-
noExtra$
|
|
49770
|
+
noExtra$13(tail);
|
|
49533
49771
|
const endsAt = context.flags.get("--ends-at")?.trim() ?? "";
|
|
49534
49772
|
if (endsAt === "") throw new UsageError(`service cancel needs --ends-at.\n\n${USAGE$29}`);
|
|
49535
49773
|
if (Number.isNaN(Date.parse(endsAt))) throw new UsageError(`--ends-at must be an ISO date (got "${endsAt}").`);
|
|
@@ -49539,7 +49777,7 @@ async function service(context, rest) {
|
|
|
49539
49777
|
})).data);
|
|
49540
49778
|
}
|
|
49541
49779
|
if (action === "cancel-withdraw") {
|
|
49542
|
-
noExtra$
|
|
49780
|
+
noExtra$13(tail);
|
|
49543
49781
|
return await confirmableWrite(context, "Withdraw the pending cancellation.", async () => {
|
|
49544
49782
|
return (await emailCancellationWithdraw({ path: { company } })).data;
|
|
49545
49783
|
});
|
|
@@ -49548,7 +49786,7 @@ async function service(context, rest) {
|
|
|
49548
49786
|
}
|
|
49549
49787
|
/** `dmarc`: DMARC reporting for every attached name. */
|
|
49550
49788
|
async function dmarc$1(context, rest) {
|
|
49551
|
-
noExtra$
|
|
49789
|
+
noExtra$13(rest);
|
|
49552
49790
|
return {
|
|
49553
49791
|
kind: "dmarc",
|
|
49554
49792
|
domains: (await emailDmarcShow({ path: { company: await requireCompany(context.flags) } })).data.domains
|
|
@@ -49556,7 +49794,7 @@ async function dmarc$1(context, rest) {
|
|
|
49556
49794
|
}
|
|
49557
49795
|
/** `blocklist`: blocklist monitoring for every attached name. */
|
|
49558
49796
|
async function blocklist$1(context, rest) {
|
|
49559
|
-
noExtra$
|
|
49797
|
+
noExtra$13(rest);
|
|
49560
49798
|
return {
|
|
49561
49799
|
kind: "blocklist",
|
|
49562
49800
|
subjects: (await emailBlocklistMonitoringShow({ path: { company: await requireCompany(context.flags) } })).data.subjects.map((one) => ({ ...one }))
|
|
@@ -49594,7 +49832,7 @@ async function blocklistSet(context, rest) {
|
|
|
49594
49832
|
}
|
|
49595
49833
|
/** `import-schema --version …`: the schema document as the API publishes it. */
|
|
49596
49834
|
async function importSchema(context, rest) {
|
|
49597
|
-
noExtra$
|
|
49835
|
+
noExtra$13(rest);
|
|
49598
49836
|
const version = context.flags.get("--version")?.trim() ?? "";
|
|
49599
49837
|
if (version === "") throw new UsageError(`import-schema needs --version.\n\n${USAGE$29}`);
|
|
49600
49838
|
return {
|
|
@@ -49630,7 +49868,7 @@ var USAGE$28 = [
|
|
|
49630
49868
|
"Every write needs --confirm; --dry-run describes the change without reading the file or sending it."
|
|
49631
49869
|
].join("\n");
|
|
49632
49870
|
/** One named uuid, or a usage refusal. */
|
|
49633
|
-
function one$
|
|
49871
|
+
function one$2(rest) {
|
|
49634
49872
|
const [uuid, ...extra] = rest;
|
|
49635
49873
|
if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$28);
|
|
49636
49874
|
return uuid;
|
|
@@ -49638,7 +49876,7 @@ function one$1(rest) {
|
|
|
49638
49876
|
/** `csv preview|commit <domain> --file <path>`: one multipart upload of the CSV itself. */
|
|
49639
49877
|
async function csv(context, tail) {
|
|
49640
49878
|
const [action, ...args] = tail;
|
|
49641
|
-
const path = await domainPath(context, one$
|
|
49879
|
+
const path = await domainPath(context, one$2(args));
|
|
49642
49880
|
const file = context.flags.get("--file") ?? "";
|
|
49643
49881
|
if (file === "") throw new UsageError(`sync csv needs --file <path>.\n\n${USAGE$28}`);
|
|
49644
49882
|
if (action === "preview") return {
|
|
@@ -49728,7 +49966,7 @@ async function emailSync(context, rest) {
|
|
|
49728
49966
|
throw new UsageError(USAGE$27);
|
|
49729
49967
|
}
|
|
49730
49968
|
/** One named uuid, or a usage refusal. */
|
|
49731
|
-
function one(rest) {
|
|
49969
|
+
function one$1(rest) {
|
|
49732
49970
|
const [uuid, ...extra] = rest;
|
|
49733
49971
|
if (uuid === void 0 || uuid === "" || extra.length > 0) throw new UsageError(USAGE$27);
|
|
49734
49972
|
return uuid;
|
|
@@ -49737,12 +49975,12 @@ function one(rest) {
|
|
|
49737
49975
|
async function show$4(context, tail) {
|
|
49738
49976
|
return {
|
|
49739
49977
|
kind: "overview",
|
|
49740
|
-
overview: (await emailMailboxSyncIndex({ path: await domainPath(context, one(tail)) })).data
|
|
49978
|
+
overview: (await emailMailboxSyncIndex({ path: await domainPath(context, one$1(tail)) })).data
|
|
49741
49979
|
};
|
|
49742
49980
|
}
|
|
49743
49981
|
/** `server --host … --port … --encryption …`. */
|
|
49744
49982
|
async function server(context, tail) {
|
|
49745
|
-
const path = await domainPath(context, one(tail));
|
|
49983
|
+
const path = await domainPath(context, one$1(tail));
|
|
49746
49984
|
const host = context.flags.get("--host")?.trim() ?? "";
|
|
49747
49985
|
const port = Number(context.flags.get("--port") ?? "");
|
|
49748
49986
|
const encryption = context.flags.get("--encryption")?.trim() ?? "";
|
|
@@ -49810,7 +50048,7 @@ async function startAccount(context, path) {
|
|
|
49810
50048
|
}
|
|
49811
50049
|
/** `account add <domain> --username … --password-* … --mailbox … --recurrence …`. */
|
|
49812
50050
|
async function accountAdd(context, args) {
|
|
49813
|
-
const path = await domainPath(context, one(args));
|
|
50051
|
+
const path = await domainPath(context, one$1(args));
|
|
49814
50052
|
const body = accountBody(context);
|
|
49815
50053
|
const sourcePassword = readSecret(context, "password", 4096, USAGE$27);
|
|
49816
50054
|
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({
|
|
@@ -49894,7 +50132,7 @@ function serviceText$1(summary) {
|
|
|
49894
50132
|
}
|
|
49895
50133
|
/** Enrollment is optional on the summary, so an absent or unshaped value reads as not reported. */
|
|
49896
50134
|
function enrollmentLine(availability) {
|
|
49897
|
-
if (!("available" in availability) || typeof availability.available !== "boolean") return " Enrollment: not reported by the API.";
|
|
50135
|
+
if (availability === void 0 || !("available" in availability) || typeof availability.available !== "boolean") return " Enrollment: not reported by the API.";
|
|
49898
50136
|
const message = "message" in availability && typeof availability.message === "string" ? availability.message : "";
|
|
49899
50137
|
return ` Enrollment: ${availability.available ? "available" : "not available"}${message === "" ? "" : ` — ${message}`}`;
|
|
49900
50138
|
}
|
|
@@ -50347,12 +50585,12 @@ var email$2 = {
|
|
|
50347
50585
|
};
|
|
50348
50586
|
/** `show [--company]`: the service state, its entitlement and whether enrollment is available. */
|
|
50349
50587
|
async function show$3(company, rest) {
|
|
50350
|
-
noExtra$
|
|
50588
|
+
noExtra$12(rest);
|
|
50351
50589
|
return (await emailShow({ path: { company } })).data;
|
|
50352
50590
|
}
|
|
50353
50591
|
/** `names [--company]`: the attached names with the readiness the API observed for each. */
|
|
50354
50592
|
async function names(company, rest) {
|
|
50355
|
-
noExtra$
|
|
50593
|
+
noExtra$12(rest);
|
|
50356
50594
|
return (await emailShow({ path: { company } })).data.domains;
|
|
50357
50595
|
}
|
|
50358
50596
|
/** `mailboxes <email-domain-uuid>`: every mailbox on the name, across every reported page. */
|
|
@@ -50428,7 +50666,7 @@ function oneUuid$4(rest) {
|
|
|
50428
50666
|
return uuid;
|
|
50429
50667
|
}
|
|
50430
50668
|
/** A company-wide read takes no positional arguments. */
|
|
50431
|
-
function noExtra$
|
|
50669
|
+
function noExtra$12(rest) {
|
|
50432
50670
|
if (rest.length > 0) throw new UsageError(USAGE$26);
|
|
50433
50671
|
}
|
|
50434
50672
|
//#endregion
|
|
@@ -50638,11 +50876,106 @@ async function environmentComponentVersion(context, rest) {
|
|
|
50638
50876
|
})).data);
|
|
50639
50877
|
}
|
|
50640
50878
|
//#endregion
|
|
50879
|
+
//#region src/commands/environment-configuration-text.ts
|
|
50880
|
+
/**
|
|
50881
|
+
* The phrases the platform writes when the cluster itself answered that it cannot run an engine.
|
|
50882
|
+
*
|
|
50883
|
+
* Every verdict sentence it writes says the engine "cannot run" here, and names the missing
|
|
50884
|
+
* operator. A reason carrying neither is a check that did not complete, which is the safe
|
|
50885
|
+
* direction: a failed check is never presented as the cluster's verdict.
|
|
50886
|
+
*/
|
|
50887
|
+
var CLUSTER_VERDICT = ["cannot run", "operator is missing"];
|
|
50888
|
+
function engineCapabilityState(engine) {
|
|
50889
|
+
if (engine.supported) return "ready";
|
|
50890
|
+
if (engine.unavailableReason === null) return "failed";
|
|
50891
|
+
return CLUSTER_VERDICT.some((phrase) => engine.unavailableReason?.includes(phrase)) ? "unsupported" : "failed";
|
|
50892
|
+
}
|
|
50893
|
+
/**
|
|
50894
|
+
* Every engine this environment can declare, with the state the cluster's answer gives it.
|
|
50895
|
+
*
|
|
50896
|
+
* The catalog and the cluster are two answers and both are read: an engine the catalog offers and the answer
|
|
50897
|
+
* never mentions is pending, and one the answer reports is its own state. Nothing is printed when the payload
|
|
50898
|
+
* carries no engine capability at all — an API that does not answer the field was not asked, which is not the
|
|
50899
|
+
* same claim as "everything is supported".
|
|
50900
|
+
*/
|
|
50901
|
+
function engineCapabilityLines(offered, engines) {
|
|
50902
|
+
const reported = new Map(engines.map((engine) => [engine.slug, engine]));
|
|
50903
|
+
return [.../* @__PURE__ */ new Set([...offered, ...reported.keys()])].map((slug, index) => {
|
|
50904
|
+
const engine = reported.get(slug);
|
|
50905
|
+
const state = engine === void 0 ? "pending" : engineCapabilityState(engine);
|
|
50906
|
+
const reason = engine?.unavailableReason;
|
|
50907
|
+
const detail = state === "pending" ? " (the catalog offers it; this cluster was not asked)" : state === "ready" || reason == null ? "" : `: ${reason}`;
|
|
50908
|
+
return `${index === 0 ? " engines " : " "}${slug} ${state}${detail}`;
|
|
50909
|
+
});
|
|
50910
|
+
}
|
|
50911
|
+
/**
|
|
50912
|
+
* The `configuration` group's human rendering. A read names the revision and its declared secrets; a review
|
|
50913
|
+
* names its verdict. A write's page answer renders through `configurationPageText` too, so a `secret` write
|
|
50914
|
+
* and a `configuration save` show the same page rather than inventing two readings of one payload.
|
|
50915
|
+
*/
|
|
50916
|
+
function configurationPageText(page) {
|
|
50917
|
+
const lines = [
|
|
50918
|
+
`generation ${String(page.desiredGeneration)}`,
|
|
50919
|
+
` canManage ${page.canManage ? "yes" : "no"}`,
|
|
50920
|
+
` restore ${page.canRestore ? "a known-good revision is available" : "nothing to restore"}`
|
|
50921
|
+
];
|
|
50922
|
+
lines.push(...engineCapabilityLines(page.capabilities?.databases ?? [], page.capabilities?.engines ?? []));
|
|
50923
|
+
lines.push(...revisionLines("revision", page.revision));
|
|
50924
|
+
lines.push(...revisionLines("active", page.activeRevision));
|
|
50925
|
+
lines.push(...revisionLines("known good", page.knownGoodRevision));
|
|
50926
|
+
return lines.join("\n");
|
|
50927
|
+
}
|
|
50928
|
+
/**
|
|
50929
|
+
* One revision's line and the secrets it declares.
|
|
50930
|
+
*
|
|
50931
|
+
* The page carries one revision in full and names the others, so both shapes are read by the same
|
|
50932
|
+
* printing: every field here is one the reference carries too, and the document is not printed.
|
|
50933
|
+
*/
|
|
50934
|
+
function revisionLines(label, revision) {
|
|
50935
|
+
if (revision === null) return [` ${label} none`];
|
|
50936
|
+
const lines = [` ${label} ${revision.origin} ${revision.applied ? "applied" : "draft"} ${revision.configHash}`];
|
|
50937
|
+
for (const secret of revision.secrets) lines.push(` secret ${secret.name} ${secret.isSet ? "set" : secret.willGenerateOnApply ? "will generate on apply" : "unset"} ${secret.description}`);
|
|
50938
|
+
return lines;
|
|
50939
|
+
}
|
|
50940
|
+
/**
|
|
50941
|
+
* The installation, cluster, company and environment a review was made against, on one line.
|
|
50942
|
+
*
|
|
50943
|
+
* Two installations may use the same company and environment names, so the line a person reads before a write
|
|
50944
|
+
* names all four and the API decides which they are. An older API answers no target at all, and the line is
|
|
50945
|
+
* then absent rather than guessed — a preview that cannot say where it applies must not imply an address.
|
|
50946
|
+
*/
|
|
50947
|
+
function configurationTargetLine(target) {
|
|
50948
|
+
if (target === null) return null;
|
|
50949
|
+
return `Target: ${target.installation} · cluster ${target.cluster} · company ${target.company} · environment ${target.environment}`;
|
|
50950
|
+
}
|
|
50951
|
+
/** A review's verdict: what it creates or adopts, whether it applies, and what it still needs. */
|
|
50952
|
+
function configurationPreviewText(review) {
|
|
50953
|
+
const unset = review.secrets.filter((one) => !one.isSet && !one.willGenerateOnApply).map((one) => one.name);
|
|
50954
|
+
const lines = [
|
|
50955
|
+
`Preview at generation ${String(review.desiredGeneration)} (hash ${review.previewHash}):`,
|
|
50956
|
+
` ${review.noOp ? "no change" : review.createsApplication ? "creates an application" : review.adoptsApplication ? "adopts an application" : "changes the configuration"}`,
|
|
50957
|
+
` runtime supported ${review.runtimeSupported ? "yes" : "no"}`,
|
|
50958
|
+
` can apply ${review.canApply ? "yes" : "no"}`,
|
|
50959
|
+
` proposed storage ${String(review.proposedStorageMib)} MiB, retention ${String(review.retentionDays)} days`
|
|
50960
|
+
];
|
|
50961
|
+
const target = configurationTargetLine(review.target ?? null);
|
|
50962
|
+
if (target !== null) lines.unshift(target);
|
|
50963
|
+
const summary = review.allocationSummary;
|
|
50964
|
+
if (summary !== null) lines.push(` commits ${String(summary.applicationCount)} application(s), requests ${String(summary.cpuRequestMillicores)}m / ${String(summary.memoryRequestMib)}Mi, limits ${String(summary.cpuLimitMillicores)}m / ${String(summary.memoryLimitMib)}Mi`, ` sharing ceiling CPU ${String(summary.cpuLimitCeilingMillicores)}m at ${String(Math.round(summary.cpuCommittedRatio * 100))}% · memory ${String(summary.memoryLimitCeilingMib)}Mi at ${String(Math.round(summary.memoryCommittedRatio * 100))}%`);
|
|
50965
|
+
const generated = review.secrets.filter((one) => !one.isSet && one.willGenerateOnApply).map((one) => one.name);
|
|
50966
|
+
if (generated.length > 0) lines.push(` generate on apply ${generated.join(", ")}`);
|
|
50967
|
+
if (unset.length > 0) lines.push(` secrets unset ${unset.join(", ")}`);
|
|
50968
|
+
if (review.applyUnavailableReason !== null) lines.push(` apply unavailable ${review.applyUnavailableReason}`);
|
|
50969
|
+
return lines.join("\n");
|
|
50970
|
+
}
|
|
50971
|
+
//#endregion
|
|
50641
50972
|
//#region src/commands/environment-configuration-description.ts
|
|
50642
50973
|
/** Describe the reviewed scope and resource changes before sending the write. */
|
|
50643
50974
|
function describeRecord(review, apply, target) {
|
|
50644
50975
|
const verdict = apply ? review.canApply ? "The review reports it can be applied." : `The review refuses to apply it: ${review.applyUnavailableReason ?? "see the API answer"}.` : "It is recorded as a draft revision and is not applied.";
|
|
50976
|
+
const address = configurationTargetLine(review.target ?? null);
|
|
50645
50977
|
return [
|
|
50978
|
+
...address === null ? [] : [address],
|
|
50646
50979
|
`${apply ? "Apply" : "Save"} the reviewed configuration at generation ${String(review.desiredGeneration)}:`,
|
|
50647
50980
|
` ${review.createsApplication ? "It creates an application." : review.adoptsApplication ? "It adopts an existing application." : "It changes the existing configuration."}`,
|
|
50648
50981
|
` ${review.noOp ? "The review reports no change." : verdict}`,
|
|
@@ -51417,7 +51750,7 @@ async function environmentDomains(context, subcommand, rest) {
|
|
|
51417
51750
|
const path = await environmentPath(context, environmentUuid, USAGE$22);
|
|
51418
51751
|
if (subcommand === "domains") return await domains(path, tail);
|
|
51419
51752
|
if (subcommand === "redirects") return await redirects(path, tail);
|
|
51420
|
-
if (subcommand === "domain-add") return await add$
|
|
51753
|
+
if (subcommand === "domain-add") return await add$7(context, path, tail);
|
|
51421
51754
|
if (subcommand === "redirect-set") return await setRedirect(context, path, tail);
|
|
51422
51755
|
if (subcommand === "redirect-remove") return await removeRedirect(context, path, tail);
|
|
51423
51756
|
if (subcommand === "domain-remove") return await removeDomain(context, path, tail);
|
|
@@ -51427,7 +51760,7 @@ async function environmentDomains(context, subcommand, rest) {
|
|
|
51427
51760
|
}
|
|
51428
51761
|
/** `domains <env>`. */
|
|
51429
51762
|
async function domains(path, rest) {
|
|
51430
|
-
noExtra$
|
|
51763
|
+
noExtra$11(rest);
|
|
51431
51764
|
return {
|
|
51432
51765
|
kind: "domains",
|
|
51433
51766
|
page: (await hostingDomainIndex({ path })).data
|
|
@@ -51435,15 +51768,15 @@ async function domains(path, rest) {
|
|
|
51435
51768
|
}
|
|
51436
51769
|
/** `redirects <env>`. */
|
|
51437
51770
|
async function redirects(path, rest) {
|
|
51438
|
-
noExtra$
|
|
51771
|
+
noExtra$11(rest);
|
|
51439
51772
|
return {
|
|
51440
51773
|
kind: "redirects",
|
|
51441
51774
|
page: (await hostingDomainRedirectIndex({ path })).data
|
|
51442
51775
|
};
|
|
51443
51776
|
}
|
|
51444
51777
|
/** `domain-add --hostname … --workload … [--intended …]`. */
|
|
51445
|
-
async function add$
|
|
51446
|
-
noExtra$
|
|
51778
|
+
async function add$7(context, path, rest) {
|
|
51779
|
+
noExtra$11(rest);
|
|
51447
51780
|
const hostname = context.flags.get("--hostname")?.trim().toLowerCase() ?? "";
|
|
51448
51781
|
const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
|
|
51449
51782
|
if (hostname === "" || workloadUuid === "") throw new UsageError(`domain-add needs --hostname and --workload.\n\n${USAGE$22}`);
|
|
@@ -51538,7 +51871,7 @@ async function written$2(pending) {
|
|
|
51538
51871
|
};
|
|
51539
51872
|
}
|
|
51540
51873
|
/** No positional arguments, or a usage refusal. */
|
|
51541
|
-
function noExtra$
|
|
51874
|
+
function noExtra$11(rest) {
|
|
51542
51875
|
if (rest.length > 0) throw new UsageError(USAGE$22);
|
|
51543
51876
|
}
|
|
51544
51877
|
//#endregion
|
|
@@ -51573,7 +51906,7 @@ async function environmentExports(context, subcommand, rest) {
|
|
|
51573
51906
|
const [environmentUuid, ...tail] = rest;
|
|
51574
51907
|
const path = await environmentPath(context, environmentUuid, USAGE$21);
|
|
51575
51908
|
if (subcommand === "database-exports") {
|
|
51576
|
-
noExtra$
|
|
51909
|
+
noExtra$10(tail);
|
|
51577
51910
|
return {
|
|
51578
51911
|
kind: "exports",
|
|
51579
51912
|
exports: (await hostingDatabaseExportIndex({ path })).data.exports
|
|
@@ -51623,7 +51956,7 @@ async function remove$1(context, path, rest) {
|
|
|
51623
51956
|
};
|
|
51624
51957
|
}
|
|
51625
51958
|
/** No positional arguments, or a usage refusal. */
|
|
51626
|
-
function noExtra$
|
|
51959
|
+
function noExtra$10(rest) {
|
|
51627
51960
|
if (rest.length > 0) throw new UsageError(USAGE$21);
|
|
51628
51961
|
}
|
|
51629
51962
|
/** One export as one line. */
|
|
@@ -51727,14 +52060,14 @@ async function environmentRuntimeVersionGrants(context, rest) {
|
|
|
51727
52060
|
throw new UsageError(USAGE$20);
|
|
51728
52061
|
}
|
|
51729
52062
|
async function grant(context, company) {
|
|
51730
|
-
const type = required$
|
|
51731
|
-
const line = required$
|
|
51732
|
-
const scope = required$
|
|
52063
|
+
const type = required$5(context, "--type");
|
|
52064
|
+
const line = required$5(context, "--line");
|
|
52065
|
+
const scope = required$5(context, "--scope");
|
|
51733
52066
|
if (scope !== "company" && scope !== "workload") throw new UsageError(`--scope must be company or workload.\n\n${USAGE$20}`);
|
|
51734
52067
|
const workloadUuid = context.flags.get("--workload")?.trim() ?? "";
|
|
51735
52068
|
if (scope === "workload" && workloadUuid === "") throw new UsageError(`--scope workload needs the application's --workload <uuid>.\n\n${USAGE$20}`);
|
|
51736
|
-
const reason = required$
|
|
51737
|
-
const expiresAt = required$
|
|
52069
|
+
const reason = required$5(context, "--reason");
|
|
52070
|
+
const expiresAt = required$5(context, "--expires");
|
|
51738
52071
|
return {
|
|
51739
52072
|
kind: "runtime-version-grant-write",
|
|
51740
52073
|
outcome: await confirmableWrite(context, `grant ${type} ${line} to ${scope === "workload" ? `application ${workloadUuid}` : `company ${company}`} until ${expiresAt}`, async () => (await hostingRuntimeVersionGrantsStore({
|
|
@@ -51753,7 +52086,7 @@ async function grant(context, company) {
|
|
|
51753
52086
|
};
|
|
51754
52087
|
}
|
|
51755
52088
|
async function revoke$3(context, company) {
|
|
51756
|
-
const grantUuid = required$
|
|
52089
|
+
const grantUuid = required$5(context, "--grant");
|
|
51757
52090
|
return {
|
|
51758
52091
|
kind: "runtime-version-grant-write",
|
|
51759
52092
|
outcome: await confirmableWrite(context, `revoke runtime version grant ${grantUuid}`, async () => (await hostingRuntimeVersionGrantsRevoke({ path: {
|
|
@@ -51763,7 +52096,7 @@ async function revoke$3(context, company) {
|
|
|
51763
52096
|
};
|
|
51764
52097
|
}
|
|
51765
52098
|
/** One flag's value, refused by name when it was not given. */
|
|
51766
|
-
function required$
|
|
52099
|
+
function required$5(context, flag) {
|
|
51767
52100
|
const value = context.flags.get(flag)?.trim() ?? "";
|
|
51768
52101
|
if (value === "") throw new UsageError(`${flag} is required.\n\n${USAGE$20}`);
|
|
51769
52102
|
return value;
|
|
@@ -52330,7 +52663,7 @@ async function environmentServices(context, subcommand, rest) {
|
|
|
52330
52663
|
typeSlug: type
|
|
52331
52664
|
} })).data
|
|
52332
52665
|
};
|
|
52333
|
-
if (subcommand === "service-add") return await add$
|
|
52666
|
+
if (subcommand === "service-add") return await add$6(context, path, type);
|
|
52334
52667
|
if (subcommand === "service-runtime") return await runtime$1(context, path, type);
|
|
52335
52668
|
if (subcommand === "service-protect") return await protect(context, path, type);
|
|
52336
52669
|
if (subcommand === "service-retire") return await retire$1(context, path, type);
|
|
@@ -52355,7 +52688,7 @@ async function reviewAddition(context, path, type) {
|
|
|
52355
52688
|
};
|
|
52356
52689
|
}
|
|
52357
52690
|
/** `service-add <type> --name … [--replicas …]`. */
|
|
52358
|
-
async function add$
|
|
52691
|
+
async function add$6(context, path, type) {
|
|
52359
52692
|
const name = context.flags.get("--name")?.trim() ?? "";
|
|
52360
52693
|
if (name === "") throw new UsageError(`service-add needs --name.\n\n${USAGE$18}`);
|
|
52361
52694
|
const replicas = wholeNumber(context, "--replicas") ?? 1;
|
|
@@ -52497,7 +52830,7 @@ var USAGE$17 = [
|
|
|
52497
52830
|
async function environmentShared(context, subcommand, rest) {
|
|
52498
52831
|
const [environmentUuid, ...tail] = rest;
|
|
52499
52832
|
const path = await environmentPath(context, environmentUuid, USAGE$17);
|
|
52500
|
-
noExtra$
|
|
52833
|
+
noExtra$9(tail);
|
|
52501
52834
|
if (subcommand === "shared-runtime") return {
|
|
52502
52835
|
kind: "shared-runtime",
|
|
52503
52836
|
runtime: (await hostingSharedRuntimeShow({ path })).data
|
|
@@ -52538,7 +52871,7 @@ async function environment$1(context, path) {
|
|
|
52538
52871
|
};
|
|
52539
52872
|
}
|
|
52540
52873
|
/** No positional arguments, or a usage refusal. */
|
|
52541
|
-
function noExtra$
|
|
52874
|
+
function noExtra$9(rest) {
|
|
52542
52875
|
if (rest.length > 0) throw new UsageError(USAGE$17);
|
|
52543
52876
|
}
|
|
52544
52877
|
/** The line shared by both shared states: adopted, with whom, and the ceiling it lives inside. */
|
|
@@ -52955,6 +53288,16 @@ var ENVIRONMENT_METADATA = {
|
|
|
52955
53288
|
usage: ENVIRONMENT_USAGE,
|
|
52956
53289
|
flags: [
|
|
52957
53290
|
...CREATE_FLAG_SPECS,
|
|
53291
|
+
{
|
|
53292
|
+
name: "--volume-type",
|
|
53293
|
+
takesValue: true,
|
|
53294
|
+
description: "The claim type `storage` reads or changes."
|
|
53295
|
+
},
|
|
53296
|
+
{
|
|
53297
|
+
name: "--class",
|
|
53298
|
+
takesValue: true,
|
|
53299
|
+
description: "The storage class `environment storage set` chooses."
|
|
53300
|
+
},
|
|
52958
53301
|
{
|
|
52959
53302
|
name: "--template",
|
|
52960
53303
|
takesValue: true,
|
|
@@ -53697,86 +54040,6 @@ async function workloadRegistry(company, environmentUuid) {
|
|
|
53697
54040
|
return new Map(environment.workloads.map((one) => [one.uuid, one]));
|
|
53698
54041
|
}
|
|
53699
54042
|
//#endregion
|
|
53700
|
-
//#region src/commands/environment-configuration-text.ts
|
|
53701
|
-
/**
|
|
53702
|
-
* The phrases the platform writes when the cluster itself answered that it cannot run an engine.
|
|
53703
|
-
*
|
|
53704
|
-
* Every verdict sentence it writes says the engine "cannot run" here, and names the missing
|
|
53705
|
-
* operator. A reason carrying neither is a check that did not complete, which is the safe
|
|
53706
|
-
* direction: a failed check is never presented as the cluster's verdict.
|
|
53707
|
-
*/
|
|
53708
|
-
var CLUSTER_VERDICT = ["cannot run", "operator is missing"];
|
|
53709
|
-
function engineCapabilityState(engine) {
|
|
53710
|
-
if (engine.supported) return "ready";
|
|
53711
|
-
if (engine.unavailableReason === null) return "failed";
|
|
53712
|
-
return CLUSTER_VERDICT.some((phrase) => engine.unavailableReason?.includes(phrase)) ? "unsupported" : "failed";
|
|
53713
|
-
}
|
|
53714
|
-
/**
|
|
53715
|
-
* Every engine this environment can declare, with the state the cluster's answer gives it.
|
|
53716
|
-
*
|
|
53717
|
-
* The catalog and the cluster are two answers and both are read: an engine the catalog offers and the answer
|
|
53718
|
-
* never mentions is pending, and one the answer reports is its own state. Nothing is printed when the payload
|
|
53719
|
-
* carries no engine capability at all — an API that does not answer the field was not asked, which is not the
|
|
53720
|
-
* same claim as "everything is supported".
|
|
53721
|
-
*/
|
|
53722
|
-
function engineCapabilityLines(offered, engines) {
|
|
53723
|
-
const reported = new Map(engines.map((engine) => [engine.slug, engine]));
|
|
53724
|
-
return [.../* @__PURE__ */ new Set([...offered, ...reported.keys()])].map((slug, index) => {
|
|
53725
|
-
const engine = reported.get(slug);
|
|
53726
|
-
const state = engine === void 0 ? "pending" : engineCapabilityState(engine);
|
|
53727
|
-
const reason = engine?.unavailableReason;
|
|
53728
|
-
const detail = state === "pending" ? " (the catalog offers it; this cluster was not asked)" : state === "ready" || reason == null ? "" : `: ${reason}`;
|
|
53729
|
-
return `${index === 0 ? " engines " : " "}${slug} ${state}${detail}`;
|
|
53730
|
-
});
|
|
53731
|
-
}
|
|
53732
|
-
/**
|
|
53733
|
-
* The `configuration` group's human rendering. A read names the revision and its declared secrets; a review
|
|
53734
|
-
* names its verdict. A write's page answer renders through `configurationPageText` too, so a `secret` write
|
|
53735
|
-
* and a `configuration save` show the same page rather than inventing two readings of one payload.
|
|
53736
|
-
*/
|
|
53737
|
-
function configurationPageText(page) {
|
|
53738
|
-
const lines = [
|
|
53739
|
-
`generation ${String(page.desiredGeneration)}`,
|
|
53740
|
-
` canManage ${page.canManage ? "yes" : "no"}`,
|
|
53741
|
-
` restore ${page.canRestore ? "a known-good revision is available" : "nothing to restore"}`
|
|
53742
|
-
];
|
|
53743
|
-
lines.push(...engineCapabilityLines(page.capabilities?.databases ?? [], page.capabilities?.engines ?? []));
|
|
53744
|
-
lines.push(...revisionLines("revision", page.revision));
|
|
53745
|
-
lines.push(...revisionLines("active", page.activeRevision));
|
|
53746
|
-
lines.push(...revisionLines("known good", page.knownGoodRevision));
|
|
53747
|
-
return lines.join("\n");
|
|
53748
|
-
}
|
|
53749
|
-
/**
|
|
53750
|
-
* One revision's line and the secrets it declares.
|
|
53751
|
-
*
|
|
53752
|
-
* The page carries one revision in full and names the others, so both shapes are read by the same
|
|
53753
|
-
* printing: every field here is one the reference carries too, and the document is not printed.
|
|
53754
|
-
*/
|
|
53755
|
-
function revisionLines(label, revision) {
|
|
53756
|
-
if (revision === null) return [` ${label} none`];
|
|
53757
|
-
const lines = [` ${label} ${revision.origin} ${revision.applied ? "applied" : "draft"} ${revision.configHash}`];
|
|
53758
|
-
for (const secret of revision.secrets) lines.push(` secret ${secret.name} ${secret.isSet ? "set" : secret.willGenerateOnApply ? "will generate on apply" : "unset"} ${secret.description}`);
|
|
53759
|
-
return lines;
|
|
53760
|
-
}
|
|
53761
|
-
/** A review's verdict: what it creates or adopts, whether it applies, and what it still needs. */
|
|
53762
|
-
function configurationPreviewText(review) {
|
|
53763
|
-
const unset = review.secrets.filter((one) => !one.isSet && !one.willGenerateOnApply).map((one) => one.name);
|
|
53764
|
-
const lines = [
|
|
53765
|
-
`Preview at generation ${String(review.desiredGeneration)} (hash ${review.previewHash}):`,
|
|
53766
|
-
` ${review.noOp ? "no change" : review.createsApplication ? "creates an application" : review.adoptsApplication ? "adopts an application" : "changes the configuration"}`,
|
|
53767
|
-
` runtime supported ${review.runtimeSupported ? "yes" : "no"}`,
|
|
53768
|
-
` can apply ${review.canApply ? "yes" : "no"}`,
|
|
53769
|
-
` proposed storage ${String(review.proposedStorageMib)} MiB, retention ${String(review.retentionDays)} days`
|
|
53770
|
-
];
|
|
53771
|
-
const summary = review.allocationSummary;
|
|
53772
|
-
if (summary !== null) lines.push(` commits ${String(summary.applicationCount)} application(s), requests ${String(summary.cpuRequestMillicores)}m / ${String(summary.memoryRequestMib)}Mi, limits ${String(summary.cpuLimitMillicores)}m / ${String(summary.memoryLimitMib)}Mi`, ` sharing ceiling CPU ${String(summary.cpuLimitCeilingMillicores)}m at ${String(Math.round(summary.cpuCommittedRatio * 100))}% · memory ${String(summary.memoryLimitCeilingMib)}Mi at ${String(Math.round(summary.memoryCommittedRatio * 100))}%`);
|
|
53773
|
-
const generated = review.secrets.filter((one) => !one.isSet && one.willGenerateOnApply).map((one) => one.name);
|
|
53774
|
-
if (generated.length > 0) lines.push(` generate on apply ${generated.join(", ")}`);
|
|
53775
|
-
if (unset.length > 0) lines.push(` secrets unset ${unset.join(", ")}`);
|
|
53776
|
-
if (review.applyUnavailableReason !== null) lines.push(` apply unavailable ${review.applyUnavailableReason}`);
|
|
53777
|
-
return lines.join("\n");
|
|
53778
|
-
}
|
|
53779
|
-
//#endregion
|
|
53780
54043
|
//#region src/commands/environment-object-cache-text.ts
|
|
53781
54044
|
/**
|
|
53782
54045
|
* The environment's WordPress object-cache answer: the recorded choice, whether it can serve, and
|
|
@@ -53795,6 +54058,109 @@ function objectCacheText(settings) {
|
|
|
53795
54058
|
].join("\n");
|
|
53796
54059
|
}
|
|
53797
54060
|
//#endregion
|
|
54061
|
+
//#region src/commands/environment-storage-choice.ts
|
|
54062
|
+
/** The claim types the platform allocates, as the API spells them. */
|
|
54063
|
+
var VOLUME_TYPES$1 = [
|
|
54064
|
+
"application-files",
|
|
54065
|
+
"database-data",
|
|
54066
|
+
"redis-data"
|
|
54067
|
+
];
|
|
54068
|
+
function volumeType(value) {
|
|
54069
|
+
const known = VOLUME_TYPES$1.find((type) => type === value);
|
|
54070
|
+
if (known === void 0) throw new UsageError(`[${value}] is not a claim type; use one of ${VOLUME_TYPES$1.join(", ")}.`);
|
|
54071
|
+
return known;
|
|
54072
|
+
}
|
|
54073
|
+
var ENVIRONMENT_STORAGE_USAGE = [
|
|
54074
|
+
"Usage: hostingctl environment storage get <environment-uuid> --company <slug>",
|
|
54075
|
+
" hostingctl environment storage set <environment-uuid> --company <slug>",
|
|
54076
|
+
" --volume-type <type> --class <uuid>",
|
|
54077
|
+
" hostingctl environment storage clear <environment-uuid> --volume-type <type> --company <slug>",
|
|
54078
|
+
"",
|
|
54079
|
+
" get Each claim type, the class a new claim would take, and the classes this environment may choose.",
|
|
54080
|
+
" set Choose a class for one claim type. It applies to future allocation only: a volume already",
|
|
54081
|
+
" bound keeps the class recorded on it, because Kubernetes cannot change one in place.",
|
|
54082
|
+
" clear Return one claim type to the cluster default.",
|
|
54083
|
+
"",
|
|
54084
|
+
"Every write needs --confirm; --dry-run describes the change and sends nothing."
|
|
54085
|
+
].join("\n");
|
|
54086
|
+
/**
|
|
54087
|
+
* An environment's storage classes: what it may choose, and what it uses now.
|
|
54088
|
+
*
|
|
54089
|
+
* A choice is future allocation only. The screen and this command say the same thing, because a client who
|
|
54090
|
+
* read either one must not believe a provisioned volume moves.
|
|
54091
|
+
*/
|
|
54092
|
+
async function environmentStorage(context, rest) {
|
|
54093
|
+
const [action, uuid, ...extra] = rest;
|
|
54094
|
+
if (uuid === void 0 || extra.length > 0) throw new UsageError(ENVIRONMENT_STORAGE_USAGE);
|
|
54095
|
+
const path = {
|
|
54096
|
+
company: await requireCompany(context.flags),
|
|
54097
|
+
environmentUuid: uuid
|
|
54098
|
+
};
|
|
54099
|
+
if (action === "get") return {
|
|
54100
|
+
kind: "storage-choices",
|
|
54101
|
+
choices: (await hostingEnvironmentStorageIndex({ path })).data
|
|
54102
|
+
};
|
|
54103
|
+
if (action === "set") {
|
|
54104
|
+
const type = volumeType(required$4(context, "--volume-type"));
|
|
54105
|
+
const storageClassUuid = required$4(context, "--class");
|
|
54106
|
+
return {
|
|
54107
|
+
kind: "storage-write",
|
|
54108
|
+
outcome: await confirm$2(context, `Allocate future ${type} claims in environment ${uuid} from class ${storageClassUuid}`, async () => (await hostingEnvironmentStorageUpdate({
|
|
54109
|
+
path,
|
|
54110
|
+
body: {
|
|
54111
|
+
volumeType: type,
|
|
54112
|
+
storageClassUuid
|
|
54113
|
+
}
|
|
54114
|
+
})).data)
|
|
54115
|
+
};
|
|
54116
|
+
}
|
|
54117
|
+
if (action === "clear") {
|
|
54118
|
+
const type = volumeType(required$4(context, "--volume-type"));
|
|
54119
|
+
return {
|
|
54120
|
+
kind: "storage-write",
|
|
54121
|
+
outcome: await confirm$2(context, `Return ${type} claims in environment ${uuid} to the cluster default`, async () => {
|
|
54122
|
+
await hostingEnvironmentStorageDestroy({ path: {
|
|
54123
|
+
...path,
|
|
54124
|
+
volumeType: type
|
|
54125
|
+
} });
|
|
54126
|
+
return (await hostingEnvironmentStorageIndex({ path })).data;
|
|
54127
|
+
})
|
|
54128
|
+
};
|
|
54129
|
+
}
|
|
54130
|
+
throw new UsageError(ENVIRONMENT_STORAGE_USAGE);
|
|
54131
|
+
}
|
|
54132
|
+
function required$4(context, flag) {
|
|
54133
|
+
const value = (context.flags.get(flag) ?? "").trim();
|
|
54134
|
+
if (value === "") throw new UsageError(`${flag} is required.\n\n${ENVIRONMENT_STORAGE_USAGE}`);
|
|
54135
|
+
return value;
|
|
54136
|
+
}
|
|
54137
|
+
async function confirm$2(context, description, send) {
|
|
54138
|
+
if (context.flags.has("--dry-run")) return {
|
|
54139
|
+
sent: false,
|
|
54140
|
+
description
|
|
54141
|
+
};
|
|
54142
|
+
if (!context.flags.has("--confirm")) throw new UsageError([
|
|
54143
|
+
description,
|
|
54144
|
+
"",
|
|
54145
|
+
"Nothing was sent. Pass --confirm to make this change, or --dry-run to see it without making it."
|
|
54146
|
+
].join("\n"));
|
|
54147
|
+
return {
|
|
54148
|
+
sent: true,
|
|
54149
|
+
description,
|
|
54150
|
+
result: await send()
|
|
54151
|
+
};
|
|
54152
|
+
}
|
|
54153
|
+
function storageChoicesText(choices) {
|
|
54154
|
+
return choices.map((choice) => {
|
|
54155
|
+
const selected = choice.selectedUuid === null ? "cluster default" : choice.selectedUuid;
|
|
54156
|
+
const offered = choice.classes.map((one) => `${one.name}${one.enabled ? "" : " (disabled)"}`).join(", ");
|
|
54157
|
+
return ` ${choice.volumeType}: new claims take ${choice.effectiveName ?? "nothing"} (${selected}); offered: ${offered}`;
|
|
54158
|
+
}).join("\n");
|
|
54159
|
+
}
|
|
54160
|
+
function storageWriteText(outcome) {
|
|
54161
|
+
return renderWriteOutcome(outcome, (choices) => choices.length === 0 ? "This environment holds no claim yet." : storageChoicesText(choices));
|
|
54162
|
+
}
|
|
54163
|
+
//#endregion
|
|
53798
54164
|
//#region src/commands/environment-domains-text.ts
|
|
53799
54165
|
/** One name as one line: its address, where it points and how far routing has got. */
|
|
53800
54166
|
function domainLine(one) {
|
|
@@ -53867,6 +54233,8 @@ function taggedReportText(report) {
|
|
|
53867
54233
|
if (report.kind === "cache-write") return renderWriteOutcome(report.outcome, outcomeOf$1);
|
|
53868
54234
|
if (report.kind === "object-cache") return objectCacheText(report.settings);
|
|
53869
54235
|
if (report.kind === "object-cache-write") return renderWriteOutcome(report.outcome, objectCacheText);
|
|
54236
|
+
if (report.kind === "storage-choices") return storageChoicesText(report.choices);
|
|
54237
|
+
if (report.kind === "storage-write") return storageWriteText(report.outcome);
|
|
53870
54238
|
return environmentTaggedText(report);
|
|
53871
54239
|
}
|
|
53872
54240
|
/** Render one `environment` answer to a person, never to a value the payload does not carry. */
|
|
@@ -53890,10 +54258,22 @@ function environmentText(report) {
|
|
|
53890
54258
|
` status ${report.status.status} generation ${String(report.status.generation)} applied ${String(report.status.appliedGeneration)}`,
|
|
53891
54259
|
` observed ${report.status.observedAt ?? "never"}`,
|
|
53892
54260
|
` reconciled ${lastReconcile(report.lastReconcile)}`,
|
|
53893
|
-
` layout ${report.applicationLayout}
|
|
54261
|
+
` layout ${report.applicationLayout}`,
|
|
54262
|
+
...allocationSummaryLines(report.allocationSummary)
|
|
53894
54263
|
].join("\n");
|
|
53895
54264
|
}
|
|
53896
54265
|
/**
|
|
54266
|
+
* What the environment's applications commit against the capacity it shares, in the terms a refusal is
|
|
54267
|
+
* written in: the total beside the ceiling it is measured against and how much of that ceiling is taken.
|
|
54268
|
+
*
|
|
54269
|
+
* An older API answers no summary at all — omitted or null — and then nothing is printed rather than zeroes the
|
|
54270
|
+
* platform never reported.
|
|
54271
|
+
*/
|
|
54272
|
+
function allocationSummaryLines(summary) {
|
|
54273
|
+
if (summary === null || summary === void 0) return [];
|
|
54274
|
+
return [` committed ${String(summary.applicationCount)} application(s); requests ${String(summary.cpuRequestMillicores)}m / ${String(summary.memoryRequestMib)}Mi; limits ${String(summary.cpuLimitMillicores)}m / ${String(summary.memoryLimitMib)}Mi`, ` sharing ceiling CPU ${String(summary.cpuLimitCeilingMillicores)}m at ${String(Math.round(summary.cpuCommittedRatio * 100))}% · memory ${String(summary.memoryLimitCeilingMib)}Mi at ${String(Math.round(summary.memoryCommittedRatio * 100))}%`];
|
|
54275
|
+
}
|
|
54276
|
+
/**
|
|
53897
54277
|
* A write's receipt, and — when an apply waited — the environment reading it ended on.
|
|
53898
54278
|
*
|
|
53899
54279
|
* The receipt says what was recorded; the reading says what the platform has done with it, in the same status lines
|
|
@@ -53957,16 +54337,13 @@ function componentVersionText(data) {
|
|
|
53957
54337
|
return [` version ${data.previous} → ${data.version}`, ` image ${data.image}`].join("\n");
|
|
53958
54338
|
}
|
|
53959
54339
|
/**
|
|
53960
|
-
* The three states, each named for what it means
|
|
53961
|
-
* adopted the shared set is not participating, not incomplete, and the difference is the whole reason the
|
|
53962
|
-
* payload carries a mode rather than a list of missing keys.
|
|
54340
|
+
* The three states, each named for what it means: never adopted is not participating, not incomplete.
|
|
53963
54341
|
*/
|
|
53964
54342
|
function profile(report) {
|
|
53965
54343
|
const state = report.mode === "not_participating" ? "not participating: this environment never adopted the shared set" : `profile ${String(report.present)} of ${String(report.expected)}`;
|
|
53966
54344
|
if (report.mode !== "short_of_catalog") return state;
|
|
53967
54345
|
return [state, ` short of the catalog: ${report.missing.map((one) => one.key).join(", ")}`].join("\n");
|
|
53968
54346
|
}
|
|
53969
|
-
/** The environment-wide cache answer lives beside the other small renderers, in its own module. */
|
|
53970
54347
|
//#endregion
|
|
53971
54348
|
//#region src/commands/environment-setup-text.ts
|
|
53972
54349
|
/**
|
|
@@ -54420,7 +54797,7 @@ function partial(Class, schema, mask, name = "partial") {
|
|
|
54420
54797
|
checks: []
|
|
54421
54798
|
}));
|
|
54422
54799
|
}
|
|
54423
|
-
function required$
|
|
54800
|
+
function required$3(Class, schema, mask) {
|
|
54424
54801
|
const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
|
|
54425
54802
|
const newShape = {};
|
|
54426
54803
|
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) => selected && !selected.has(key) ? value : new Class({
|
|
@@ -59458,7 +59835,7 @@ var ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
|
|
|
59458
59835
|
return partial(ZodExactOptional, this, args[0], "exactPartial");
|
|
59459
59836
|
},
|
|
59460
59837
|
required(...args) {
|
|
59461
|
-
return required$
|
|
59838
|
+
return required$3(ZodNonOptional, this, args[0]);
|
|
59462
59839
|
}
|
|
59463
59840
|
});
|
|
59464
59841
|
function object(shape, params) {
|
|
@@ -60756,6 +61133,7 @@ var permissionSchema = _enum([
|
|
|
60756
61133
|
"hosting.deletion.execute",
|
|
60757
61134
|
"hosting.vocabulary.manage",
|
|
60758
61135
|
"hosting.seeds.manage",
|
|
61136
|
+
"hosting.storage.manage",
|
|
60759
61137
|
"email.installation.adopt",
|
|
60760
61138
|
"email.monitoring.manage",
|
|
60761
61139
|
"platform.domains.ownership.attest",
|
|
@@ -60779,7 +61157,7 @@ var permissionSchema = _enum([
|
|
|
60779
61157
|
"platform.billing.write_off",
|
|
60780
61158
|
"billing.view",
|
|
60781
61159
|
"billing.profile.manage"
|
|
60782
|
-
]).describe("Every application permission. Permissions belong to roles in a scope; users receive roles. Company permissions are scoped to the company team, platform permissions to the reserved platform team. Nothing assigns a permission directly to a user.\n| |\n|---|\n| `operations.horizon.view` <br/> |\n| `operations.impersonate` <br/> |\n| `platform.clients.view` <br/> |\n| `platform.clients.manage` <br/> |\n| `platform.alerts.manage` <br/> |\n| `hosting.diagnostics.view` <br/> |\n| `hosting.retention.approve` <br/> |\n| `platform.users.manage` <br/> Granting or removing a platform role. Deliberately granted to no role: it is a Super Admin act, reached through the platform bypass that already exists for that role. A grant that let a system admin promote another system admin would make the boundary it protects meaningless. |\n| `platform.accounts.close` <br/> |\n| `platform.companies.close` <br/> |\n| `hosting.deletion.execute` <br/> |\n| `hosting.vocabulary.manage` <br/> |\n| `hosting.seeds.manage` <br/> |\n| `email.installation.adopt` <br/> |\n| `email.monitoring.manage` <br/> |\n| `platform.domains.ownership.attest` <br/> |\n| `platform.custd.ownership.attest` <br/> |\n| `platform.domains.ownership.transfer` <br/> |\n| `company.view` <br/> |\n| `company.update` <br/> |\n| `company.members.manage` <br/> |\n| `company.activity.view` <br/> |\n| `domain.view` <br/> |\n| `domain.manage` <br/> |\n| `dns.view` <br/> |\n| `dns.manage` <br/> |\n| `email.view` <br/> |\n| `email.manage` <br/> |\n| `hosting.tools.use` <br/> |\n| `hosting.access.view` <br/> |\n| `hosting.access.manage` <br/> |\n| `platform.billing.view` <br/> |\n| `platform.billing.manage` <br/> |\n| `platform.billing.write_off` <br/> |\n| `billing.view` <br/> |\n| `billing.profile.manage` <br/> |");
|
|
61160
|
+
]).describe("Every application permission. Permissions belong to roles in a scope; users receive roles. Company permissions are scoped to the company team, platform permissions to the reserved platform team. Nothing assigns a permission directly to a user.\n| |\n|---|\n| `operations.horizon.view` <br/> |\n| `operations.impersonate` <br/> |\n| `platform.clients.view` <br/> |\n| `platform.clients.manage` <br/> |\n| `platform.alerts.manage` <br/> |\n| `hosting.diagnostics.view` <br/> |\n| `hosting.retention.approve` <br/> |\n| `platform.users.manage` <br/> Granting or removing a platform role. Deliberately granted to no role: it is a Super Admin act, reached through the platform bypass that already exists for that role. A grant that let a system admin promote another system admin would make the boundary it protects meaningless. |\n| `platform.accounts.close` <br/> |\n| `platform.companies.close` <br/> |\n| `hosting.deletion.execute` <br/> |\n| `hosting.vocabulary.manage` <br/> |\n| `hosting.seeds.manage` <br/> |\n| `hosting.storage.manage` <br/> |\n| `email.installation.adopt` <br/> |\n| `email.monitoring.manage` <br/> |\n| `platform.domains.ownership.attest` <br/> |\n| `platform.custd.ownership.attest` <br/> |\n| `platform.domains.ownership.transfer` <br/> |\n| `company.view` <br/> |\n| `company.update` <br/> |\n| `company.members.manage` <br/> |\n| `company.activity.view` <br/> |\n| `domain.view` <br/> |\n| `domain.manage` <br/> |\n| `dns.view` <br/> |\n| `dns.manage` <br/> |\n| `email.view` <br/> |\n| `email.manage` <br/> |\n| `hosting.tools.use` <br/> |\n| `hosting.access.view` <br/> |\n| `hosting.access.manage` <br/> |\n| `platform.billing.view` <br/> |\n| `platform.billing.manage` <br/> |\n| `platform.billing.write_off` <br/> |\n| `billing.view` <br/> |\n| `billing.profile.manage` <br/> |");
|
|
60783
61161
|
var companySummaryDataSchema = object({
|
|
60784
61162
|
slug: string(),
|
|
60785
61163
|
name: string(),
|
|
@@ -61574,10 +61952,10 @@ var domainDataSchema = object({
|
|
|
61574
61952
|
ownershipRecord: union([hostingDomainRecordDataSchema, _null()]),
|
|
61575
61953
|
summary: domainServiceSummaryDataSchema,
|
|
61576
61954
|
validationOverride: union([domainValidationOverrideDataSchema, _null()]),
|
|
61577
|
-
canViewDomain:
|
|
61578
|
-
canManageDomain:
|
|
61579
|
-
canViewDns:
|
|
61580
|
-
canManageDns:
|
|
61955
|
+
canViewDomain: boolean().optional(),
|
|
61956
|
+
canManageDomain: boolean().optional(),
|
|
61957
|
+
canViewDns: boolean().optional(),
|
|
61958
|
+
canManageDns: boolean().optional()
|
|
61581
61959
|
});
|
|
61582
61960
|
object({ reason: string() });
|
|
61583
61961
|
object({
|
|
@@ -62039,9 +62417,9 @@ object({
|
|
|
62039
62417
|
entitlement: union([emailEntitlementDataSchema, _null()])
|
|
62040
62418
|
}), _null()]),
|
|
62041
62419
|
domains: array(emailDomainSummaryDataSchema),
|
|
62042
|
-
canViewEmail:
|
|
62043
|
-
canManageEmail:
|
|
62044
|
-
enrollmentAvailability:
|
|
62420
|
+
canViewEmail: boolean().optional(),
|
|
62421
|
+
canManageEmail: boolean().optional(),
|
|
62422
|
+
enrollmentAvailability: emailEnrollmentAvailabilityDataSchema.optional()
|
|
62045
62423
|
});
|
|
62046
62424
|
var endBillingRateRequestSchema = object({ effectiveUntil: datetime() }).describe("Ending one recorded price window.\n\nEnding is not an edit: it sets the one boundary the window has left, and the refusal to move an already\nended window is the service's, because only it can see the rows this window shares a scope with.");
|
|
62047
62425
|
var evacuateHostingRuntimeVersionRequestSchema = object({
|
|
@@ -62877,6 +63255,32 @@ object({
|
|
|
62877
63255
|
blockedReason: string().nullable(),
|
|
62878
63256
|
recovery: union([hostingApplicationRecoveryDataSchema, _null()])
|
|
62879
63257
|
});
|
|
63258
|
+
object({
|
|
63259
|
+
decision: object({
|
|
63260
|
+
rung: _enum([
|
|
63261
|
+
"healthy",
|
|
63262
|
+
"unmeasured",
|
|
63263
|
+
"warn",
|
|
63264
|
+
"throttle",
|
|
63265
|
+
"memory",
|
|
63266
|
+
"oom"
|
|
63267
|
+
]).describe("The rung one APPLICATION sits on in the red-line ladder. The vocabulary is closed for the same reason {@see HostingNoisyNeighbourRungEnum}'s is: the ladder escalates in a fixed order, every consumer has to be able to switch on the rung exhaustively, and an unrecognised rung would be a bug rather than a state. The order is the escalation order, and it is the order the responses are meant to be taken in: 1. `healthy` — every signal that could be measured is below its warn line. 2. `unmeasured` — nothing could be measured, so no red line was established. This is NOT an escalation: it sits above `healthy` only because an operator reading the ranked list should see the applications the ladder cannot speak for, rather than a clean bill of health nobody measured. 3. `warn` — a signal reached its warn line and nothing more is true of the application yet. 4. `throttle` — the kernel held the application back for a material share of its CPU periods. 5. `memory` — the working set is at the red line under the declared memory limit, one step before the kernel enforces it. 6. `oom` — the kernel already stopped it for exceeding that limit. Worst, because this is an outage rather than a slowdown, and because \"your site went down\" and \"your site exceeded 512 MiB\" are different support tickets.\n").describe("The rung one APPLICATION sits on in the red-line ladder. The vocabulary is closed for the same reason {@see HostingNoisyNeighbourRungEnum}'s is: the ladder escalates in a fixed order, every consumer has to be able to switch on the rung exhaustively, and an unrecognised rung would be a bug rather than a state. The order is the escalation order, and it is the order the responses are meant to be taken in: 1. `healthy` — every signal that could be measured is below its warn line. 2. `unmeasured` — nothing could be measured, so no red line was established. This is NOT an escalation: it sits above `healthy` only because an operator reading the ranked list should see the applications the ladder cannot speak for, rather than a clean bill of health nobody measured. 3. `warn` — a signal reached its warn line and nothing more is true of the application yet. 4. `throttle` — the kernel held the application back for a material share of its CPU periods. 5. `memory` — the working set is at the red line under the declared memory limit, one step before the kernel enforces it. 6. `oom` — the kernel already stopped it for exceeding that limit. Worst, because this is an outage rather than a slowdown, and because \"your site went down\" and \"your site exceeded 512 MiB\" are different support tickets.\n"),
|
|
63268
|
+
reason: string(),
|
|
63269
|
+
recommendation: string()
|
|
63270
|
+
}),
|
|
63271
|
+
signals: object({
|
|
63272
|
+
tenant: string(),
|
|
63273
|
+
environment: string(),
|
|
63274
|
+
application: string(),
|
|
63275
|
+
cpuThrottledRatio: number().nullable(),
|
|
63276
|
+
memoryUsedMib: int().nullable(),
|
|
63277
|
+
memoryLimitMib: int(),
|
|
63278
|
+
oomKills: int().nullable(),
|
|
63279
|
+
cpuCommittedRatio: number(),
|
|
63280
|
+
memoryCommittedRatio: number(),
|
|
63281
|
+
unmeasured: array(string())
|
|
63282
|
+
})
|
|
63283
|
+
});
|
|
62880
63284
|
var hostingApplicationRemovalDataSchema = object({
|
|
62881
63285
|
uuid: string(),
|
|
62882
63286
|
workloadUuid: string(),
|
|
@@ -63299,7 +63703,8 @@ var hostingConfigurationRoutingDataSchema = object({
|
|
|
63299
63703
|
var hostingConfigurationImageDataSchema = object({
|
|
63300
63704
|
repository: string(),
|
|
63301
63705
|
reference: string(),
|
|
63302
|
-
connection: string().nullable()
|
|
63706
|
+
connection: string().nullable(),
|
|
63707
|
+
registryHost: string().nullable()
|
|
63303
63708
|
});
|
|
63304
63709
|
var hostingConfigurationApplicationDataSchema = object({
|
|
63305
63710
|
key: string(),
|
|
@@ -63319,7 +63724,8 @@ var hostingConfigurationApplicationDataSchema = object({
|
|
|
63319
63724
|
routing: union([hostingConfigurationRoutingDataSchema, _null()]),
|
|
63320
63725
|
resources: union([hostingResourceDataSchema, _null()]),
|
|
63321
63726
|
image: union([hostingConfigurationImageDataSchema, _null()]),
|
|
63322
|
-
filesGib: int().nullable()
|
|
63727
|
+
filesGib: int().nullable(),
|
|
63728
|
+
webServer: string().nullish()
|
|
63323
63729
|
});
|
|
63324
63730
|
var hostingConfigurationApplicationPreviewDataSchema = object({
|
|
63325
63731
|
key: string(),
|
|
@@ -63492,6 +63898,23 @@ var hostingConfigurationPageDataSchema = object({
|
|
|
63492
63898
|
capabilities: hostingConfigurationCapabilitiesDataSchema
|
|
63493
63899
|
});
|
|
63494
63900
|
var hostingConfigurationScopeEnumSchema = _enum(["environment", "application"]);
|
|
63901
|
+
var hostingConfigurationTargetDataSchema = object({
|
|
63902
|
+
installation: string().describe("The API the client reached, so two installations with the same company names cannot be confused."),
|
|
63903
|
+
cluster: string(),
|
|
63904
|
+
company: string().describe("The company slug the company middleware scoped this request to."),
|
|
63905
|
+
environment: string()
|
|
63906
|
+
});
|
|
63907
|
+
var hostingStorageBindingPreviewDataSchema = object({
|
|
63908
|
+
volumeUuid: string(),
|
|
63909
|
+
volumeType: string(),
|
|
63910
|
+
storageClassName: string()
|
|
63911
|
+
});
|
|
63912
|
+
var hostingConfigurationStorageClassPreviewDataSchema = object({
|
|
63913
|
+
volumeType: string(),
|
|
63914
|
+
effectiveClassUuid: string().nullable(),
|
|
63915
|
+
effectiveClassName: string().nullable(),
|
|
63916
|
+
existingBindings: array(hostingStorageBindingPreviewDataSchema)
|
|
63917
|
+
});
|
|
63495
63918
|
object({
|
|
63496
63919
|
environmentUuid: string(),
|
|
63497
63920
|
desiredGeneration: int(),
|
|
@@ -63519,7 +63942,9 @@ object({
|
|
|
63519
63942
|
allocationSummary: union([hostingAllocationSummaryDataSchema, _null()]),
|
|
63520
63943
|
scope: union([hostingConfigurationScopeEnumSchema, _null()]),
|
|
63521
63944
|
applicationKey: string().nullable(),
|
|
63522
|
-
bucket: union([hostingConfigurationBucketPreviewDataSchema, _null()])
|
|
63945
|
+
bucket: union([hostingConfigurationBucketPreviewDataSchema, _null()]),
|
|
63946
|
+
target: union([hostingConfigurationTargetDataSchema, _null()]),
|
|
63947
|
+
storageClasses: array(hostingConfigurationStorageClassPreviewDataSchema).describe("Per claim type: the class a claim this apply creates would be allocated from, and the class\neach existing claim keeps. A review states both so applying a document cannot look like it\nmoves storage.")
|
|
63523
63948
|
});
|
|
63524
63949
|
object({
|
|
63525
63950
|
name: string(),
|
|
@@ -63884,6 +64309,15 @@ var hostingValkeyEndpointDataSchema = object({
|
|
|
63884
64309
|
port: int(),
|
|
63885
64310
|
warning: string().nullable().describe("What a client must know before using this endpoint, or null when there is nothing to warn about.")
|
|
63886
64311
|
});
|
|
64312
|
+
var hostingWebServerOptionDataSchema = object({
|
|
64313
|
+
value: string(),
|
|
64314
|
+
label: string(),
|
|
64315
|
+
detail: string()
|
|
64316
|
+
});
|
|
64317
|
+
var hostingWebServerCapabilitiesDataSchema = object({
|
|
64318
|
+
default: string(),
|
|
64319
|
+
options: array(hostingWebServerOptionDataSchema)
|
|
64320
|
+
});
|
|
63887
64321
|
var hostingWorkloadDataSchema = object({
|
|
63888
64322
|
uuid: string(),
|
|
63889
64323
|
type: string(),
|
|
@@ -63897,7 +64331,7 @@ var hostingWorkloadDataSchema = object({
|
|
|
63897
64331
|
generatedHostnames: array(string()),
|
|
63898
64332
|
tuning: hostingWorkloadTuningDataSchema,
|
|
63899
64333
|
webServer: string().nullable().describe("The web server the customer chose, or null when the application follows the platform\ndefault. Exposed beside `webServerEffective` so a screen can say which one is running\nand why, rather than implying the choice from a value it derived itself."),
|
|
63900
|
-
webServerEffective: string().nullable().describe("
|
|
64334
|
+
webServerEffective: string().nullable().describe("The effective desired shape, not an observation of the serving Pod."),
|
|
63901
64335
|
runtimeVersion: string().nullable().describe("The version line the customer chose, or null when the application's type offers none.\nReported beside `runtimeVersionEffective` for the same reason the web server pair is: a\nscreen says which line is running rather than deriving it from a value it guessed."),
|
|
63902
64336
|
runtimeVersionEffective: string().nullable().describe("What this application actually runs: the served line; null when its type offers no version lines."),
|
|
63903
64337
|
bounds: hostingWorkloadBoundsDataSchema,
|
|
@@ -63906,7 +64340,8 @@ var hostingWorkloadDataSchema = object({
|
|
|
63906
64340
|
capabilities: hostingApplicationCapabilitiesDataSchema.describe("What this workload can and cannot do. Carried here as well as on the application payload because this is the\nshape the applications table renders; the ANSWERS come from one owner either way."),
|
|
63907
64341
|
requiresBuild: boolean(),
|
|
63908
64342
|
valkey: union([hostingValkeySettingsDataSchema, _null()]),
|
|
63909
|
-
valkeyEndpoints: array(hostingValkeyEndpointDataSchema).describe("The endpoints that actually exist for this service, each with its own warning. Empty for every type that\nis not a Valkey service.")
|
|
64343
|
+
valkeyEndpoints: array(hostingValkeyEndpointDataSchema).describe("The endpoints that actually exist for this service, each with its own warning. Empty for every type that\nis not a Valkey service."),
|
|
64344
|
+
webServerCapabilities: union([hostingWebServerCapabilitiesDataSchema, _null()])
|
|
63910
64345
|
});
|
|
63911
64346
|
var hostingVolumeDataSchema = object({
|
|
63912
64347
|
uuid: string(),
|
|
@@ -64004,7 +64439,8 @@ var hostingEnvironmentDataSchema = object({
|
|
|
64004
64439
|
canRestoreTuning: boolean().describe("Whether the live runtime tuning differs from the tuning that last reached ready, so a failed\ntuning change can be rolled back. Computed by the tuning owner from the recorded snapshot."),
|
|
64005
64440
|
knownGoodTuningGeneration: int().nullable().describe("The generation the known-good tuning was observed at, or null when none is recorded."),
|
|
64006
64441
|
toolSelection: array(hostingToolSelectionDataSchema).describe("Every browser tool with the client's own on/off state, including the ones switched off."),
|
|
64007
|
-
purchasePeriod: union([hostingPurchasePeriodDataSchema, _null()])
|
|
64442
|
+
purchasePeriod: union([hostingPurchasePeriodDataSchema, _null()]),
|
|
64443
|
+
allocationSummary: union([hostingAllocationSummaryDataSchema, _null()])
|
|
64008
64444
|
});
|
|
64009
64445
|
object({
|
|
64010
64446
|
environmentUuid: string(),
|
|
@@ -64056,6 +64492,27 @@ object({
|
|
|
64056
64492
|
})),
|
|
64057
64493
|
meta: pageMetaDataSchema
|
|
64058
64494
|
});
|
|
64495
|
+
var hostingStorageClassDataSchema = object({
|
|
64496
|
+
uuid: string(),
|
|
64497
|
+
clusterUuid: string(),
|
|
64498
|
+
clusterName: string(),
|
|
64499
|
+
backendType: string(),
|
|
64500
|
+
backendName: string(),
|
|
64501
|
+
kubernetesName: string(),
|
|
64502
|
+
name: string(),
|
|
64503
|
+
description: string(),
|
|
64504
|
+
enabled: boolean(),
|
|
64505
|
+
volumeTypes: array(string()),
|
|
64506
|
+
reportsUsedBytes: boolean(),
|
|
64507
|
+
supportsBackingImages: boolean()
|
|
64508
|
+
});
|
|
64509
|
+
object({
|
|
64510
|
+
volumeType: string(),
|
|
64511
|
+
selectedUuid: string().nullable(),
|
|
64512
|
+
effectiveUuid: string().nullable(),
|
|
64513
|
+
effectiveName: string().nullable(),
|
|
64514
|
+
classes: array(hostingStorageClassDataSchema)
|
|
64515
|
+
});
|
|
64059
64516
|
var hostingExternalSecretStatusDataSchema = object({
|
|
64060
64517
|
status: string(),
|
|
64061
64518
|
lastSuccessAt: string().nullable(),
|
|
@@ -64435,15 +64892,9 @@ var hostingRegistryProviderEnumSchema = _enum([
|
|
|
64435
64892
|
"gar",
|
|
64436
64893
|
"custom"
|
|
64437
64894
|
]);
|
|
64438
|
-
var
|
|
64439
|
-
|
|
64440
|
-
|
|
64441
|
-
name: string(),
|
|
64442
|
-
description: string(),
|
|
64443
|
-
enabled: boolean(),
|
|
64444
|
-
order_column: int(),
|
|
64445
|
-
created_at: datetime(),
|
|
64446
|
-
updated_at: datetime()
|
|
64895
|
+
var hostingReleasePrepareDataSchema = object({
|
|
64896
|
+
releaseUuid: string(),
|
|
64897
|
+
status: string().nullable()
|
|
64447
64898
|
});
|
|
64448
64899
|
var hostingRepositoryDeliveryDataSchema = object({
|
|
64449
64900
|
event: string(),
|
|
@@ -64966,6 +65417,11 @@ object({
|
|
|
64966
65417
|
bucket: string(),
|
|
64967
65418
|
retained: array(hostingStorageGatewayRetainedDataSchema)
|
|
64968
65419
|
});
|
|
65420
|
+
var hostingStorageBackendEnumSchema = _enum([
|
|
65421
|
+
"longhorn",
|
|
65422
|
+
"ceph",
|
|
65423
|
+
"local-path"
|
|
65424
|
+
]);
|
|
64969
65425
|
var hostingStorageBindingDataSchema = object({
|
|
64970
65426
|
uuid: string(),
|
|
64971
65427
|
environmentUuid: string(),
|
|
@@ -65015,12 +65471,42 @@ var hostingStorageBucketDataSchema = object({
|
|
|
65015
65471
|
retiredAt: string().nullable()
|
|
65016
65472
|
});
|
|
65017
65473
|
object({ items: array(hostingStorageBucketDataSchema) });
|
|
65474
|
+
var hostingStorageDefaultDataSchema = object({
|
|
65475
|
+
clusterUuid: string(),
|
|
65476
|
+
volumeType: string(),
|
|
65477
|
+
storageClassUuid: string(),
|
|
65478
|
+
storageClassName: string()
|
|
65479
|
+
});
|
|
65480
|
+
object({
|
|
65481
|
+
classes: array(hostingStorageClassDataSchema),
|
|
65482
|
+
defaults: array(hostingStorageDefaultDataSchema),
|
|
65483
|
+
backends: array(object({
|
|
65484
|
+
slug: string(),
|
|
65485
|
+
name: string(),
|
|
65486
|
+
reportsUsedBytes: boolean(),
|
|
65487
|
+
supportsBackingImages: boolean(),
|
|
65488
|
+
enabled: boolean()
|
|
65489
|
+
})),
|
|
65490
|
+
volumeTypes: array(object({
|
|
65491
|
+
slug: string(),
|
|
65492
|
+
name: string()
|
|
65493
|
+
}))
|
|
65494
|
+
});
|
|
65018
65495
|
object({
|
|
65019
65496
|
ceilingCents: int().nullable(),
|
|
65020
65497
|
effectiveFrom: string().nullable(),
|
|
65021
65498
|
currency: string()
|
|
65022
65499
|
});
|
|
65023
65500
|
var hostingStorageCeilingRequestSchema = object({ ceilingCents: int().min(0).max(1e8).nullable() }).describe("Setting the most a company may be charged for S3 download overage in a month.\n\nThe amount includes VAT, like every other storage price, and zero is a real choice: it means the client allows no\noverage at all. `ceilingCents: null` is how the ceiling is removed, which is a different promise from zero and must\nnot be expressible by omission — a body without the key is refused rather than read as \"remove it\".");
|
|
65501
|
+
object({
|
|
65502
|
+
observed: boolean(),
|
|
65503
|
+
provisioner: string().nullable(),
|
|
65504
|
+
backendMatches: boolean(),
|
|
65505
|
+
reclaimPolicy: string().nullable(),
|
|
65506
|
+
allowVolumeExpansion: boolean().nullable(),
|
|
65507
|
+
volumeBindingMode: string().nullable(),
|
|
65508
|
+
reason: string().nullable()
|
|
65509
|
+
});
|
|
65024
65510
|
object({ items: array(object({
|
|
65025
65511
|
uuid: string(),
|
|
65026
65512
|
accessKeyHint: string(),
|
|
@@ -65185,6 +65671,11 @@ object({
|
|
|
65185
65671
|
pause: hostingUpdatePauseDataSchema,
|
|
65186
65672
|
capabilities: hostingUpdateSurfaceCapabilitiesDataSchema
|
|
65187
65673
|
});
|
|
65674
|
+
var hostingVolumeEnumSchema = _enum([
|
|
65675
|
+
"application-files",
|
|
65676
|
+
"database-data",
|
|
65677
|
+
"redis-data"
|
|
65678
|
+
]);
|
|
65188
65679
|
var impersonationSessionDataSchema = object({
|
|
65189
65680
|
uuid: string(),
|
|
65190
65681
|
operator: userDataSchema,
|
|
@@ -65549,6 +66040,7 @@ object({
|
|
|
65549
66040
|
requiresReauthentication: boolean()
|
|
65550
66041
|
});
|
|
65551
66042
|
var promoteHostingSeedVersionRequestSchema = object({ versionUuid: uuid() }).describe("Promote one immutable version to the version this definition selects for future claims.\n\nThe version is named by UUID; whether it belongs to the addressed definition is checked in the\nservice against the definition that owns the route, so the field rule is a shape check only.");
|
|
66043
|
+
var provisionHostingPoolRequestSchema = object({ unitQuantity: int().min(1) }).describe("Platform client-management middleware owns authority; the service refuses priced accounts.");
|
|
65552
66044
|
var publicPriceDataSchema = object({
|
|
65553
66045
|
product: string(),
|
|
65554
66046
|
priceKey: string(),
|
|
@@ -65628,6 +66120,15 @@ var refundBillingCollectionReceiptRequestSchema = object({
|
|
|
65628
66120
|
refundReference: string().max(64).describe("The provider's refund reference. Required, and kept on this return only: it is not a destination."),
|
|
65629
66121
|
requestKey: string().max(64).nullish().describe("Idempotency key, unique per company. A replay returns this return; a different payload fails.")
|
|
65630
66122
|
}).describe("Record that verified money came back.\n\nThe reason is required because it is the evidence for a return: a refund is a cash movement, and the record\nhas to say who established it and why. A credit note is a supply reversal and is not this.\n\nThere is no destination field, by design. The money goes back to the original payment instrument; this\nrequest only carries the provider's own refund reference so the return can be checked against it later.");
|
|
66123
|
+
var registerHostingStorageClassRequestSchema = object({
|
|
66124
|
+
clusterUuid: uuid(),
|
|
66125
|
+
backendType: hostingStorageBackendEnumSchema,
|
|
66126
|
+
kubernetesName: string().max(253).regex(/^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/),
|
|
66127
|
+
name: string().max(100),
|
|
66128
|
+
description: string().max(500).nullish(),
|
|
66129
|
+
volumeTypes: array(hostingVolumeEnumSchema).min(1),
|
|
66130
|
+
enabled: boolean().optional()
|
|
66131
|
+
}).describe("Register one cluster's Kubernetes StorageClass in the catalogue.\n\nThe name is validated as a Kubernetes object name and unique per cluster, because it names an\nobject that already exists: a second row for the same class would let two records disagree about\none pool. Nothing here contacts the cluster; registration records intent.");
|
|
65631
66132
|
object({
|
|
65632
66133
|
name: string().max(255),
|
|
65633
66134
|
email: email().max(255).describe("Live rows only. A closed account keeps its address as retained\nhistory, so the address is registrable again as a new person — which\nis the only reason this is not the whole-table rule it used to be."),
|
|
@@ -66006,6 +66507,10 @@ object({
|
|
|
66006
66507
|
desiredGeneration: int().min(1),
|
|
66007
66508
|
running: boolean()
|
|
66008
66509
|
});
|
|
66510
|
+
var setHostingClusterStorageDefaultRequestSchema = object({
|
|
66511
|
+
volumeType: hostingVolumeEnumSchema,
|
|
66512
|
+
storageClassUuid: uuid()
|
|
66513
|
+
}).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.");
|
|
66009
66514
|
var setHostingEnvironmentDeletionProtectionRequestSchema = object({
|
|
66010
66515
|
locked: boolean(),
|
|
66011
66516
|
desiredGeneration: int().min(0),
|
|
@@ -66027,6 +66532,7 @@ var setHostingServiceRuntimeRequestSchema = object({
|
|
|
66027
66532
|
type: string().optional(),
|
|
66028
66533
|
stoppedAt: string().optional()
|
|
66029
66534
|
}).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.");
|
|
66535
|
+
var setHostingStorageClassEnabledRequestSchema = object({ enabled: boolean() }).describe("Switch one registered class's enabled state.");
|
|
66030
66536
|
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\".");
|
|
66031
66537
|
var startEmailMailboxSyncActionRequestSchema = object({
|
|
66032
66538
|
recurrence: emailMailboxSyncRecurrenceModeEnumSchema,
|
|
@@ -66640,6 +67146,10 @@ var updateHostingEnvironmentRequestSchema = object({
|
|
|
66640
67146
|
sizeMib: int().min(1)
|
|
66641
67147
|
})).min(1).max(20)
|
|
66642
67148
|
}).describe("A change to an existing environment's budget and allocations.\n\nThe submitted lists must name exactly the workloads and volumes that already\nexist: this request replaces values, and adding or removing a workload or\nvolume is a different operation. `desiredGeneration` must match the stored\ngeneration, which the service checks under its lock.");
|
|
67149
|
+
var updateHostingEnvironmentStorageSelectionRequestSchema = object({
|
|
67150
|
+
volumeType: hostingVolumeEnumSchema,
|
|
67151
|
+
storageClassUuid: uuid()
|
|
67152
|
+
}).describe("Choose the storage class one environment allocates a claim type from.\n\nThe chosen class must be enabled, registered on the environment's own cluster and offered for the\ntype; the writer refuses anything else with a field error. Existing volumes keep their binding.");
|
|
66643
67153
|
var updateHostingGeneratedHostnameWordRequestSchema = object({ enabled: boolean() }).describe("Switch one word in the generated-hostname vocabulary on or off.\n\nDisabling is the only write: a word already drawn into an address is never removed or renamed, because\nthe address is a client's permanent fallback route. Disabling stops a word being drawn again.");
|
|
66644
67154
|
var updateHostingObjectCacheSettingsRequestSchema = object({
|
|
66645
67155
|
desiredGeneration: int().min(1),
|
|
@@ -66712,6 +67222,11 @@ var updateHostingStorageCapacityRequestSchema = object({ quote: object({
|
|
|
66712
67222
|
generatedAt: string(),
|
|
66713
67223
|
reviewToken: string()
|
|
66714
67224
|
}) }).describe("Adding capacity to an existing purchase.\n\nOnly an increase is accepted: a client buys more space, and a decrease would have to remove objects or invent a\npartial refund, neither of which this product offers. The target capacity is the quote's own, and a quote for less\nthan the bucket holds is refused by the purchase service rather than silently accepting it.");
|
|
67225
|
+
var updateHostingStorageClassRequestSchema = object({
|
|
67226
|
+
name: string().max(100),
|
|
67227
|
+
description: string().max(500).nullish()
|
|
67228
|
+
}).describe("Edit a registered class's display text.\n\nOnly the name and description are editable. The Kubernetes name, backend and cluster are the\nclass's identity and changing them would make an existing claim's history untrue.");
|
|
67229
|
+
var updateHostingStorageClassVolumeTypesRequestSchema = object({ volumeTypes: array(hostingVolumeEnumSchema).min(1) }).describe("Replace the claim types one registered class serves.\n\nWithdrawing a type that a bound volume already uses is refused by the writer, because that claim\nwould describe a class which no longer admits it. The list is the whole set, so repeating a request\nchanges nothing.");
|
|
66715
67230
|
var updateHostingStorageNativeMaximumRequestSchema = object({ maximumBytes: int().min(0).max(0x5af3107a4000).nullable() }).describe("The optional stored-byte maximum one bucket may be held to.\n\n`maximumBytes: null` is how a maximum is removed, which is a different statement from zero: zero is a real ceiling\nfor an empty bucket, and a body without the key is refused rather than read as \"remove it\". The ceiling is an\nexisting operational size bound (the largest storage this product sells), not a new knob and not a price.");
|
|
66716
67231
|
var updateHostingToolSelectionRequestSchema = object({
|
|
66717
67232
|
enabled: boolean(),
|
|
@@ -67913,6 +68428,11 @@ union([
|
|
|
67913
68428
|
messageDataSchema,
|
|
67914
68429
|
messageDataSchema
|
|
67915
68430
|
]);
|
|
68431
|
+
union([
|
|
68432
|
+
object({ message: string().describe("Error overview.") }),
|
|
68433
|
+
object({ message: string().describe("Error overview.") }),
|
|
68434
|
+
messageDataSchema
|
|
68435
|
+
]);
|
|
67916
68436
|
union([
|
|
67917
68437
|
object({ message: string().describe("Error overview.") }),
|
|
67918
68438
|
object({ message: string().describe("Error overview.") }),
|
|
@@ -68461,6 +68981,18 @@ union([
|
|
|
68461
68981
|
object({ message: string().describe("Error overview.") }),
|
|
68462
68982
|
messageDataSchema
|
|
68463
68983
|
]);
|
|
68984
|
+
union([
|
|
68985
|
+
object({ message: string().describe("Error overview.") }),
|
|
68986
|
+
object({ message: string().describe("Error overview.") }),
|
|
68987
|
+
messageDataSchema
|
|
68988
|
+
]);
|
|
68989
|
+
updateHostingEnvironmentStorageSelectionRequestSchema.describe("Choose the storage class one environment allocates a claim type from.\n\nThe chosen class must be enabled, registered on the environment's own cluster and offered for the\ntype; the writer refuses anything else with a field error. Existing volumes keep their binding.");
|
|
68990
|
+
union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
|
|
68991
|
+
union([
|
|
68992
|
+
object({ message: string().describe("Error overview.") }),
|
|
68993
|
+
object({ message: string().describe("Error overview.") }),
|
|
68994
|
+
messageDataSchema
|
|
68995
|
+
]);
|
|
68464
68996
|
var hostingExternalSecretStoreStatus200Schema = hostingExternalSecretConnectionDataSchema;
|
|
68465
68997
|
var hostingExternalSecretStoreStatus201Schema = hostingExternalSecretConnectionDataSchema;
|
|
68466
68998
|
var hostingExternalSecretStoreStatus401Schema = object({ message: string().describe("Error overview.") });
|
|
@@ -68674,11 +69206,8 @@ union([
|
|
|
68674
69206
|
object({ message: string().describe("Error overview.") }),
|
|
68675
69207
|
messageDataSchema
|
|
68676
69208
|
]);
|
|
68677
|
-
var hostingDeploymentPrepareImageStatus200Schema =
|
|
68678
|
-
|
|
68679
|
-
status: union([hostingReleaseStatusTypeSchema, _null()])
|
|
68680
|
-
});
|
|
68681
|
-
var hostingDeploymentPrepareImageStatus202Schema = string();
|
|
69209
|
+
var hostingDeploymentPrepareImageStatus200Schema = hostingReleasePrepareDataSchema;
|
|
69210
|
+
var hostingDeploymentPrepareImageStatus202Schema = hostingReleasePrepareDataSchema;
|
|
68682
69211
|
var hostingDeploymentPrepareImageStatus401Schema = object({ message: string().describe("Error overview.") });
|
|
68683
69212
|
var hostingDeploymentPrepareImageStatus403Schema = object({ message: string().describe("Error overview.") });
|
|
68684
69213
|
var hostingDeploymentPrepareImageStatus404Schema = messageDataSchema;
|
|
@@ -70005,6 +70534,17 @@ union([
|
|
|
70005
70534
|
object({ message: string().describe("Error overview.") }),
|
|
70006
70535
|
messageDataSchema
|
|
70007
70536
|
]);
|
|
70537
|
+
string().describe("The company slug");
|
|
70538
|
+
union([
|
|
70539
|
+
object({ message: string().describe("Error overview.") }),
|
|
70540
|
+
object({ message: string().describe("Error overview.") }),
|
|
70541
|
+
object({ message: string().describe("Error overview.") }),
|
|
70542
|
+
object({
|
|
70543
|
+
message: string().describe("Errors overview."),
|
|
70544
|
+
errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
70545
|
+
})
|
|
70546
|
+
]);
|
|
70547
|
+
provisionHostingPoolRequestSchema.describe("Platform client-management middleware owns authority; the service refuses priced accounts.");
|
|
70008
70548
|
union([
|
|
70009
70549
|
object({ message: string().describe("Error overview.") }),
|
|
70010
70550
|
object({ message: string().describe("Error overview.") }),
|
|
@@ -70198,6 +70738,51 @@ union([
|
|
|
70198
70738
|
errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
70199
70739
|
})
|
|
70200
70740
|
]);
|
|
70741
|
+
union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
|
|
70742
|
+
union([
|
|
70743
|
+
object({ message: string().describe("Error overview.") }),
|
|
70744
|
+
object({ message: string().describe("Error overview.") }),
|
|
70745
|
+
object({
|
|
70746
|
+
message: string().describe("Errors overview."),
|
|
70747
|
+
errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
70748
|
+
})
|
|
70749
|
+
]);
|
|
70750
|
+
registerHostingStorageClassRequestSchema.describe("Register one cluster's Kubernetes StorageClass in the catalogue.\n\nThe name is validated as a Kubernetes object name and unique per cluster, because it names an\nobject that already exists: a second row for the same class would let two records disagree about\none pool. Nothing here contacts the cluster; registration records intent.");
|
|
70751
|
+
union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
|
|
70752
|
+
union([
|
|
70753
|
+
object({ message: string().describe("Error overview.") }),
|
|
70754
|
+
object({ message: string().describe("Error overview.") }),
|
|
70755
|
+
messageDataSchema,
|
|
70756
|
+
object({
|
|
70757
|
+
message: string().describe("Errors overview."),
|
|
70758
|
+
errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
70759
|
+
})
|
|
70760
|
+
]);
|
|
70761
|
+
updateHostingStorageClassRequestSchema.describe("Edit a registered class's display text.\n\nOnly the name and description are editable. The Kubernetes name, backend and cluster are the\nclass's identity and changing them would make an existing claim's history untrue.");
|
|
70762
|
+
union([
|
|
70763
|
+
object({ message: string().describe("Error overview.") }),
|
|
70764
|
+
object({ message: string().describe("Error overview.") }),
|
|
70765
|
+
object({
|
|
70766
|
+
message: string().describe("Errors overview."),
|
|
70767
|
+
errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
70768
|
+
})
|
|
70769
|
+
]);
|
|
70770
|
+
setHostingStorageClassEnabledRequestSchema.describe("Switch one registered class's enabled state.");
|
|
70771
|
+
union([
|
|
70772
|
+
object({ message: string().describe("Error overview.") }),
|
|
70773
|
+
object({ message: string().describe("Error overview.") }),
|
|
70774
|
+
messageDataSchema
|
|
70775
|
+
]);
|
|
70776
|
+
updateHostingStorageClassVolumeTypesRequestSchema.describe("Replace the claim types one registered class serves.\n\nWithdrawing a type that a bound volume already uses is refused by the writer, because that claim\nwould describe a class which no longer admits it. The list is the whole set, so repeating a request\nchanges nothing.");
|
|
70777
|
+
union([
|
|
70778
|
+
object({ message: string().describe("Error overview.") }),
|
|
70779
|
+
object({ message: string().describe("Error overview.") }),
|
|
70780
|
+
object({
|
|
70781
|
+
message: string().describe("Errors overview."),
|
|
70782
|
+
errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
70783
|
+
})
|
|
70784
|
+
]);
|
|
70785
|
+
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.");
|
|
70201
70786
|
union([
|
|
70202
70787
|
object({ message: string().describe("Error overview.") }),
|
|
70203
70788
|
messageDataSchema,
|
|
@@ -70574,7 +71159,8 @@ var SIMPLE_SUBCOMMANDS = {
|
|
|
70574
71159
|
databases,
|
|
70575
71160
|
database,
|
|
70576
71161
|
"runtime-versions": environmentRuntimeVersions,
|
|
70577
|
-
"runtime-version-grants": environmentRuntimeVersionGrants
|
|
71162
|
+
"runtime-version-grants": environmentRuntimeVersionGrants,
|
|
71163
|
+
storage: environmentStorage
|
|
70578
71164
|
};
|
|
70579
71165
|
/** Which feature group answers this subcommand and arguments, or null when the command itself does. */
|
|
70580
71166
|
function dispatched(context, subcommand, rest) {
|
|
@@ -70829,7 +71415,7 @@ var keys$1 = {
|
|
|
70829
71415
|
async run(context) {
|
|
70830
71416
|
const [subcommand, ...rest] = context.positional;
|
|
70831
71417
|
if (subcommand === void 0) return await list$3();
|
|
70832
|
-
if (subcommand === "add") return await add$
|
|
71418
|
+
if (subcommand === "add") return await add$5(context, rest);
|
|
70833
71419
|
if (subcommand === "remove") return await remove(context, rest);
|
|
70834
71420
|
throw new UsageError(KEYS_USAGE);
|
|
70835
71421
|
},
|
|
@@ -70856,7 +71442,7 @@ async function list$3() {
|
|
|
70856
71442
|
}, "personal SSH keys");
|
|
70857
71443
|
}
|
|
70858
71444
|
/** `add --name … --public-key-file … --current-password-* …`. */
|
|
70859
|
-
async function add$
|
|
71445
|
+
async function add$5(context, rest) {
|
|
70860
71446
|
if (rest.length > 0) throw new UsageError(KEYS_USAGE);
|
|
70861
71447
|
const name = context.flags.get("--name")?.trim() ?? "";
|
|
70862
71448
|
const file = context.flags.get("--public-key-file") ?? "";
|
|
@@ -71033,7 +71619,7 @@ async function platformDirectory(context, group, args) {
|
|
|
71033
71619
|
}
|
|
71034
71620
|
/** `users`, filtered by the API's own query keys. */
|
|
71035
71621
|
async function users(context, args) {
|
|
71036
|
-
noExtra$
|
|
71622
|
+
noExtra$8(args);
|
|
71037
71623
|
const search = context.flags.get("--search")?.trim() ?? "";
|
|
71038
71624
|
const company = context.flags.get("--company")?.trim() ?? "";
|
|
71039
71625
|
const { items } = await allPages(async (page, perPage) => {
|
|
@@ -71055,7 +71641,7 @@ async function users(context, args) {
|
|
|
71055
71641
|
}
|
|
71056
71642
|
/** `company-activity <slug>`, newest first. */
|
|
71057
71643
|
async function companyActivity(context, slug, rest) {
|
|
71058
|
-
noExtra$
|
|
71644
|
+
noExtra$8(rest);
|
|
71059
71645
|
const event = context.flags.get("--event")?.trim() ?? "";
|
|
71060
71646
|
const log = context.flags.get("--log")?.trim() ?? "";
|
|
71061
71647
|
const { items } = await allPages(async (page, perPage) => {
|
|
@@ -71093,7 +71679,7 @@ async function activityOne(slug, rest) {
|
|
|
71093
71679
|
}
|
|
71094
71680
|
/** `user-closure <uuid>`: what closing the account would remove and keep. */
|
|
71095
71681
|
async function userClosure(uuid, rest) {
|
|
71096
|
-
noExtra$
|
|
71682
|
+
noExtra$8(rest);
|
|
71097
71683
|
return {
|
|
71098
71684
|
kind: "user-closure",
|
|
71099
71685
|
review: (await platformUserClosureShow({ path: { userUuid: uuid } })).data
|
|
@@ -71101,7 +71687,7 @@ async function userClosure(uuid, rest) {
|
|
|
71101
71687
|
}
|
|
71102
71688
|
/** `user-close <uuid> --reason …`: close the account the review described. */
|
|
71103
71689
|
async function closeUser(context, uuid, rest) {
|
|
71104
|
-
noExtra$
|
|
71690
|
+
noExtra$8(rest);
|
|
71105
71691
|
const reason = context.flags.get("--reason")?.trim() ?? "";
|
|
71106
71692
|
if (reason === "") throw new UsageError(`user-close needs --reason.\n\n${USAGE$13}`);
|
|
71107
71693
|
const review = (await platformUserClosureShow({ path: { userUuid: uuid } })).data;
|
|
@@ -71118,7 +71704,7 @@ async function closeUser(context, uuid, rest) {
|
|
|
71118
71704
|
};
|
|
71119
71705
|
}
|
|
71120
71706
|
/** No positional arguments, or a usage refusal. */
|
|
71121
|
-
function noExtra$
|
|
71707
|
+
function noExtra$8(rest) {
|
|
71122
71708
|
if (rest.length > 0) throw new UsageError(USAGE$13);
|
|
71123
71709
|
}
|
|
71124
71710
|
//#endregion
|
|
@@ -71169,7 +71755,7 @@ async function platformAdmin(context, group, args) {
|
|
|
71169
71755
|
}
|
|
71170
71756
|
/** `companies`, filtered by the API's own query keys. */
|
|
71171
71757
|
async function companies(context, args) {
|
|
71172
|
-
noExtra$
|
|
71758
|
+
noExtra$7(args);
|
|
71173
71759
|
const search = context.flags.get("--search")?.trim() ?? "";
|
|
71174
71760
|
const state = context.flags.get("--state")?.trim() ?? "";
|
|
71175
71761
|
const { items } = await allPages(async (page, perPage) => {
|
|
@@ -71191,7 +71777,7 @@ async function companies(context, args) {
|
|
|
71191
71777
|
}
|
|
71192
71778
|
/** `company-add --name … --slug … --admin-email …`. */
|
|
71193
71779
|
async function addCompany(context, args) {
|
|
71194
|
-
noExtra$
|
|
71780
|
+
noExtra$7(args);
|
|
71195
71781
|
const body = {
|
|
71196
71782
|
name: requiredFlag$3(context, "--name", USAGE$12),
|
|
71197
71783
|
slug: requiredFlag$3(context, "--slug", USAGE$12).toLowerCase(),
|
|
@@ -71204,7 +71790,7 @@ async function addCompany(context, args) {
|
|
|
71204
71790
|
}
|
|
71205
71791
|
/** `company-member-add --company … --email … --role …`: attach an account that already exists. */
|
|
71206
71792
|
async function addCompanyMember(context, args) {
|
|
71207
|
-
noExtra$
|
|
71793
|
+
noExtra$7(args);
|
|
71208
71794
|
const company = requiredFlag$3(context, "--company", USAGE$12);
|
|
71209
71795
|
const email = requiredFlag$3(context, "--email", USAGE$12).toLowerCase();
|
|
71210
71796
|
const role = companyRole(context.flags.get("--role"), USAGE$12);
|
|
@@ -71221,7 +71807,7 @@ async function addCompanyMember(context, args) {
|
|
|
71221
71807
|
}
|
|
71222
71808
|
/** `domain-lookup --hostname …`: which company's claim the name sits on. */
|
|
71223
71809
|
async function lookup(context, args) {
|
|
71224
|
-
noExtra$
|
|
71810
|
+
noExtra$7(args);
|
|
71225
71811
|
return {
|
|
71226
71812
|
kind: "domain-claim",
|
|
71227
71813
|
claim: (await platformDomainOwnershipLookup({ query: { "filter[hostname]": requiredFlag$3(context, "--hostname", USAGE$12).toLowerCase() } })).data
|
|
@@ -71229,7 +71815,7 @@ async function lookup(context, args) {
|
|
|
71229
71815
|
}
|
|
71230
71816
|
/** `company-closure <slug>`: what closing the company would do. */
|
|
71231
71817
|
async function companyClosure(slug, rest) {
|
|
71232
|
-
noExtra$
|
|
71818
|
+
noExtra$7(rest);
|
|
71233
71819
|
return {
|
|
71234
71820
|
kind: "company-closure",
|
|
71235
71821
|
review: (await platformCompanyClosureShow({ path: { company: slug } })).data
|
|
@@ -71237,7 +71823,7 @@ async function companyClosure(slug, rest) {
|
|
|
71237
71823
|
}
|
|
71238
71824
|
/** `company-close <slug> --reason …`: request the closure the review described. */
|
|
71239
71825
|
async function closeCompany(context, slug, rest) {
|
|
71240
|
-
noExtra$
|
|
71826
|
+
noExtra$7(rest);
|
|
71241
71827
|
const reason = requiredFlag$3(context, "--reason", USAGE$12);
|
|
71242
71828
|
const review = (await platformCompanyClosureShow({ path: { company: slug } })).data;
|
|
71243
71829
|
if (!review.canFinalise) throw new UsageError(`Closing ${slug} is blocked: ${review.blockingReasons.join("; ") || "the review cannot be finalised"}.`);
|
|
@@ -71254,7 +71840,7 @@ async function closeCompany(context, slug, rest) {
|
|
|
71254
71840
|
}
|
|
71255
71841
|
/** `company-close-accept <slug>`: the step that acts on a recorded closure. */
|
|
71256
71842
|
async function acceptCompany(context, slug, rest) {
|
|
71257
|
-
noExtra$
|
|
71843
|
+
noExtra$7(rest);
|
|
71258
71844
|
const outcome = await confirmableWrite(context, `Accept the recorded closure of ${slug}. This is the step that acts on it.`, async () => (await platformCompanyClosureAccept({ path: { company: slug } })).data);
|
|
71259
71845
|
return outcome.sent ? {
|
|
71260
71846
|
kind: "admin-message",
|
|
@@ -71265,7 +71851,7 @@ async function acceptCompany(context, slug, rest) {
|
|
|
71265
71851
|
};
|
|
71266
71852
|
}
|
|
71267
71853
|
/** No positional arguments, or a usage refusal. */
|
|
71268
|
-
function noExtra$
|
|
71854
|
+
function noExtra$7(rest) {
|
|
71269
71855
|
if (rest.length > 0) throw new UsageError(USAGE$12);
|
|
71270
71856
|
}
|
|
71271
71857
|
//#endregion
|
|
@@ -71381,25 +71967,25 @@ var USAGE$11 = [
|
|
|
71381
71967
|
/** `platform alerts|alert-*|github-app|yahoo-feedback*`. */
|
|
71382
71968
|
async function platformAlerts(context, group, args) {
|
|
71383
71969
|
if (group === "alerts") {
|
|
71384
|
-
noExtra$
|
|
71970
|
+
noExtra$6(args);
|
|
71385
71971
|
return {
|
|
71386
71972
|
kind: "alert-settings",
|
|
71387
71973
|
settings: (await platformAlertIndex()).data
|
|
71388
71974
|
};
|
|
71389
71975
|
}
|
|
71390
71976
|
if (group === "github-app") {
|
|
71391
|
-
noExtra$
|
|
71977
|
+
noExtra$6(args);
|
|
71392
71978
|
return {
|
|
71393
71979
|
kind: "github-app",
|
|
71394
71980
|
app: (await platformGithubAppStatus()).data
|
|
71395
71981
|
};
|
|
71396
71982
|
}
|
|
71397
|
-
if (group === "alert-add") return await add$
|
|
71983
|
+
if (group === "alert-add") return await add$4(context, args);
|
|
71398
71984
|
if (group === "alert-test") return await test(context, args);
|
|
71399
71985
|
if (group === "alert-settings") return await settings(context, args);
|
|
71400
71986
|
if (group === "alert") return await alert(context, args);
|
|
71401
71987
|
if (group === "yahoo-feedback") {
|
|
71402
|
-
noExtra$
|
|
71988
|
+
noExtra$6(args);
|
|
71403
71989
|
return {
|
|
71404
71990
|
kind: "yahoo-feedback",
|
|
71405
71991
|
feedback: (await yahooFeedbackShow()).data
|
|
@@ -71409,8 +71995,8 @@ async function platformAlerts(context, group, args) {
|
|
|
71409
71995
|
throw new UsageError(USAGE$11);
|
|
71410
71996
|
}
|
|
71411
71997
|
/** `alert-add --email …`. */
|
|
71412
|
-
async function add$
|
|
71413
|
-
noExtra$
|
|
71998
|
+
async function add$4(context, args) {
|
|
71999
|
+
noExtra$6(args);
|
|
71414
72000
|
const email = context.flags.get("--email")?.trim().toLowerCase() ?? "";
|
|
71415
72001
|
if (email === "") throw new UsageError(`alert-add needs --email.\n\n${USAGE$11}`);
|
|
71416
72002
|
return {
|
|
@@ -71422,7 +72008,7 @@ async function add$3(context, args) {
|
|
|
71422
72008
|
}
|
|
71423
72009
|
/** `alert-test`: one alert to every enabled recipient. */
|
|
71424
72010
|
async function test(context, args) {
|
|
71425
|
-
noExtra$
|
|
72011
|
+
noExtra$6(args);
|
|
71426
72012
|
return {
|
|
71427
72013
|
kind: "alert-write",
|
|
71428
72014
|
outcome: await confirmableWrite(context, "Send one test platform alert to every enabled recipient.", async () => (await platformAlertTest()).data)
|
|
@@ -71430,7 +72016,7 @@ async function test(context, args) {
|
|
|
71430
72016
|
}
|
|
71431
72017
|
/** `alert-settings --monitoring on|off`. */
|
|
71432
72018
|
async function settings(context, args) {
|
|
71433
|
-
noExtra$
|
|
72019
|
+
noExtra$6(args);
|
|
71434
72020
|
const monitoringEnabled = onOffFlag(context, "--monitoring");
|
|
71435
72021
|
if (monitoringEnabled === null) throw new UsageError(`alert-settings needs --monitoring.\n\n${USAGE$11}`);
|
|
71436
72022
|
const outcome = await confirmableWrite(context, `Turn platform monitoring ${monitoringEnabled ? "on" : "off"}.`, async () => (await platformAlertUpdateSettings({ body: { monitoringEnabled } })).data);
|
|
@@ -71472,7 +72058,7 @@ async function alert(context, args) {
|
|
|
71472
72058
|
}
|
|
71473
72059
|
/** `yahoo-feedback-set --enabled … [--mailbox …]`. */
|
|
71474
72060
|
async function feedback(context, args) {
|
|
71475
|
-
noExtra$
|
|
72061
|
+
noExtra$6(args);
|
|
71476
72062
|
const enabled = onOffFlag(context, "--enabled");
|
|
71477
72063
|
if (enabled === null) throw new UsageError(`yahoo-feedback-set needs --enabled.\n\n${USAGE$11}`);
|
|
71478
72064
|
const mailbox = context.flags.get("--mailbox")?.trim() ?? "";
|
|
@@ -71489,7 +72075,7 @@ async function current() {
|
|
|
71489
72075
|
return (await platformAlertIndex()).data;
|
|
71490
72076
|
}
|
|
71491
72077
|
/** No positional arguments, or a usage refusal. */
|
|
71492
|
-
function noExtra$
|
|
72078
|
+
function noExtra$6(args) {
|
|
71493
72079
|
if (args.length > 0) throw new UsageError(USAGE$11);
|
|
71494
72080
|
}
|
|
71495
72081
|
/** The `platform alerts|alert-*|github-app|yahoo-feedback*` renderer. */
|
|
@@ -71849,7 +72435,7 @@ async function platformEmail(context, rest) {
|
|
|
71849
72435
|
if (action === "dmarc-replay") return await replay(context, tail);
|
|
71850
72436
|
if (action === "signals") return await signals(tail);
|
|
71851
72437
|
if (action === "postmaster") {
|
|
71852
|
-
noExtra$
|
|
72438
|
+
noExtra$5(tail);
|
|
71853
72439
|
return {
|
|
71854
72440
|
kind: "postmaster",
|
|
71855
72441
|
status: (await googlePostmasterShow({})).data
|
|
@@ -71858,12 +72444,12 @@ async function platformEmail(context, rest) {
|
|
|
71858
72444
|
throw new UsageError(USAGE$8);
|
|
71859
72445
|
}
|
|
71860
72446
|
/** No positional arguments, or a usage refusal. */
|
|
71861
|
-
function noExtra$
|
|
72447
|
+
function noExtra$5(rest) {
|
|
71862
72448
|
if (rest.length > 0) throw new UsageError(USAGE$8);
|
|
71863
72449
|
}
|
|
71864
72450
|
/** `blocklist`. */
|
|
71865
72451
|
async function blocklist(rest) {
|
|
71866
|
-
noExtra$
|
|
72452
|
+
noExtra$5(rest);
|
|
71867
72453
|
return {
|
|
71868
72454
|
kind: "blocklist",
|
|
71869
72455
|
blocklist: (await emailBlocklistIndex({})).data
|
|
@@ -71891,7 +72477,7 @@ async function acknowledge(context, rest) {
|
|
|
71891
72477
|
}
|
|
71892
72478
|
/** `dmarc`. */
|
|
71893
72479
|
async function dmarc(rest) {
|
|
71894
|
-
noExtra$
|
|
72480
|
+
noExtra$5(rest);
|
|
71895
72481
|
return {
|
|
71896
72482
|
kind: "dmarc",
|
|
71897
72483
|
settings: (await emailDmarcReportingShow({})).data
|
|
@@ -71899,7 +72485,7 @@ async function dmarc(rest) {
|
|
|
71899
72485
|
}
|
|
71900
72486
|
/** `dmarc-set --enabled … [--mailbox …]`. */
|
|
71901
72487
|
async function dmarcSet(context, rest) {
|
|
71902
|
-
noExtra$
|
|
72488
|
+
noExtra$5(rest);
|
|
71903
72489
|
const enabled = onOff$2(context, "--enabled");
|
|
71904
72490
|
const mailboxUuid = context.flags.get("--mailbox")?.trim() ?? "";
|
|
71905
72491
|
return {
|
|
@@ -71922,7 +72508,7 @@ async function replay(context, rest) {
|
|
|
71922
72508
|
}
|
|
71923
72509
|
/** `signals`. */
|
|
71924
72510
|
async function signals(rest) {
|
|
71925
|
-
noExtra$
|
|
72511
|
+
noExtra$5(rest);
|
|
71926
72512
|
return {
|
|
71927
72513
|
kind: "signals",
|
|
71928
72514
|
signals: (await emailNativeSignalShow({})).data
|
|
@@ -72165,8 +72751,8 @@ async function platformRuntimeVersions(context, rest) {
|
|
|
72165
72751
|
const [action, ...tail] = rest;
|
|
72166
72752
|
if (tail.length > 0) throw new UsageError(USAGE$7);
|
|
72167
72753
|
const path = {
|
|
72168
|
-
type: required$
|
|
72169
|
-
line: required$
|
|
72754
|
+
type: required$2(context, "--type"),
|
|
72755
|
+
line: required$2(context, "--line")
|
|
72170
72756
|
};
|
|
72171
72757
|
switch (action) {
|
|
72172
72758
|
case "preview": return {
|
|
@@ -72180,16 +72766,16 @@ async function platformRuntimeVersions(context, rest) {
|
|
|
72180
72766
|
note: flag(context, "--note")
|
|
72181
72767
|
}
|
|
72182
72768
|
})).data);
|
|
72183
|
-
case "announce": return write$1(context, `announce ${path.type} ${path.line} ending ${required$
|
|
72769
|
+
case "announce": return write$1(context, `announce ${path.type} ${path.line} ending ${required$2(context, "--until")}`, async () => (await platformRuntimeVersionAnnounce({
|
|
72184
72770
|
path,
|
|
72185
72771
|
body: {
|
|
72186
|
-
until: required$
|
|
72187
|
-
note: required$
|
|
72772
|
+
until: required$2(context, "--until"),
|
|
72773
|
+
note: required$2(context, "--note")
|
|
72188
72774
|
}
|
|
72189
72775
|
})).data);
|
|
72190
72776
|
case "retire": return write$1(context, `retire ${path.type} ${path.line}`, async () => (await platformRuntimeVersionRetirement({
|
|
72191
72777
|
path,
|
|
72192
|
-
body: { reason: required$
|
|
72778
|
+
body: { reason: required$2(context, "--reason") }
|
|
72193
72779
|
})).data);
|
|
72194
72780
|
case "evacuate": {
|
|
72195
72781
|
const limit = flag(context, "--limit");
|
|
@@ -72198,7 +72784,7 @@ async function platformRuntimeVersions(context, rest) {
|
|
|
72198
72784
|
outcome: await confirmableWrite(context, `move up to ${limit === "" ? "the configured batch of" : limit} applications off ${path.type} ${path.line}`, async () => (await platformRuntimeVersionEvacuate({
|
|
72199
72785
|
path,
|
|
72200
72786
|
body: {
|
|
72201
|
-
reason: required$
|
|
72787
|
+
reason: required$2(context, "--reason"),
|
|
72202
72788
|
...limit === "" ? {} : { limit: Number(limit) }
|
|
72203
72789
|
}
|
|
72204
72790
|
})).data)
|
|
@@ -72215,7 +72801,7 @@ async function write$1(context, description, send) {
|
|
|
72215
72801
|
};
|
|
72216
72802
|
}
|
|
72217
72803
|
/** One flag's value, refused by name when it was not given. */
|
|
72218
|
-
function required$
|
|
72804
|
+
function required$2(context, flagName) {
|
|
72219
72805
|
const value = flag(context, flagName);
|
|
72220
72806
|
if (value === "") throw new UsageError(`${flagName} is required.\n\n${USAGE$7}`);
|
|
72221
72807
|
return value;
|
|
@@ -72229,7 +72815,7 @@ var STATES = [
|
|
|
72229
72815
|
"forced"
|
|
72230
72816
|
];
|
|
72231
72817
|
function stateFlag(context) {
|
|
72232
|
-
const value = required$
|
|
72818
|
+
const value = required$2(context, "--state");
|
|
72233
72819
|
if (!STATES.includes(value)) throw new UsageError(`--state must be one of ${STATES.join(", ")}.\n\n${USAGE$7}`);
|
|
72234
72820
|
return value;
|
|
72235
72821
|
}
|
|
@@ -72437,7 +73023,7 @@ async function platformSeedPlacements(context, action, seedUuid, rest) {
|
|
|
72437
73023
|
if (versionUuid === void 0) throw new UsageError(USAGE$6);
|
|
72438
73024
|
if (action === "placement-add") {
|
|
72439
73025
|
if (third !== void 0 || extra.length > 0) throw new UsageError(USAGE$6);
|
|
72440
|
-
return await add$
|
|
73026
|
+
return await add$3(context, seedUuid, versionUuid);
|
|
72441
73027
|
}
|
|
72442
73028
|
if (third === void 0 || extra.length > 0) throw new UsageError(USAGE$6);
|
|
72443
73029
|
const path = {
|
|
@@ -72454,7 +73040,7 @@ async function platformSeedPlacements(context, action, seedUuid, rest) {
|
|
|
72454
73040
|
throw new UsageError(USAGE$6);
|
|
72455
73041
|
}
|
|
72456
73042
|
/** `placement-add`: ask for the version to be prepared on one cluster. */
|
|
72457
|
-
async function add$
|
|
73043
|
+
async function add$3(context, seedUuid, versionUuid) {
|
|
72458
73044
|
const body = {
|
|
72459
73045
|
clusterUuid: requiredFlag$3(context, "--cluster", USAGE$6),
|
|
72460
73046
|
preparationMode: preparationModeOf$1(context, "placement-add"),
|
|
@@ -72522,7 +73108,7 @@ var USAGE$5 = [
|
|
|
72522
73108
|
/** `seed words|word-add|word`. */
|
|
72523
73109
|
async function platformSeedWords(context, action, rest) {
|
|
72524
73110
|
if (action === "words") {
|
|
72525
|
-
noExtra$
|
|
73111
|
+
noExtra$4(rest);
|
|
72526
73112
|
return {
|
|
72527
73113
|
kind: "seed-words",
|
|
72528
73114
|
vocabulary: (await hostingGeneratedHostnameVocabularyIndex()).data
|
|
@@ -72534,7 +73120,7 @@ async function platformSeedWords(context, action, rest) {
|
|
|
72534
73120
|
}
|
|
72535
73121
|
/** `word-add --position … --word …`. */
|
|
72536
73122
|
async function addWord(context, rest) {
|
|
72537
|
-
noExtra$
|
|
73123
|
+
noExtra$4(rest);
|
|
72538
73124
|
const body = {
|
|
72539
73125
|
position: pickPosition(context),
|
|
72540
73126
|
word: requiredFlag$3(context, "--word", USAGE$5).toLowerCase(),
|
|
@@ -72573,7 +73159,7 @@ function onOff$1(context, flag) {
|
|
|
72573
73159
|
throw new UsageError(`${flag} must be on or off.\n\n${USAGE$5}`);
|
|
72574
73160
|
}
|
|
72575
73161
|
/** No positional arguments, or a usage refusal. */
|
|
72576
|
-
function noExtra$
|
|
73162
|
+
function noExtra$4(rest) {
|
|
72577
73163
|
if (rest.length > 0) throw new UsageError(USAGE$5);
|
|
72578
73164
|
}
|
|
72579
73165
|
//#endregion
|
|
@@ -72626,7 +73212,7 @@ async function platformSeeds(context, args) {
|
|
|
72626
73212
|
}
|
|
72627
73213
|
/** `list`: every definition with its selected version and placements. */
|
|
72628
73214
|
async function catalogue(rest) {
|
|
72629
|
-
noExtra$
|
|
73215
|
+
noExtra$3(rest);
|
|
72630
73216
|
return {
|
|
72631
73217
|
kind: "seed-catalogue",
|
|
72632
73218
|
catalogue: (await hostingSeedIndex()).data
|
|
@@ -72634,7 +73220,7 @@ async function catalogue(rest) {
|
|
|
72634
73220
|
}
|
|
72635
73221
|
/** `add --workload-type … --scope … --preparation-mode …`. */
|
|
72636
73222
|
async function addSeed(context, rest) {
|
|
72637
|
-
noExtra$
|
|
73223
|
+
noExtra$3(rest);
|
|
72638
73224
|
const body = {
|
|
72639
73225
|
workloadType: pick(Object.values(hostingWorkloadEnum), "--workload-type", context, "add"),
|
|
72640
73226
|
scope: pick(Object.values(hostingSeedScopeEnum), "--scope", context, "add"),
|
|
@@ -72649,7 +73235,7 @@ async function addSeed(context, rest) {
|
|
|
72649
73235
|
}
|
|
72650
73236
|
/** `set <seed> --preparation-mode …`. */
|
|
72651
73237
|
async function setSeed(context, seedUuid, rest) {
|
|
72652
|
-
noExtra$
|
|
73238
|
+
noExtra$3(rest);
|
|
72653
73239
|
const preparationMode = preparationModeOf(context, "set");
|
|
72654
73240
|
return {
|
|
72655
73241
|
kind: "seed-write",
|
|
@@ -72661,7 +73247,7 @@ async function setSeed(context, seedUuid, rest) {
|
|
|
72661
73247
|
}
|
|
72662
73248
|
/** `consumption <seed> --enabled …`: whether the definition is offered at all. */
|
|
72663
73249
|
async function consumption(context, seedUuid, rest) {
|
|
72664
|
-
noExtra$
|
|
73250
|
+
noExtra$3(rest);
|
|
72665
73251
|
const enabled = onOff(context, "--enabled", "consumption");
|
|
72666
73252
|
return {
|
|
72667
73253
|
kind: "seed-write",
|
|
@@ -72673,7 +73259,7 @@ async function consumption(context, seedUuid, rest) {
|
|
|
72673
73259
|
}
|
|
72674
73260
|
/** `promote <seed> --version …`. */
|
|
72675
73261
|
async function promote(context, seedUuid, rest) {
|
|
72676
|
-
noExtra$
|
|
73262
|
+
noExtra$3(rest);
|
|
72677
73263
|
const versionUuid = requiredFlag$3(context, "--version", USAGE$4);
|
|
72678
73264
|
return {
|
|
72679
73265
|
kind: "seed-write",
|
|
@@ -72685,7 +73271,7 @@ async function promote(context, seedUuid, rest) {
|
|
|
72685
73271
|
}
|
|
72686
73272
|
/** `version-add <seed> --source-* … [--content-contract <path>]`. */
|
|
72687
73273
|
async function addVersion(context, seedUuid, rest) {
|
|
72688
|
-
noExtra$
|
|
73274
|
+
noExtra$3(rest);
|
|
72689
73275
|
const body = {
|
|
72690
73276
|
sourceRelease: requiredFlag$3(context, "--source-release", USAGE$4),
|
|
72691
73277
|
sourceCommit: requiredFlag$3(context, "--source-commit", USAGE$4),
|
|
@@ -72722,7 +73308,7 @@ function onOff(context, flag, verb) {
|
|
|
72722
73308
|
throw new UsageError(`${verb} needs ${flag} on or off.\n\n${USAGE$4}`);
|
|
72723
73309
|
}
|
|
72724
73310
|
/** Exactly one positional value. */
|
|
72725
|
-
function noExtra$
|
|
73311
|
+
function noExtra$3(rest) {
|
|
72726
73312
|
if (rest.length > 0) throw new UsageError(USAGE$4);
|
|
72727
73313
|
}
|
|
72728
73314
|
//#endregion
|
|
@@ -73054,7 +73640,7 @@ function platformSeedsText(report) {
|
|
|
73054
73640
|
const { vocabulary } = report;
|
|
73055
73641
|
return [` ${String(vocabulary.words.length)} word(s), ${String(vocabulary.combinations)} possible name(s)`, ...vocabulary.words.map((one) => ` ${one.slug.padEnd(24)} ${one.position.padEnd(10)} ${one.enabled ? "enabled" : "disabled"}`)].join("\n");
|
|
73056
73642
|
}
|
|
73057
|
-
return catalogueText(report.catalogue);
|
|
73643
|
+
return catalogueText$1(report.catalogue);
|
|
73058
73644
|
}
|
|
73059
73645
|
/** Which write answered, named by the fields only that answer carries. */
|
|
73060
73646
|
function resultText(value) {
|
|
@@ -73064,7 +73650,7 @@ function resultText(value) {
|
|
|
73064
73650
|
return ` seed ${String(value.uuid)} ${String(value.workloadType)}/${String(value.scope)} ${String(value.preparationMode)}${value.enabled === false ? " not offered" : ""}`;
|
|
73065
73651
|
}
|
|
73066
73652
|
/** The catalogue: every definition, then what may be chosen. */
|
|
73067
|
-
function catalogueText(catalogue) {
|
|
73653
|
+
function catalogueText$1(catalogue) {
|
|
73068
73654
|
return [...catalogue.definitions.flatMap(definitionLines), ...catalogue.choices === null ? [" choices unavailable"] : choicesLines(catalogue.choices)].join("\n");
|
|
73069
73655
|
}
|
|
73070
73656
|
/** One definition, its selected version and its placements. */
|
|
@@ -73255,6 +73841,7 @@ var POOL_USAGE = [
|
|
|
73255
73841
|
"Usage: hostingctl pool --company <slug>",
|
|
73256
73842
|
" hostingctl pool quote --company <slug> --units <n>",
|
|
73257
73843
|
" hostingctl pool purchase --company <slug> --units <n> [--confirm]",
|
|
73844
|
+
" hostingctl pool provision --company <slug> --units <n> [--confirm]",
|
|
73258
73845
|
" hostingctl pool blocks --company <slug>",
|
|
73259
73846
|
" hostingctl pool blocks quote --company <slug> --blocks <n>",
|
|
73260
73847
|
" hostingctl pool blocks purchase --company <slug> --blocks <n> [--confirm]",
|
|
@@ -73267,6 +73854,9 @@ var POOL_USAGE = [
|
|
|
73267
73854
|
" billing. The API refuses a second purchase, an account still billed per environment, and a",
|
|
73268
73855
|
" company founded by HaakCo: changing a pool, converting an account and selling capacity to a",
|
|
73269
73856
|
" company we founded are decisions recorded as an agreement, not a self-service purchase.",
|
|
73857
|
+
" provision Platform client administrators assign an unbilled total holding before billing starts.",
|
|
73858
|
+
" No invoice details, paid quote or billing activation are required. Included storage can",
|
|
73859
|
+
" be assigned to S3 without another purchase. This cannot make an already billed account free.",
|
|
73270
73860
|
" blocks The NVMe blocks the company bought, which its environments' volumes draw from: what it",
|
|
73271
73861
|
" holds, what a stated total costs, and the purchase that raises it.",
|
|
73272
73862
|
"",
|
|
@@ -73274,15 +73864,15 @@ var POOL_USAGE = [
|
|
|
73274
73864
|
"the total the company holds after the purchase rather than an increment: a total equal to the current holding",
|
|
73275
73865
|
"writes nothing, and a lower total is refused because blocks are only ever added and reducing capacity is a",
|
|
73276
73866
|
"reviewed request rather than a purchase.",
|
|
73277
|
-
"
|
|
73278
|
-
"
|
|
73279
|
-
"
|
|
73867
|
+
"Capacity belongs to the company, not an environment. A purchase starts billing; provision does not.",
|
|
73868
|
+
"A pool read's monthly price is a quote, not evidence that billing is active. Provision 1 unit for a 40 GiB",
|
|
73869
|
+
"budget; for example, 10 GiB databases + 10 GiB application files + 10 GiB S3 leaves 10 GiB spare.",
|
|
73280
73870
|
"",
|
|
73281
73871
|
"A purchase needs --confirm; --dry-run describes it, at the same quoted price, and sends no change."
|
|
73282
73872
|
].join("\n");
|
|
73283
73873
|
var POOL_METADATA = {
|
|
73284
73874
|
name: "pool",
|
|
73285
|
-
summary: "A company's capacity pool:
|
|
73875
|
+
summary: "A company's capacity pool: holdings, prices, paid purchase, or staff provisioning before billing.",
|
|
73286
73876
|
usage: POOL_USAGE,
|
|
73287
73877
|
flags: [
|
|
73288
73878
|
{
|
|
@@ -73303,17 +73893,18 @@ var POOL_METADATA = {
|
|
|
73303
73893
|
{
|
|
73304
73894
|
name: "--confirm",
|
|
73305
73895
|
takesValue: false,
|
|
73306
|
-
description: "
|
|
73896
|
+
description: "Confirm the purchase or unbilled provisioning. Without it no write is sent."
|
|
73307
73897
|
},
|
|
73308
73898
|
{
|
|
73309
73899
|
name: "--dry-run",
|
|
73310
73900
|
takesValue: false,
|
|
73311
|
-
description: "Describe the purchase and send nothing."
|
|
73901
|
+
description: "Describe the purchase or unbilled provisioning and send nothing."
|
|
73312
73902
|
}
|
|
73313
73903
|
],
|
|
73314
73904
|
subcommands: [
|
|
73315
73905
|
"quote",
|
|
73316
73906
|
"purchase",
|
|
73907
|
+
"provision",
|
|
73317
73908
|
"blocks"
|
|
73318
73909
|
]
|
|
73319
73910
|
};
|
|
@@ -73379,12 +73970,12 @@ function blocksPurchasedText(quote) {
|
|
|
73379
73970
|
}
|
|
73380
73971
|
/** The pool a company holds, or the plain fact that it holds none. */
|
|
73381
73972
|
function poolSummaryText(pool) {
|
|
73382
|
-
if (!pool.recorded || pool.units === null) return "No capacity pool is recorded for this company
|
|
73383
|
-
const lines = [pool.agreed ? `A pool of ${String(pool.units)} unit(s) is recorded as an agreed
|
|
73973
|
+
if (!pool.recorded || pool.units === null) return "No capacity pool is recorded for this company. Staff can use pool provision to assign unbilled capacity; clients use pool purchase for paid capacity. No pool does not establish whether billing is active.";
|
|
73974
|
+
const lines = [pool.agreed ? `A pool of ${String(pool.units)} unit(s) is recorded as an agreed capacity holding. An agreement alone does not activate billing.` : `A pool of ${String(pool.units)} unit(s) is recorded, but not as an agreed holding: it records what the company already holds, so admission grants no slice from it.`];
|
|
73384
73975
|
if (pool.total !== null) lines.push(` total: ${budgetText(pool.total)}`);
|
|
73385
73976
|
if (pool.allocated !== null) lines.push(` allocated: ${budgetText(pool.allocated)}`);
|
|
73386
73977
|
if (pool.remaining !== null) lines.push(` remaining: ${budgetText(pool.remaining)}`);
|
|
73387
|
-
if (pool.monthly !== null) lines.push(` monthly: ${quotePrice(pool.monthly)}`);
|
|
73978
|
+
if (pool.monthly !== null) lines.push(` monthly price quote (not billing status): ${quotePrice(pool.monthly)}`);
|
|
73388
73979
|
else if (pool.monthlyUnavailable !== null) lines.push(` monthly price unavailable: ${pool.monthlyUnavailable}`);
|
|
73389
73980
|
if (pool.purchasedStorage !== null && pool.purchasedStorage.blocks !== null) lines.push(` bought storage: ${String(pool.purchasedStorage.blocks)} block(s), ${String(pool.purchasedStorageMib ?? 0)}Mi added to the pool${pool.purchasedStorage.usableFrom === null ? "" : `, usable from ${pool.purchasedStorage.usableFrom.slice(0, 10)}`}`);
|
|
73390
73981
|
return lines.join("\n");
|
|
@@ -73396,6 +73987,7 @@ function purchasedText(report) {
|
|
|
73396
73987
|
function poolText(report) {
|
|
73397
73988
|
if (report.kind === "pool") return poolSummaryText(report.pool);
|
|
73398
73989
|
if (report.kind === "poolQuote") return quoteText$2(report.quote);
|
|
73990
|
+
if (report.kind === "poolProvision") return renderWriteOutcome(report.outcome, (held) => `${poolSummaryText(held)}\nUnbilled capacity assigned. Billing was not activated; no invoice details were required.`);
|
|
73399
73991
|
if (report.kind === "poolBlocks") return blocksHeldText(report.held);
|
|
73400
73992
|
if (report.kind === "poolBlocksQuote") return blocksQuoteText(report.quote);
|
|
73401
73993
|
if (report.kind === "poolBlocksPurchase") return renderWriteOutcome(report.outcome, blocksPurchasedText);
|
|
@@ -73440,6 +74032,17 @@ async function purchasePool(context, company) {
|
|
|
73440
74032
|
}).unwrap())
|
|
73441
74033
|
};
|
|
73442
74034
|
}
|
|
74035
|
+
/** Staff assign the company's total capacity before billing, with no paid quote or activation. */
|
|
74036
|
+
async function provisionPool(context, company) {
|
|
74037
|
+
const unitQuantity = requiredUnits(context);
|
|
74038
|
+
return {
|
|
74039
|
+
kind: "poolProvision",
|
|
74040
|
+
outcome: await confirmableWrite(context, `Assign ${String(unitQuantity)} unbilled unit(s) to ${company}. This is the company's total holding, not an increment. It starts no billing, needs no invoice details, and cannot make a billed account free.`, async () => platformHostingPoolAllowance({
|
|
74041
|
+
path: { company },
|
|
74042
|
+
body: { unitQuantity }
|
|
74043
|
+
}).unwrap())
|
|
74044
|
+
};
|
|
74045
|
+
}
|
|
73443
74046
|
/**
|
|
73444
74047
|
* The blocks a blocks quote or purchase names.
|
|
73445
74048
|
*
|
|
@@ -73505,6 +74108,7 @@ var pool = {
|
|
|
73505
74108
|
if (rest.length > 0) throw new UsageError(POOL_USAGE);
|
|
73506
74109
|
if (subcommand === "quote") return await quotePool(context, company);
|
|
73507
74110
|
if (subcommand === "purchase") return await purchasePool(context, company);
|
|
74111
|
+
if (subcommand === "provision") return await provisionPool(context, company);
|
|
73508
74112
|
throw new UsageError(POOL_USAGE);
|
|
73509
74113
|
},
|
|
73510
74114
|
human(report) {
|
|
@@ -74529,20 +75133,20 @@ function nameserversForBody(context, action = "register") {
|
|
|
74529
75133
|
function registrantOf(context, action) {
|
|
74530
75134
|
if (action === "renew") return void 0;
|
|
74531
75135
|
return {
|
|
74532
|
-
name: required(context, "--name"),
|
|
74533
|
-
email: required(context, "--email"),
|
|
74534
|
-
country: required(context, "--country"),
|
|
74535
|
-
province: required(context, "--province"),
|
|
74536
|
-
contactNumber: required(context, "--contact"),
|
|
74537
|
-
postalCode: required(context, "--postal-code"),
|
|
74538
|
-
address1: required(context, "--address1"),
|
|
75136
|
+
name: required$1(context, "--name"),
|
|
75137
|
+
email: required$1(context, "--email"),
|
|
75138
|
+
country: required$1(context, "--country"),
|
|
75139
|
+
province: required$1(context, "--province"),
|
|
75140
|
+
contactNumber: required$1(context, "--contact"),
|
|
75141
|
+
postalCode: required$1(context, "--postal-code"),
|
|
75142
|
+
address1: required$1(context, "--address1"),
|
|
74539
75143
|
address2: optional(context, "--address2"),
|
|
74540
75144
|
address3: optional(context, "--address3"),
|
|
74541
|
-
city: required(context, "--city")
|
|
75145
|
+
city: required$1(context, "--city")
|
|
74542
75146
|
};
|
|
74543
75147
|
}
|
|
74544
75148
|
/** A flag whose absence is a refusal, named so the operator knows what to pass. */
|
|
74545
|
-
function required(context, flag) {
|
|
75149
|
+
function required$1(context, flag) {
|
|
74546
75150
|
const value = context.flags.get(flag) ?? "";
|
|
74547
75151
|
if (value === "") throw new UsageError(`${flag} is required here.\n\n${USAGE$2}`);
|
|
74548
75152
|
return value;
|
|
@@ -74607,7 +75211,7 @@ var registrar = {
|
|
|
74607
75211
|
};
|
|
74608
75212
|
/** Close one unknown zero-cost transfer after the provider checks; this never starts a new transfer. */
|
|
74609
75213
|
async function supersedeTransfer(context, path) {
|
|
74610
|
-
const operationUuid = required(context, "--operation");
|
|
75214
|
+
const operationUuid = required$1(context, "--operation");
|
|
74611
75215
|
return await confirmableWrite(context, `Close the unknown zero-cost transfer ${operationUuid} for ${(await domainsRegistrarShow({ path })).data.hostname}. Its prior outcome remains unknown; this does not start another transfer.`, async () => {
|
|
74612
75216
|
if (!context.flags.has("--accept-terms")) throw new UsageError(`Superseding an unknown transfer needs --accept-terms, which confirms this closure after the provider checks.\n\n${USAGE$2}`);
|
|
74613
75217
|
return (await domainsRegistrarOperationsSupersedeTransfer({
|
|
@@ -74621,9 +75225,9 @@ async function supersedeTransfer(context, path) {
|
|
|
74621
75225
|
}
|
|
74622
75226
|
/** `register|renew|transfer <uuid>`: one consented, serialized registrar operation. */
|
|
74623
75227
|
async function operation(context, path, action) {
|
|
74624
|
-
const quoteUuid = required(context, "--quote");
|
|
74625
|
-
const amount = required(context, "--amount");
|
|
74626
|
-
const currency = required(context, "--currency");
|
|
75228
|
+
const quoteUuid = required$1(context, "--quote");
|
|
75229
|
+
const amount = required$1(context, "--amount");
|
|
75230
|
+
const currency = required$1(context, "--currency");
|
|
74627
75231
|
const periodYears = periodYearsOf(context);
|
|
74628
75232
|
const status = await domainsRegistrarShow({ path });
|
|
74629
75233
|
return await confirmableWrite(context, `${label(action)} ${status.data.hostname} for ${String(periodYears)} year(s) at ${amount} ${currency} through ${status.data.providerName ?? "the registrar"}.`, async () => (await domainsRegistrarOperationsStore({
|
|
@@ -75013,11 +75617,11 @@ var registryConnections = {
|
|
|
75013
75617
|
if (subcommand === void 0) throw new UsageError(USAGE);
|
|
75014
75618
|
const company = await requireCompany(context.flags);
|
|
75015
75619
|
if (subcommand === "list") {
|
|
75016
|
-
noExtra$
|
|
75620
|
+
noExtra$2(rest);
|
|
75017
75621
|
return (await hostingRegistryConnectionsIndex({ path: { company } })).data;
|
|
75018
75622
|
}
|
|
75019
75623
|
if (subcommand === "add") {
|
|
75020
|
-
noExtra$
|
|
75624
|
+
noExtra$2(rest);
|
|
75021
75625
|
return await addRegistryConnection(context, company);
|
|
75022
75626
|
}
|
|
75023
75627
|
if (!CONNECTION_SUBCOMMANDS.has(subcommand)) throw new UsageError(USAGE);
|
|
@@ -75037,7 +75641,7 @@ var registryConnections = {
|
|
|
75037
75641
|
}
|
|
75038
75642
|
};
|
|
75039
75643
|
/** Refuse arguments a subcommand does not take, rather than silently ignoring them. */
|
|
75040
|
-
function noExtra$
|
|
75644
|
+
function noExtra$2(rest) {
|
|
75041
75645
|
if (rest.length > 0) throw new UsageError(USAGE);
|
|
75042
75646
|
}
|
|
75043
75647
|
/** `check`: prove the credential reads one repository and reference, and record the digest it resolved. */
|
|
@@ -75191,7 +75795,7 @@ var repository = {
|
|
|
75191
75795
|
};
|
|
75192
75796
|
/** `list`. */
|
|
75193
75797
|
async function list$2(company, rest) {
|
|
75194
|
-
noExtra(rest);
|
|
75798
|
+
noExtra$1(rest);
|
|
75195
75799
|
return {
|
|
75196
75800
|
kind: "connections",
|
|
75197
75801
|
connections: (await hostingRepositoryConnectionIndex({ path: { company } })).data
|
|
@@ -75206,7 +75810,7 @@ async function list$2(company, rest) {
|
|
|
75206
75810
|
* authorisation handoff instead, and that one returns code and state like any other callback.
|
|
75207
75811
|
*/
|
|
75208
75812
|
async function connect(context, company, rest) {
|
|
75209
|
-
noExtra(rest);
|
|
75813
|
+
noExtra$1(rest);
|
|
75210
75814
|
const account = context.flags.get("--account")?.trim() ?? "";
|
|
75211
75815
|
return {
|
|
75212
75816
|
kind: "start",
|
|
@@ -75218,7 +75822,7 @@ async function connect(context, company, rest) {
|
|
|
75218
75822
|
}
|
|
75219
75823
|
/** `complete --callback-* …`: the code and state from the redirect GitHub sent. */
|
|
75220
75824
|
async function complete(context, company, rest) {
|
|
75221
|
-
noExtra(rest);
|
|
75825
|
+
noExtra$1(rest);
|
|
75222
75826
|
return {
|
|
75223
75827
|
kind: "connection",
|
|
75224
75828
|
connection: await completed(context, company)
|
|
@@ -75249,7 +75853,7 @@ async function completed(context, company) {
|
|
|
75249
75853
|
}
|
|
75250
75854
|
/** `repositories <connection>`. */
|
|
75251
75855
|
async function repositories(path, rest) {
|
|
75252
|
-
noExtra(rest);
|
|
75856
|
+
noExtra$1(rest);
|
|
75253
75857
|
return {
|
|
75254
75858
|
kind: "repositories",
|
|
75255
75859
|
repositories: (await hostingRepositoryConnectionRepositories({ path })).data
|
|
@@ -75257,7 +75861,7 @@ async function repositories(path, rest) {
|
|
|
75257
75861
|
}
|
|
75258
75862
|
/** `select <connection> --repository …`. */
|
|
75259
75863
|
async function select(context, path, rest) {
|
|
75260
|
-
noExtra(rest);
|
|
75864
|
+
noExtra$1(rest);
|
|
75261
75865
|
const raw = context.flags.get("--repository") ?? "";
|
|
75262
75866
|
const repositoryId = Number(raw);
|
|
75263
75867
|
if (!Number.isInteger(repositoryId) || repositoryId < 1) throw new UsageError(`select needs --repository <id>.\n\n${REPOSITORY_USAGE}`);
|
|
@@ -75293,14 +75897,14 @@ async function resync(context, path, rest) {
|
|
|
75293
75897
|
}
|
|
75294
75898
|
/** `revoke <connection>`. */
|
|
75295
75899
|
async function revoke$1(context, path, rest) {
|
|
75296
|
-
noExtra(rest);
|
|
75900
|
+
noExtra$1(rest);
|
|
75297
75901
|
return {
|
|
75298
75902
|
kind: "repository-write",
|
|
75299
75903
|
outcome: await confirmableWrite(context, "Revoke this GitHub connection. Applications bound to its selections stop deploying.", async () => (await hostingRepositoryConnectionRevoke({ path })).data)
|
|
75300
75904
|
};
|
|
75301
75905
|
}
|
|
75302
75906
|
/** No positional arguments, or a usage refusal. */
|
|
75303
|
-
function noExtra(rest) {
|
|
75907
|
+
function noExtra$1(rest) {
|
|
75304
75908
|
if (rest.length > 0) throw new UsageError(REPOSITORY_USAGE);
|
|
75305
75909
|
}
|
|
75306
75910
|
/** The read and handoff renderer. */
|
|
@@ -75396,7 +76000,7 @@ function writeSummary(result) {
|
|
|
75396
76000
|
//#region src/commands/secret-connection-write.ts
|
|
75397
76001
|
/** Every write, each describing what it will do before it sends anything. */
|
|
75398
76002
|
async function write(context, subcommand, path, connectionPath, reference) {
|
|
75399
|
-
if (subcommand === "add") return await add$
|
|
76003
|
+
if (subcommand === "add") return await add$2(context, path);
|
|
75400
76004
|
if (subcommand === "link") return await link(context, connectionPath);
|
|
75401
76005
|
if (subcommand === "unlink") {
|
|
75402
76006
|
if (reference === void 0) throw new UsageError(SECRET_CONNECTION_USAGE);
|
|
@@ -75415,7 +76019,7 @@ async function write(context, subcommand, path, connectionPath, reference) {
|
|
|
75415
76019
|
throw new UsageError(SECRET_CONNECTION_USAGE);
|
|
75416
76020
|
}
|
|
75417
76021
|
/** `add`: connect a secret manager, with the identity read from a private file or stdin. */
|
|
75418
|
-
async function add$
|
|
76022
|
+
async function add$2(context, path) {
|
|
75419
76023
|
const provider = context.flags.get("--provider") ?? "";
|
|
75420
76024
|
const endpoint = context.flags.get("--endpoint") ?? "";
|
|
75421
76025
|
const projectId = context.flags.get("--project-id") ?? "";
|
|
@@ -75651,7 +76255,7 @@ var services = {
|
|
|
75651
76255
|
report.environmentUuid,
|
|
75652
76256
|
`desired generation ${String(report.desiredGeneration)}`,
|
|
75653
76257
|
`applied generation ${String(report.observed.appliedGeneration)}`,
|
|
75654
|
-
observationText(report)
|
|
76258
|
+
observationText$1(report)
|
|
75655
76259
|
].join(" ");
|
|
75656
76260
|
if (report.services.length === 0) return [header, " no services are recorded for this environment"].join("\n");
|
|
75657
76261
|
const width = report.services.reduce((widest, one) => Math.max(widest, one.name.length), 0);
|
|
@@ -75662,7 +76266,7 @@ var services = {
|
|
|
75662
76266
|
* The observation in words. Any status other than `ready` is the API's own word passed through rather than
|
|
75663
76267
|
* mapped, so a status added later reads as itself instead of being silently folded into a known case.
|
|
75664
76268
|
*/
|
|
75665
|
-
function observationText(report) {
|
|
76269
|
+
function observationText$1(report) {
|
|
75666
76270
|
const { observed } = report;
|
|
75667
76271
|
if (observed.observedAt === null) return "nothing observed yet";
|
|
75668
76272
|
if (observed.status !== "ready") return observed.status;
|
|
@@ -76273,7 +76877,7 @@ async function start(context, tail) {
|
|
|
76273
76877
|
* never the latest one this CLI happened to read, because a capture that moved on between review and confirmation
|
|
76274
76878
|
* is exactly the change nobody looked at.
|
|
76275
76879
|
*/
|
|
76276
|
-
async function confirm(context, tail) {
|
|
76880
|
+
async function confirm$1(context, tail) {
|
|
76277
76881
|
const path = await bucketPath(context, tail);
|
|
76278
76882
|
const body = {
|
|
76279
76883
|
operationId: requiredFlag$3(context, "--operation-id", STORAGE_USAGE),
|
|
@@ -76420,7 +77024,7 @@ async function adoption(context, tail) {
|
|
|
76420
77024
|
case "retained-objects": return await retainedObjects(context, rest);
|
|
76421
77025
|
case "recovery": return await recovery(context, rest);
|
|
76422
77026
|
case "start": return await start(context, rest);
|
|
76423
|
-
case "confirm": return await confirm(context, rest);
|
|
77027
|
+
case "confirm": return await confirm$1(context, rest);
|
|
76424
77028
|
case "cancel": return await cancel(context, rest);
|
|
76425
77029
|
case "resume": return await resume(context, rest);
|
|
76426
77030
|
case "restore": return await restore(context, rest);
|
|
@@ -77415,7 +78019,7 @@ function maximumDescription(path, bytes) {
|
|
|
77415
78019
|
* Use included package storage by default. Paid capacity is explicit through `--mode allocated` or a saved
|
|
77416
78020
|
* `--quote-file`; `--mode native` buys usage-billed storage. Never turn a package refusal into a charge.
|
|
77417
78021
|
*/
|
|
77418
|
-
async function add(context, tail) {
|
|
78022
|
+
async function add$1(context, tail) {
|
|
77419
78023
|
refuseExtra(tail);
|
|
77420
78024
|
const name = requiredName(context);
|
|
77421
78025
|
const company = await requireCompany(context.flags);
|
|
@@ -77597,7 +78201,7 @@ async function dispatch$1(context) {
|
|
|
77597
78201
|
case "downloads": return await downloads(context, tail);
|
|
77598
78202
|
case "ceiling": return await ceiling(context, tail);
|
|
77599
78203
|
case "maximum": return await maximum(context, tail);
|
|
77600
|
-
case "add": return await add(context, tail);
|
|
78204
|
+
case "add": return await add$1(context, tail);
|
|
77601
78205
|
case "grow": return await grow(context, tail);
|
|
77602
78206
|
case "resize": return await resize(context, tail);
|
|
77603
78207
|
case "subscription": return await subscription(context, tail);
|
|
@@ -77691,6 +78295,329 @@ async function signedUrl(context, tail, direction) {
|
|
|
77691
78295
|
};
|
|
77692
78296
|
}
|
|
77693
78297
|
//#endregion
|
|
78298
|
+
//#region src/commands/storage-class-text.ts
|
|
78299
|
+
/**
|
|
78300
|
+
* How each storage-catalogue answer reads to a person.
|
|
78301
|
+
*
|
|
78302
|
+
* Kept beside the command rather than inside it: the command owns argument parsing and the write gate, and
|
|
78303
|
+
* these functions own the words, so the file the complexity guard watches stays small.
|
|
78304
|
+
*/
|
|
78305
|
+
function catalogueText(catalogue) {
|
|
78306
|
+
const lines = [`Registered classes (${catalogue.classes.length}):`, ...catalogue.classes.map((one) => ` ${classLine(one)}`)];
|
|
78307
|
+
if (catalogue.defaults.length > 0) {
|
|
78308
|
+
lines.push("", "Cluster defaults:");
|
|
78309
|
+
lines.push(...catalogue.defaults.map((one) => ` ${defaultText(one)}`));
|
|
78310
|
+
}
|
|
78311
|
+
lines.push("", `Backends: ${catalogue.backends.map((one) => one.slug).join(", ")}`);
|
|
78312
|
+
lines.push(`Claim types: ${catalogue.volumeTypes.map((one) => one.slug).join(", ")}`);
|
|
78313
|
+
return lines.join("\n");
|
|
78314
|
+
}
|
|
78315
|
+
function classLine(one) {
|
|
78316
|
+
const types = one.volumeTypes.join(", ");
|
|
78317
|
+
return `${one.name} [${one.kubernetesName}] on ${one.clusterName}, ${one.backendName}, ${types}${one.enabled ? "" : " disabled"}`;
|
|
78318
|
+
}
|
|
78319
|
+
function classText(one) {
|
|
78320
|
+
return [
|
|
78321
|
+
`Kubernetes name: ${one.kubernetesName}`,
|
|
78322
|
+
`Name: ${one.name}`,
|
|
78323
|
+
one.description === "" ? null : `Description: ${one.description}`,
|
|
78324
|
+
`Cluster: ${one.clusterName}`,
|
|
78325
|
+
`Backend: ${one.backendName}`,
|
|
78326
|
+
`Claim types: ${one.volumeTypes.join(", ")}`,
|
|
78327
|
+
`Enabled: ${one.enabled ? "yes" : "no"}`,
|
|
78328
|
+
`Reports written bytes: ${one.reportsUsedBytes ? "yes" : "no"}`,
|
|
78329
|
+
`Can carry a seed: ${one.supportsBackingImages ? "yes" : "no"}`,
|
|
78330
|
+
`UUID: ${one.uuid}`
|
|
78331
|
+
].filter((line) => line !== null).join("\n");
|
|
78332
|
+
}
|
|
78333
|
+
function defaultText(one) {
|
|
78334
|
+
return `${one.volumeType} -> ${one.storageClassName} (${one.storageClassUuid}) on cluster ${one.clusterUuid}`;
|
|
78335
|
+
}
|
|
78336
|
+
function observationText(one) {
|
|
78337
|
+
if (!one.observed) return `Not observed: ${one.reason ?? "the cluster did not answer."}`;
|
|
78338
|
+
return [
|
|
78339
|
+
`Observed: yes`,
|
|
78340
|
+
`Provisioner: ${one.provisioner ?? "unreported"}`,
|
|
78341
|
+
`Matches the recorded backend: ${one.backendMatches ? "yes" : "no"}`,
|
|
78342
|
+
`Reclaim policy: ${one.reclaimPolicy ?? "unreported"}`,
|
|
78343
|
+
`Allows expansion: ${one.allowVolumeExpansion === null ? "unreported" : one.allowVolumeExpansion ? "yes" : "no"}`,
|
|
78344
|
+
`Volume binding mode: ${one.volumeBindingMode ?? "unreported"}`,
|
|
78345
|
+
one.reason === null ? null : `Note: ${one.reason}`
|
|
78346
|
+
].filter((line) => line !== null).join("\n");
|
|
78347
|
+
}
|
|
78348
|
+
//#endregion
|
|
78349
|
+
//#region src/commands/storage-class-writes.ts
|
|
78350
|
+
/**
|
|
78351
|
+
* The catalogue's writes, and the vocabulary each one accepts.
|
|
78352
|
+
*
|
|
78353
|
+
* Split from the command so the file the complexity guard watches stays small. Every write goes through the
|
|
78354
|
+
* one `confirm` gate below, so a dry run and a refusal say the same sentence about the same change.
|
|
78355
|
+
*/
|
|
78356
|
+
/** The claim types the platform allocates, as the API's own vocabulary spells them. */
|
|
78357
|
+
var VOLUME_TYPES = [
|
|
78358
|
+
"application-files",
|
|
78359
|
+
"database-data",
|
|
78360
|
+
"redis-data"
|
|
78361
|
+
];
|
|
78362
|
+
/** The backends the platform's closed behaviour vocabulary carries. */
|
|
78363
|
+
var BACKENDS = [
|
|
78364
|
+
"longhorn",
|
|
78365
|
+
"ceph",
|
|
78366
|
+
"local-path"
|
|
78367
|
+
];
|
|
78368
|
+
function claimType(value) {
|
|
78369
|
+
const known = VOLUME_TYPES.find((type) => type === value);
|
|
78370
|
+
if (known === void 0) throw new UsageError(`[${value}] is not a claim type; use one of ${VOLUME_TYPES.join(", ")}.`);
|
|
78371
|
+
return known;
|
|
78372
|
+
}
|
|
78373
|
+
function backend(value) {
|
|
78374
|
+
const known = BACKENDS.find((one) => one === value);
|
|
78375
|
+
if (known === void 0) throw new UsageError(`[${value}] is not a storage backend; use one of ${BACKENDS.join(", ")}.`);
|
|
78376
|
+
return known;
|
|
78377
|
+
}
|
|
78378
|
+
/** A flag a write requires, refused by name rather than sent empty. */
|
|
78379
|
+
function required(context, flag) {
|
|
78380
|
+
const value = (context.flags.get(flag) ?? "").trim();
|
|
78381
|
+
if (value === "") throw new UsageError(`${flag} is required.\n\n${STORAGE_CLASS_USAGE}`);
|
|
78382
|
+
return value;
|
|
78383
|
+
}
|
|
78384
|
+
function one(rest) {
|
|
78385
|
+
const [value, ...extra] = rest;
|
|
78386
|
+
if (value === void 0 || extra.length > 0) throw new UsageError(STORAGE_CLASS_USAGE);
|
|
78387
|
+
return value;
|
|
78388
|
+
}
|
|
78389
|
+
function noExtra(rest) {
|
|
78390
|
+
if (rest.length > 0) throw new UsageError(STORAGE_CLASS_USAGE);
|
|
78391
|
+
}
|
|
78392
|
+
function description(context) {
|
|
78393
|
+
return (context.flags.get("--description") ?? "").trim();
|
|
78394
|
+
}
|
|
78395
|
+
/** The claim types a write names, accepted as one comma-separated flag. */
|
|
78396
|
+
function volumeTypes(context) {
|
|
78397
|
+
const types = (context.flags.get("--volume-types") ?? "").split(",").map((type) => type.trim()).filter((type) => type.length > 0);
|
|
78398
|
+
if (types.length === 0) throw new UsageError("--volume-types names at least one claim type, separated by commas.");
|
|
78399
|
+
return types.map((type) => claimType(type));
|
|
78400
|
+
}
|
|
78401
|
+
/** The one gate every write goes through, so a dry run and a refusal say the same sentence. */
|
|
78402
|
+
async function confirm(context, statement, send) {
|
|
78403
|
+
if (context.flags.has("--dry-run")) return {
|
|
78404
|
+
sent: false,
|
|
78405
|
+
description: statement
|
|
78406
|
+
};
|
|
78407
|
+
if (!context.flags.has("--confirm")) throw new UsageError([
|
|
78408
|
+
statement,
|
|
78409
|
+
"",
|
|
78410
|
+
"Nothing was sent. Pass --confirm to make this change, or --dry-run to see it without making it."
|
|
78411
|
+
].join("\n"));
|
|
78412
|
+
return {
|
|
78413
|
+
sent: true,
|
|
78414
|
+
description: statement,
|
|
78415
|
+
result: await send()
|
|
78416
|
+
};
|
|
78417
|
+
}
|
|
78418
|
+
async function add(context, rest) {
|
|
78419
|
+
noExtra(rest);
|
|
78420
|
+
const body = {
|
|
78421
|
+
clusterUuid: required(context, "--cluster"),
|
|
78422
|
+
backendType: backend(required(context, "--backend")),
|
|
78423
|
+
kubernetesName: required(context, "--kubernetes-name"),
|
|
78424
|
+
name: required(context, "--name"),
|
|
78425
|
+
description: description(context),
|
|
78426
|
+
volumeTypes: volumeTypes(context),
|
|
78427
|
+
enabled: !context.flags.has("--disabled")
|
|
78428
|
+
};
|
|
78429
|
+
return {
|
|
78430
|
+
kind: "write",
|
|
78431
|
+
outcome: await confirm(context, `Register storage class ${body.kubernetesName} on cluster ${body.clusterUuid} for ${body.volumeTypes.join(", ")}`, async () => (await platformStorageClassStore({ body })).data)
|
|
78432
|
+
};
|
|
78433
|
+
}
|
|
78434
|
+
async function set(context, rest) {
|
|
78435
|
+
const uuid = one(rest);
|
|
78436
|
+
const body = {
|
|
78437
|
+
name: required(context, "--name"),
|
|
78438
|
+
description: description(context)
|
|
78439
|
+
};
|
|
78440
|
+
return {
|
|
78441
|
+
kind: "write",
|
|
78442
|
+
outcome: await confirm(context, `Rename storage class ${uuid} to ${body.name}`, async () => (await platformStorageClassUpdate({
|
|
78443
|
+
path: { storageClassUuid: uuid },
|
|
78444
|
+
body
|
|
78445
|
+
})).data)
|
|
78446
|
+
};
|
|
78447
|
+
}
|
|
78448
|
+
async function enabled(context, rest) {
|
|
78449
|
+
const uuid = one(rest);
|
|
78450
|
+
const on = context.flags.has("--on");
|
|
78451
|
+
if (on === context.flags.has("--off")) throw new UsageError(`Name exactly one of --on or --off.\n\n${STORAGE_CLASS_USAGE}`);
|
|
78452
|
+
return {
|
|
78453
|
+
kind: "write",
|
|
78454
|
+
outcome: await confirm(context, `${on ? "Enable" : "Disable"} storage class ${uuid} for future allocation`, async () => (await platformStorageClassSetEnabled({
|
|
78455
|
+
path: { storageClassUuid: uuid },
|
|
78456
|
+
body: { enabled: on }
|
|
78457
|
+
})).data)
|
|
78458
|
+
};
|
|
78459
|
+
}
|
|
78460
|
+
async function replaceVolumeTypes(context, rest) {
|
|
78461
|
+
const uuid = one(rest);
|
|
78462
|
+
const types = volumeTypes(context);
|
|
78463
|
+
return {
|
|
78464
|
+
kind: "write",
|
|
78465
|
+
outcome: await confirm(context, `Serve ${types.join(", ")} from storage class ${uuid}`, async () => (await platformStorageClassUpdateVolumeTypes({
|
|
78466
|
+
path: { storageClassUuid: uuid },
|
|
78467
|
+
body: { volumeTypes: types }
|
|
78468
|
+
})).data)
|
|
78469
|
+
};
|
|
78470
|
+
}
|
|
78471
|
+
async function setDefault(context, rest) {
|
|
78472
|
+
noExtra(rest);
|
|
78473
|
+
const cluster = required(context, "--cluster");
|
|
78474
|
+
const type = claimType(required(context, "--volume-type"));
|
|
78475
|
+
const classUuid = required(context, "--class");
|
|
78476
|
+
return {
|
|
78477
|
+
kind: "write",
|
|
78478
|
+
outcome: await confirm(context, `Allocate ${type} claims on cluster ${cluster} from storage class ${classUuid}`, async () => (await platformStorageClassSetDefault({
|
|
78479
|
+
path: { clusterUuid: cluster },
|
|
78480
|
+
body: {
|
|
78481
|
+
volumeType: type,
|
|
78482
|
+
storageClassUuid: classUuid
|
|
78483
|
+
}
|
|
78484
|
+
})).data)
|
|
78485
|
+
};
|
|
78486
|
+
}
|
|
78487
|
+
async function observation(rest) {
|
|
78488
|
+
return {
|
|
78489
|
+
kind: "observation",
|
|
78490
|
+
observation: (await platformStorageClassObservation({ path: { storageClassUuid: one(rest) } })).data
|
|
78491
|
+
};
|
|
78492
|
+
}
|
|
78493
|
+
//#endregion
|
|
78494
|
+
//#region src/commands/storage-class.ts
|
|
78495
|
+
var STORAGE_CLASS_USAGE = [
|
|
78496
|
+
"Usage: hostingctl storage-class list",
|
|
78497
|
+
" hostingctl storage-class add --cluster <uuid> --backend <slug> --kubernetes-name <name>",
|
|
78498
|
+
" --name <text> --volume-types <type[,type...]> [--description <text>] [--disabled]",
|
|
78499
|
+
" hostingctl storage-class set <uuid> --name <text> [--description <text>]",
|
|
78500
|
+
" hostingctl storage-class enabled <uuid> (--on|--off)",
|
|
78501
|
+
" hostingctl storage-class volume-types <uuid> --volume-types <type[,type...]>",
|
|
78502
|
+
" hostingctl storage-class default --cluster <uuid> --volume-type <type> --class <uuid>",
|
|
78503
|
+
" hostingctl storage-class observation <uuid>",
|
|
78504
|
+
"",
|
|
78505
|
+
" list Every registered class, each cluster's defaults, and the vocabularies a class may use.",
|
|
78506
|
+
" add Register one cluster's Kubernetes StorageClass. Registering records intent: it does not",
|
|
78507
|
+
" create the class on the cluster, and an operator grants no company anything by it.",
|
|
78508
|
+
" set Edit the display text. The Kubernetes name, backend and cluster are the class's identity.",
|
|
78509
|
+
" enabled Switch a class on or off. Disabling removes it from future selection; a claim already",
|
|
78510
|
+
" bound to it keeps its class, because Kubernetes cannot change one in place.",
|
|
78511
|
+
" volume-types Replace the claim types a class serves. A type a bound volume already uses cannot be",
|
|
78512
|
+
" withdrawn.",
|
|
78513
|
+
" default The class a cluster allocates a claim type from when an environment names no choice.",
|
|
78514
|
+
" observation What the cluster reports for the class, or why it could not be read.",
|
|
78515
|
+
"",
|
|
78516
|
+
"Every write needs --confirm; --dry-run describes the change and sends nothing."
|
|
78517
|
+
].join("\n");
|
|
78518
|
+
/**
|
|
78519
|
+
* The storage catalogue, for a staff reader with no database console.
|
|
78520
|
+
*
|
|
78521
|
+
* A catalogue rather than a cluster change: registering a class records what the platform may offer, and the
|
|
78522
|
+
* `observation` subcommand is what asks the cluster whether that is true. Nothing here migrates a claim or
|
|
78523
|
+
* rewrites one that already exists.
|
|
78524
|
+
*/
|
|
78525
|
+
var storageClass = {
|
|
78526
|
+
name: "storage-class",
|
|
78527
|
+
summary: "The storage classes the platform may allocate from, what each serves, and each cluster's default.",
|
|
78528
|
+
usage: STORAGE_CLASS_USAGE,
|
|
78529
|
+
flags: [
|
|
78530
|
+
{
|
|
78531
|
+
name: "--cluster",
|
|
78532
|
+
takesValue: true,
|
|
78533
|
+
description: "The cluster a class exists on, by UUID."
|
|
78534
|
+
},
|
|
78535
|
+
{
|
|
78536
|
+
name: "--backend",
|
|
78537
|
+
takesValue: true,
|
|
78538
|
+
description: "The backend that serves the class."
|
|
78539
|
+
},
|
|
78540
|
+
{
|
|
78541
|
+
name: "--kubernetes-name",
|
|
78542
|
+
takesValue: true,
|
|
78543
|
+
description: "The StorageClass object's own name on the cluster."
|
|
78544
|
+
},
|
|
78545
|
+
{
|
|
78546
|
+
name: "--name",
|
|
78547
|
+
takesValue: true,
|
|
78548
|
+
description: "The name a person reads."
|
|
78549
|
+
},
|
|
78550
|
+
{
|
|
78551
|
+
name: "--description",
|
|
78552
|
+
takesValue: true,
|
|
78553
|
+
description: "What the class is for."
|
|
78554
|
+
},
|
|
78555
|
+
{
|
|
78556
|
+
name: "--volume-types",
|
|
78557
|
+
takesValue: true,
|
|
78558
|
+
description: "The claim types the class serves, separated by commas."
|
|
78559
|
+
},
|
|
78560
|
+
{
|
|
78561
|
+
name: "--volume-type",
|
|
78562
|
+
takesValue: true,
|
|
78563
|
+
description: "The claim type a default answers."
|
|
78564
|
+
},
|
|
78565
|
+
{
|
|
78566
|
+
name: "--class",
|
|
78567
|
+
takesValue: true,
|
|
78568
|
+
description: "The class to make a cluster's default."
|
|
78569
|
+
},
|
|
78570
|
+
{
|
|
78571
|
+
name: "--disabled",
|
|
78572
|
+
takesValue: false,
|
|
78573
|
+
description: "Register the class switched off."
|
|
78574
|
+
},
|
|
78575
|
+
{
|
|
78576
|
+
name: "--on",
|
|
78577
|
+
takesValue: false,
|
|
78578
|
+
description: "Switch the class on."
|
|
78579
|
+
},
|
|
78580
|
+
{
|
|
78581
|
+
name: "--off",
|
|
78582
|
+
takesValue: false,
|
|
78583
|
+
description: "Switch the class off."
|
|
78584
|
+
}
|
|
78585
|
+
],
|
|
78586
|
+
subcommands: [
|
|
78587
|
+
"list",
|
|
78588
|
+
"add",
|
|
78589
|
+
"set",
|
|
78590
|
+
"enabled",
|
|
78591
|
+
"volume-types",
|
|
78592
|
+
"default",
|
|
78593
|
+
"observation"
|
|
78594
|
+
],
|
|
78595
|
+
async run(context) {
|
|
78596
|
+
const [action, ...rest] = context.positional;
|
|
78597
|
+
if (action === "list") {
|
|
78598
|
+
if (rest.length > 0) throw new UsageError(STORAGE_CLASS_USAGE);
|
|
78599
|
+
return {
|
|
78600
|
+
kind: "catalogue",
|
|
78601
|
+
catalogue: (await platformStorageClassIndex()).data
|
|
78602
|
+
};
|
|
78603
|
+
}
|
|
78604
|
+
if (action === "add") return await add(context, rest);
|
|
78605
|
+
if (action === "set") return await set(context, rest);
|
|
78606
|
+
if (action === "enabled") return await enabled(context, rest);
|
|
78607
|
+
if (action === "volume-types") return await replaceVolumeTypes(context, rest);
|
|
78608
|
+
if (action === "default") return await setDefault(context, rest);
|
|
78609
|
+
if (action === "observation") return await observation(rest);
|
|
78610
|
+
throw new UsageError(STORAGE_CLASS_USAGE);
|
|
78611
|
+
},
|
|
78612
|
+
human(report) {
|
|
78613
|
+
if (report.kind === "catalogue") return catalogueText(report.catalogue);
|
|
78614
|
+
if (report.kind === "class") return classText(report.storageClass);
|
|
78615
|
+
if (report.kind === "default") return defaultText(report.default);
|
|
78616
|
+
if (report.kind === "observation") return observationText(report.observation);
|
|
78617
|
+
return renderWriteOutcome(report.outcome, (result) => "kubernetesName" in result ? classText(result) : defaultText(result));
|
|
78618
|
+
}
|
|
78619
|
+
};
|
|
78620
|
+
//#endregion
|
|
77694
78621
|
//#region src/commands/system-metadata.ts
|
|
77695
78622
|
/**
|
|
77696
78623
|
* `system` — what this system sees left on the cluster it manages.
|
|
@@ -78387,7 +79314,7 @@ function writeUpdateState(state, env = process.env) {
|
|
|
78387
79314
|
}
|
|
78388
79315
|
//#endregion
|
|
78389
79316
|
//#region src/version.ts
|
|
78390
|
-
var VERSION = "1.0.
|
|
79317
|
+
var VERSION = "1.0.669";
|
|
78391
79318
|
//#endregion
|
|
78392
79319
|
//#region src/commands/update.ts
|
|
78393
79320
|
/**
|
|
@@ -78462,7 +79389,7 @@ var update = {
|
|
|
78462
79389
|
}, process.env);
|
|
78463
79390
|
return {
|
|
78464
79391
|
...known,
|
|
78465
|
-
current: after ?? "1.0.
|
|
79392
|
+
current: after ?? "1.0.669",
|
|
78466
79393
|
latest: after ?? latest,
|
|
78467
79394
|
upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
|
|
78468
79395
|
action: "run",
|
|
@@ -78629,6 +79556,7 @@ var COMMANDS = [
|
|
|
78629
79556
|
register(backups),
|
|
78630
79557
|
register(backupDestination),
|
|
78631
79558
|
register(storage),
|
|
79559
|
+
register(storageClass),
|
|
78632
79560
|
register(logs),
|
|
78633
79561
|
register(pricing),
|
|
78634
79562
|
register(purchases),
|
|
@@ -78743,7 +79671,7 @@ async function printUpdateNotice(options) {
|
|
|
78743
79671
|
}, env, { waitMs: NOTICE_LOCK_WAIT_MS });
|
|
78744
79672
|
} catch {}
|
|
78745
79673
|
if (latest === null) return;
|
|
78746
|
-
if (!isNewerVersion(latest, "1.0.
|
|
79674
|
+
if (!isNewerVersion(latest, "1.0.669")) return;
|
|
78747
79675
|
process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
|
|
78748
79676
|
}
|
|
78749
79677
|
/** Whether an environment variable is set to something, which is how CI and the opt-out are read. */
|