@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/dist/highstate.library.msgpack +0 -0
- package/dist/index.js +55 -8
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/common/access-point.ts +8 -0
- package/src/k8s/apps/index.ts +1 -0
- package/src/k8s/apps/shared.ts +12 -4
- package/src/k8s/apps/syncthing.ts +1 -1
- package/src/k8s/apps/traefik.ts +1 -1
- package/src/k8s/game-servers/index.ts +1 -0
- package/src/k8s/game-servers/satisfactory.ts +34 -0
- package/src/k8s/index.ts +1 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@highstate/library",
|
3
|
-
"version": "0.9.
|
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.
|
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.
|
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": "
|
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: {
|
package/src/k8s/apps/index.ts
CHANGED
package/src/k8s/apps/shared.ts
CHANGED
@@ -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:
|
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
|
82
|
+
* The key to use for backup encryption. If not provided, a random key will be generated.
|
75
83
|
*/
|
76
|
-
|
84
|
+
backupKey: z.string().optional(),
|
77
85
|
})
|
78
86
|
|
79
87
|
export const sharedDatabaseArgs = $args({
|
package/src/k8s/apps/traefik.ts
CHANGED
@@ -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