@kvbox/cli 0.6.21 → 0.6.22

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/kvbox.js CHANGED
@@ -170,7 +170,7 @@ function versionOf(srcFileUrl, injected) {
170
170
  }
171
171
 
172
172
  // src/version.ts
173
- var VERSION = versionOf(import.meta.url, true ? "0.6.21" : void 0);
173
+ var VERSION = versionOf(import.meta.url, true ? "0.6.22" : void 0);
174
174
 
175
175
  // src/commands/vm/index.ts
176
176
  import { Command as Command44 } from "commander";
@@ -946,6 +946,7 @@ var HostEnvRequest = z2.object({
946
946
  vars: z2.array(z2.object({ name: z2.string(), value: z2.string() }))
947
947
  });
948
948
  var HostEnvVersionsSchema = z2.array(z2.object({ owner: z2.string(), version: z2.number().int() }));
949
+ var CLUSTER_ID_RE = /^[a-z0-9][a-z0-9_-]{0,39}$/;
949
950
  var CreateMachineRequest = z2.object({
950
951
  name: z2.string().optional(),
951
952
  /** Ignored over the local socket (the caller is the host owner); the control plane sets it over HTTPS. */
@@ -989,7 +990,13 @@ var CreateMachineRequest = z2.object({
989
990
  * The integrations turned on for the box (#205, `kvbox new --integration github`). Absent: none, or with
990
991
  * `from` / `fromBackup` the list the snapshot or the backup was taken with.
991
992
  */
992
- integrations: IntegrationListSchema.optional()
993
+ integrations: IntegrationListSchema.optional(),
994
+ /**
995
+ * The cluster the box is a part of (kvbox k8s, #215): on its host, the boxes of one owner with the same id
996
+ * reach each other on any port. An id the control plane makes, never a user's: the control plane refuses
997
+ * it from anyone it did not make it for, and a host takes it only from a control plane.
998
+ */
999
+ cluster: z2.string().regex(CLUSTER_ID_RE).optional()
993
1000
  });
994
1001
  var HostFromBackupRequest = CreateMachineRequest.omit({ from: true, fromBackup: true, image: true, env: true }).extend({ backup: HostRestoreRequest });
995
1002
  var ForkMachineRequest = z2.object({
@@ -1086,6 +1093,8 @@ var CapacitySchema = z2.object({
1086
1093
  integrations: z2.boolean().optional(),
1087
1094
  /** True on a kvbox-server that carries a link to a box on another host (#207); the control plane links across hosts only between two such. */
1088
1095
  farLinks: z2.boolean().optional(),
1096
+ /** True on a host whose network puts the boxes of one cluster in reach of each other (#215); the control plane places a cluster's box only on such a host. */
1097
+ clusters: z2.boolean().optional(),
1089
1098
  /** The integrations this kvbox-server knows (`hostKnowsIntegrations`). Absent with `integrations`: the first one's, `github` alone. */
1090
1099
  integrationIds: z2.array(z2.string()).optional()
1091
1100
  });