@highstate/library 0.26.0 → 0.27.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highstate/library",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "type": "module",
5
5
  "highstate": {
6
6
  "type": "library"
@@ -30,12 +30,12 @@
30
30
  "biome:check": "biome check --error-on-warnings"
31
31
  },
32
32
  "dependencies": {
33
- "@highstate/contract": "0.26.0",
33
+ "@highstate/contract": "0.27.0",
34
34
  "remeda": "^2.21.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@biomejs/biome": "2.2.0",
38
- "@highstate/cli": "0.26.0",
37
+ "@biomejs/biome": "2.5.0",
38
+ "@highstate/cli": "0.27.0",
39
39
  "@typescript/native-preview": "^7.0.0-dev.20250920.1",
40
40
  "type-fest": "^4.41.0"
41
41
  },
@@ -1,4 +1,4 @@
1
- import { defineUnit } from "@highstate/contract"
1
+ import { defineUnit, z } from "@highstate/contract"
2
2
  import { pick } from "remeda"
3
3
  import { connectionEntity } from "../../databases/etcd"
4
4
  import {
@@ -19,6 +19,16 @@ export const etcd = defineUnit({
19
19
  args: {
20
20
  ...appName("etcd"),
21
21
  ...pick(sharedArgs, ["external", "values", "patches", "service", "scheduling"]),
22
+
23
+ /**
24
+ * The odd number of etcd members to deploy.
25
+ */
26
+ replicas: z
27
+ .number()
28
+ .int()
29
+ .positive()
30
+ .refine(replicas => replicas % 2 === 1, "etcd replicas must be odd")
31
+ .default(1),
22
32
  },
23
33
 
24
34
  secrets: {
@@ -1,5 +1,6 @@
1
- import { defineUnit } from "@highstate/contract"
1
+ import { defineUnit, z } from "@highstate/contract"
2
2
  import { pick } from "remeda"
3
+ import { folderEntity } from "../../common"
3
4
  import { l4EndpointEntity } from "../../network"
4
5
  import { appName, sharedArgs, sharedInputs, source } from "./shared"
5
6
 
@@ -11,11 +12,28 @@ export const wgFeedServer = defineUnit({
11
12
 
12
13
  args: {
13
14
  ...appName("wg-feed-server"),
14
- ...pick(sharedArgs, ["fqdn"]),
15
+ ...pick(sharedArgs, ["fqdn", "replicas", "scheduling"]),
16
+
17
+ /**
18
+ * The regular expression matching paths served by the WG feed server.
19
+ *
20
+ * Must be provided together with `fallbackSite`.
21
+ */
22
+ pathPattern: z.string().optional(),
15
23
  },
16
24
 
17
25
  inputs: {
18
26
  ...pick(sharedInputs, ["k8sCluster", "accessPoint", "etcd"]),
27
+
28
+ /**
29
+ * The static site served for paths that do not match `pathPattern`.
30
+ *
31
+ * Must be provided together with `pathPattern`.
32
+ */
33
+ fallbackSite: {
34
+ entity: folderEntity,
35
+ required: false,
36
+ },
19
37
  },
20
38
 
21
39
  outputs: {
package/src/wireguard.ts CHANGED
@@ -768,6 +768,11 @@ export const nodeK8s = defineUnit({
768
768
  */
769
769
  external: z.boolean().default(false),
770
770
 
771
+ /**
772
+ * The NodePort to assign when the node is exposed.
773
+ */
774
+ nodePort: z.number().int().min(30000).max(32767).optional(),
775
+
771
776
  /**
772
777
  * The policy to use for exposing the WireGuard node.
773
778
  *
@@ -779,6 +784,11 @@ export const nodeK8s = defineUnit({
779
784
  */
780
785
  exposePolicy: nodeExposePolicySchema.default("when-has-endpoint"),
781
786
 
787
+ /**
788
+ * Whether to include a listen port in the generated WireGuard configuration.
789
+ */
790
+ listen: z.boolean().default(true),
791
+
782
792
  /**
783
793
  * The extra specification of the container which runs the WireGuard node.
784
794
  *