@haakco/hostingctl 1.0.702 → 1.0.710
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 +292 -119
- 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
|
@@ -34999,22 +34999,6 @@ function hostingSeedStorePlacement(options) {
|
|
|
34999
34999
|
}));
|
|
35000
35000
|
}
|
|
35001
35001
|
/**
|
|
35002
|
-
* {@link /platform/hosting/seeds/:seedUuid/versions/:versionUuid/placements/adoptions}
|
|
35003
|
-
*/
|
|
35004
|
-
function hostingSeedPlacementStoreAdoption(options) {
|
|
35005
|
-
const { client: request = client, ...config } = options;
|
|
35006
|
-
return withUnwrap(request({
|
|
35007
|
-
method: "POST",
|
|
35008
|
-
url: "/platform/hosting/seeds/{seedUuid}/versions/{versionUuid}/placements/adoptions",
|
|
35009
|
-
security: [{
|
|
35010
|
-
type: "http",
|
|
35011
|
-
scheme: "bearer"
|
|
35012
|
-
}],
|
|
35013
|
-
...config,
|
|
35014
|
-
throwOnError: config.throwOnError ?? true
|
|
35015
|
-
}));
|
|
35016
|
-
}
|
|
35017
|
-
/**
|
|
35018
35002
|
* {@link /platform/hosting/seeds/:seedUuid/versions/:versionUuid/placements/:placementUuid/builds}
|
|
35019
35003
|
*/
|
|
35020
35004
|
function hostingSeedPlacementStoreBuild(options) {
|
|
@@ -37340,6 +37324,54 @@ function platformBillingPaymentStateCompanyUnpaid(options) {
|
|
|
37340
37324
|
}));
|
|
37341
37325
|
}
|
|
37342
37326
|
/**
|
|
37327
|
+
* {@link /platform/billing/price-changes/preview}
|
|
37328
|
+
*/
|
|
37329
|
+
function platformBillingPriceChangePreview(options) {
|
|
37330
|
+
const { client: request = client, ...config } = options;
|
|
37331
|
+
return withUnwrap(request({
|
|
37332
|
+
method: "POST",
|
|
37333
|
+
url: "/platform/billing/price-changes/preview",
|
|
37334
|
+
security: [{
|
|
37335
|
+
type: "http",
|
|
37336
|
+
scheme: "bearer"
|
|
37337
|
+
}],
|
|
37338
|
+
...config,
|
|
37339
|
+
throwOnError: config.throwOnError ?? true
|
|
37340
|
+
}));
|
|
37341
|
+
}
|
|
37342
|
+
/**
|
|
37343
|
+
* {@link /platform/billing/price-changes}
|
|
37344
|
+
*/
|
|
37345
|
+
function platformBillingPriceChangeStore(options) {
|
|
37346
|
+
const { client: request = client, ...config } = options;
|
|
37347
|
+
return withUnwrap(request({
|
|
37348
|
+
method: "POST",
|
|
37349
|
+
url: "/platform/billing/price-changes",
|
|
37350
|
+
security: [{
|
|
37351
|
+
type: "http",
|
|
37352
|
+
scheme: "bearer"
|
|
37353
|
+
}],
|
|
37354
|
+
...config,
|
|
37355
|
+
throwOnError: config.throwOnError ?? true
|
|
37356
|
+
}));
|
|
37357
|
+
}
|
|
37358
|
+
/**
|
|
37359
|
+
* {@link /platform/billing/price-changes/:rateUuid}
|
|
37360
|
+
*/
|
|
37361
|
+
function platformBillingPriceChangeDestroy(options) {
|
|
37362
|
+
const { client: request = client, ...config } = options;
|
|
37363
|
+
return withUnwrap(request({
|
|
37364
|
+
method: "DELETE",
|
|
37365
|
+
url: "/platform/billing/price-changes/{rateUuid}",
|
|
37366
|
+
security: [{
|
|
37367
|
+
type: "http",
|
|
37368
|
+
scheme: "bearer"
|
|
37369
|
+
}],
|
|
37370
|
+
...config,
|
|
37371
|
+
throwOnError: config.throwOnError ?? true
|
|
37372
|
+
}));
|
|
37373
|
+
}
|
|
37374
|
+
/**
|
|
37343
37375
|
* @description The whole book is returned rather than a page of it. It is bounded by how often we change a price, and
|
|
37344
37376
|
* a reviewer needs the windows in order to see the gaps.
|
|
37345
37377
|
* @summary Every recorded window: the default prices and each company's overrides
|
|
@@ -44878,8 +44910,11 @@ var BILLING_USAGE = `hostingctl billing <subcommand> [flags]
|
|
|
44878
44910
|
issuer Who issues our documents, and whether issuance is on
|
|
44879
44911
|
issuer activate --month <YYYY-MM> Record the first month Hosting issues its own documents
|
|
44880
44912
|
rates [--company <slug>] Every recorded price window
|
|
44881
|
-
rate start --product <MHU|MHS> --amount <rand> --from <date> [--package <key>] [--company <slug>]
|
|
44913
|
+
rate start --product <MHU|MHS|STO|TRF> --amount <rand> --from <date> [--package <key>] [--company <slug>]
|
|
44882
44914
|
rate end <rate-uuid> --until <date> End a price window
|
|
44915
|
+
rate change --product <code> --package <key> --amount <rand> --on <YYYY-MM-DD> [--applies-to-all]
|
|
44916
|
+
Schedule a list-price change from a day
|
|
44917
|
+
rate cancel <rate-uuid> Cancel a scheduled change before its day
|
|
44883
44918
|
tax-rates Every recorded VAT window
|
|
44884
44919
|
tax-rate start --label <text> --percent <n> --from <date>
|
|
44885
44920
|
run --company <slug> --period <YYYY-MM> What that company's month came to
|
|
@@ -45045,6 +45080,10 @@ var billingProductEnum = {
|
|
|
45045
45080
|
STO: "STO",
|
|
45046
45081
|
TRF: "TRF"
|
|
45047
45082
|
};
|
|
45083
|
+
var billingRateExistingCustomerRuleEnum = {
|
|
45084
|
+
grandfathered: "grandfathered",
|
|
45085
|
+
applies_to_all: "applies_to_all"
|
|
45086
|
+
};
|
|
45048
45087
|
var hostingCancellationDeletionTimingEnum = {
|
|
45049
45088
|
"at-service-end": "at-service-end",
|
|
45050
45089
|
now: "now"
|
|
@@ -46149,7 +46188,7 @@ var BILLING_METADATA = {
|
|
|
46149
46188
|
{
|
|
46150
46189
|
name: "--product",
|
|
46151
46190
|
takesValue: true,
|
|
46152
|
-
description: "
|
|
46191
|
+
description: "A rate's product: MHU, MHS, STO or TRF."
|
|
46153
46192
|
},
|
|
46154
46193
|
{
|
|
46155
46194
|
name: "--package",
|
|
@@ -46171,6 +46210,16 @@ var BILLING_METADATA = {
|
|
|
46171
46210
|
takesValue: true,
|
|
46172
46211
|
description: "The ISO-8601 date a window ends."
|
|
46173
46212
|
},
|
|
46213
|
+
{
|
|
46214
|
+
name: "--on",
|
|
46215
|
+
takesValue: true,
|
|
46216
|
+
description: "The day a price change starts, YYYY-MM-DD."
|
|
46217
|
+
},
|
|
46218
|
+
{
|
|
46219
|
+
name: "--applies-to-all",
|
|
46220
|
+
takesValue: false,
|
|
46221
|
+
description: "Move existing customers too."
|
|
46222
|
+
},
|
|
46174
46223
|
{
|
|
46175
46224
|
name: "--label",
|
|
46176
46225
|
takesValue: true,
|
|
@@ -46353,6 +46402,8 @@ var BILLING_METADATA = {
|
|
|
46353
46402
|
"rates",
|
|
46354
46403
|
"rate start",
|
|
46355
46404
|
"rate end",
|
|
46405
|
+
"rate change",
|
|
46406
|
+
"rate cancel",
|
|
46356
46407
|
"tax-rates",
|
|
46357
46408
|
"tax-rate start",
|
|
46358
46409
|
"run",
|
|
@@ -46416,7 +46467,7 @@ var BILLING_TOPICS = [
|
|
|
46416
46467
|
},
|
|
46417
46468
|
{
|
|
46418
46469
|
path: ["rate"],
|
|
46419
|
-
usage: "hostingctl billing rate <start|end> [flags]\n\nA rate is never edited
|
|
46470
|
+
usage: "hostingctl billing rate <start|end|change|cancel> [flags]\n\nA rate is never edited. A list price changes on a day with `rate change`, which the API previews before --confirm sends it; existing customers keep their price unless --applies-to-all is given for an increase with notice. `rate cancel` takes a scheduled change back before its day. `rate start` records a key's first price or a company's own price."
|
|
46420
46471
|
},
|
|
46421
46472
|
{
|
|
46422
46473
|
path: ["run"],
|
|
@@ -46452,6 +46503,40 @@ var BILLING_TOPICS = [
|
|
|
46452
46503
|
}
|
|
46453
46504
|
];
|
|
46454
46505
|
//#endregion
|
|
46506
|
+
//#region src/commands/billing-price-changes.ts
|
|
46507
|
+
/**
|
|
46508
|
+
* A list-price change, given as a day: `rate change` and `rate cancel`.
|
|
46509
|
+
*
|
|
46510
|
+
* The change is previewed by the API first — a read that writes nothing — so `--dry-run` reports what the API says
|
|
46511
|
+
* the change would do (the current price, whether it rises and who it reaches), and `--confirm` sends exactly that.
|
|
46512
|
+
*/
|
|
46513
|
+
/** The sentence an operator confirms, built from the API's own preview. */
|
|
46514
|
+
function changeDescription(preview) {
|
|
46515
|
+
const reach = preview.existingCustomers === billingRateExistingCustomerRuleEnum.applies_to_all ? "Existing customers move to it, each no earlier than their notice period after their notice is sent." : preview.isIncrease ? "Existing customers keep their current price; new customers pay the new one." : "Every customer pays the lower price from that day.";
|
|
46516
|
+
return `Change the ${preview.product} list price for ${preview.packageKey} from ${randAmount(preview.currentAmountCents)} to ${randAmount(preview.newAmountCents)} from ${preview.effectiveOn} (${preview.effectiveFrom}). ${reach} ${preview.existingCustomerCount} existing customers, ${preview.keepingPriceCount} keeping their price.`;
|
|
46517
|
+
}
|
|
46518
|
+
async function changeRate(context) {
|
|
46519
|
+
const on = requiredFlag$2(context, "--on");
|
|
46520
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(on)) throw new UsageError(`--on must be a day, written YYYY-MM-DD (got ${on}).\n\n${BILLING_USAGE}`);
|
|
46521
|
+
const body = {
|
|
46522
|
+
product: product$1(context),
|
|
46523
|
+
packageKey: requiredFlag$2(context, "--package"),
|
|
46524
|
+
amountCents: randToCents$1(context, "--amount"),
|
|
46525
|
+
effectiveOn: on,
|
|
46526
|
+
existingCustomers: context.flags.has("--applies-to-all") ? billingRateExistingCustomerRuleEnum.applies_to_all : billingRateExistingCustomerRuleEnum.grandfathered
|
|
46527
|
+
};
|
|
46528
|
+
return {
|
|
46529
|
+
kind: "write",
|
|
46530
|
+
outcome: await confirmableWrite(context, changeDescription(await platformBillingPriceChangePreview({ body }).unwrap()), async () => platformBillingPriceChangeStore({ body }).unwrap())
|
|
46531
|
+
};
|
|
46532
|
+
}
|
|
46533
|
+
async function cancelRateChange(context, rateUuid) {
|
|
46534
|
+
return {
|
|
46535
|
+
kind: "write",
|
|
46536
|
+
outcome: await confirmableWrite(context, `Cancel the scheduled price change ${rateUuid}. The earlier price is reopened, so no day is left unpriced.`, async () => platformBillingPriceChangeDestroy({ path: { rateUuid } }).unwrap())
|
|
46537
|
+
};
|
|
46538
|
+
}
|
|
46539
|
+
//#endregion
|
|
46455
46540
|
//#region src/commands/billing-refunds.ts
|
|
46456
46541
|
/**
|
|
46457
46542
|
* Money going back: the platform's list, a client's request, and the four transitions an operator records.
|
|
@@ -46705,10 +46790,11 @@ async function rates() {
|
|
|
46705
46790
|
}
|
|
46706
46791
|
async function rate(context, rest) {
|
|
46707
46792
|
if (rest[0] === "start") return startRate(context);
|
|
46708
|
-
if (rest[0] === "
|
|
46793
|
+
if (rest[0] === "change") return changeRate(context);
|
|
46794
|
+
if (rest[0] === "end" || rest[0] === "cancel") {
|
|
46709
46795
|
const rateUuid = rest[1] ?? "";
|
|
46710
|
-
if (rateUuid === "") throw new UsageError(`rate
|
|
46711
|
-
return endRate(context, rateUuid);
|
|
46796
|
+
if (rateUuid === "") throw new UsageError(`rate ${rest[0]} needs the rate's uuid.\n\n${BILLING_USAGE}`);
|
|
46797
|
+
return rest[0] === "end" ? endRate(context, rateUuid) : cancelRateChange(context, rateUuid);
|
|
46712
46798
|
}
|
|
46713
46799
|
throw new UsageError(BILLING_USAGE);
|
|
46714
46800
|
}
|
|
@@ -51465,6 +51551,7 @@ function stated(flags, flag, usage) {
|
|
|
51465
51551
|
var USAGE$24 = [
|
|
51466
51552
|
"Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
|
|
51467
51553
|
" hostingctl environment create --client <slug> --name <name> [--slug <slug>] [--package <key>]",
|
|
51554
|
+
" [--storage-classes <volume-type>=<class-uuid>[,<volume-type>=<class-uuid>...]]",
|
|
51468
51555
|
" [--cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
|
|
51469
51556
|
" --storage-limit <MiB>]",
|
|
51470
51557
|
"",
|
|
@@ -51481,8 +51568,15 @@ var USAGE$24 = [
|
|
|
51481
51568
|
"answer rather than a size this command picked.",
|
|
51482
51569
|
"",
|
|
51483
51570
|
"The package is one of the keys this environment's catalog offers; the platform chooses the placement,",
|
|
51484
|
-
"so no cluster is sent or accepted."
|
|
51571
|
+
"so no cluster is sent or accepted.",
|
|
51572
|
+
"Initial storage classes are optional; each is reviewed and recorded before the environment's first reconcile."
|
|
51485
51573
|
].join("\n");
|
|
51574
|
+
var STORAGE_VOLUME_TYPES = [
|
|
51575
|
+
"application-files",
|
|
51576
|
+
"database-data",
|
|
51577
|
+
"redis-data"
|
|
51578
|
+
];
|
|
51579
|
+
var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
51486
51580
|
/**
|
|
51487
51581
|
* The flags this command reads, declared once and published by the group's metadata.
|
|
51488
51582
|
*
|
|
@@ -51505,6 +51599,11 @@ var CREATE_FLAG_SPECS = [
|
|
|
51505
51599
|
takesValue: true,
|
|
51506
51600
|
description: "The platform package the environment is created from."
|
|
51507
51601
|
},
|
|
51602
|
+
{
|
|
51603
|
+
name: "--storage-classes",
|
|
51604
|
+
takesValue: true,
|
|
51605
|
+
description: "Initial per-claim-type class choices, each written as `<volume-type>=<class-uuid>` and separated by commas."
|
|
51606
|
+
},
|
|
51508
51607
|
{
|
|
51509
51608
|
name: "--client",
|
|
51510
51609
|
takesValue: true,
|
|
@@ -51522,15 +51621,40 @@ async function create$2(context, rest) {
|
|
|
51522
51621
|
if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$24}`);
|
|
51523
51622
|
const slug = slugFor(context.flags.get("--slug"), name, USAGE$24);
|
|
51524
51623
|
const slice = sliceFor(context.flags, USAGE$24);
|
|
51624
|
+
const storageSelections = storageSelectionsFor(context.flags, USAGE$24);
|
|
51525
51625
|
const scope = await scopeFor(context.flags);
|
|
51526
51626
|
const chosen = chosenPackage(await catalogFor(scope), context.flags.get("--package")?.trim() ?? "");
|
|
51527
51627
|
const body = {
|
|
51528
51628
|
name,
|
|
51529
51629
|
slug,
|
|
51530
51630
|
resourceProfile: chosen.key,
|
|
51531
|
-
...slice === null ? {} : { budget: slice }
|
|
51532
|
-
|
|
51533
|
-
|
|
51631
|
+
...slice === null ? {} : { budget: slice },
|
|
51632
|
+
...storageSelections === null ? {} : { storageSelections }
|
|
51633
|
+
};
|
|
51634
|
+
return await confirmableWrite(context, describeCreate$1(name, slug, chosen.key, scope, slice, storageSelections), async () => await sendCreate(scope, body));
|
|
51635
|
+
}
|
|
51636
|
+
/** Parse the optional initial per-role class choices before the command reads a catalog or sends a write. */
|
|
51637
|
+
function storageSelectionsFor(flags, usage) {
|
|
51638
|
+
if (!flags.has("--storage-classes")) return null;
|
|
51639
|
+
const value = flags.get("--storage-classes")?.trim() ?? "";
|
|
51640
|
+
if (value === "") throw new UsageError(`--storage-classes needs at least one type=uuid choice.\n\n${usage}`);
|
|
51641
|
+
const seen = /* @__PURE__ */ new Set();
|
|
51642
|
+
const selections = [];
|
|
51643
|
+
for (const entry of value.split(",")) {
|
|
51644
|
+
const separator = entry.indexOf("=");
|
|
51645
|
+
const volumeType = entry.slice(0, separator).trim();
|
|
51646
|
+
const storageClassUuid = entry.slice(separator + 1).trim();
|
|
51647
|
+
if (separator < 1 || entry.indexOf("=", separator + 1) !== -1) throw new UsageError(`Each --storage-classes choice must be <volume-type>=<class-uuid>.\n\n${usage}`);
|
|
51648
|
+
if (!STORAGE_VOLUME_TYPES.includes(volumeType)) throw new UsageError(`--storage-classes volume types are ${STORAGE_VOLUME_TYPES.join(", ")} (got ${volumeType}).\n\n${usage}`);
|
|
51649
|
+
if (seen.has(volumeType)) throw new UsageError(`--storage-classes names ${volumeType} more than once.\n\n${usage}`);
|
|
51650
|
+
if (!UUID_PATTERN.test(storageClassUuid)) throw new UsageError(`--storage-classes needs a UUID for ${volumeType}.\n\n${usage}`);
|
|
51651
|
+
seen.add(volumeType);
|
|
51652
|
+
selections.push({
|
|
51653
|
+
volumeType,
|
|
51654
|
+
storageClassUuid
|
|
51655
|
+
});
|
|
51656
|
+
}
|
|
51657
|
+
return selections;
|
|
51534
51658
|
}
|
|
51535
51659
|
/** Which company or client the create is for, from exactly one of `--company` and `--client`. */
|
|
51536
51660
|
async function scopeFor(flags) {
|
|
@@ -51576,10 +51700,11 @@ async function sendCreate(scope, body) {
|
|
|
51576
51700
|
* The addressee is named in every mode, so an operator who acted for a client sees that in the description and in
|
|
51577
51701
|
* `--json`, rather than reading a receipt that could be their own company's.
|
|
51578
51702
|
*/
|
|
51579
|
-
function describeCreate$1(name, slug, packageKey, scope, slice) {
|
|
51703
|
+
function describeCreate$1(name, slug, packageKey, scope, slice, storageSelections) {
|
|
51580
51704
|
return [
|
|
51581
51705
|
`Create environment "${name}" (${slug}) ${scope.mode === "client" ? `for client ${scope.client} through the platform route (this account holds no membership in it)` : `in company ${scope.company} through the company's own route`}, with the ${packageKey} package.`,
|
|
51582
51706
|
...slice === null ? [] : [describeSlice(slice)],
|
|
51707
|
+
...storageSelections === null ? [] : [" Initial storage classes (recorded before the first reconcile):", ...storageSelections.map((one) => ` ${one.volumeType}: ${one.storageClassUuid}`)],
|
|
51583
51708
|
" The platform chooses the placement from its own configuration: no cluster is sent or accepted, and",
|
|
51584
51709
|
" the package supplies the purchase and the composition, not the cluster or the namespace."
|
|
51585
51710
|
].join("\n");
|
|
@@ -52427,6 +52552,7 @@ var ENVIRONMENT_SUBCOMMANDS = [
|
|
|
52427
52552
|
var ENVIRONMENT_USAGE = [
|
|
52428
52553
|
"Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
|
|
52429
52554
|
" hostingctl environment create --client <slug> --name <name> [--slug <slug>] [--package <key>]",
|
|
52555
|
+
" [--storage-classes <volume-type>=<class-uuid>[,<volume-type>=<class-uuid>...]]",
|
|
52430
52556
|
" [--cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
|
|
52431
52557
|
" --storage-limit <MiB>]",
|
|
52432
52558
|
" hostingctl environment show|profile <uuid> --company <slug>",
|
|
@@ -54126,7 +54252,7 @@ var SETUP_USAGE = [
|
|
|
54126
54252
|
"Usage: hostingctl environment setup --company <slug> --file <hosting.yaml> --confirm",
|
|
54127
54253
|
" [--environment <uuid> | --name <name> [--slug <slug>] [--package <key>]",
|
|
54128
54254
|
" [--cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
|
|
54129
|
-
" --storage-limit <MiB>]]",
|
|
54255
|
+
" --storage-limit <MiB>] [--storage-classes <volume-type>=<class-uuid>[,...]]]",
|
|
54130
54256
|
" [--source-dir <repository-root> | --source-archive <project.zip>] [--switch-mode]",
|
|
54131
54257
|
" [--timeout <seconds>] [--dry-run]",
|
|
54132
54258
|
"",
|
|
@@ -54139,6 +54265,8 @@ var SETUP_USAGE = [
|
|
|
54139
54265
|
" --environment An existing environment to configure and serve. Otherwise --name creates one.",
|
|
54140
54266
|
" --name The environment to create when it does not exist yet.",
|
|
54141
54267
|
" --package The package a created environment is sized from; omitted, the API sizes it from the pool.",
|
|
54268
|
+
" --storage-classes Initial per-claim-type class choices, recorded before first reconcile when a new environment is",
|
|
54269
|
+
" created. The command refuses this option for an existing or adopted environment.",
|
|
54142
54270
|
" --cpu-request/--cpu-limit The slice's CPU request and limit, in millicores, for an environment setup",
|
|
54143
54271
|
" creates. They do not resize an environment it adopted.",
|
|
54144
54272
|
" --memory-request/--memory-limit The slice's memory request and limit, in MiB.",
|
|
@@ -54174,10 +54302,16 @@ async function resolveEnvironment(context, company, existing, name) {
|
|
|
54174
54302
|
created: false
|
|
54175
54303
|
};
|
|
54176
54304
|
const found = await findBySlug(company, slugFor(context.flags.get("--slug"), name ?? "", SETUP_USAGE));
|
|
54177
|
-
if (found !== null)
|
|
54178
|
-
environment
|
|
54179
|
-
|
|
54180
|
-
|
|
54305
|
+
if (found !== null) {
|
|
54306
|
+
if (context.flags.has("--storage-classes")) throw new UsageError("--storage-classes applies only when setup creates a new environment; this slug already exists.");
|
|
54307
|
+
return {
|
|
54308
|
+
environment: (await hostingEnvironmentShow({ path: {
|
|
54309
|
+
company,
|
|
54310
|
+
environmentUuid: found.uuid
|
|
54311
|
+
} })).data,
|
|
54312
|
+
created: false
|
|
54313
|
+
};
|
|
54314
|
+
}
|
|
54181
54315
|
const written = await create$2(context, []);
|
|
54182
54316
|
if (!written.sent) throw new UsageError("The environment was not created; nothing else was sent.");
|
|
54183
54317
|
return {
|
|
@@ -54201,10 +54335,7 @@ async function findBySlug(company, slug) {
|
|
|
54201
54335
|
};
|
|
54202
54336
|
}, "environments").then((paged) => paged.items.find((one) => one.slug === slug));
|
|
54203
54337
|
if (listed === void 0) return null;
|
|
54204
|
-
return
|
|
54205
|
-
company,
|
|
54206
|
-
environmentUuid: listed.uuid
|
|
54207
|
-
} })).data;
|
|
54338
|
+
return listed;
|
|
54208
54339
|
}
|
|
54209
54340
|
/**
|
|
54210
54341
|
* The document, applied — and only submitted, not waited for.
|
|
@@ -54703,7 +54834,9 @@ async function setup(context, rest) {
|
|
|
54703
54834
|
if (existing === null === (name === null)) throw new UsageError(`Name the environment to configure (--environment) or the one to create (--name).\n\n${SETUP_USAGE}`);
|
|
54704
54835
|
if (context.flags.has("--wait")) throw new UsageError(`setup always waits for what it starts; --wait belongs to \`configuration apply\`.\n\n${SETUP_USAGE}`);
|
|
54705
54836
|
const slice = sliceFor(context.flags, SETUP_USAGE);
|
|
54706
|
-
const
|
|
54837
|
+
const storageSelections = storageSelectionsFor(context.flags, SETUP_USAGE);
|
|
54838
|
+
if (existing !== null && storageSelections !== null) throw new UsageError(`--storage-classes applies only when setup creates a new environment.\n\n${SETUP_USAGE}`);
|
|
54839
|
+
const plan = setupPlan(name, existing, file, flag$1(context, "--source-dir"), flag$1(context, "--source-archive"), existing === null ? slice : null, storageSelections);
|
|
54707
54840
|
if (context.flags.has("--dry-run")) return {
|
|
54708
54841
|
kind: "environment-setup",
|
|
54709
54842
|
outcome: "planned",
|
|
@@ -54751,12 +54884,17 @@ async function setup(context, rest) {
|
|
|
54751
54884
|
}
|
|
54752
54885
|
}
|
|
54753
54886
|
/** The ordered statement of what this command will do, used by both `--dry-run` and the confirmation refusal. */
|
|
54754
|
-
function setupPlan(name, existing, file, sourceDir, sourceArchive, slice) {
|
|
54887
|
+
function setupPlan(name, existing, file, sourceDir, sourceArchive, slice, storageSelections) {
|
|
54755
54888
|
const environment = existing === null ? `create environment "${name ?? ""}" if it does not exist` : `use environment ${existing}`;
|
|
54756
54889
|
return [
|
|
54757
54890
|
`Set up the environment from ${file}:`,
|
|
54758
54891
|
` ${environment}`,
|
|
54759
54892
|
...slice === null ? [] : [describeSlice(slice)],
|
|
54893
|
+
...storageSelections === null ? [] : [
|
|
54894
|
+
" Initial storage classes (used only if a new environment is created):",
|
|
54895
|
+
...storageSelections.map((one) => ` ${one.volumeType}: ${one.storageClassUuid}`),
|
|
54896
|
+
" If this slug already exists, setup refuses before applying the document."
|
|
54897
|
+
],
|
|
54760
54898
|
" apply the document and wait for the platform to accept it",
|
|
54761
54899
|
` send source from ${sourceDir ?? sourceArchive ?? "no source named"}`,
|
|
54762
54900
|
" build each application that builds from source, deploy its release and see it running",
|
|
@@ -60521,13 +60659,6 @@ object({
|
|
|
60521
60659
|
items: array(activityDataSchema),
|
|
60522
60660
|
meta: pageMetaDataSchema
|
|
60523
60661
|
});
|
|
60524
|
-
var adoptHostingSeedPlacementRequestSchema = object({
|
|
60525
|
-
clusterUuid: uuid(),
|
|
60526
|
-
storageClassName: string().max(253).regex(/~^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*$~/),
|
|
60527
|
-
backingImageName: string().max(253).regex(/~^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*$~/),
|
|
60528
|
-
expectedChecksum: string().regex(/^[0-9a-f]{128}$/),
|
|
60529
|
-
minimumSizeMib: int().min(1)
|
|
60530
|
-
}).describe("Record one seed version's already-existing cluster objects on one cluster.\n\nA caller supplies the cluster, the two object names an outside owner already built, the immutable\nSHA-512 checksum that BackingImage must keep reporting, and the smallest claim the class can provision.\n\nNo readiness, size, status or origin can be submitted: those are recorded by a real observation or by\nthe service. The names are validated as Kubernetes object identities — a DNS-1123 subdomain — because\na name that is not already addressable in the cluster is not an existing object at all. The checksum is\nLonghorn's SHA-512 form, deliberately not the version's SHA-256 source archive checksum.");
|
|
60531
60662
|
var announceHostingRuntimeVersionNoticeRequestSchema = object({
|
|
60532
60663
|
until: datetime(),
|
|
60533
60664
|
note: string().max(500)
|
|
@@ -60745,6 +60876,31 @@ object({
|
|
|
60745
60876
|
method: union([billingPaymentMethodDataSchema, _null()]),
|
|
60746
60877
|
invoices: array(billingInvoiceCollectionPositionDataSchema)
|
|
60747
60878
|
});
|
|
60879
|
+
var billingProductEnumSchema = _enum([
|
|
60880
|
+
"MHU",
|
|
60881
|
+
"MHS",
|
|
60882
|
+
"STO",
|
|
60883
|
+
"TRF"
|
|
60884
|
+
]).describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. They are our product codes, not package keys: a package says what an environment holds, a product says what it is billed as.\n");
|
|
60885
|
+
var billingPriceSourceEnumSchema = _enum([
|
|
60886
|
+
"company_rate",
|
|
60887
|
+
"default_rate",
|
|
60888
|
+
"protected_rate",
|
|
60889
|
+
"free_allowance"
|
|
60890
|
+
]).describe("Which price a rated line segment resolved to. The source is frozen onto the line so a later price book change cannot rewrite why a past segment was worth what it was. A free-allowance segment has no rate at all.\n| |\n|---|\n| `company_rate` <br/> A company-specific rate window applied. |\n| `default_rate` <br/> The default (company-null) rate window applied. |\n| `protected_rate` <br/> An existing customer's protected price: the lowest earlier list price, kept when the list price rose. |\n| `free_allowance` <br/> A period held under the free allowance: a stated zero line, never an omission. |");
|
|
60891
|
+
var billingCompanyPriceDataSchema = object({
|
|
60892
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. They are our product codes, not package keys: a package says what an environment holds, a product says what it is billed as.\n"),
|
|
60893
|
+
packageKey: string(),
|
|
60894
|
+
name: string().describe("The key's name a customer reads, such as \"Standard unit\"."),
|
|
60895
|
+
yourPrice: billingAmountsDataSchema,
|
|
60896
|
+
listPrice: billingAmountsDataSchema,
|
|
60897
|
+
priceSource: billingPriceSourceEnumSchema.describe("Which price a rated line segment resolved to. The source is frozen onto the line so a later price book change cannot rewrite why a past segment was worth what it was. A free-allowance segment has no rate at all.\n| |\n|---|\n| `company_rate` <br/> A company-specific rate window applied. |\n| `default_rate` <br/> The default (company-null) rate window applied. |\n| `protected_rate` <br/> An existing customer's protected price: the lowest earlier list price, kept when the list price rose. |\n| `free_allowance` <br/> A period held under the free allowance: a stated zero line, never an omission. |")
|
|
60898
|
+
});
|
|
60899
|
+
object({
|
|
60900
|
+
currency: string(),
|
|
60901
|
+
quotedAt: string(),
|
|
60902
|
+
items: array(billingCompanyPriceDataSchema)
|
|
60903
|
+
});
|
|
60748
60904
|
var billingCreditEntryTypeEnumSchema = _enum([
|
|
60749
60905
|
"over_recovery",
|
|
60750
60906
|
"unapplied_receipt",
|
|
@@ -60890,12 +61046,6 @@ var billingDeliveryStateEnumSchema = _enum([
|
|
|
60890
61046
|
"failed"
|
|
60891
61047
|
]).describe("What we know about sending the document. The mail transport can prove submission, not mailbox delivery, so `sent` means \"the transport * accepted it for the billing contact\". A failed or missing contact never un-issues the document.\n");
|
|
60892
61048
|
var billingDiscountKindEnumSchema = _enum(["amount", "percent"]).describe("What a discount code states: a price, or a share off the list price. A code's promise is an **amount**, because an amount is what a client is charged and what a price window records. A percentage is therefore a way of *deriving* that amount once, at the month the window opens, against the list price effective then — not a second pricing rule that would reprice a settled month when a list price moves. The kind is stored rather than inferred from which column is filled, so a half-written code cannot mean two things and an existing row keeps its original meaning as `amount`.\n");
|
|
60893
|
-
var billingProductEnumSchema = _enum([
|
|
60894
|
-
"MHU",
|
|
60895
|
-
"MHS",
|
|
60896
|
-
"STO",
|
|
60897
|
-
"TRF"
|
|
60898
|
-
]).describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. They are our product codes, not package keys: a package says what an environment holds, a product says what it is billed as.\n");
|
|
60899
61049
|
var billingDiscountCodeRedemptionDataSchema = object({
|
|
60900
61050
|
state: _enum(["pending", "applied"]).describe("Whether a redeemed code has priced the account yet. A code can be redeemed before the account holds anything to price: a client types it while creating their account, and a brand-new company has no environment, so no purchase period, so nothing a price window could name. `pending` is that state — the promise exists and is spent, and the first environment the client creates prices it. `applied` is a redemption that already wrote the company's price window. The distinction is a fact about the record, not a workflow step a caller advances by hand: only the environment creation path moves a redemption from `pending` to `applied`, in the transaction that opens the period.\n| |\n|---|\n| `pending` <br/> Redeemed, and waiting for the account to hold a package that can be priced. |\n| `applied` <br/> Redeemed, and the company's own price window carries the code's amount. |").describe("Whether a redeemed code has priced the account yet. A code can be redeemed before the account holds anything to price: a client types it while creating their account, and a brand-new company has no environment, so no purchase period, so nothing a price window could name. `pending` is that state — the promise exists and is spent, and the first environment the client creates prices it. `applied` is a redemption that already wrote the company's price window. The distinction is a fact about the record, not a workflow step a caller advances by hand: only the environment creation path moves a redemption from `pending` to `applied`, in the transaction that opens the period.\n| |\n|---|\n| `pending` <br/> Redeemed, and waiting for the account to hold a package that can be priced. |\n| `applied` <br/> Redeemed, and the company's own price window carries the code's amount. |"),
|
|
60901
61051
|
code: string(),
|
|
@@ -61171,11 +61321,21 @@ object({
|
|
|
61171
61321
|
paidGrossCents: int(),
|
|
61172
61322
|
unpaidGrossCents: int()
|
|
61173
61323
|
});
|
|
61174
|
-
var
|
|
61175
|
-
|
|
61176
|
-
"
|
|
61177
|
-
|
|
61178
|
-
|
|
61324
|
+
var billingRateExistingCustomerRuleEnumSchema = _enum(["grandfathered", "applies_to_all"]);
|
|
61325
|
+
object({
|
|
61326
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. They are our product codes, not package keys: a package says what an environment holds, a product says what it is billed as.\n"),
|
|
61327
|
+
packageKey: string(),
|
|
61328
|
+
amountBasis: billingAmountBasisEnumSchema.describe("What one rate amount is for, and whether the amount already includes VAT. A recurring packaging price is charged per month and prorated by time held; a setup price is charged once for an approved event and is never prorated. A **VAT-inclusive** recurring price is the third case, and it exists because some prices are agreed as a consumer figure: R3.00 per 10 GB including VAT cannot be expressed as a whole number of net cents that reproduces R30.00 for ten blocks, so the agreed gross figure is what the price book stores and the VAT is separated out of it. That keeps a quote and an invoice equal to the number the client was given, instead of two cents away from it. Keeping all three in one effective-dated price table means there is one place a price lives, not three.\n"),
|
|
61329
|
+
currentAmountCents: int(),
|
|
61330
|
+
newAmountCents: int(),
|
|
61331
|
+
isIncrease: boolean(),
|
|
61332
|
+
effectiveOn: string(),
|
|
61333
|
+
effectiveFrom: string(),
|
|
61334
|
+
existingCustomers: billingRateExistingCustomerRuleEnumSchema,
|
|
61335
|
+
existingCustomerCount: int().describe("Companies already customers of this product and key."),
|
|
61336
|
+
keepingPriceCount: int().describe("Of those, how many keep their current price: every one on a grandfathered increase, none otherwise."),
|
|
61337
|
+
rateUuid: string().nullable()
|
|
61338
|
+
});
|
|
61179
61339
|
object({
|
|
61180
61340
|
uuid: string(),
|
|
61181
61341
|
provider: string(),
|
|
@@ -61221,7 +61381,8 @@ object({ items: array(object({
|
|
|
61221
61381
|
amountCents: int(),
|
|
61222
61382
|
currency: string(),
|
|
61223
61383
|
effectiveFrom: string(),
|
|
61224
|
-
effectiveUntil: string().nullable()
|
|
61384
|
+
effectiveUntil: string().nullable(),
|
|
61385
|
+
existingCustomers: union([billingRateExistingCustomerRuleEnumSchema, _null()])
|
|
61225
61386
|
})) });
|
|
61226
61387
|
var billingReceivablesSuspensionDataSchema = object({
|
|
61227
61388
|
reason: string(),
|
|
@@ -61272,7 +61433,7 @@ var billingRunLineDataSchema = object({
|
|
|
61272
61433
|
serviceTo: datetime(),
|
|
61273
61434
|
heldSeconds: int(),
|
|
61274
61435
|
monthSeconds: int(),
|
|
61275
|
-
priceSource: billingPriceSourceEnumSchema.describe("Which price a rated line segment resolved to. The source is frozen onto the line so a later price book change cannot rewrite why a past segment was worth what it was. A free-allowance segment has no rate at all.\n| |\n|---|\n| `company_rate` <br/> A company-specific rate window applied. |\n| `default_rate` <br/> The default (company-null) rate window applied. |\n| `free_allowance` <br/> A period held under the free allowance: a stated zero line, never an omission. |"),
|
|
61436
|
+
priceSource: billingPriceSourceEnumSchema.describe("Which price a rated line segment resolved to. The source is frozen onto the line so a later price book change cannot rewrite why a past segment was worth what it was. A free-allowance segment has no rate at all.\n| |\n|---|\n| `company_rate` <br/> A company-specific rate window applied. |\n| `default_rate` <br/> The default (company-null) rate window applied. |\n| `protected_rate` <br/> An existing customer's protected price: the lowest earlier list price, kept when the list price rose. |\n| `free_allowance` <br/> A period held under the free allowance: a stated zero line, never an omission. |"),
|
|
61276
61437
|
rateUuid: string().nullable(),
|
|
61277
61438
|
monthlyAmountCents: int().nullable(),
|
|
61278
61439
|
amountBasis: union([billingAmountBasisEnumSchema, _null()]),
|
|
@@ -61798,10 +61959,19 @@ var hostingCertificateIssuerEnumSchema = _enum([
|
|
|
61798
61959
|
"letsencrypt-staging",
|
|
61799
61960
|
"zerossl"
|
|
61800
61961
|
]);
|
|
61962
|
+
var hostingVolumeEnumSchema = _enum([
|
|
61963
|
+
"application-files",
|
|
61964
|
+
"database-data",
|
|
61965
|
+
"redis-data"
|
|
61966
|
+
]);
|
|
61801
61967
|
var hostingWorkloadServerModeEnumSchema = _enum(["shared", "dedicated"]).describe("Whether a workload's database server is shared with the rest of its engine, or bought for it alone. An environment runs ONE server per engine, and every database of that engine binds to it. That is the purchase's shape: one server's memory and CPU serve every application on the engine. A second same-engine server splits that purchase between two Pods that each must still clear the engine's own floor — measured on Home 2026-10-19, where such a split left an engine 512Mi and it was OOM-killed on every boot. A second server is therefore a **client capability request** and never a side effect of declaring a workload. `DEDICATED` is that request: the workload pays its own floor out of the environment's budget, and the reconciler binds the databases to it by name rather than by engine. `SHARED` is every workload that did not ask. This is a named mode rather than a boolean because the same field may grow a third value (for example a replica-bearing server) without reinterpreting two call sites.\n| |\n|---|\n| `shared` <br/> The environment's existing server for this engine serves this workload's databases. |\n| `dedicated` <br/> The client asked for a server of this engine for this workload alone. |");
|
|
61802
61968
|
var createHostingEnvironmentRequestSchema = object({
|
|
61803
61969
|
certificateIssuer: hostingCertificateIssuerEnumSchema.optional(),
|
|
61804
61970
|
applicationLayout: _enum(["dedicated"]).optional().describe("How an environment's web applications are served. `DEDICATED` preserves existing environments and initial Node workload sets: one Pod per application, each with its own CPU and memory limits. Existing layouts never change merely because a new creation default is released. `SHARED_WORDPRESS` is plan 40's layout: one Apache/mod_php container serves every WordPress application in the environment, and each member keeps its own tree, Service, Ingress, certificate and database identity. The container carries the SUM of its members' limits. `SHARED_APPLICATIONS` is plan 48's layout and a superset of the WordPress case: one Pod holds the WordPress container AND one container per Moodle application, with the aggregate CPU/memory ceiling on the POD and no per-container limit, so WordPress may borrow capacity Moodle is not using and the reverse. It is a separate value rather than a reinterpretation of `SHARED_WORDPRESS`, because an environment that adopted WordPress sharing never consented to moving its Moodle applications into that Pod. `SHARED_ENVIRONMENT` is the new PHP environment default: web, cron, Redis and tools share one parent cap with requests-only containers. MariaDB remains separate. Component settings are persisted at creation or explicit adoption and read from PostgreSQL thereafter. `SHARED_PHP` is the shared environment with **one** PHP container instead of one container per PHP application: the same web, cron, Redis and tools Pod, but the Apache/PHP container serves every WordPress AND Moodle member as vhosts. N PHP applications then cost about one runtime's memory instead of N runtimes'. It is a value of its own rather than a change to `SHARED_APPLICATIONS` or `SHARED_ENVIRONMENT`, because an environment already composing those layouts keeps composing them exactly as before; a member joins the one container only in an environment that selected this. The stored value is this case's name, so a layout is a value the platform declares and validates rather than a branch keyed by a string somewhere.\n"),
|
|
61971
|
+
storageSelections: array(object({
|
|
61972
|
+
volumeType: hostingVolumeEnumSchema,
|
|
61973
|
+
storageClassUuid: uuid()
|
|
61974
|
+
})).max(3).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
|
|
61805
61975
|
resourceProfile: _enum([
|
|
61806
61976
|
"small_sites",
|
|
61807
61977
|
"small_sites_2x",
|
|
@@ -62474,7 +62644,9 @@ var emailKindEnumSchema = _enum([
|
|
|
62474
62644
|
"mailbox-fallback-verification",
|
|
62475
62645
|
"password-recovery",
|
|
62476
62646
|
"verify-email",
|
|
62477
|
-
"platform-alert"
|
|
62647
|
+
"platform-alert",
|
|
62648
|
+
"billing-price-increase-notice",
|
|
62649
|
+
"billing-price-increase-cancelled"
|
|
62478
62650
|
]);
|
|
62479
62651
|
var emailMailboxQuotaEnumSchema = _enum([
|
|
62480
62652
|
"gb-5",
|
|
@@ -63914,7 +64086,8 @@ object({
|
|
|
63914
64086
|
var hostingPoolLinePriceDataSchema = object({
|
|
63915
64087
|
priceKey: string().describe("The price book's key this part is priced from: a unit's package key, or a storage product's key."),
|
|
63916
64088
|
quantity: int().describe("How many of that key the part covers: the units the pool holds, or the 10 GB blocks the client bought."),
|
|
63917
|
-
monthly: billingAmountsDataSchema.describe("That quantity at that key's monthly amount, for the month this quote is stated for.")
|
|
64089
|
+
monthly: billingAmountsDataSchema.describe("That quantity at that key's monthly amount, for the month this quote is stated for."),
|
|
64090
|
+
priceSource: billingPriceSourceEnumSchema.describe("Which price applies to this company: the list price, its negotiated price, or its earlier protected price.\n| |\n|---|\n| `company_rate` <br/> A company-specific rate window applied. |\n| `default_rate` <br/> The default (company-null) rate window applied. |\n| `protected_rate` <br/> An existing customer's protected price: the lowest earlier list price, kept when the list price rose. |\n| `free_allowance` <br/> A period held under the free allowance: a stated zero line, never an omission. |")
|
|
63918
64091
|
});
|
|
63919
64092
|
var hostingPoolPriceDataSchema = object({
|
|
63920
64093
|
period: string().describe("The local billing month these figures are stated for, as `YYYY-MM`."),
|
|
@@ -64941,7 +65114,8 @@ var hostingNvmeBlockQuoteDataSchema = object({
|
|
|
64941
65114
|
capacityBytes: int().describe("Those blocks in exact decimal bytes, from the configured block size."),
|
|
64942
65115
|
monthlyPeriod: string().describe("The local billing month these figures are stated for, as `YYYY-MM`."),
|
|
64943
65116
|
currency: string(),
|
|
64944
|
-
monthly: billingAmountsDataSchema.describe("The stated blocks for one month, net, VAT and gross.")
|
|
65117
|
+
monthly: billingAmountsDataSchema.describe("The stated blocks for one month, net, VAT and gross."),
|
|
65118
|
+
priceSource: billingPriceSourceEnumSchema.describe("Which price applies to this company: the list price, its negotiated price, or its earlier protected price.\n| |\n|---|\n| `company_rate` <br/> A company-specific rate window applied. |\n| `default_rate` <br/> The default (company-null) rate window applied. |\n| `protected_rate` <br/> An existing customer's protected price: the lowest earlier list price, kept when the list price rose. |\n| `free_allowance` <br/> A period held under the free allowance: a stated zero line, never an omission. |")
|
|
64945
65119
|
});
|
|
64946
65120
|
object({
|
|
64947
65121
|
holding: hostingCompanyNvmeBlocksDataSchema.describe("The blocks this company holds now, or `recorded: false` when it holds none."),
|
|
@@ -66038,11 +66212,6 @@ object({
|
|
|
66038
66212
|
pause: hostingUpdatePauseDataSchema,
|
|
66039
66213
|
capabilities: hostingUpdateSurfaceCapabilitiesDataSchema
|
|
66040
66214
|
});
|
|
66041
|
-
var hostingVolumeEnumSchema = _enum([
|
|
66042
|
-
"application-files",
|
|
66043
|
-
"database-data",
|
|
66044
|
-
"redis-data"
|
|
66045
|
-
]);
|
|
66046
66215
|
var hostingVolumeMigrationPhaseEnumSchema = _enum([
|
|
66047
66216
|
"review",
|
|
66048
66217
|
"writers-hold",
|
|
@@ -66456,6 +66625,13 @@ object({
|
|
|
66456
66625
|
});
|
|
66457
66626
|
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.");
|
|
66458
66627
|
var provisionHostingPoolRequestSchema = object({ unitQuantity: int().min(1) }).describe("Platform client-management middleware owns authority; the service refuses priced accounts.");
|
|
66628
|
+
var publicPriceChangeDataSchema = object({
|
|
66629
|
+
effectiveOn: string().describe("The local `YYYY-MM-DD` day the price applies from."),
|
|
66630
|
+
effectiveFrom: string(),
|
|
66631
|
+
netCents: int(),
|
|
66632
|
+
vatCents: int(),
|
|
66633
|
+
grossCents: int()
|
|
66634
|
+
});
|
|
66459
66635
|
var publicPriceDataSchema = object({
|
|
66460
66636
|
product: string(),
|
|
66461
66637
|
priceKey: string(),
|
|
@@ -66463,12 +66639,14 @@ var publicPriceDataSchema = object({
|
|
|
66463
66639
|
netCents: int(),
|
|
66464
66640
|
vatCents: int(),
|
|
66465
66641
|
grossCents: int(),
|
|
66466
|
-
effectiveFrom: string()
|
|
66642
|
+
effectiveFrom: string(),
|
|
66643
|
+
next: union([publicPriceChangeDataSchema, _null()])
|
|
66467
66644
|
});
|
|
66468
66645
|
object({
|
|
66469
66646
|
currency: string(),
|
|
66470
66647
|
quotedAt: string(),
|
|
66471
|
-
items: array(publicPriceDataSchema)
|
|
66648
|
+
items: array(publicPriceDataSchema),
|
|
66649
|
+
vatBasisPoints: int().nullable().describe("The VAT rate in force at `quotedAt`, in basis points (1500 is 15%); null when none is recorded.")
|
|
66472
66650
|
});
|
|
66473
66651
|
var purchaseHostingNvmeBlocksRequestSchema = object({ blocks: int().min(1).max(1e4) }).describe("The number of 10 GB NVMe blocks a client holds after this request.\n\nThe count is the total, not an increment, because that is what the ledger records and what the invoice charges: a\nclient that holds three blocks and asks for four is buying one, and a retry of the same request buys nothing. The\nceiling is a mistyped-number guard, not a limit anyone is expected to meet — the price book's own ceiling is a\nmillion rand a month, which is far more blocks than one company has ever held.");
|
|
66474
66652
|
var purchaseHostingPoolRequestSchema = object({ unitQuantity: int().min(1) }).describe("Company capability middleware owns authority; the purchase owner also enforces self-service origin.");
|
|
@@ -66867,13 +67045,24 @@ var saveHostingDomainRedirectRequestSchema = object({
|
|
|
66867
67045
|
hostingDomainUuid: uuid().nullish(),
|
|
66868
67046
|
destinationUrl: string().max(2048).nullish()
|
|
66869
67047
|
}).describe("One whole-domain redirect to save.\n\nThe source name comes from the route, the environment from the route, and the target is one of two\nnamed shapes: an application alias (`hostingDomainUuid`) or an explicitly saved HTTPS address\n(`destinationUrl`). The service refuses the combination each shape cannot use, so a body cannot\ndescribe a state the database would refuse.");
|
|
67048
|
+
var scheduleBillingPriceChangeRequestSchema = object({
|
|
67049
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. They are our product codes, not package keys: a package says what an environment holds, a product says what it is billed as.\n"),
|
|
67050
|
+
packageKey: string().max(64),
|
|
67051
|
+
amountCents: int().min(0).max(1e8),
|
|
67052
|
+
effectiveOn: date(),
|
|
67053
|
+
existingCustomers: billingRateExistingCustomerRuleEnumSchema
|
|
67054
|
+
}).describe("A list-price change, previewed or scheduled: one key's new price from one local day.\n\nShape is checked here; whether the day, the notice and the current window allow it is the service's.");
|
|
66870
67055
|
var selectGitHubRepositoryRequestSchema = object({
|
|
66871
67056
|
repositoryId: int().min(1),
|
|
66872
67057
|
branch: string().min(1).max(255).nullish(),
|
|
66873
67058
|
configPath: string().min(1).max(255).nullish()
|
|
66874
67059
|
}).describe("One repository selected from a bound installation, by GitHub's numeric id.\n\nThe name is deliberately not accepted: a rename would otherwise silently stop matching,\nand the id is what the provider's own repository list is keyed on.");
|
|
66875
67060
|
var sendMailboxSetupInstructionsRequestSchema = object({ recipient: email().max(254).nullish() }).describe("Sending one mailbox's mail-client setup instructions.\n\n`recipient` is optional: when it is absent the mailbox's stored fallback address is used. A mailbox\nmay not be usable yet, so the mailbox's own address is never required as the destination and the\nmessage carries no password.");
|
|
66876
|
-
var sentEmailContextEnumSchema = _enum([
|
|
67061
|
+
var sentEmailContextEnumSchema = _enum([
|
|
67062
|
+
"billing-document",
|
|
67063
|
+
"alert-message",
|
|
67064
|
+
"billing-price-change-notice"
|
|
67065
|
+
]);
|
|
66877
67066
|
var sentEmailTagEnumSchema = _enum([
|
|
66878
67067
|
"alert",
|
|
66879
67068
|
"incident",
|
|
@@ -67325,6 +67514,10 @@ var storePlatformCompanyRequestSchema = object({
|
|
|
67325
67514
|
var storePlatformHostingEnvironmentRequestSchema = object({
|
|
67326
67515
|
certificateIssuer: hostingCertificateIssuerEnumSchema.optional(),
|
|
67327
67516
|
applicationLayout: _enum(["dedicated"]).optional().describe("How an environment's web applications are served. `DEDICATED` preserves existing environments and initial Node workload sets: one Pod per application, each with its own CPU and memory limits. Existing layouts never change merely because a new creation default is released. `SHARED_WORDPRESS` is plan 40's layout: one Apache/mod_php container serves every WordPress application in the environment, and each member keeps its own tree, Service, Ingress, certificate and database identity. The container carries the SUM of its members' limits. `SHARED_APPLICATIONS` is plan 48's layout and a superset of the WordPress case: one Pod holds the WordPress container AND one container per Moodle application, with the aggregate CPU/memory ceiling on the POD and no per-container limit, so WordPress may borrow capacity Moodle is not using and the reverse. It is a separate value rather than a reinterpretation of `SHARED_WORDPRESS`, because an environment that adopted WordPress sharing never consented to moving its Moodle applications into that Pod. `SHARED_ENVIRONMENT` is the new PHP environment default: web, cron, Redis and tools share one parent cap with requests-only containers. MariaDB remains separate. Component settings are persisted at creation or explicit adoption and read from PostgreSQL thereafter. `SHARED_PHP` is the shared environment with **one** PHP container instead of one container per PHP application: the same web, cron, Redis and tools Pod, but the Apache/PHP container serves every WordPress AND Moodle member as vhosts. N PHP applications then cost about one runtime's memory instead of N runtimes'. It is a value of its own rather than a change to `SHARED_APPLICATIONS` or `SHARED_ENVIRONMENT`, because an environment already composing those layouts keeps composing them exactly as before; a member joins the one container only in an environment that selected this. The stored value is this case's name, so a layout is a value the platform declares and validates rather than a branch keyed by a string somewhere.\n"),
|
|
67517
|
+
storageSelections: array(object({
|
|
67518
|
+
volumeType: hostingVolumeEnumSchema,
|
|
67519
|
+
storageClassUuid: uuid()
|
|
67520
|
+
})).max(3).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
|
|
67328
67521
|
resourceProfile: _enum([
|
|
67329
67522
|
"small_sites",
|
|
67330
67523
|
"small_sites_2x",
|
|
@@ -67968,6 +68161,11 @@ union([
|
|
|
67968
68161
|
object({ message: string().describe("Error overview.") }),
|
|
67969
68162
|
object({ message: string().describe("Error overview.") })
|
|
67970
68163
|
]);
|
|
68164
|
+
union([
|
|
68165
|
+
object({ message: string().describe("Error overview.") }),
|
|
68166
|
+
object({ message: string().describe("Error overview.") }),
|
|
68167
|
+
object({ message: string().describe("Error overview.") })
|
|
68168
|
+
]);
|
|
67971
68169
|
union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
|
|
67972
68170
|
union([
|
|
67973
68171
|
object({ message: string().describe("Error overview.") }),
|
|
@@ -69901,14 +70099,10 @@ union([
|
|
|
69901
70099
|
]);
|
|
69902
70100
|
storeHostingSeedPlacementRequestSchema.describe("Record one seed version's desired state on one cluster.\n\nA caller supplies the cluster, the per-placement execution mode and the smallest claim the storage\nclass can provision. Resource names and observed readiness are deliberately not accepted: those are\nwritten by construction and by a real observation, and never fabricated from a request.");
|
|
69903
70101
|
union([
|
|
69904
|
-
|
|
69905
|
-
object({ message: string().describe("Error overview.") }),
|
|
69906
|
-
object({
|
|
69907
|
-
message: string().describe("Errors overview."),
|
|
69908
|
-
errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
|
|
69909
|
-
})
|
|
70102
|
+
unknown(),
|
|
70103
|
+
object({ message: string().describe("Error overview.").meta({ examples: [""] }) }),
|
|
70104
|
+
object({ message: string().describe("Error overview.").meta({ examples: [""] }) })
|
|
69910
70105
|
]);
|
|
69911
|
-
adoptHostingSeedPlacementRequestSchema.describe("Record one seed version's already-existing cluster objects on one cluster.\n\nA caller supplies the cluster, the two object names an outside owner already built, the immutable\nSHA-512 checksum that BackingImage must keep reporting, and the smallest claim the class can provision.\n\nNo readiness, size, status or origin can be submitted: those are recorded by a real observation or by\nthe service. The names are validated as Kubernetes object identities — a DNS-1123 subdomain — because\na name that is not already addressable in the cluster is not an existing object at all. The checksum is\nLonghorn's SHA-512 form, deliberately not the version's SHA-256 source archive checksum.");
|
|
69912
70106
|
union([
|
|
69913
70107
|
object({ message: string().describe("Error overview.") }),
|
|
69914
70108
|
object({ message: string().describe("Error overview.") }),
|
|
@@ -70901,6 +71095,24 @@ union([
|
|
|
70901
71095
|
messageDataSchema
|
|
70902
71096
|
]);
|
|
70903
71097
|
updateBillingPaymentStateRequestSchema.describe("Recording a manual payment state: one invoice, or an explicit list of a company's invoices.\n\nTwo bodies, one route file apart: a single invoice names a `state` and an optional `note`, while a\ncompany action names `invoices`, an explicit array of UUIDs. The shape is what separates them — a\ncompany action that could also be read as a single-invoice write would be a way to mark an unnamed\nset unpaid, which is exactly what this surface refuses to do.");
|
|
71098
|
+
union([
|
|
71099
|
+
object({ message: string().describe("Error overview.") }),
|
|
71100
|
+
object({ message: string().describe("Error overview.") }),
|
|
71101
|
+
messageDataSchema
|
|
71102
|
+
]);
|
|
71103
|
+
scheduleBillingPriceChangeRequestSchema.describe("A list-price change, previewed or scheduled: one key's new price from one local day.\n\nShape is checked here; whether the day, the notice and the current window allow it is the service's.");
|
|
71104
|
+
union([
|
|
71105
|
+
object({ message: string().describe("Error overview.") }),
|
|
71106
|
+
object({ message: string().describe("Error overview.") }),
|
|
71107
|
+
messageDataSchema
|
|
71108
|
+
]);
|
|
71109
|
+
scheduleBillingPriceChangeRequestSchema.describe("A list-price change, previewed or scheduled: one key's new price from one local day.\n\nShape is checked here; whether the day, the notice and the current window allow it is the service's.");
|
|
71110
|
+
union([
|
|
71111
|
+
object({ message: string().describe("Error overview.") }),
|
|
71112
|
+
object({ message: string().describe("Error overview.") }),
|
|
71113
|
+
messageDataSchema,
|
|
71114
|
+
messageDataSchema
|
|
71115
|
+
]);
|
|
70904
71116
|
union([
|
|
70905
71117
|
object({ message: string().describe("Error overview.") }),
|
|
70906
71118
|
object({ message: string().describe("Error overview.") }),
|
|
@@ -73578,26 +73790,11 @@ var PLATFORM_SEED_FLAGS = [
|
|
|
73578
73790
|
takesValue: true,
|
|
73579
73791
|
description: "The cluster the placement is made on."
|
|
73580
73792
|
},
|
|
73581
|
-
{
|
|
73582
|
-
name: "--storage-class",
|
|
73583
|
-
takesValue: true,
|
|
73584
|
-
description: "The storage class the placement is adopted with."
|
|
73585
|
-
},
|
|
73586
73793
|
{
|
|
73587
73794
|
name: "--source-storage-class",
|
|
73588
73795
|
takesValue: true,
|
|
73589
73796
|
description: "Source class UUID for placement-add or placement-build; omitted uses the platform's selection."
|
|
73590
73797
|
},
|
|
73591
|
-
{
|
|
73592
|
-
name: "--backing-image",
|
|
73593
|
-
takesValue: true,
|
|
73594
|
-
description: "The backing image the placement runs from."
|
|
73595
|
-
},
|
|
73596
|
-
{
|
|
73597
|
-
name: "--expected-checksum",
|
|
73598
|
-
takesValue: true,
|
|
73599
|
-
description: "The checksum the adopted placement is verified against."
|
|
73600
|
-
},
|
|
73601
73798
|
{
|
|
73602
73799
|
name: "--minimum-size",
|
|
73603
73800
|
takesValue: true,
|
|
@@ -73705,16 +73902,12 @@ function requiredSize(context, usage) {
|
|
|
73705
73902
|
var USAGE$6 = [
|
|
73706
73903
|
"Usage: hostingctl platform seed placement-add <seed-uuid> <version-uuid> --cluster <uuid>",
|
|
73707
73904
|
" --preparation-mode <mode> --minimum-size <MiB> [--source-storage-class <uuid>]",
|
|
73708
|
-
" hostingctl platform seed placement-adopt <seed-uuid> <version-uuid> <placement-uuid>",
|
|
73709
|
-
" --cluster <uuid> --storage-class <name> --backing-image <name> --expected-checksum <sha>",
|
|
73710
|
-
" --minimum-size <MiB>",
|
|
73711
73905
|
" hostingctl platform seed placement-build <seed-uuid> <version-uuid> <placement-uuid>",
|
|
73712
73906
|
" [--source-storage-class <uuid>]",
|
|
73713
73907
|
" hostingctl platform seed placement-retire <seed-uuid> <version-uuid> <placement-uuid>",
|
|
73714
73908
|
" hostingctl platform seed placement-diagnostics <seed-uuid> <version-uuid> <placement-uuid>",
|
|
73715
73909
|
"",
|
|
73716
73910
|
" placement-add Ask for the version to be prepared on a cluster.",
|
|
73717
|
-
" placement-adopt Record an image that already exists there, with the checksum it must match.",
|
|
73718
73911
|
" placement-build Build the prepared image now.",
|
|
73719
73912
|
" placement-retire Withdraw the prepared image from the cluster.",
|
|
73720
73913
|
" placement-diagnostics What the platform observed: generations, checksums, claims and refusals."
|
|
@@ -73738,7 +73931,6 @@ async function platformSeedPlacements(context, action, seedUuid, rest) {
|
|
|
73738
73931
|
diagnostics: (await hostingSeedPlacementDiagnostics({ path })).data
|
|
73739
73932
|
};
|
|
73740
73933
|
if (action === "placement-build" || action === "placement-retire") return await change(context, action === "placement-retire", third, path);
|
|
73741
|
-
if (action === "placement-adopt") return await adopt$1(context, path);
|
|
73742
73934
|
throw new UsageError(USAGE$6);
|
|
73743
73935
|
}
|
|
73744
73936
|
/** `placement-add`: ask for the version to be prepared on one cluster. */
|
|
@@ -73760,23 +73952,6 @@ async function add$3(context, seedUuid, versionUuid) {
|
|
|
73760
73952
|
})).data)
|
|
73761
73953
|
};
|
|
73762
73954
|
}
|
|
73763
|
-
/** `placement-adopt`: record an image that already exists on the cluster. */
|
|
73764
|
-
async function adopt$1(context, path) {
|
|
73765
|
-
const body = {
|
|
73766
|
-
clusterUuid: requiredFlag$3(context, "--cluster", USAGE$6),
|
|
73767
|
-
storageClassName: requiredFlag$3(context, "--storage-class", USAGE$6),
|
|
73768
|
-
backingImageName: requiredFlag$3(context, "--backing-image", USAGE$6),
|
|
73769
|
-
expectedChecksum: requiredFlag$3(context, "--expected-checksum", USAGE$6),
|
|
73770
|
-
minimumSizeMib: requiredSize(context, USAGE$6)
|
|
73771
|
-
};
|
|
73772
|
-
return {
|
|
73773
|
-
kind: "seed-write",
|
|
73774
|
-
outcome: await confirmableWrite(context, `Adopt backing image ${body.backingImageName} (${body.storageClassName}) as placement ${path.placementUuid}, expecting checksum ${body.expectedChecksum}.`, async () => (await hostingSeedPlacementStoreAdoption({
|
|
73775
|
-
path,
|
|
73776
|
-
body
|
|
73777
|
-
})).data)
|
|
73778
|
-
};
|
|
73779
|
-
}
|
|
73780
73955
|
/** `placement-build|placement-retire`. */
|
|
73781
73956
|
async function change(context, retiring, placementUuid, path) {
|
|
73782
73957
|
return {
|
|
@@ -73895,8 +74070,6 @@ var USAGE$4 = [
|
|
|
73895
74070
|
" --content-contract <path> [--release <release-uuid>]",
|
|
73896
74071
|
" hostingctl platform seed placement-add <seed-uuid> <version-uuid> --cluster <uuid>",
|
|
73897
74072
|
" --preparation-mode <mode> --minimum-size <MiB>",
|
|
73898
|
-
" hostingctl platform seed placement-adopt <seed-uuid> <version-uuid> --cluster <uuid>",
|
|
73899
|
-
" --storage-class <name> --backing-image <name> --expected-checksum <sha> --minimum-size <MiB>",
|
|
73900
74073
|
" hostingctl platform seed placement-build <seed-uuid> <version-uuid> <placement-uuid>",
|
|
73901
74074
|
" hostingctl platform seed placement-retire <seed-uuid> <version-uuid> <placement-uuid>",
|
|
73902
74075
|
" hostingctl platform seed placement-diagnostics <seed-uuid> <version-uuid> <placement-uuid>",
|
|
@@ -73906,7 +74079,7 @@ var USAGE$4 = [
|
|
|
73906
74079
|
" add|set|consumption Create a definition, change its preparation mode, or stop offering it.",
|
|
73907
74080
|
" promote Make one version the definition's selected version.",
|
|
73908
74081
|
" version-add Record a built version's source, recipe and runtime digests.",
|
|
73909
|
-
" placement-* Prepare a version on a cluster,
|
|
74082
|
+
" placement-* Prepare a version on a cluster, build or retire it.",
|
|
73910
74083
|
"",
|
|
73911
74084
|
"A content contract is supplied as JSON in the API's own shape: it is a recorded contract, not a value this CLI",
|
|
73912
74085
|
"invents, so an omitted file records none. Every write needs --confirm; --dry-run describes the change."
|
|
@@ -80107,7 +80280,7 @@ function writeUpdateState(state, env = process.env) {
|
|
|
80107
80280
|
}
|
|
80108
80281
|
//#endregion
|
|
80109
80282
|
//#region src/version.ts
|
|
80110
|
-
var VERSION = "1.0.
|
|
80283
|
+
var VERSION = "1.0.710";
|
|
80111
80284
|
//#endregion
|
|
80112
80285
|
//#region src/commands/update.ts
|
|
80113
80286
|
/**
|
|
@@ -80182,7 +80355,7 @@ var update = {
|
|
|
80182
80355
|
}, process.env);
|
|
80183
80356
|
return {
|
|
80184
80357
|
...known,
|
|
80185
|
-
current: after ?? "1.0.
|
|
80358
|
+
current: after ?? "1.0.710",
|
|
80186
80359
|
latest: after ?? latest,
|
|
80187
80360
|
upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
|
|
80188
80361
|
action: "run",
|
|
@@ -80464,7 +80637,7 @@ async function printUpdateNotice(options) {
|
|
|
80464
80637
|
}, env, { waitMs: NOTICE_LOCK_WAIT_MS });
|
|
80465
80638
|
} catch {}
|
|
80466
80639
|
if (latest === null) return;
|
|
80467
|
-
if (!isNewerVersion(latest, "1.0.
|
|
80640
|
+
if (!isNewerVersion(latest, "1.0.710")) return;
|
|
80468
80641
|
process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
|
|
80469
80642
|
}
|
|
80470
80643
|
/** Whether an environment variable is set to something, which is how CI and the opt-out are read. */
|