@highstate/library 0.9.30 → 0.9.32

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.9.30",
3
+ "version": "0.9.32",
4
4
  "type": "module",
5
5
  "highstate": {
6
6
  "type": "library"
@@ -25,14 +25,14 @@
25
25
  "biome:check": "biome check --error-on-warnings"
26
26
  },
27
27
  "dependencies": {
28
- "@highstate/contract": "^0.9.30",
28
+ "@highstate/contract": "^0.9.32",
29
29
  "remeda": "^2.21.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@biomejs/biome": "2.2.0",
33
- "@highstate/cli": "^0.9.30",
33
+ "@highstate/cli": "^0.9.32",
34
34
  "@typescript/native-preview": "^7.0.0-dev.20250920.1",
35
35
  "type-fest": "^4.41.0"
36
36
  },
37
- "gitHead": "8f5a4724814f573e2172bc0eaf09fcbdd9eb0a4c"
37
+ "gitHead": "00a7c1c40e556daeecfa9e5f3f6a1e60d88911ee"
38
38
  }
@@ -1,6 +1,7 @@
1
1
  import { defineEntity, defineUnit, z } from "@highstate/contract"
2
2
  import * as dns from "../dns"
3
3
  import { implementationReferenceSchema } from "../impl-ref"
4
+ import { l3EndpointEntity } from "../network"
4
5
 
5
6
  export const gatewayEntity = defineEntity({
6
7
  type: "common.gateway.v1",
@@ -10,6 +11,13 @@ export const gatewayEntity = defineEntity({
10
11
  * The reference to the implementation of the gateway.
11
12
  */
12
13
  implRef: implementationReferenceSchema,
14
+
15
+ /**
16
+ * The public L3 endpoints of the gateway.
17
+ *
18
+ * If not provided, should be automatically detected by the implementation.
19
+ */
20
+ endpoints: l3EndpointEntity.schema.array().default([]),
13
21
  }),
14
22
 
15
23
  meta: {
@@ -12,6 +12,7 @@ export {
12
12
  optionalSharedInputs,
13
13
  sharedArgs,
14
14
  sharedInputs,
15
+ sharedSecrets,
15
16
  } from "./shared"
16
17
  export * from "./syncthing"
17
18
  // export * from "./zitadel"
@@ -7,6 +7,7 @@ import {
7
7
  $secrets,
8
8
  type FullComponentArgumentOptions,
9
9
  type FullComponentInputOptions,
10
+ text,
10
11
  z,
11
12
  } from "@highstate/contract"
12
13
  import { mapValues } from "remeda"
@@ -25,8 +26,10 @@ export const sharedArgs = $args({
25
26
 
26
27
  /**
27
28
  * The endpoints where the application will or should be accessible.
29
+ *
30
+ * Can be both L3 (IP addresses) or L4 (IP:port) endpoints and the interpretation is up to the application.
28
31
  */
29
- endpoints: z.string().array(),
32
+ endpoints: z.string().array().default([]),
30
33
 
31
34
  /**
32
35
  * Whether the application should be exposed externally by NodePort or LoadBalancer service.
@@ -58,7 +61,12 @@ export function appName(defaultAppName: string) {
58
61
  appName: {
59
62
  schema: z.string().default(defaultAppName),
60
63
  meta: {
61
- description: "The name of the application to deploy.",
64
+ description: text`
65
+ The name of the application to deploy.
66
+ Defines the name of the namespace and other resources.
67
+
68
+ If not provided, defaults to "${defaultAppName}".
69
+ `,
62
70
  },
63
71
  },
64
72
  }
@@ -71,9 +79,9 @@ export const sharedSecrets = $secrets({
71
79
  rootPassword: z.string().optional(),
72
80
 
73
81
  /**
74
- * The password to use for backup encryption. If not provided, a random password will be generated.
82
+ * The key to use for backup encryption. If not provided, a random key will be generated.
75
83
  */
76
- backupPassword: z.string().optional(),
84
+ backupKey: z.string().optional(),
77
85
  })
78
86
 
79
87
  export const sharedDatabaseArgs = $args({
@@ -45,7 +45,7 @@ export const syncthing = defineUnit({
45
45
  },
46
46
 
47
47
  secrets: {
48
- ...pick(sharedSecrets, ["backupPassword"]),
48
+ ...pick(sharedSecrets, ["backupKey"]),
49
49
  },
50
50
 
51
51
  inputs: {
@@ -13,7 +13,7 @@ export const traefik = defineUnit({
13
13
 
14
14
  args: {
15
15
  ...appName("traefik"),
16
- ...pick(sharedArgs, ["external", "replicas"]),
16
+ ...pick(sharedArgs, ["external", "replicas", "endpoints"]),
17
17
  className: z.string().optional(),
18
18
  },
19
19
 
@@ -0,0 +1 @@
1
+ export * from "./satisfactory"
@@ -0,0 +1,34 @@
1
+ import { defineUnit, z } from "@highstate/contract"
2
+ import { pick } from "remeda"
3
+ import { appName, optionalSharedInputs, sharedArgs, sharedInputs, sharedSecrets } from "../apps"
4
+
5
+ export const satisfactory = defineUnit({
6
+ type: "k8s.game-servers.satisfactory.v1",
7
+
8
+ args: {
9
+ ...appName("satisfactory-server"),
10
+ ...pick(sharedArgs, ["fqdn"]),
11
+
12
+ port: z.number().default(7777).describe("The port the game server will be exposed on."),
13
+ },
14
+
15
+ inputs: {
16
+ ...pick(sharedInputs, ["k8sCluster", "accessPoint"]),
17
+ ...pick(optionalSharedInputs, ["resticRepo"]),
18
+ },
19
+
20
+ secrets: {
21
+ ...pick(sharedSecrets, ["backupKey"]),
22
+ },
23
+
24
+ source: {
25
+ package: "@highstate/k8s.game-servers",
26
+ path: "satisfactory",
27
+ },
28
+
29
+ meta: {
30
+ title: "Satisfactory Server",
31
+ description: "The dedicated server for the Satisfactory game.",
32
+ icon: "mdi:google-gamepad",
33
+ },
34
+ })
package/src/k8s/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * as apps from "./apps"
2
2
  export * from "./cert-manager"
3
3
  export * from "./cilium"
4
+ export * as gameServers from "./game-servers"
4
5
  export * from "./gateway"
5
6
  export * as obfuscators from "./obfuscators"
6
7
  export * from "./reduced-access"