@highstate/library 0.9.31 → 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.
Binary file
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { registerKnownAbbreviations, z, camelCaseToHumanReadable, defineEntity, defineUnit, $addArgumentDescription, $addInputDescription, fileContentSchema as fileContentSchema$1, fileMetaSchema, unitArtifactSchema, $secrets, $inputs, $outputs, $args } from '@highstate/contract';
1
+ import { registerKnownAbbreviations, z, camelCaseToHumanReadable, defineEntity, defineUnit, $addArgumentDescription, $addInputDescription, fileContentSchema as fileContentSchema$1, fileMetaSchema, unitArtifactSchema, $secrets, $inputs, $outputs, $args, text } from '@highstate/contract';
2
2
  import { mapValues, pick, omit } from 'remeda';
3
3
 
4
4
  var __defProp = Object.defineProperty;
@@ -620,7 +620,15 @@ var gatewayEntity = defineEntity({
620
620
  /**
621
621
  * The reference to the implementation of the gateway.
622
622
  */
623
- implRef: implementationReferenceSchema.meta({ title: camelCaseToHumanReadable("implRef"), description: `The reference to the implementation of the gateway.` })
623
+ implRef: implementationReferenceSchema.meta({ title: camelCaseToHumanReadable("implRef"), description: `The reference to the implementation of the gateway.` }),
624
+ /**
625
+ * The public L3 endpoints of the gateway.
626
+ *
627
+ * If not provided, should be automatically detected by the implementation.
628
+ */
629
+ endpoints: l3EndpointEntity.schema.array().default([]).meta({ title: camelCaseToHumanReadable("endpoints"), description: `The public L3 endpoints of the gateway.
630
+
631
+ If not provided, should be automatically detected by the implementation.` })
624
632
  }),
625
633
  meta: {
626
634
  color: "#F57F17"
@@ -1827,6 +1835,7 @@ __export(k8s_exports, {
1827
1835
  exposableWorkloadEntity: () => exposableWorkloadEntity,
1828
1836
  externalServiceTypeSchema: () => externalServiceTypeSchema,
1829
1837
  fallbackKubeApiAccessSchema: () => fallbackKubeApiAccessSchema,
1838
+ gameServers: () => game_servers_exports,
1830
1839
  gatewayApi: () => gatewayApi,
1831
1840
  gatewayDataSchema: () => gatewayDataSchema,
1832
1841
  gatewayEntity: () => gatewayEntity2,
@@ -1875,6 +1884,7 @@ __export(apps_exports, {
1875
1884
  postgresqlDatabase: () => postgresqlDatabase,
1876
1885
  sharedArgs: () => sharedArgs2,
1877
1886
  sharedInputs: () => sharedInputs2,
1887
+ sharedSecrets: () => sharedSecrets2,
1878
1888
  syncthing: () => syncthing,
1879
1889
  traefik: () => traefik,
1880
1890
  vaultwarden: () => vaultwarden,
@@ -2072,8 +2082,10 @@ var sharedArgs2 = $args({
2072
2082
  fqdn: z.string(),
2073
2083
  /**
2074
2084
  * The endpoints where the application will or should be accessible.
2085
+ *
2086
+ * Can be both L3 (IP addresses) or L4 (IP:port) endpoints and the interpretation is up to the application.
2075
2087
  */
2076
- endpoints: z.string().array(),
2088
+ endpoints: z.string().array().default([]),
2077
2089
  /**
2078
2090
  * Whether the application should be exposed externally by NodePort or LoadBalancer service.
2079
2091
  */
@@ -2092,7 +2104,12 @@ function appName(defaultAppName) {
2092
2104
  appName: {
2093
2105
  schema: z.string().default(defaultAppName),
2094
2106
  meta: {
2095
- description: "The name of the application to deploy."
2107
+ description: text`
2108
+ The name of the application to deploy.
2109
+ Defines the name of the namespace and other resources.
2110
+
2111
+ If not provided, defaults to "${defaultAppName}".
2112
+ `
2096
2113
  }
2097
2114
  }
2098
2115
  };
@@ -2103,9 +2120,9 @@ var sharedSecrets2 = $secrets({
2103
2120
  */
2104
2121
  rootPassword: z.string().optional(),
2105
2122
  /**
2106
- * The password to use for backup encryption. If not provided, a random password will be generated.
2123
+ * The key to use for backup encryption. If not provided, a random key will be generated.
2107
2124
  */
2108
- backupPassword: z.string().optional()
2125
+ backupKey: z.string().optional()
2109
2126
  });
2110
2127
  var sharedDatabaseArgs = $args({
2111
2128
  /**
@@ -2474,7 +2491,7 @@ var syncthing = defineUnit({
2474
2491
  The default is \`state\`.`)
2475
2492
  },
2476
2493
  secrets: {
2477
- ...pick(sharedSecrets2, ["backupPassword"])
2494
+ ...pick(sharedSecrets2, ["backupKey"])
2478
2495
  },
2479
2496
  inputs: {
2480
2497
  ...pick(sharedInputs2, ["k8sCluster", "accessPoint"]),
@@ -2500,7 +2517,7 @@ var traefik = defineUnit({
2500
2517
  type: "k8s.apps.traefik.v1",
2501
2518
  args: {
2502
2519
  ...appName("traefik"),
2503
- ...pick(sharedArgs2, ["external", "replicas"]),
2520
+ ...pick(sharedArgs2, ["external", "replicas", "endpoints"]),
2504
2521
  className: z.string().optional()
2505
2522
  },
2506
2523
  inputs: {
@@ -2887,6 +2904,36 @@ var ciliumClusterMetadata = z.object({
2887
2904
  By default, is \`false\`.` })
2888
2905
  })
2889
2906
  });
2907
+
2908
+ // src/k8s/game-servers/index.ts
2909
+ var game_servers_exports = {};
2910
+ __export(game_servers_exports, {
2911
+ satisfactory: () => satisfactory
2912
+ });
2913
+ var satisfactory = defineUnit({
2914
+ type: "k8s.game-servers.satisfactory.v1",
2915
+ args: {
2916
+ ...appName("satisfactory-server"),
2917
+ ...pick(sharedArgs2, ["fqdn"]),
2918
+ port: z.number().default(7777).describe("The port the game server will be exposed on.")
2919
+ },
2920
+ inputs: {
2921
+ ...pick(sharedInputs2, ["k8sCluster", "accessPoint"]),
2922
+ ...pick(optionalSharedInputs, ["resticRepo"])
2923
+ },
2924
+ secrets: {
2925
+ ...pick(sharedSecrets2, ["backupKey"])
2926
+ },
2927
+ source: {
2928
+ package: "@highstate/k8s.game-servers",
2929
+ path: "satisfactory"
2930
+ },
2931
+ meta: {
2932
+ title: "Satisfactory Server",
2933
+ description: "The dedicated server for the Satisfactory game.",
2934
+ icon: "mdi:google-gamepad"
2935
+ }
2936
+ });
2890
2937
  var gatewayDataSchema = z.object({
2891
2938
  /**
2892
2939
  * The Kubernetes cluster to use for creating gateway routes.