@highstate/library 0.9.16 → 0.9.19

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.
Files changed (82) hide show
  1. package/dist/highstate.library.msgpack +0 -0
  2. package/dist/index.js +3548 -2985
  3. package/dist/index.js.map +1 -1
  4. package/package.json +5 -5
  5. package/src/common/access-point.ts +105 -0
  6. package/src/common/files.ts +137 -0
  7. package/src/common/index.ts +3 -0
  8. package/src/common/server.ts +231 -0
  9. package/src/databases/index.ts +4 -0
  10. package/src/databases/mariadb.ts +37 -0
  11. package/src/databases/mongodb.ts +37 -0
  12. package/src/databases/postgresql.ts +37 -0
  13. package/src/databases/shared.ts +61 -0
  14. package/src/distributions/ubuntu.ts +13 -11
  15. package/src/dns.ts +116 -18
  16. package/src/git.ts +14 -10
  17. package/src/impl-ref.ts +26 -0
  18. package/src/index.ts +14 -15
  19. package/src/k3s.ts +14 -12
  20. package/src/k8s/apps/code-server.ts +48 -0
  21. package/src/k8s/apps/gitea.ts +25 -0
  22. package/src/k8s/apps/grocy.ts +39 -0
  23. package/src/k8s/apps/hubble.ts +30 -0
  24. package/src/{apps → k8s/apps}/index.ts +16 -13
  25. package/src/k8s/apps/kubernetes-dashboard.ts +28 -0
  26. package/src/k8s/apps/mariadb.ts +83 -0
  27. package/src/k8s/apps/maybe.ts +39 -0
  28. package/src/k8s/apps/mongodb.ts +84 -0
  29. package/src/k8s/apps/postgresql.ts +86 -0
  30. package/src/k8s/apps/shared.ts +149 -0
  31. package/src/k8s/apps/syncthing.ts +72 -0
  32. package/src/k8s/apps/traefik.ts +40 -0
  33. package/src/k8s/apps/vaultwarden.ts +31 -0
  34. package/src/k8s/apps/workload.ts +214 -0
  35. package/src/k8s/apps/zitadel.ts +26 -0
  36. package/src/k8s/cert-manager.ts +80 -0
  37. package/src/k8s/cilium.ts +64 -0
  38. package/src/k8s/gateway.ts +70 -0
  39. package/src/k8s/index.ts +9 -0
  40. package/src/{obfuscators → k8s/obfuscators}/phantun.ts +14 -10
  41. package/src/{obfuscators → k8s/obfuscators}/shared.ts +17 -11
  42. package/src/k8s/resources.ts +111 -0
  43. package/src/k8s/service.ts +65 -0
  44. package/src/k8s/shared.ts +343 -0
  45. package/src/k8s/workload.ts +77 -0
  46. package/src/network.ts +249 -63
  47. package/src/nixos.ts +38 -77
  48. package/src/proxmox.ts +203 -96
  49. package/src/restic.ts +28 -19
  50. package/src/sops.ts +19 -8
  51. package/src/ssh.ts +122 -24
  52. package/src/talos.ts +21 -19
  53. package/src/third-party/cloudflare.ts +59 -0
  54. package/src/third-party/index.ts +3 -0
  55. package/src/{mullvad.ts → third-party/mullvad.ts} +11 -9
  56. package/src/third-party/timeweb.ts +99 -0
  57. package/src/utils.ts +27 -6
  58. package/src/wireguard.ts +249 -115
  59. package/src/apps/code-server.ts +0 -34
  60. package/src/apps/deployment.ts +0 -60
  61. package/src/apps/dns.ts +0 -107
  62. package/src/apps/gitea.ts +0 -18
  63. package/src/apps/grocy.ts +0 -20
  64. package/src/apps/hubble.ts +0 -20
  65. package/src/apps/kubernetes-dashboard.ts +0 -19
  66. package/src/apps/mariadb.ts +0 -81
  67. package/src/apps/maybe.ts +0 -25
  68. package/src/apps/mongodb.ts +0 -81
  69. package/src/apps/network.ts +0 -55
  70. package/src/apps/postgresql.ts +0 -81
  71. package/src/apps/shared.ts +0 -290
  72. package/src/apps/syncthing.ts +0 -54
  73. package/src/apps/test.ts +0 -19
  74. package/src/apps/traefik.ts +0 -36
  75. package/src/apps/vaultwarden.ts +0 -23
  76. package/src/apps/zitadel.ts +0 -21
  77. package/src/cloudflare.ts +0 -26
  78. package/src/common.ts +0 -200
  79. package/src/files.ts +0 -146
  80. package/src/k8s.ts +0 -638
  81. package/src/timeweb.ts +0 -75
  82. package/src/{obfuscators → k8s/obfuscators}/index.ts +1 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/abbreviations.ts","../src/common.ts","../src/ssh.ts","../src/network.ts","../src/files.ts","../src/dns.ts","../src/utils.ts","../src/proxmox.ts","../src/k8s.ts","../src/talos.ts","../src/wireguard.ts","../src/apps/index.ts","../src/restic.ts","../src/apps/shared.ts","../src/apps/mariadb.ts","../src/apps/postgresql.ts","../src/apps/vaultwarden.ts","../src/apps/mongodb.ts","../src/apps/network.ts","../src/apps/dns.ts","../src/apps/traefik.ts","../src/apps/kubernetes-dashboard.ts","../src/apps/grocy.ts","../src/apps/maybe.ts","../src/apps/deployment.ts","../src/apps/syncthing.ts","../src/apps/code-server.ts","../src/apps/hubble.ts","../src/cloudflare.ts","../src/k3s.ts","../src/mullvad.ts","../src/timeweb.ts","../src/nixos.ts","../src/sops.ts","../src/obfuscators/index.ts","../src/obfuscators/shared.ts","../src/obfuscators/phantun.ts","../src/distributions/index.ts","../src/distributions/ubuntu.ts","../src/git.ts"],"names":["Type","baseFileContentSchema","defineEntity","baseFileMetaSchema","defineUnit","clusterEntity","cniSchema","createArgs","inputs","endpointFilterSchema","connection","cluster","peer","virtualMachine"],"mappings":";;;;;;;;;AAEA,0BAA2B,CAAA;AAAA,EACzB,IAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAAC,CAAA;;;AChCD,IAAA,cAAA,GAAA;AAAA,QAAA,CAAA,cAAA,EAAA;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CAAA,OAAA,IAAW,KAAK,CAAA;AAAA,MAC1C,IAAM,EAAA;AAAA,QACJ,WAAa,EAAA,CAAA;;AAAA,yDAAA;AAAA;AAGf;AACF,GACE;AAAA,EAEA,MAAQ,EAAA;AAAA;AAAA;AAAA;AAAA,IAIN,QAAU,EAAA;AAAA,MACR,MAAQ,EAAA,gBAAA;AAAA,MACR,QAAU,EAAA,KAAA;AAAA,MAEd,IAAM,EAAA;AAAA,QACJ,WAAa,EAAA,CAAA,yCAAA;AAAA;AACf;AACF,GACE;AAAA,EAEA,OAAS,EAAA;AAAA;AAAA;AAAA;AAAA,IAIP,MAAQ,EAAA;AAAA,MACV,MAAQ,EAAA,YAAA;AAAA,MACR,IAAM,EAAA;AAAA,QACJ,WAAa,EAAA,CAAA,6CAAA;AAAA;AACf;AACF,GACE;AAAA,EAEA,IAAM,EAAA;AAAA,IACJ,WAAa,EAAA,uBAAA;AAAA,IACb,WAAa,EAAA,qCAAA;AAAA,IACb,WAAa,EAAA,kBAAA;AAAA,IACb,gBAAkB,EAAA,SAAA;AAAA,IAClB,QAAU,EAAA;AAAA,GACZ;AAAA,EAEA,MAAQ,EAAA;AAAA,IACN,OAAS,EAAA,gBAAA;AAAA,IACT,IAAM,EAAA;AAAA;AAEV,CAAC,CAAA","file":"index.js","sourcesContent":["import { registerKnownAbbreviations } from \"@highstate/contract\"\n\nregisterKnownAbbreviations([\n \"ID\",\n \"URL\",\n \"IP\",\n \"IPs\",\n \"IPv4\",\n \"IPv6\",\n \"DNS\",\n \"FQDN\",\n \"SSH\",\n \"WireGuard\",\n \"API\",\n \"k8s\",\n \"TLS\",\n \"HTTP\",\n \"HTTPS\",\n \"TCP\",\n \"UDP\",\n \"CIDR\",\n \"CPU\",\n \"RAM\",\n \"GPU\",\n \"SSD\",\n \"HDD\",\n \"VM\",\n \"CNI\",\n \"CSI\",\n \"MariaDB\",\n \"PostgreSQL\",\n \"MongoDB\",\n])\n\nexport const noop = () => {}\n","import { defineEntity, defineUnit, Type, type Static } from \"@highstate/contract\"\nimport { credentialsSchema, keyPairEntity } from \"./ssh\"\nimport { l3EndpointEntity } from \"./network\"\nimport * as dns from \"./dns\"\nimport { arrayPatchModeSchema } from \"./utils\"\n\nexport const serverEntity = defineEntity({\n type: \"common.server\",\n\n schema: Type.Object({\n hostname: Type.String(),\n endpoints: Type.Array(l3EndpointEntity.schema),\n ssh: Type.Optional(credentialsSchema),\n }),\n\n meta: {\n color: \"#009688\",\n },\n})\n\nexport const serverOutputs = {\n server: serverEntity,\n endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n} as const\n\nexport const existingServer = defineUnit({\n type: \"common.existing-server\",\n\n args: {\n /**\n * The endpoint of the server.\n *\n * Takes precedence over the `endpoint` input.\n */\n endpoint: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The endpoint of the server.\n\n Takes precedence over the \\`endpoint\\` input.`,\n },\n},\n\n /**\n * The SSH user to use for connecting to the server.\n */\n sshUser: {\n schema: Type.Default(Type.String(), \"root\"),\n meta: {\n description: `The SSH user to use for connecting to the server.`,\n },\n},\n\n /**\n * The SSH port to use for connecting to the server.\n */\n sshPort: {\n schema: Type.Default(Type.Number(), 22),\n meta: {\n description: `The SSH port to use for connecting to the server.`,\n },\n},\n },\n\n secrets: {\n sshPassword: Type.Optional(Type.String()),\n sshPrivateKey: Type.Optional(Type.String()),\n },\n\n inputs: {\n sshKeyPair: {\n entity: keyPairEntity,\n required: false,\n },\n endpoint: {\n entity: l3EndpointEntity,\n required: false,\n },\n },\n\n outputs: serverOutputs,\n\n meta: {\n displayName: \"Existing Server\",\n description: \"An existing server that can be used in the configuration.\",\n primaryIcon: \"mdi:server\",\n defaultNamePrefix: \"server\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/existing-server\",\n },\n})\n\nexport const serverPatch = defineUnit({\n type: \"common.server-patch\",\n\n args: {\n /**\n * The endpoints of the server.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same server may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n endpoints: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `The endpoints of the server.\n\n The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n\n The same server may also be represented by multiple entries (e.g. a node with private and public IP).`,\n },\n},\n\n /**\n * The mode to use for patching the endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n endpointsPatchMode: {\n schema: Type.Default(arrayPatchModeSchema, \"prepend\"),\n meta: {\n description: `The mode to use for patching the endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`,\n },\n},\n },\n\n inputs: {\n server: serverEntity,\n endpoints: {\n entity: l3EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n server: serverEntity,\n endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"Server Patch\",\n description: \"Patches some properties of the server.\",\n primaryIcon: \"mdi:server\",\n secondaryIcon: \"fluent:patch-20-filled\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/server-patch\",\n },\n})\n\nexport const serverDns = defineUnit({\n type: \"common.server-dns\",\n\n args: dns.createArgs(),\n\n inputs: {\n server: serverEntity,\n ...dns.inputs,\n },\n\n outputs: {\n server: serverEntity,\n endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"Server DNS\",\n description: \"Creates DNS records for the server and updates endpoints.\",\n primaryIcon: \"mdi:server\",\n secondaryIcon: \"mdi:dns\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/server-dns\",\n },\n})\n\nexport const script = defineUnit({\n type: \"common.script\",\n\n args: {\n script: Type.String({ language: \"shell\" }),\n updateScript: Type.Optional(Type.String({ language: \"shell\" })),\n deleteScript: Type.Optional(Type.String({ language: \"shell\" })),\n },\n\n inputs: {\n server: serverEntity,\n },\n\n outputs: {\n server: serverEntity,\n },\n\n meta: {\n displayName: \"Shell Script\",\n description: \"Run a shell script on the server.\",\n primaryIcon: \"mdi:bash\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/script\",\n },\n})\n\nexport type Server = Static<typeof serverEntity.schema>\n\nexport * from \"./files\"\n","import { defineEntity, defineUnit, Type, type Static } from \"@highstate/contract\"\nimport { l4EndpointEntity } from \"./network\"\nimport { fileEntity } from \"./files\"\n\nexport const keyTypeSchema = Type.StringEnum([\"ed25519\"])\n\nexport const keyPairEntity = defineEntity({\n type: \"ssh.key-pair\",\n\n schema: Type.Object({\n type: keyTypeSchema,\n fingerprint: Type.String(),\n publicKey: Type.String(),\n privateKey: Type.String(),\n }),\n\n meta: {\n color: \"#2b5797\",\n },\n})\n\nexport const credentialsSchema = Type.Object({\n endpoints: Type.Array(l4EndpointEntity.schema),\n hostKey: Type.String(),\n user: Type.String(),\n password: Type.Optional(Type.String()),\n keyPair: Type.Optional(keyPairEntity.schema),\n})\n\nexport const keyPair = defineUnit({\n type: \"ssh.key-pair\",\n\n secrets: {\n privateKey: Type.Optional(Type.String()),\n },\n\n outputs: {\n keyPair: keyPairEntity,\n publicKeyFile: fileEntity,\n },\n\n meta: {\n displayName: \"SSH Key Pair\",\n description: \"Holds the ED25519 SSH key pair and generates the private key if not provided.\",\n category: \"ssh\",\n primaryIcon: \"charm:key\",\n primaryIconColor: \"#ffffff\",\n secondaryIcon: \"mdi:lock\",\n secondaryIconColor: \"#ffffff\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/ssh/key-pair\",\n },\n})\n\nexport type KeyType = Static<typeof keyTypeSchema>\nexport type Credentials = Static<typeof credentialsSchema>\nexport type KeyPair = Static<typeof keyPairEntity.schema>\n","import { defineEntity, defineUnit, Type, type Static } from \"@highstate/contract\"\n\nexport const endpointVisibilitySchema = Type.StringEnum([\n \"public\", // Reachable from the public internet\n \"external\", // Reachable from outside the system boundary, but not public\n \"internal\", // Reachable only from within the system or cluster\n])\n\nexport const endpointFilterSchema = Type.Array(endpointVisibilitySchema)\n\nexport const l3EndpointEntity = defineEntity({\n type: \"network.l3-endpoint\",\n\n schema: Type.Intersect([\n Type.Object({\n visibility: endpointVisibilitySchema,\n metadata: Type.Optional(Type.Record(Type.String(), Type.Unknown())),\n }),\n Type.Union([\n Type.Object({\n type: Type.Literal(\"hostname\"),\n\n /**\n * The hostname of the endpoint in the format of a domain name.\n */\n hostname: Type.String(),\n }),\n Type.Object({\n type: Type.Literal(\"ipv4\"),\n\n /**\n * The IPv4 address of the endpoint.\n */\n address: Type.String(),\n }),\n Type.Object({\n type: Type.Literal(\"ipv6\"),\n\n /**\n * The IPv6 address of the endpoint.\n */\n address: Type.String(),\n }),\n ]),\n ]),\n\n meta: {\n color: \"#4CAF50\",\n description: \"The L3 endpoint for some service. May be a domain name or an IP address.\",\n },\n})\n\nexport const l4ProtocolSchema = Type.StringEnum([\"tcp\", \"udp\"])\n\nexport const l4PortInfoSchema = Type.Object({\n port: Type.Number(),\n protocol: l4ProtocolSchema,\n})\n\nexport const l4EndpointEntity = defineEntity({\n type: \"network.l4-endpoint\",\n\n schema: Type.Intersect([l3EndpointEntity.schema, l4PortInfoSchema]),\n\n meta: {\n color: \"#2196F3\",\n description: \"The L4 endpoint for some service. Extends an L3 endpoint with a port.\",\n },\n})\n\nexport const l7AppInfoSchema = Type.Object({\n /**\n * The name of the application protocol used by the endpoint.\n */\n appProtocol: Type.String(),\n\n /**\n * The resource path of the application endpoint, including query parameters.\n * Must not start with a slash (`/`).\n *\n * Example: `api/v1/resource?query=value`, `database?param=value`, `user/repo.git`.\n */\n resource: Type.Optional(Type.String()),\n})\n\nexport const l7EndpointEntity = defineEntity({\n type: \"network.l7-endpoint\",\n\n schema: Type.Intersect([l4EndpointEntity.schema, l7AppInfoSchema]),\n\n meta: {\n color: \"#FF9800\",\n description:\n \"The L7 endpoint for some service. Extends an L4 endpoint with application protocol information.\",\n },\n})\n\nexport const l3Endpoint = defineUnit({\n type: \"network.l3-endpoint\",\n\n args: {\n /**\n * The string representation of the endpoint.\n *\n * May be a domain name or an IP address.\n */\n endpoint: {\n schema: Type.String(),\n meta: {\n description: `The string representation of the endpoint.\n\n May be a domain name or an IP address.`,\n },\n},\n\n /**\n * The visibility of the endpoint.\n */\n visibility: {\n schema: Type.Default(endpointVisibilitySchema, \"public\"),\n meta: {\n description: `The visibility of the endpoint.`,\n },\n},\n },\n\n outputs: {\n endpoint: l3EndpointEntity,\n },\n\n meta: {\n displayName: \"L3 Endpoint\",\n description: \"An L3 endpoint for some service. May be a domain name or an IP address.\",\n primaryIcon: \"mdi:network-outline\",\n primaryIconColor: \"#4CAF50\",\n defaultNamePrefix: \"endpoint\",\n category: \"Network\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/network/l3-endpoint\",\n },\n})\n\nexport const l4Endpoint = defineUnit({\n type: \"network.l4-endpoint\",\n\n args: {\n /**\n * The string representation of the endpoint.\n *\n * May be a domain name or an IP address + port/protocol.\n *\n * The possible formats are:\n *\n * - `endpoint:port` (TCP by default)\n * - `tcp://endpoint:port`\n * - `udp://endpoint:port`\n */\n endpoint: {\n schema: Type.String(),\n meta: {\n description: `The string representation of the endpoint.\n\n May be a domain name or an IP address + port/protocol.\n\n The possible formats are:\n\n - \\`endpoint:port\\` (TCP by default)\n - \\`tcp://endpoint:port\\`\n - \\`udp://endpoint:port\\``,\n },\n},\n\n /**\n * The visibility of the endpoint.\n */\n visibility: {\n schema: Type.Default(endpointVisibilitySchema, \"public\"),\n meta: {\n description: `The visibility of the endpoint.`,\n },\n},\n },\n\n outputs: {\n endpoint: l4EndpointEntity,\n },\n\n meta: {\n displayName: \"L4 Endpoint\",\n description: \"An L4 endpoint for some service. Extends an L3 endpoint with a port.\",\n primaryIcon: \"mdi:network-outline\",\n primaryIconColor: \"#2196F3\",\n defaultNamePrefix: \"endpoint\",\n category: \"Network\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/network/l4-endpoint\",\n },\n})\n\n/**\n * The generic visibility of an endpoint.\n *\n * - `public`: Reachable from the public internet.\n * - `external`: Reachable from outside the system boundary (e.g., LAN, VPC), but not public.\n * - `internal`: Reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n */\nexport type EndpointVisibility = Static<typeof endpointVisibilitySchema>\n\n/**\n * The list of endpoint visibility levels used to filter endpoints.\n *\n * If empty, it will filter the most widely accessible endpoints, prefering visibility in the following order:\n * - If any public endpoints exist, all public endpoints are selected.\n * - Otherwise, if any external endpoints exist, all external endpoints are selected.\n * - If neither exist, all internal endpoints are selected.\n */\nexport type EndpointFilter = Static<typeof endpointFilterSchema>\n\nexport type L3Endpoint = Static<typeof l3EndpointEntity.schema>\nexport type L4Endpoint = Static<typeof l4EndpointEntity.schema>\nexport type L4Protocol = Static<typeof l4ProtocolSchema>\nexport type L4PortInfo = Static<typeof l4PortInfoSchema>\nexport type L7Endpoint = Static<typeof l7EndpointEntity.schema>\nexport type L7AppInfo = Static<typeof l7AppInfoSchema>\n\n/**\n * The L3 or L4 endpoint for some service.\n */\nexport type L34Endpoint = (L3Endpoint & { port?: undefined; protocol?: undefined }) | L4Endpoint\n","import type { Static } from \"@sinclair/typebox\"\nimport {\n defineEntity,\n defineUnit,\n HighstateSignature,\n Type,\n fileContentSchema as baseFileContentSchema,\n fileMetaSchema as baseFileMetaSchema,\n unitArtifactSchema,\n} from \"@highstate/contract\"\nimport { l7EndpointEntity } from \"./network\"\n\nexport const checksumAlgorithmSchema = Type.StringEnum([\n \"md5\",\n \"sha1\",\n \"sha256\",\n \"sha384\",\n \"sha512\",\n])\n\nexport const checksumSchema = Type.Object({\n algorithm: checksumAlgorithmSchema,\n value: Type.String(),\n})\n\nexport const fileContentSchema = Type.Union([\n baseFileContentSchema,\n Type.Object({\n type: Type.Literal(\"local\"),\n path: Type.String(),\n }),\n Type.Object({\n type: Type.Literal(\"remote\"),\n endpoint: l7EndpointEntity.schema,\n checksum: Type.Optional(checksumSchema),\n }),\n])\n\nexport const fileEntity = defineEntity({\n type: \"common.file\",\n\n schema: Type.Object({\n meta: baseFileMetaSchema,\n content: fileContentSchema,\n }),\n\n meta: {\n color: \"#FF5722\",\n },\n})\n\nexport const folderMetaSchema = Type.Object({\n name: Type.String(),\n mode: Type.Optional(Type.Number()),\n})\n\nexport const folderContentSchema = Type.Recursive(\n TSelf => {\n return Type.Union([\n Type.Object({\n type: Type.Literal(\"embedded\"),\n files: Type.Array(fileEntity.schema),\n folders: Type.Array(\n Type.Object({\n meta: folderMetaSchema,\n content: TSelf,\n }),\n ),\n }),\n Type.Object({\n type: Type.Literal(\"artifact\"),\n [HighstateSignature.Artifact]: unitArtifactSchema,\n }),\n Type.Object({\n type: Type.Literal(\"local\"),\n path: Type.String(),\n }),\n Type.Object({\n type: Type.Literal(\"remote\"),\n endpoint: l7EndpointEntity.schema,\n }),\n ])\n },\n { $id: \"common.folder.content\" },\n)\n\nexport const folderEntity = defineEntity({\n type: \"common.folder\",\n\n schema: Type.Object({\n meta: folderMetaSchema,\n content: folderContentSchema,\n }),\n\n meta: {\n color: \"#FF9800\",\n },\n})\n\nexport const remoteFile = defineUnit({\n type: \"common.remote-file\",\n\n args: {\n /**\n * The URL of the remote file.\n */\n url: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The URL of the remote file.`,\n },\n},\n },\n\n inputs: {\n /**\n * The L7 endpoint of the remote file.\n */\n endpoint: {\n entity: l7EndpointEntity,\n required: false,\n \n meta: {\n description: `The L7 endpoint of the remote file.`,\n },\n},\n },\n\n outputs: {\n file: fileEntity,\n },\n\n meta: {\n displayName: \"Remote File\",\n description: \"References a file from a remote URL.\",\n primaryIcon: \"mdi:file-download\",\n category: \"Files\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/remote-file\",\n },\n})\n\nexport type File = Static<typeof fileEntity.schema>\nexport type FileMeta = Static<typeof baseFileMetaSchema>\nexport type FileContent = Static<typeof fileContentSchema>\n\nexport type Folder = Static<typeof folderEntity.schema>\nexport type FolderMeta = Static<typeof folderMetaSchema>\nexport type FolderContent = Static<typeof folderContentSchema>\n\nexport type Checksum = Static<typeof checksumSchema>\nexport type ChecksumAlgorithm = Static<typeof checksumAlgorithmSchema>\n","import { defineEntity, Type, type Static } from \"@highstate/contract\"\nimport { endpointFilterSchema } from \"./network\"\nimport { arrayPatchModeSchema, prefixKeysWith } from \"./utils\"\n\nexport const providerEntity = defineEntity({\n type: \"dns.provider\",\n\n schema: Type.Object({\n name: Type.String(),\n type: Type.String(),\n data: Type.Record(Type.String(), Type.Unknown()),\n domain: Type.String(),\n }),\n\n meta: {\n color: \"#FF5722\",\n },\n})\n\nexport function createArgs<TPrefix extends string = \"\">(prefix?: TPrefix) {\n return prefixKeysWith(prefix, {\n /**\n * The FQDN to register the existing endpoints with.\n *\n * Will be inserted at the beginning of the resulting endpoint list.\n *\n * Will throw an error if no matching provider is found.\n */\n fqdn: Type.Optional(Type.String()),\n\n /**\n * The endpoint filter to filter the endpoints before creating the DNS records.\n *\n * Possible values:\n *\n * - `public`: Only endpoints exposed to the public internet.\n * - `external`: Reachable from outside the system but not public (e.g., LAN, VPC).\n * - `internal`: Reachable only from within the system boundary (e.g., inside a cluster).\n *\n * You can select one or more values.\n *\n * If no value is provided, the endpoints will be filtered by the most accessible type:\n *\n * - If any public endpoints exist, all public endpoints are selected;\n * - Otherwise, if any external endpoints exist, all external endpoints are selected;\n * - If neither exist, all internal endpoints are selected.\n */\n endpointFilter: Type.Default(endpointFilterSchema, []),\n\n /**\n * The mode to use for patching the existing endpoints.\n *\n * - `prepend`: Prepend the FQDN to the existing endpoints. It will make them prioritized.\n * - `replace`: Replace the existing endpoints with the FQDN. It will ensure that the only the FQDN is used.\n *\n * The default is `prepend`.\n */\n patchMode: Type.Default(arrayPatchModeSchema, \"prepend\"),\n })\n}\n\nexport const inputs = {\n /**\n * The DNS providers to use to create the DNS records.\n *\n * If multiple providers match the domain, all of them will be used and multiple DNS records will be created.\n */\n dnsProviders: {\n entity: providerEntity,\n multiple: true,\n },\n} as const\n\nexport type Provider = Static<typeof providerEntity.schema>\n","import { Type, type Static } from \"@highstate/contract\"\n\ntype PrefixWith<TString extends string, TPrefix extends string> = TPrefix extends \"\"\n ? TString\n : `${TPrefix}${Capitalize<TString>}`\n\nfunction prefixWith<TString extends string, TPrefix extends string>(\n string: TString,\n prefix?: TPrefix,\n): PrefixWith<TString, TPrefix> {\n return (\n prefix ? `${prefix}${string.charAt(0).toUpperCase()}${string.slice(1)}` : string\n ) as PrefixWith<TString, TPrefix>\n}\n\ntype PrefixedKeys<T extends Record<string, unknown>, Prefix extends string> = {\n [K in keyof T as PrefixWith<Extract<K, string>, Prefix>]: T[K]\n}\n\nexport function prefixKeysWith<T extends Record<string, unknown>, Prefix extends string>(\n prefix: Prefix | undefined,\n obj: T,\n): PrefixedKeys<T, Prefix> {\n return Object.fromEntries(\n Object.entries(obj).map(([key, value]) => [prefixWith(key, prefix), value]),\n ) as PrefixedKeys<T, Prefix>\n}\n\nexport const arrayPatchModeSchema = Type.StringEnum([\"prepend\", \"replace\"])\n\n/**\n * The mode to use when patching some array.\n *\n * - `prepend`: Prepend the values of the new array to the existing array.\n * - `replace`: Replace the existing array with the new array.\n */\nexport type ArrayPatchMode = Static<typeof arrayPatchModeSchema>\n","import { defineEntity, defineUnit, Type } from \"@highstate/contract\"\nimport { checksumSchema, fileEntity, serverOutputs } from \"./common\"\nimport { credentialsSchema, keyPairEntity } from \"./ssh\"\nimport { l7EndpointEntity } from \"./network\"\n\nexport const clusterEntity = defineEntity({\n type: \"proxmox.cluster\",\n\n schema: Type.Object({\n endpoint: l7EndpointEntity.schema,\n insecure: Type.Optional(Type.Boolean()),\n username: Type.Optional(Type.String()),\n\n defaultNodeName: Type.String(),\n defaultDatastoreId: Type.String(),\n\n password: Type.Optional(Type.String()),\n apiToken: Type.Optional(Type.String()),\n\n ssh: Type.Optional(credentialsSchema),\n }),\n\n meta: {\n color: \"#e56901\",\n },\n})\n\nexport const imageEntity = defineEntity({\n type: \"proxmox.image\",\n\n schema: Type.Object({\n id: Type.String(),\n }),\n\n meta: {\n color: \"#e56901\",\n },\n})\n\nexport const connection = defineUnit({\n type: \"proxmox.connection\",\n\n args: {\n /**\n * The endpoint of the Proxmox API.\n */\n endpoint: {\n schema: Type.String(),\n meta: {\n description: `The endpoint of the Proxmox API.`,\n },\n},\n\n /**\n * Whether to allow insecure connections to the Proxmox API.\n */\n insecure: {\n schema: Type.Optional(Type.Boolean()),\n meta: {\n description: `Whether to allow insecure connections to the Proxmox API.`,\n },\n},\n\n /**\n * The username to use for the Proxmox API.\n *\n * Only required for password token authentication.\n */\n username: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The username to use for the Proxmox API.\n\n Only required for password token authentication.`,\n },\n},\n\n /**\n * The name of the default Proxmox node to use for operations.\n *\n * If not specified, the first node in the cluster will be used.\n */\n defaultNodeName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the default Proxmox node to use for operations.\n\n If not specified, the first node in the cluster will be used.`,\n },\n},\n\n /**\n * The ID of the default Proxmox datastore to use for operations.\n *\n * If not specified, the first datastore in the cluster will be used.\n */\n defaultDatastoreId: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The ID of the default Proxmox datastore to use for operations.\n\n If not specified, the first datastore in the cluster will be used.`,\n },\n},\n\n /**\n * The username to use for SSH connections to the Proxmox nodes.\n *\n * By default, this is set to \"root\".\n */\n sshUser: {\n schema: Type.Default(Type.String(), \"root\"),\n meta: {\n description: `The username to use for SSH connections to the Proxmox nodes.\n\n By default, this is set to \"root\".`,\n },\n},\n\n /**\n * The port to use for SSH connections to the Proxmox nodes.\n *\n * By default, this is set to 22.\n */\n sshPort: {\n schema: Type.Default(Type.Number(), 22),\n meta: {\n description: `The port to use for SSH connections to the Proxmox nodes.\n\n By default, this is set to 22.`,\n },\n},\n },\n\n secrets: {\n /**\n * The password to use for the Proxmox API.\n *\n * Requires `username` to be set.\n */\n password: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The password to use for the Proxmox API.\n\n Requires \\`username\\` to be set.`,\n displayName: \"Proxmox Password\",\n },\n },\n\n /**\n * The Proxmox API token to use for authentication.\n */\n apiToken: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The Proxmox API token to use for authentication.`,\n displayName: \"Proxmox API Token\",\n },\n },\n\n /**\n * The SSH password to use for connecting to the Proxmox nodes.\n */\n sshPassword: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The SSH password to use for connecting to the Proxmox nodes.`,\n },\n},\n },\n\n inputs: {\n /**\n * The key pair to use for SSH connections to the Proxmox nodes.\n */\n sshKeyPair: {\n entity: keyPairEntity,\n required: false,\n \n meta: {\n description: `The key pair to use for SSH connections to the Proxmox nodes.`,\n },\n},\n },\n\n outputs: {\n proxmoxCluster: clusterEntity,\n },\n\n meta: {\n displayName: \"Proxmox Connection\",\n description: \"The connection to an existing Proxmox cluster.\",\n category: \"Proxmox\",\n primaryIcon: \"simple-icons:proxmox\",\n primaryIconColor: \"#e56901\",\n },\n\n source: {\n package: \"@highstate/proxmox\",\n path: \"connection\",\n },\n})\n\nexport const image = defineUnit({\n type: \"proxmox.image\",\n\n args: {\n /**\n * The name of the image to upload.\n *\n * If not specified, the default name is `<unitName>-<sha256>.<extension>`\n * or `<unitName>.<extension>` if `sha256` is not provided.\n */\n fileName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the image to upload.\n\n If not specified, the default name is \\`<unitName>-<sha256>.<extension>\\`\n or \\`<unitName>.<extension>\\` if \\`sha256\\` is not provided.`,\n },\n},\n\n /**\n * The URL of the image to upload.\n */\n url: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The URL of the image to upload.`,\n },\n},\n\n /**\n * The checksum of the image file to verify.\n */\n checksum: {\n schema: Type.Optional(checksumSchema),\n meta: {\n description: `The checksum of the image file to verify.`,\n },\n},\n\n /**\n * The name of the Proxmox node to upload the image to.\n *\n * If not specified, the default node name from the cluster will be used.\n */\n nodeName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the Proxmox node to upload the image to.\n\n If not specified, the default node name from the cluster will be used.`,\n },\n},\n\n /**\n * The ID of the Proxmox datastore to upload the image to.\n *\n * If not specified, the default datastore ID from the cluster will be used.\n */\n datastoreId: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The ID of the Proxmox datastore to upload the image to.\n\n If not specified, the default datastore ID from the cluster will be used.`,\n },\n},\n },\n\n inputs: {\n /**\n * The Proxmox cluster to upload the image to.\n */\n proxmoxCluster: {\n entity: clusterEntity,\n meta: {\n description: `The Proxmox cluster to upload the image to.`,\n },\n},\n\n /**\n * The file to upload as an image.\n *\n * If `url` is not specified, this file will be used.\n */\n file: {\n entity: fileEntity,\n required: false,\n \n meta: {\n description: `The file to upload as an image.\n\n If \\`url\\` is not specified, this file will be used.`,\n },\n},\n },\n\n outputs: {\n image: imageEntity,\n },\n\n meta: {\n displayName: \"Proxmox Image\",\n description: \"The image to upload to a Proxmox cluster.\",\n category: \"Proxmox\",\n primaryIcon: \"simple-icons:proxmox\",\n primaryIconColor: \"#e56901\",\n secondaryIcon: \"mage:compact-disk-fill\",\n },\n\n source: {\n package: \"@highstate/proxmox\",\n path: \"image\",\n },\n})\n\nexport const existingImage = defineUnit({\n type: \"proxmox.existing-image\",\n\n args: {\n id: Type.String(),\n },\n\n inputs: {\n proxmoxCluster: clusterEntity,\n },\n\n outputs: {\n image: imageEntity,\n },\n\n meta: {\n displayName: \"Proxmox Existing Image\",\n description: \"The existing image on a Proxmox cluster.\",\n category: \"Proxmox\",\n primaryIcon: \"simple-icons:proxmox\",\n primaryIconColor: \"#e56901\",\n secondaryIcon: \"mage:compact-disk-fill\",\n },\n\n source: {\n package: \"@highstate/proxmox\",\n path: \"existing-image\",\n },\n})\n\nexport const virtualMachine = defineUnit({\n type: \"proxmox.virtual-machine\",\n\n args: {\n nodeName: Type.Optional(Type.String()),\n\n cpuType: Type.Default(Type.String(), \"host\"),\n cores: Type.Default(Type.Number(), 1),\n sockets: Type.Default(Type.Number(), 1),\n memory: Type.Default(Type.Number(), 512),\n\n /**\n * The IPv4 address to assign to the virtual machine.\n *\n * If not specified, the virtual machine will not have an IPv4 address.\n */\n ipv4: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The IPv4 address to assign to the virtual machine.\n\n If not specified, the virtual machine will not have an IPv4 address.`,\n },\n},\n ipv4Gateway: Type.Optional(Type.String()),\n dns: Type.Optional(Type.Array(Type.String())),\n\n datastoreId: Type.Optional(Type.String()),\n diskSize: Type.Default(Type.Number(), 8),\n bridge: Type.Default(Type.String(), \"vmbr0\"),\n\n sshPort: Type.Default(Type.Number(), 22),\n sshUser: Type.Default(Type.String(), \"root\"),\n\n waitForAgent: Type.Default(Type.Boolean(), true),\n vendorData: Type.Optional(Type.String({ language: \"yaml\" })),\n },\n\n secrets: {\n sshPassword: Type.Optional(Type.String()),\n },\n\n inputs: {\n proxmoxCluster: clusterEntity,\n image: imageEntity,\n\n sshKeyPair: {\n entity: keyPairEntity,\n required: false,\n },\n\n /**\n * The cloud-init vendor data to use for the virtual machine.\n *\n * You can provide a cloud-config from the distribution component.\n */\n vendorData: {\n entity: fileEntity,\n required: false,\n \n meta: {\n description: `The cloud-init vendor data to use for the virtual machine.\n\n You can provide a cloud-config from the distribution component.`,\n },\n},\n },\n\n outputs: serverOutputs,\n\n meta: {\n displayName: \"Proxmox Virtual Machine\",\n description: \"The virtual machine on a Proxmox cluster.\",\n category: \"Proxmox\",\n primaryIcon: \"simple-icons:proxmox\",\n primaryIconColor: \"#e56901\",\n secondaryIcon: \"codicon:vm\",\n },\n\n source: {\n package: \"@highstate/proxmox\",\n path: \"virtual-machine\",\n },\n})\n","import { defineEntity, defineUnit, Type, type Static } from \"@highstate/contract\"\nimport { Literal } from \"@sinclair/typebox\"\nimport * as dns from \"./dns\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"./network\"\nimport { serverEntity } from \"./common\"\nimport { arrayPatchModeSchema } from \"./utils\"\n\nexport const fallbackKubeApiAccessSchema = Type.Object({\n serverIp: Type.String(),\n serverPort: Type.Number(),\n})\n\nexport const tunDevicePolicySchema = Type.Union([\n Type.Object({\n type: Literal(\"host\"),\n }),\n Type.Object({\n type: Literal(\"plugin\"),\n resourceName: Type.String(),\n resourceValue: Type.String(),\n }),\n])\n\nexport const externalServiceTypeSchema = Type.StringEnum([\"NodePort\", \"LoadBalancer\"])\nexport const scheduleOnMastersPolicySchema = Type.StringEnum([\"always\", \"when-no-workers\", \"never\"])\nexport const cniSchema = Type.StringEnum([\"cilium\", \"other\"])\n\nexport const clusterQuirksSchema = Type.Object({\n /**\n * The IP and port of the kube-apiserver available from the cluster.\n *\n * Will be used to create fallback network policy in CNIs which does not support allowing access to the kube-apiserver.\n */\n fallbackKubeApiAccess: Type.Optional(fallbackKubeApiAccessSchema),\n\n /**\n * Specifies the policy for using the tun device inside containers.\n *\n * If not provided, the default policy is `host` which assumes just mounting /dev/net/tun from the host.\n *\n * For some runtimes, like Talos's one, the /dev/net/tun device is not available in the host, so the plugin policy should be used.\n */\n tunDevicePolicy: Type.Optional(tunDevicePolicySchema),\n\n /**\n * The service type to use for external services.\n *\n * If not provided, the default service type is `NodePort` since `LoadBalancer` may not be available.\n */\n externalServiceType: Type.Optional(externalServiceTypeSchema),\n})\n\nexport const clusterInfoProperties = {\n /**\n * The unique identifier of the cluster.\n *\n * Should be defined as a UUID of the `kube-system` namespace which is always present in the cluster.\n */\n id: Type.String(),\n\n /**\n * The name of the cluster.\n */\n name: Type.String(),\n\n /**\n * The name of the CNI plugin used by the cluster.\n *\n * Supported values are:\n * - `cilium`\n * - `other`\n */\n cni: cniSchema,\n\n /**\n * The endpoints of the cluster nodes.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same node may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n endpoints: Type.Array(l3EndpointEntity.schema),\n\n /**\n * The endpoints of the API server.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same node may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n apiEndpoints: Type.Array(l4EndpointEntity.schema),\n\n /**\n * The external IPs of the cluster nodes allowed to be used for external access.\n */\n externalIps: Type.Array(Type.String()),\n\n /**\n * The extra quirks of the cluster to improve compatibility.\n */\n quirks: Type.Optional(clusterQuirksSchema),\n\n /**\n * The extra metadata to attach to the cluster.\n */\n metadata: Type.Optional(Type.Record(Type.String(), Type.Unknown())),\n} as const\n\nexport const serviceTypeSchema = Type.StringEnum([\"NodePort\", \"LoadBalancer\", \"ClusterIP\"])\n\nexport const metadataSchema = Type.Object({\n name: Type.String(),\n namespace: Type.String(),\n labels: Type.Optional(Type.Record(Type.String(), Type.String())),\n annotations: Type.Optional(Type.Record(Type.String(), Type.String())),\n})\n\nexport const resourceSchema = Type.Object({\n clusterId: Type.String(),\n metadata: metadataSchema,\n})\n\nexport const serviceEntity = defineEntity({\n type: \"k8s.service\",\n\n schema: Type.Object({\n type: Type.Literal(\"k8s.service\"),\n ...resourceSchema.properties,\n endpoints: Type.Array(l4EndpointEntity.schema),\n }),\n\n meta: {\n color: \"#2196F3\",\n },\n})\n\nexport const clusterEntity = defineEntity({\n type: \"k8s.cluster\",\n\n schema: Type.Object({\n ...clusterInfoProperties,\n kubeconfig: Type.String(),\n }),\n\n meta: {\n color: \"#2196F3\",\n },\n})\n\nexport const internalIpsPolicySchema = Type.StringEnum([\"always\", \"public\", \"never\"])\n\nexport const scheduleOnMastersPolicyArgs = {\n /**\n * The policy for scheduling workloads on master nodes.\n *\n * - `always`: always schedule workloads on master nodes regardless of the number of workers;\n * - `when-no-workers`: schedule workloads on master nodes only if there are no workers (default);\n * - `never`: never schedule workloads on master nodes.\n */\n scheduleOnMastersPolicy: Type.Default(scheduleOnMastersPolicySchema, \"when-no-workers\"),\n}\n\nexport const clusterInputs = {\n masters: {\n entity: serverEntity,\n multiple: true,\n },\n workers: {\n entity: serverEntity,\n multiple: true,\n required: false,\n },\n} as const\n\nexport const clusterOutputs = {\n k8sCluster: clusterEntity,\n apiEndpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n} as const\n\nexport const existingCluster = defineUnit({\n type: \"k8s.existing-cluster\",\n\n args: {\n /**\n * The list of external IPs of the cluster nodes allowed to be used for external access.\n *\n * If not provided, will be automatically detected by querying the cluster nodes.\n */\n externalIps: {\n schema: Type.Optional(Type.Array(Type.String())),\n meta: {\n description: `The list of external IPs of the cluster nodes allowed to be used for external access.\n\n If not provided, will be automatically detected by querying the cluster nodes.`,\n },\n},\n\n /**\n * The policy for using internal IPs of the nodes as external IPs.\n *\n * - `always`: always use internal IPs as external IPs;\n * - `public`: use internal IPs as external IPs only if they are (theoretically) routable from the public internet **(default)**;\n * - `never`: never use internal IPs as external IPs.\n */\n internalIpsPolicy: {\n schema: Type.Default(internalIpsPolicySchema, \"public\"),\n meta: {\n description: `The policy for using internal IPs of the nodes as external IPs.\n\n - \\`always\\`: always use internal IPs as external IPs;\n - \\`public\\`: use internal IPs as external IPs only if they are (theoretically) routable from the public internet **(default)**;\n - \\`never\\`: never use internal IPs as external IPs.`,\n },\n},\n\n /**\n * The extra quirks of the cluster to improve compatibility.\n */\n quirks: {\n schema: Type.Optional(clusterQuirksSchema),\n meta: {\n description: `The extra quirks of the cluster to improve compatibility.`,\n },\n},\n },\n\n secrets: {\n /**\n * The kubeconfig of the cluster to use for connecting to the cluster.\n *\n * Will be available for all components using `cluster` output of this unit.\n */\n kubeconfig: {\n schema: Type.Record(Type.String(), Type.Any()),\n meta: {\n description: `The kubeconfig of the cluster to use for connecting to the cluster.\n\n Will be available for all components using \\`cluster\\` output of this unit.`,\n },\n},\n },\n\n outputs: clusterOutputs,\n\n meta: {\n displayName: \"Existing Cluster\",\n description: \"An existing Kubernetes cluster.\",\n primaryIcon: \"devicon:kubernetes\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/existing-cluster\",\n },\n})\n\nexport const clusterPatch = defineUnit({\n type: \"k8s.cluster-patch\",\n\n args: {\n /**\n * The endpoints of the API server.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same node may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n apiEndpoints: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `The endpoints of the API server.\n\n The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n\n The same node may also be represented by multiple entries (e.g. a node with private and public IP).`,\n },\n},\n\n /**\n * The mode to use for patching the API endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n apiEndpointsPatchMode: {\n schema: Type.Default(arrayPatchModeSchema, \"prepend\"),\n meta: {\n description: `The mode to use for patching the API endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`,\n },\n},\n\n /**\n * The endpoints of the cluster nodes.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same node may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n endpoints: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `The endpoints of the cluster nodes.\n\n The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n\n The same node may also be represented by multiple entries (e.g. a node with private and public IP).`,\n },\n},\n\n /**\n * The mode to use for patching the endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n endpointsPatchMode: {\n schema: Type.Default(arrayPatchModeSchema, \"prepend\"),\n meta: {\n description: `The mode to use for patching the endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`,\n },\n},\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n apiEndpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n endpoints: {\n entity: l3EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: clusterOutputs,\n\n meta: {\n displayName: \"Cluster Patch\",\n description: \"Patches some properties of the cluster.\",\n primaryIcon: \"devicon:kubernetes\",\n secondaryIcon: \"fluent:patch-20-filled\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/cluster-patch\",\n },\n})\n\nexport const clusterDns = defineUnit({\n type: \"k8s.cluster-dns\",\n\n args: {\n ...dns.createArgs(),\n ...dns.createArgs(\"api\"),\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n ...dns.inputs,\n },\n\n outputs: clusterOutputs,\n\n meta: {\n displayName: \"Cluster DNS\",\n description: \"Creates DNS records for the cluster and updates endpoints.\",\n primaryIcon: \"devicon:kubernetes\",\n secondaryIcon: \"mdi:dns\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/cluster-dns\",\n },\n})\n\nexport const gatewayEntity = defineEntity({\n type: \"k8s.gateway\",\n\n schema: Type.Object({\n clusterId: Type.String(),\n gatewayClassName: Type.String(),\n httpListenerPort: Type.Number(),\n httpsListenerPort: Type.Number(),\n endpoints: Type.Array(l3EndpointEntity.schema),\n }),\n\n meta: {\n color: \"#4CAF50\",\n },\n})\n\nexport const tlsIssuerEntity = defineEntity({\n type: \"k8s.tls-issuer\",\n\n schema: Type.Object({\n clusterId: Type.String(),\n clusterIssuerName: Type.String(),\n }),\n\n meta: {\n color: \"#f06292\",\n },\n})\n\nexport const accessPointEntity = defineEntity({\n type: \"k8s.access-point\",\n\n schema: Type.Object({\n clusterId: Type.String(),\n gateway: gatewayEntity.schema,\n tlsIssuer: tlsIssuerEntity.schema,\n dnsProviders: Type.Array(dns.providerEntity.schema),\n }),\n\n meta: {\n color: \"#F57F17\",\n },\n})\n\nexport const accessPoint = defineUnit({\n type: \"k8s.access-point\",\n\n inputs: {\n gateway: gatewayEntity,\n tlsIssuer: tlsIssuerEntity,\n dnsProviders: {\n entity: dns.providerEntity,\n multiple: true,\n },\n },\n\n outputs: {\n accessPoint: accessPointEntity,\n },\n\n meta: {\n displayName: \"Access Point\",\n description: \"An access point which can be used to connect to services.\",\n primaryIcon: \"mdi:access-point\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/access-point\",\n },\n})\n\nexport const certManager = defineUnit({\n type: \"k8s.cert-manager\",\n\n inputs: {\n k8sCluster: clusterEntity,\n },\n\n outputs: {\n k8sCluster: clusterEntity,\n },\n\n meta: {\n displayName: \"Cert Manager\",\n description: \"A certificate manager for managing TLS certificates.\",\n primaryIcon: \"simple-icons:letsencrypt\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/cert-manager\",\n },\n})\n\nexport const dns01TlsIssuer = defineUnit({\n type: \"k8s.dns01-issuer\",\n\n args: {\n /**\n * The top-level domains to filter the DNS01 challenge for.\n *\n * If not provided, will use all domains passed to the DNS providers.\n */\n domains: {\n schema: Type.Optional(Type.Array(Type.String())),\n meta: {\n description: `The top-level domains to filter the DNS01 challenge for.\n\n If not provided, will use all domains passed to the DNS providers.`,\n },\n},\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n dnsProviders: {\n entity: dns.providerEntity,\n multiple: true,\n },\n },\n\n outputs: {\n tlsIssuer: tlsIssuerEntity,\n },\n\n meta: {\n displayName: \"DNS01 Issuer\",\n description: \"A TLS issuer for issuing certificate using DNS01 challenge.\",\n primaryIcon: \"mdi:certificate\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/dns01-issuer\",\n },\n})\n\nexport const deploymentEntity = defineEntity({\n type: \"k8s.deployment\",\n\n schema: Type.Object({\n type: Type.Literal(\"k8s.deployment\"),\n ...resourceSchema.properties,\n service: Type.Optional(serviceEntity.schema),\n }),\n\n meta: {\n color: \"#4CAF50\",\n },\n})\n\nexport const statefulSetEntity = defineEntity({\n type: \"k8s.stateful-set\",\n\n schema: Type.Object({\n type: Type.Literal(\"k8s.stateful-set\"),\n ...resourceSchema.properties,\n service: serviceEntity.schema,\n }),\n\n meta: {\n color: \"#FFC107\",\n },\n})\n\nexport const exposableWorkloadEntity = defineEntity({\n type: \"k8s.exposable-workload\",\n\n schema: Type.Union([deploymentEntity.schema, statefulSetEntity.schema]),\n\n meta: {\n color: \"#4CAF50\",\n },\n})\n\nexport const persistentVolumeClaimEntity = defineEntity({\n type: \"k8s.persistent-volume-claim\",\n\n schema: Type.Object({\n type: Type.Literal(\"k8s.persistent-volume-claim\"),\n ...resourceSchema.properties,\n }),\n\n meta: {\n color: \"#FFC107\",\n },\n})\n\nexport const interfaceEntity = defineEntity({\n type: \"k8s.interface\",\n\n schema: Type.Object({\n name: Type.String(),\n workload: exposableWorkloadEntity.schema,\n }),\n\n meta: {\n color: \"#2196F3\",\n description:\n \"The interface in a network space of pod kernel which can accept or transmit packets.\",\n },\n})\n\nexport const gatewayApi = defineUnit({\n type: \"k8s.gateway-api\",\n\n inputs: {\n k8sCluster: clusterEntity,\n },\n\n outputs: {\n k8sCluster: clusterEntity,\n },\n\n meta: {\n displayName: \"Gateway API\",\n description: \"Installs the Gateway API CRDs to the cluster.\",\n primaryIcon: \"devicon:kubernetes\",\n secondaryIcon: \"mdi:api\",\n secondaryIconColor: \"#4CAF50\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/gateway-api\",\n },\n})\n\nexport const cilium = defineUnit({\n type: \"k8s.cilium\",\n\n args: {\n /**\n * If set to `true`, the generated network policy will allow\n * all DNS queries to be resolved, even if they are\n * for forbidden (non-allowed) FQDNs.\n *\n * By default, is `false`.\n */\n allowForbiddenFqdnResolution: {\n schema: Type.Default(Type.Boolean(), false),\n meta: {\n description: `If set to \\`true\\`, the generated network policy will allow\n all DNS queries to be resolved, even if they are\n for forbidden (non-allowed) FQDNs.\n\n By default, is \\`false\\`.`,\n },\n},\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n },\n\n outputs: {\n k8sCluster: clusterEntity,\n },\n\n meta: {\n displayName: \"Cilium\",\n description: \"The Cilium CNI deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:cilium\",\n secondaryIcon: \"devicon:kubernetes\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/cilium\",\n path: \"unit\",\n },\n})\n\nexport const monitorWorkerResourceGroupSchema = Type.Object({\n type: Type.StringEnum([\"deployment\", \"statefulset\", \"pod\", \"service\"]),\n namespace: Type.String(),\n names: Type.Optional(Type.Array(Type.String())),\n})\n\nexport const monitorWorkerParamsSchema = Type.Object({\n /**\n * The ID of the secret containing the kubeconfig of the cluster.\n */\n kubeconfigSecretId: Type.String(),\n\n /**\n * The resources to monitor in the cluster.\n */\n resourceGroups: Type.Array(monitorWorkerResourceGroupSchema),\n})\n\nexport type CNI = Static<typeof cniSchema>\nexport type Cluster = Static<typeof clusterEntity.schema>\n\nexport type Gateway = Static<typeof gatewayEntity.schema>\nexport type TlsIssuer = Static<typeof tlsIssuerEntity.schema>\nexport type AccessPoint = Static<typeof accessPointEntity.schema>\n\nexport type Metadata = Static<typeof metadataSchema>\nexport type Resource = Static<typeof resourceSchema>\n\nexport type ServiceType = Static<typeof serviceTypeSchema>\nexport type Service = Static<typeof serviceEntity.schema>\n\nexport type Deployment = Static<typeof deploymentEntity.schema>\nexport type ExposableWorkload = Static<typeof exposableWorkloadEntity.schema>\n\nexport type PersistentVolumeClaim = Static<typeof persistentVolumeClaimEntity.schema>\nexport type StatefulSet = Static<typeof statefulSetEntity.schema>\n\nexport type Interface = Static<typeof interfaceEntity.schema>\nexport type InternalIpsPolicy = Static<typeof internalIpsPolicySchema>\n\nexport type MonitorWorkerParams = Static<typeof monitorWorkerParamsSchema>\nexport type MonitorWorkerResourceGroup = Static<typeof monitorWorkerResourceGroupSchema>\n","import { defineEntity, defineUnit, Type } from \"@highstate/contract\"\nimport { clusterInputs, clusterOutputs, scheduleOnMastersPolicyArgs } from \"./k8s\"\n\nexport const clusterEntity = defineEntity({\n type: \"talos.cluster\",\n\n schema: Type.Object({\n clientConfiguration: Type.String(),\n machineSecrets: Type.String(),\n }),\n\n meta: {\n color: \"#2d2d2d\",\n },\n})\n\nexport const cniSchema = Type.StringEnum([\"none\", \"cilium\", \"flannel\"])\nexport const csiSchema = Type.StringEnum([\"none\", \"local-path-provisioner\"])\n\nexport const cluster = defineUnit({\n type: \"talos.cluster\",\n\n args: {\n ...scheduleOnMastersPolicyArgs,\n\n /**\n * The name of the cluster.\n *\n * By default, the name of the instance is used.\n */\n clusterName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the cluster.\n\n By default, the name of the instance is used.`,\n },\n},\n\n /**\n * The CNI plugin to use.\n *\n * The following options are available:\n * - \"cilium\" (default)\n * - \"flannel\" (built-in in Talos)\n * - \"none\" (disable CNI, must be installed manually)\n *\n * The \"cilium\" CNI plugin is recommended to cover advanced network policies like FQDNs.\n */\n cni: {\n schema: Type.Default(cniSchema, \"cilium\"),\n meta: {\n description: `The CNI plugin to use.\n\n The following options are available:\n - \"cilium\" (default)\n - \"flannel\" (built-in in Talos)\n - \"none\" (disable CNI, must be installed manually)\n\n The \"cilium\" CNI plugin is recommended to cover advanced network policies like FQDNs.`,\n },\n},\n\n /**\n * The CSI plugin to use.\n *\n * The following options are available:\n * - \"local-path-provisioner\" (default)\n * - \"none\" (disable CSI, must be installed manually if needed)\n */\n csi: {\n schema: Type.Default(csiSchema, \"local-path-provisioner\"),\n meta: {\n description: `The CSI plugin to use.\n\n The following options are available:\n - \"local-path-provisioner\" (default)\n - \"none\" (disable CSI, must be installed manually if needed)`,\n },\n},\n\n /**\n * The shared configuration patch.\n * It will be applied to all nodes.\n */\n sharedConfigPatch: {\n schema: Type.Optional(Type.Record(Type.String(), Type.Any())),\n meta: {\n description: `The shared configuration patch.\n It will be applied to all nodes.`,\n },\n},\n\n /**\n * The master configuration patch.\n * It will be applied to all master nodes.\n */\n masterConfigPatch: {\n schema: Type.Optional(Type.Record(Type.String(), Type.Any())),\n meta: {\n description: `The master configuration patch.\n It will be applied to all master nodes.`,\n },\n},\n\n /**\n * The worker configuration patch.\n * It will be applied to all worker nodes.\n */\n workerConfigPatch: {\n schema: Type.Optional(Type.Record(Type.String(), Type.Any())),\n meta: {\n description: `The worker configuration patch.\n It will be applied to all worker nodes.`,\n },\n},\n\n /**\n * Whether to enable the Tun device plugin.\n *\n * There is the only option for Talos to get tun device in containers.\n *\n * By default, this option is set to true.\n */\n enableTunDevicePlugin: {\n schema: Type.Default(Type.Boolean(), true),\n meta: {\n description: `Whether to enable the Tun device plugin.\n\n There is the only option for Talos to get tun device in containers.\n\n By default, this option is set to true.`,\n },\n},\n },\n\n inputs: clusterInputs,\n\n outputs: {\n ...clusterOutputs,\n talosCluster: clusterEntity,\n },\n\n meta: {\n displayName: \"Talos Cluster\",\n description: \"A Kubernetes cluster managed by Talos.\",\n category: \"Talos\",\n color: \"#2d2d2d\",\n primaryIcon: \"simple-icons:talos\",\n secondaryIcon: \"devicon:kubernetes\",\n },\n\n source: {\n package: \"@highstate/talos\",\n path: \"cluster\",\n },\n})\n","import { defineEntity, defineUnit, Type, type Static, type TObject } from \"@highstate/contract\"\nimport { omit } from \"remeda\"\nimport { clusterEntity, interfaceEntity, exposableWorkloadEntity } from \"./k8s\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"./network\"\nimport { arrayPatchModeSchema } from \"./utils\"\n\nexport const backendSchema = Type.StringEnum([\"wireguard\", \"amneziawg\"])\n\nexport type Backend = Static<typeof backendSchema>\n\nexport const networkEntity = defineEntity({\n type: \"wireguard.network\",\n\n schema: Type.Object({\n backend: backendSchema,\n ipv6: Type.Boolean(),\n }),\n})\n\nexport const nodeExposePolicySchema = Type.StringEnum([\"always\", \"when-has-endpoint\", \"never\"])\n\nexport const peerEntity = defineEntity({\n type: \"wireguard.peer\",\n\n schema: Type.Object({\n name: Type.String(),\n network: Type.Optional(networkEntity.schema),\n publicKey: Type.String(),\n address: Type.Optional(Type.String()),\n allowedIps: Type.Array(Type.String()),\n endpoints: Type.Array(l4EndpointEntity.schema),\n allowedEndpoints: Type.Array(Type.Union([l3EndpointEntity.schema, l4EndpointEntity.schema])),\n\n /**\n * The pre-shared key of the WireGuard peer.\n *\n * If one of two peers has `presharedKey` set, the other peer must have `presharedKey` set too and they must be equal.\n *\n * Will be ignored if both peers have `presharedKeyPart` set.\n */\n presharedKey: Type.Optional(Type.String()),\n\n /**\n * The pre-shared key part of the WireGuard peer.\n *\n * If both peers have `presharedKeyPart` set, their `presharedKey` will be calculated as XOR of the two parts.\n */\n presharedKeyPart: Type.Optional(Type.String()),\n\n excludedIps: Type.Array(Type.String()),\n dns: Type.Array(Type.String()),\n listenPort: Type.Optional(Type.Number()),\n }),\n\n meta: {\n color: \"#673AB7\",\n },\n})\n\nexport const identityEntity = defineEntity({\n type: \"wireguard.identity\",\n\n schema: Type.Object({\n peer: peerEntity.schema,\n privateKey: Type.String(),\n }),\n\n meta: {\n color: \"#F44336\",\n },\n})\n\nexport type Network = Static<typeof networkEntity.schema>\nexport type Identity = Static<typeof identityEntity.schema>\nexport type Peer = Static<typeof peerEntity.schema>\nexport type NodeExposePolicy = Static<typeof nodeExposePolicySchema>\n\n/**\n * The network hols the shared configuration for the WireGuard identities, peers and nodes.\n */\nexport const network = defineUnit({\n type: \"wireguard.network\",\n\n args: {\n /**\n * The backend to use for the WireGuard network.\n *\n * Possible values are:\n * 1. `wireguard` - The default backend.\n * 2. `amneziawg` - The censorship-resistant fork of WireGuard.\n *\n * By default, the `wireguard` backend is used.\n */\n backend: {\n schema: Type.Default(backendSchema, \"wireguard\"),\n meta: {\n description: `The backend to use for the WireGuard network.\n\n Possible values are:\n 1. \\`wireguard\\` - The default backend.\n 2. \\`amneziawg\\` - The censorship-resistant fork of WireGuard.\n\n By default, the \\`wireguard\\` backend is used.`,\n },\n},\n\n /**\n * The option to enable IPv6 support in the network.\n *\n * By default, IPv6 support is disabled.\n */\n ipv6: {\n schema: Type.Default(Type.Boolean(), false),\n meta: {\n description: `The option to enable IPv6 support in the network.\n\n By default, IPv6 support is disabled.`,\n },\n},\n },\n\n outputs: {\n network: networkEntity,\n },\n\n meta: {\n description: \"The WireGuard network with some shared configuration.\",\n primaryIcon: \"simple-icons:wireguard\",\n primaryIconColor: \"#88171a\",\n secondaryIcon: \"mdi:local-area-network-connect\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"network\",\n },\n})\n\nconst sharedPeerArgs = {\n /**\n * The name of the WireGuard peer.\n *\n * If not provided, the peer will be named after the unit.\n */\n peerName: Type.Optional(Type.String()),\n\n /**\n * The address of the WireGuard interface.\n *\n * The address may be any IPv4 or IPv6 address. CIDR notation is also supported.\n */\n address: Type.Optional(Type.String()),\n\n /**\n * The convenience option to set `allowedIps` to `0.0.0.0/0, ::/0`.\n *\n * Will be merged with the `allowedIps` if provided.\n */\n exitNode: Type.Default(Type.Boolean(), false),\n\n /**\n * The list of IP ranges to exclude from the tunnel.\n *\n * Implementation notes:\n *\n * - This list will not be used to generate the allowed IPs for the peer.\n * - Instead, the node will setup extra direct routes to these IPs via default gateway.\n * - This allows to use `0.0.0.0/0, ::/0` in the `allowedIps` (and corresponding fwmark magic) and still have some IPs excluded from the tunnel.\n */\n excludedIps: Type.Default(Type.Array(Type.String()), []),\n\n /**\n * The convenience option to exclude private IPs from the tunnel.\n *\n * For IPv4, the private IPs are:\n *\n * - `10.0.0.0/8`\n * - `172.16.0.0/12`\n * - `192.168.0.0/16`\n *\n * For IPv6, the private IPs are:\n *\n * - `fc00::/7`\n * - `fe80::/10`\n *\n * Will be merged with `excludedIps` if provided.\n */\n excludePrivateIps: Type.Default(Type.Boolean(), false),\n\n /**\n * The endpoints of the WireGuard peer.\n */\n endpoints: Type.Default(Type.Array(Type.String()), []),\n\n /**\n * The allowed endpoints of the WireGuard peer.\n *\n * The non `hostname` endpoints will be added to the `allowedIps` of the peer.\n */\n allowedEndpoints: Type.Default(Type.Array(Type.String()), []),\n\n /**\n * The DNS servers that should be used by the interface connected to the WireGuard peer.\n *\n * If multiple peers define DNS servers, the node will merge them into a single list (but this is discouraged).\n */\n dns: Type.Default(Type.Array(Type.String()), []),\n\n /**\n * The convenience option to include the DNS servers to the allowed IPs.\n *\n * By default, is `true`.\n */\n includeDns: Type.Default(Type.Boolean(), true),\n\n /**\n * The port to listen on.\n */\n listenPort: Type.Optional(Type.Number()),\n}\n\nconst sharedPeerInputs = {\n /**\n * The network to use for the WireGuard identity.\n *\n * If not provided, the identity will use default network configuration.\n */\n network: {\n entity: networkEntity,\n required: false,\n },\n\n /**\n * The L3 endpoints of the identity.\n *\n * Will produce L4 endpoints for each of the provided L3 endpoints.\n */\n l3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n required: false,\n },\n\n /**\n * The L4 endpoints of the identity.\n *\n * Will take priority over all calculated endpoints if provided.\n */\n l4Endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n\n /**\n * The L3 endpoints to add to the allowed IPs of the identity.\n *\n * `hostname` endpoints will be ignored.\n *\n * If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,\n * the corresponding network policy will be created.\n */\n allowedL3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n required: false,\n },\n\n /**\n * The L4 endpoints to add to the allowed IPs of the identity.\n *\n * If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,\n * the corresponding network policy will be created.\n */\n allowedL4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n required: false,\n },\n} as const\n\nconst sharedPeerOutputs = {\n peer: peerEntity,\n\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n} as const\n\nexport type SharedPeerArgs = Static<TObject<typeof sharedPeerArgs>>\n\nexport const peer = defineUnit({\n type: \"wireguard.peer\",\n\n args: {\n ...sharedPeerArgs,\n\n /**\n * The public key of the WireGuard peer.\n */\n publicKey: {\n schema: Type.String(),\n meta: {\n description: `The public key of the WireGuard peer.`,\n },\n},\n },\n\n secrets: {\n /**\n * The pre-shared key which should be used for the peer.\n */\n presharedKey: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The pre-shared key which should be used for the peer.`,\n },\n},\n },\n\n inputs: sharedPeerInputs,\n outputs: sharedPeerOutputs,\n\n meta: {\n description: \"The WireGuard peer with the public key.\",\n primaryIcon: \"simple-icons:wireguard\",\n primaryIconColor: \"#88171a\",\n secondaryIcon: \"mdi:badge-account-horizontal\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"peer\",\n },\n})\n\nexport const peerPatch = defineUnit({\n type: \"wireguard.peer-patch\",\n\n args: {\n /**\n * The endpoints of the WireGuard peer.\n */\n endpoints: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `The endpoints of the WireGuard peer.`,\n },\n},\n\n /**\n * The mode to use for patching the endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n endpointsPatchMode: {\n schema: Type.Default(arrayPatchModeSchema, \"prepend\"),\n meta: {\n description: `The mode to use for patching the endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`,\n },\n},\n\n /**\n * The allowed endpoints of the WireGuard peer.\n *\n * The non `hostname` endpoints will be added to the `allowedIps` of the peer.\n */\n allowedEndpoints: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `The allowed endpoints of the WireGuard peer.\n\n The non \\`hostname\\` endpoints will be added to the \\`allowedIps\\` of the peer.`,\n },\n},\n\n /**\n * The mode to use for patching the allowed endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n allowedEndpointsPatchMode: {\n schema: Type.Default(arrayPatchModeSchema, \"prepend\"),\n meta: {\n description: `The mode to use for patching the allowed endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`,\n },\n},\n\n ...omit(sharedPeerArgs, [\"endpoints\", \"allowedEndpoints\"]),\n },\n\n inputs: {\n peer: peerEntity,\n ...sharedPeerInputs,\n },\n\n outputs: {\n peer: peerEntity,\n\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"WireGuard Peer Patch\",\n description: \"Patches some properties of the WireGuard peer.\",\n primaryIcon: \"simple-icons:wireguard\",\n primaryIconColor: \"#88171a\",\n secondaryIcon: \"mdi:badge-account-horizontal\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"peer-patch\",\n },\n})\n\nexport const identity = defineUnit({\n type: \"wireguard.identity\",\n\n args: {\n ...sharedPeerArgs,\n\n /**\n * The port to listen on.\n *\n * Used by the implementation of the identity and to calculate the endpoint of the peer.\n */\n listenPort: {\n schema: Type.Optional(Type.Number()),\n meta: {\n description: `The port to listen on.\n\n Used by the implementation of the identity and to calculate the endpoint of the peer.`,\n },\n},\n\n /**\n * The endpoint of the WireGuard peer.\n *\n * If overridden, does not affect node which implements the identity, but is used in the peer configuration of other nodes.\n *\n * Will take priority over all calculated endpoints and `l4Endpoint` input.\n */\n endpoints: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `The endpoint of the WireGuard peer.\n\n If overridden, does not affect node which implements the identity, but is used in the peer configuration of other nodes.\n\n Will take priority over all calculated endpoints and \\`l4Endpoint\\` input.`,\n },\n},\n },\n\n secrets: {\n /**\n * The private key of the WireGuard identity.\n *\n * If not provided, the key will be generated automatically.\n */\n privateKey: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The private key of the WireGuard identity.\n\n If not provided, the key will be generated automatically.`,\n },\n},\n\n /**\n * The part of the pre-shared of the WireGuard identity.\n *\n * Will be generated automatically if not provided.\n */\n presharedKeyPart: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The part of the pre-shared of the WireGuard identity.\n\n Will be generated automatically if not provided.`,\n },\n},\n },\n\n inputs: sharedPeerInputs,\n\n outputs: {\n identity: identityEntity,\n ...sharedPeerOutputs,\n },\n\n meta: {\n description: \"The WireGuard identity with the public key.\",\n primaryIcon: \"simple-icons:wireguard\",\n primaryIconColor: \"#88171a\",\n secondaryIcon: \"mdi:account\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"identity\",\n },\n})\n\nexport const node = defineUnit({\n type: \"wireguard.node\",\n\n args: {\n /**\n * The name of the namespace/deployment/statefulset where the WireGuard node will be deployed.\n *\n * By default, the name is `wg-${identity.name}`.\n */\n appName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the namespace/deployment/statefulset where the WireGuard node will be deployed.\n\n By default, the name is \\`wg-\\${identity.name}\\`.`,\n },\n},\n\n /**\n * Whether to expose the WireGuard node to the outside world.\n */\n external: {\n schema: Type.Default(Type.Boolean(), false),\n meta: {\n description: `Whether to expose the WireGuard node to the outside world.`,\n },\n},\n\n /**\n * The policy to use for exposing the WireGuard node.\n *\n * - `always` - The node will be exposed and the service will be created.\n * - `when-has-endpoint` - The node will be exposed only if the provided idenity has at least one endpoint.\n * - `never` - The node will not be exposed and the service will not be created.\n *\n * * By default, the `when-has-endpoint` policy is used.\n */\n exposePolicy: {\n schema: Type.Default(nodeExposePolicySchema, \"when-has-endpoint\"),\n meta: {\n description: `The policy to use for exposing the WireGuard node.\n\n - \\`always\\` - The node will be exposed and the service will be created.\n - \\`when-has-endpoint\\` - The node will be exposed only if the provided idenity has at least one endpoint.\n - \\`never\\` - The node will not be exposed and the service will not be created.\n\n * By default, the \\`when-has-endpoint\\` policy is used.`,\n },\n},\n\n /**\n * The extra specification of the container which runs the WireGuard node.\n *\n * Will override any overlapping fields.\n */\n containerSpec: {\n schema: Type.Optional(Type.Record(Type.String(), Type.Any())),\n meta: {\n description: `The extra specification of the container which runs the WireGuard node.\n\n Will override any overlapping fields.`,\n },\n},\n\n /**\n * List of CIDR blocks that should be blocked from forwarding through this WireGuard node.\n *\n * This prevents other peers from reaching these destination CIDRs while still allowing\n * the peers in those CIDRs to access the internet and other allowed endpoints.\n *\n * Useful for peer isolation where you want to prevent cross-peer communication.\n */\n forwardRestrictedIps: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `List of CIDR blocks that should be blocked from forwarding through this WireGuard node.\n\n This prevents other peers from reaching these destination CIDRs while still allowing\n the peers in those CIDRs to access the internet and other allowed endpoints.\n\n Useful for peer isolation where you want to prevent cross-peer communication.`,\n },\n},\n },\n\n inputs: {\n identity: identityEntity,\n k8sCluster: clusterEntity,\n\n workload: {\n entity: exposableWorkloadEntity,\n required: false,\n },\n\n interface: {\n entity: interfaceEntity,\n required: false,\n },\n\n peers: {\n entity: peerEntity,\n multiple: true,\n required: false,\n },\n },\n\n outputs: {\n interface: {\n entity: interfaceEntity,\n required: false,\n },\n\n peer: {\n entity: peerEntity,\n required: false,\n },\n\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n meta: {\n description: \"The WireGuard node running on the Kubernetes.\",\n primaryIcon: \"simple-icons:wireguard\",\n primaryIconColor: \"#88171a\",\n secondaryIcon: \"mdi:server\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"node\",\n },\n})\n\nexport const config = defineUnit({\n type: \"wireguard.config\",\n\n args: {\n /**\n * The name of the \"default\" interface where non-tunneled traffic should go.\n *\n * If not provided, the config will not respect `excludedIps`.\n */\n defaultInterface: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the \"default\" interface where non-tunneled traffic should go.\n\n If not provided, the config will not respect \\`excludedIps\\`.`,\n },\n},\n },\n\n inputs: {\n identity: identityEntity,\n peers: {\n entity: peerEntity,\n multiple: true,\n required: false,\n },\n },\n\n meta: {\n displayName: \"WireGuard Config\",\n description: \"Just the WireGuard configuration for the identity and peers.\",\n primaryIcon: \"simple-icons:wireguard\",\n primaryIconColor: \"#88171a\",\n secondaryIcon: \"mdi:settings\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"config\",\n },\n})\n\nexport const configBundle = defineUnit({\n type: \"wireguard.config-bundle\",\n\n inputs: {\n identity: identityEntity,\n peers: {\n entity: peerEntity,\n multiple: true,\n },\n sharedPeers: {\n entity: peerEntity,\n multiple: true,\n required: false,\n },\n },\n\n meta: {\n displayName: \"WireGuard Config Bundle\",\n description: \"The WireGuard configuration bundle for the identity and peers.\",\n primaryIcon: \"simple-icons:wireguard\",\n primaryIconColor: \"#88171a\",\n secondaryIcon: \"mdi:folder-settings-variant\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"config-bundle\",\n },\n})\n","export * from \"./mariadb\"\nexport * from \"./postgresql\"\nexport * from \"./vaultwarden\"\nexport * from \"./mongodb\"\nexport * from \"./network\"\nexport * from \"./dns\"\n// export * from \"./zitadel\"\n// export * from \"./gitea\"\nexport * from \"./traefik\"\nexport * from \"./kubernetes-dashboard\"\nexport * from \"./grocy\"\nexport * from \"./maybe\"\nexport * from \"./deployment\"\nexport * from \"./syncthing\"\nexport * from \"./code-server\"\nexport * from \"./hubble\"\n\nexport { createArgs, createInputs } from \"./shared\"\n","import { defineEntity, defineUnit, Type, type Static } from \"@highstate/contract\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"./network\"\n\nexport const repositoryEntity = defineEntity({\n type: \"restic.repository\",\n\n schema: Type.Object({\n remoteEndpoints: Type.Array(Type.Union([l3EndpointEntity.schema, l4EndpointEntity.schema])),\n\n type: Type.Literal(\"rclone\"),\n rcloneConfig: Type.String(),\n remoteName: Type.String(),\n pathPattern: Type.String(),\n }),\n\n meta: {\n color: \"#e56901\",\n },\n})\n\nexport const repo = defineUnit({\n type: \"restic.repo\",\n\n args: {\n remoteEndpoints: Type.Default(Type.Array(Type.String()), []),\n\n /**\n * The pattern for the path where backups will be stored for the specific application.\n *\n * Available variables:\n *\n * - `$clusterName`: The name of the Kubernetes cluster where the application is deployed.\n * - `$appName`: The name of the application for which the backups are being created. Corresponds to the `appName` argument of the unit.\n * - `$unitName`: The name of the unit, which deploys the application, provided by the user.\n *\n * By default, the path pattern is `backups/$clusterName/$appName`.\n */\n pathPattern: {\n schema: Type.Default(Type.String(), \"backups/$clusterName/$appName\"),\n meta: {\n description: `The pattern for the path where backups will be stored for the specific application.\n\n Available variables:\n\n - \\`$clusterName\\`: The name of the Kubernetes cluster where the application is deployed.\n - \\`$appName\\`: The name of the application for which the backups are being created. Corresponds to the \\`appName\\` argument of the unit.\n - \\`$unitName\\`: The name of the unit, which deploys the application, provided by the user.\n\n By default, the path pattern is \\`backups/$clusterName/$appName\\`.`,\n },\n},\n },\n\n secrets: {\n rcloneConfig: Type.String({ language: \"ini\" }),\n },\n\n inputs: {\n remoteL3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n required: false,\n },\n remoteL4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n required: false,\n },\n },\n\n outputs: {\n repo: repositoryEntity,\n },\n\n meta: {\n displayName: \"Restic Repo\",\n description: \"Holds the configuration for a Restic repository and its remote storage.\",\n primaryIconColor: \"#e56901\",\n primaryIcon: \"material-symbols:backup\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/restic\",\n path: \"repo\",\n },\n})\n\nexport type Repository = Static<typeof repositoryEntity.schema>\n","import type { TString } from \"@sinclair/typebox\"\nimport type { mariadbEntity } from \"./mariadb\"\nimport type { postgresqlEntity } from \"./postgresql\"\nimport type { mongodbEntity } from \"./mongodb\"\nimport { Type } from \"@highstate/contract\"\nimport {\n accessPointEntity,\n clusterEntity,\n persistentVolumeClaimEntity,\n serviceEntity,\n} from \"../k8s\"\nimport { repositoryEntity } from \"../restic\"\nimport { providerEntity } from \"../dns\"\nimport { l4EndpointEntity } from \"../network\"\n\nconst extraArgsDefinitions = {\n fqdn: {\n schema: Type.String(),\n },\n endpoints: {\n schema: Type.Array(Type.String()),\n required: false,\n },\n external: {\n schema: Type.Boolean(),\n required: false,\n },\n} as const\n\nconst extraSecretsDefinitions = {\n rootPassword: {\n schema: Type.String(),\n required: false,\n },\n backupPassword: {\n schema: Type.String(),\n required: false,\n },\n}\n\ntype LazyExtraInputDefinitions = {\n mariadb: {\n entity: typeof mariadbEntity\n displayName: \"MariaDB\"\n }\n postgresql: {\n entity: typeof postgresqlEntity\n displayName: \"PostgreSQL\"\n }\n mongodb: {\n entity: typeof mongodbEntity\n displayName: \"MongoDB\"\n }\n}\n\nconst eagerExtraInputDefinitions = {\n accessPoint: {\n entity: accessPointEntity,\n },\n resticRepo: {\n entity: repositoryEntity,\n required: false,\n },\n dnsProviders: {\n entity: providerEntity,\n required: false,\n multiple: true,\n },\n volume: {\n entity: persistentVolumeClaimEntity,\n required: false,\n },\n} as const\n\nexport const extraInputDefinitions = {\n ...eagerExtraInputDefinitions,\n} as typeof eagerExtraInputDefinitions & LazyExtraInputDefinitions\n\ntype ExtraArgsDefinitions = typeof extraArgsDefinitions\ntype ExtraSecretsDefinitions = typeof extraSecretsDefinitions\ntype ExtraArgsName = keyof ExtraArgsDefinitions\ntype ExtraSecretsName = keyof ExtraSecretsDefinitions\n\ntype CreateArgsOptions<R extends readonly ExtraArgsName[], O extends readonly ExtraArgsName[]> = {\n required?: R\n optional?: O\n}\n\ntype CreateSecretsOptions<\n R extends readonly ExtraSecretsName[],\n O extends readonly ExtraSecretsName[],\n> = {\n required?: R\n optional?: O\n}\n\nexport function createArgs<T extends readonly ExtraArgsName[] = []>(\n defaultAppName: string,\n extraArgs?: T,\n): {\n appName: TString & { default: string }\n} & {\n [K in T[number]]: ExtraArgsDefinitions[K]\n}\n\nexport function createArgs<\n R extends readonly ExtraArgsName[] = [],\n O extends readonly ExtraArgsName[] = [],\n>(\n defaultAppName: string,\n extraArgs?: CreateArgsOptions<R, O>,\n): {\n appName: TString & { default: string }\n} & {\n [K in R[number]]: ExtraArgsDefinitions[K] & { required: true }\n} & {\n [K in O[number]]: ExtraArgsDefinitions[K] & { required: false }\n}\n\nexport function createArgs<\n R extends readonly ExtraArgsName[] = [],\n O extends readonly ExtraArgsName[] = [],\n>(defaultAppName: string, extraArgs?: readonly ExtraArgsName[] | CreateArgsOptions<R, O>) {\n const base = {\n appName: Type.Default(Type.String(), defaultAppName),\n }\n\n const dynamicArgs: Partial<Record<ExtraArgsName, object>> = {}\n\n if (Array.isArray(extraArgs)) {\n for (const name of extraArgs as readonly ExtraArgsName[]) {\n dynamicArgs[name] = extraArgsDefinitions[name]\n }\n } else {\n const { required, optional } = (extraArgs as CreateArgsOptions<R, O>) ?? {}\n\n for (const name of required ?? []) {\n dynamicArgs[name] = {\n ...extraArgsDefinitions[name],\n required: true,\n }\n }\n\n for (const name of optional ?? []) {\n dynamicArgs[name] = {\n ...extraArgsDefinitions[name],\n required: false,\n }\n }\n }\n\n return {\n ...base,\n ...dynamicArgs,\n }\n}\n\nexport function createSecrets<T extends readonly ExtraSecretsName[] = []>(\n extraSecrets?: T,\n): {\n [K in T[number]]: ExtraSecretsDefinitions[K]\n}\n\nexport function createSecrets<\n R extends readonly ExtraSecretsName[] = [],\n O extends readonly ExtraSecretsName[] = [],\n>(\n extraSecrets?: CreateSecretsOptions<R, O>,\n): {\n [K in R[number]]: ExtraSecretsDefinitions[K] & { required: true }\n} & {\n [K in O[number]]: ExtraSecretsDefinitions[K] & { required: false }\n}\n\nexport function createSecrets<\n R extends readonly ExtraSecretsName[] = [],\n O extends readonly ExtraSecretsName[] = [],\n>(extraSecrets?: readonly ExtraSecretsName[] | CreateSecretsOptions<R, O>) {\n const dynamicSecrets: Partial<Record<ExtraSecretsName, object>> = {}\n\n if (Array.isArray(extraSecrets)) {\n for (const name of extraSecrets as readonly ExtraSecretsName[]) {\n dynamicSecrets[name] = extraSecretsDefinitions[name]\n }\n } else {\n const { required, optional } = (extraSecrets as CreateSecretsOptions<R, O>) ?? {}\n\n for (const name of required ?? []) {\n dynamicSecrets[name] = {\n ...extraSecretsDefinitions[name],\n required: true,\n }\n }\n\n for (const name of optional ?? []) {\n dynamicSecrets[name] = {\n ...extraSecretsDefinitions[name],\n required: false,\n }\n }\n }\n\n return dynamicSecrets as {\n [K in R[number]]: ExtraSecretsDefinitions[K] & { required: true }\n } & {\n [K in O[number]]: ExtraSecretsDefinitions[K] & { required: false }\n }\n}\n\ntype ExtraInputDefinitions = typeof extraInputDefinitions\ntype ExtraInputName = keyof ExtraInputDefinitions\n\ntype CreateInputsOptions<\n R extends readonly ExtraInputName[],\n O extends readonly ExtraInputName[],\n> = {\n required?: R\n optional?: O\n}\n\nexport function createInputs<T extends readonly ExtraInputName[] = []>(\n inputs?: T,\n): {\n k8sCluster: typeof clusterEntity\n} & {\n [K in T[number]]: ExtraInputDefinitions[K]\n}\n\nexport function createInputs<\n R extends readonly ExtraInputName[] = [],\n O extends readonly ExtraInputName[] = [],\n>(\n inputs?: CreateInputsOptions<R, O>,\n): {\n k8sCluster: typeof clusterEntity\n} & {\n [K in R[number]]: ExtraInputDefinitions[K] & { required: true }\n} & {\n [K in O[number]]: ExtraInputDefinitions[K] & { required: false }\n}\n\nexport function createInputs<\n R extends readonly ExtraInputName[] = [],\n O extends readonly ExtraInputName[] = [],\n>(inputs?: readonly ExtraInputName[] | CreateInputsOptions<R, O>) {\n const base = {\n k8sCluster: clusterEntity,\n }\n\n const dynamicInputs: Partial<Record<ExtraInputName, object>> = {}\n\n if (Array.isArray(inputs)) {\n for (const name of inputs as readonly ExtraInputName[]) {\n dynamicInputs[name] = extraInputDefinitions[name]\n }\n } else {\n const { required, optional } = (inputs as CreateInputsOptions<R, O>) ?? {}\n\n for (const name of required ?? []) {\n dynamicInputs[name] = {\n ...extraInputDefinitions[name],\n required: true,\n }\n }\n for (const name of optional ?? []) {\n dynamicInputs[name] = {\n ...extraInputDefinitions[name],\n required: false,\n }\n }\n }\n\n return {\n ...base,\n ...dynamicInputs,\n }\n}\n\nexport function createSource(path: string) {\n return {\n package: \"@highstate/apps\",\n path,\n }\n}\n\nexport const databaseSchema = Type.Object({\n endpoints: Type.Array(l4EndpointEntity.schema),\n service: Type.Optional(serviceEntity.schema),\n rootPassword: Type.String(),\n})\n","import { defineEntity, defineUnit, Type, type Static } from \"@highstate/contract\"\nimport { serviceEntity } from \"../k8s\"\nimport { l4EndpointEntity } from \"../network\"\nimport {\n createArgs,\n createInputs,\n createSecrets,\n createSource,\n databaseSchema,\n extraInputDefinitions,\n} from \"./shared\"\n\nexport const mariadbEntity = defineEntity({\n type: \"apps.mariadb\",\n\n schema: databaseSchema,\n\n meta: {\n color: \"#f06292\",\n },\n})\n\nexport const mariadb = defineUnit({\n type: \"apps.mariadb\",\n\n args: createArgs(\"mariadb\", [\"external\"]),\n secrets: createSecrets([\"rootPassword\", \"backupPassword\"]),\n inputs: createInputs([\"resticRepo\"]),\n\n outputs: {\n mariadb: mariadbEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"MariaDB\",\n description: \"The MariaDB database deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:mariadb\",\n secondaryIcon: \"mdi:database\",\n category: \"Databases\",\n },\n\n source: createSource(\"mariadb/app\"),\n})\n\nextraInputDefinitions.mariadb = {\n entity: mariadbEntity,\n displayName: \"MariaDB\",\n}\n\nexport const mariadbDatabase = defineUnit({\n type: \"apps.mariadb.database\",\n\n args: {\n database: Type.Optional(Type.String()),\n username: Type.Optional(Type.String()),\n },\n\n inputs: createInputs([\"mariadb\"]),\n\n secrets: {\n password: Type.Optional(Type.String()),\n },\n\n meta: {\n displayName: \"MariaDB Database\",\n description:\n \"The virtual MariaDB database created on the MariaDB instance. Works only for MariaDB instances deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:mariadb\",\n secondaryIcon: \"mdi:database-plus\",\n category: \"Databases\",\n },\n\n source: createSource(\"mariadb/database\"),\n})\n\nexport type MariaDB = Static<typeof mariadbEntity.schema>\n","import { defineEntity, defineUnit, Type, type Static } from \"@highstate/contract\"\nimport { serviceEntity } from \"../k8s\"\nimport { l4EndpointEntity } from \"../network\"\nimport {\n createArgs,\n createInputs,\n createSecrets,\n createSource,\n databaseSchema,\n extraInputDefinitions,\n} from \"./shared\"\n\nexport const postgresqlEntity = defineEntity({\n type: \"apps.postgresql\",\n\n schema: databaseSchema,\n\n meta: {\n color: \"#336791\",\n },\n})\n\nexport const postgresql = defineUnit({\n type: \"apps.postgresql\",\n\n args: createArgs(\"postgresql\", [\"external\"]),\n secrets: createSecrets([\"rootPassword\", \"backupPassword\"]),\n inputs: createInputs([\"resticRepo\", \"dnsProviders\"]),\n\n outputs: {\n postgresql: postgresqlEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"PostgreSQL\",\n description: \"The PostgreSQL database deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:postgresql\",\n secondaryIcon: \"mdi:database\",\n category: \"Databases\",\n },\n\n source: createSource(\"postgresql/app\"),\n})\n\nextraInputDefinitions.postgresql = {\n entity: postgresqlEntity,\n displayName: \"PostgreSQL\",\n}\n\nexport const postgresqlDatabase = defineUnit({\n type: \"apps.postgresql.database\",\n\n args: {\n database: Type.Optional(Type.String()),\n username: Type.Optional(Type.String()),\n },\n\n secrets: {\n password: Type.Optional(Type.String()),\n },\n\n inputs: createInputs([\"postgresql\"]),\n\n meta: {\n displayName: \"PostgreSQL Database\",\n description:\n \"The virtual PostgreSQL database created on the PostgreSQL instance. Works only for PostgreSQL instances deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:postgresql\",\n secondaryIcon: \"mdi:database-plus\",\n category: \"Databases\",\n },\n\n source: createSource(\"postgresql/database\"),\n})\n\nexport type PostgreSQL = Static<typeof postgresqlEntity.schema>\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { createArgs, createInputs, createSource } from \"./shared\"\n\nexport const vaultwarden = defineUnit({\n type: \"apps.vaultwarden\",\n\n args: createArgs(\"vaultwarden\", [\"fqdn\"]),\n\n secrets: {\n mariadbPassword: Type.Optional(Type.String()),\n },\n\n inputs: createInputs([\"accessPoint\", \"mariadb\"]),\n\n meta: {\n displayName: \"Vaultwarden\",\n description: \"The Vaultwarden password manager deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:vaultwarden\",\n category: \"Security\",\n },\n\n source: createSource(\"vaultwarden\"),\n})\n","import { defineEntity, defineUnit, Type, type Static } from \"@highstate/contract\"\nimport { serviceEntity } from \"../k8s\"\nimport { l4EndpointEntity } from \"../network\"\nimport {\n createArgs,\n createInputs,\n createSecrets,\n createSource,\n databaseSchema,\n extraInputDefinitions,\n} from \"./shared\"\n\nexport const mongodbEntity = defineEntity({\n type: \"apps.mongodb\",\n\n schema: databaseSchema,\n\n meta: {\n color: \"#13aa52\",\n },\n})\n\nexport const mongodb = defineUnit({\n type: \"apps.mongodb\",\n\n args: createArgs(\"mongodb\", [\"external\"]),\n secrets: createSecrets([\"rootPassword\", \"backupPassword\"]),\n inputs: createInputs([\"resticRepo\"]),\n\n outputs: {\n mongodb: mongodbEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"MongoDB\",\n description: \"The MongoDB instance deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:mongodb\",\n secondaryIcon: \"mdi:database\",\n category: \"Databases\",\n },\n\n source: createSource(\"mongodb/app\"),\n})\n\nextraInputDefinitions.mongodb = {\n entity: mongodbEntity,\n displayName: \"MongoDB\",\n}\n\nexport const mongodbDatabase = defineUnit({\n type: \"apps.mongodb.database\",\n\n args: {\n database: Type.Optional(Type.String()),\n username: Type.Optional(Type.String()),\n },\n\n secrets: {\n password: Type.Optional(Type.String()),\n },\n\n inputs: createInputs([\"mongodb\"]),\n\n meta: {\n displayName: \"MongoDB Database\",\n description:\n \"The virtual MongoDB database created on the MongoDB instance. Works only for MongoDB instances deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:mongodb\",\n secondaryIcon: \"mdi:database-plus\",\n category: \"Databases\",\n },\n\n source: createSource(\"mongodb/database\"),\n})\n\nexport type MongoDB = Static<typeof mongodbEntity.schema>\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"../network\"\nimport { createSource } from \"./shared\"\n\nexport const explicitEndpointFilterSchema = Type.StringEnum([\"public\", \"external\", \"internal\"])\n\nexport const endpointFilter = defineUnit({\n type: \"apps.endpoint-filter\",\n\n args: {\n /**\n * The filter to apply to the endpoints.\n *\n * - `public`: Only public endpoints accessible from the internet.\n * - `external`: Only external endpoints (e.g. NodePort, LoadBalancer) accessible from outside the cluster, but not from the internet.\n * - `internal`: Only internal endpoints (e.g. ClusterIP) accessible from within the cluster.\n */\n filter: {\n schema: Type.Default(explicitEndpointFilterSchema, \"public\"),\n meta: {\n description: `The filter to apply to the endpoints.\n\n - \\`public\\`: Only public endpoints accessible from the internet.\n - \\`external\\`: Only external endpoints (e.g. NodePort, LoadBalancer) accessible from outside the cluster, but not from the internet.\n - \\`internal\\`: Only internal endpoints (e.g. ClusterIP) accessible from within the cluster.`,\n },\n},\n },\n\n inputs: {\n l3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n required: false,\n },\n l4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n required: false,\n },\n },\n\n outputs: {\n l3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n l4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"Endpoint Filter\",\n description: \"Explicitly filter endpoints by their accessibility.\",\n primaryIcon: \"mdi:network-outline\",\n primaryIconColor: \"#FF9800\",\n secondaryIcon: \"mdi:filter-outline\",\n category: \"Network\",\n },\n\n source: createSource(\"endpoint-filter\"),\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"../network\"\nimport { providerEntity } from \"../dns\"\nimport { createSource } from \"./shared\"\n\nconst endpointFilterSchema = Type.StringEnum([\"all\", \"public\", \"external\", \"internal\"])\n\nexport const recordSet = defineUnit({\n type: \"apps.dns-record-set\",\n\n args: {\n /**\n * The name of the DNS record.\n *\n * If not provided, will use the name of the unit.\n */\n recordName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the DNS record.\n\n If not provided, will use the name of the unit.`,\n },\n},\n\n /**\n * The type of the DNS record.\n *\n * If not specified, will use the default type for the provider.\n */\n type: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The type of the DNS record.\n\n If not specified, will use the default type for the provider.`,\n },\n},\n\n /**\n * The values of the DNS record.\n */\n values: {\n schema: Type.Array(Type.String()),\n meta: {\n description: `The values of the DNS record.`,\n },\n},\n\n /**\n * The TTL of the DNS record.\n */\n ttl: {\n schema: Type.Optional(Type.Number()),\n meta: {\n description: `The TTL of the DNS record.`,\n },\n},\n\n /**\n * The priority of the DNS record.\n */\n priority: {\n schema: Type.Optional(Type.Number()),\n meta: {\n description: `The priority of the DNS record.`,\n },\n},\n\n /**\n * Whether the DNS record is proxied.\n *\n * Available only for public IPs and some DNS providers like Cloudflare.\n */\n proxied: {\n schema: Type.Optional(Type.Boolean()),\n meta: {\n description: `Whether the DNS record is proxied.\n\n Available only for public IPs and some DNS providers like Cloudflare.`,\n },\n},\n\n /**\n * The filter to apply to the endpoints.\n *\n * - `all`: All endpoints.\n * - `public`: Only public endpoints accessible from the internet (default).\n * - `external`: Only external endpoints (e.g. NodePort, LoadBalancer) accessible from outside the cluster, but not from the internet.\n * - `internal`: Only internal endpoints (e.g. ClusterIP) accessible from within the cluster.\n */\n endpointFilter: {\n schema: Type.Default(endpointFilterSchema, \"public\"),\n meta: {\n description: `The filter to apply to the endpoints.\n\n - \\`all\\`: All endpoints.\n - \\`public\\`: Only public endpoints accessible from the internet (default).\n - \\`external\\`: Only external endpoints (e.g. NodePort, LoadBalancer) accessible from outside the cluster, but not from the internet.\n - \\`internal\\`: Only internal endpoints (e.g. ClusterIP) accessible from within the cluster.`,\n },\n},\n },\n\n inputs: {\n dnsProviders: {\n entity: providerEntity,\n multiple: true,\n },\n l3Endpoints: {\n entity: l3EndpointEntity,\n required: false,\n multiple: true,\n },\n l4Endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n /**\n * The single L3 endpoint representing created DNS records.\n */\n l3Endpoint: {\n entity: l3EndpointEntity,\n meta: {\n description: `The single L3 endpoint representing created DNS records.`,\n },\n},\n\n /**\n * Multiple L4 endpoints representing created DNS records for each unique port/protocol combination from the input L4 endpoints.\n */\n l4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n \n meta: {\n description: `Multiple L4 endpoints representing created DNS records for each unique port/protocol combination from the input L4 endpoints.`,\n },\n},\n },\n\n meta: {\n displayName: \"DNS Record Set\",\n description: \"A set of DNS records to be created.\",\n primaryIcon: \"mdi:server\",\n defaultNamePrefix: \"record\",\n category: \"Network\",\n },\n\n source: createSource(\"dns-record-set\"),\n})\n\nexport const sharedArgs = {\n /**\n * The FQDN to register the cluster nodes with.\n */\n fqdn: Type.Optional(Type.String()),\n}\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { gatewayEntity, serviceEntity } from \"../k8s\"\nimport { l4EndpointEntity } from \"../network\"\nimport { createArgs, createInputs } from \"./shared\"\n\nexport const traefikGateway = defineUnit({\n type: \"apps.traefik-gateway\",\n\n args: {\n ...createArgs(\"traefik\", [\"external\"]),\n className: Type.Optional(Type.String()),\n },\n\n inputs: createInputs(),\n\n outputs: {\n gateway: gatewayEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"Traefik Gateway\",\n description: \"A Traefik gateway for routing traffic to services.\",\n primaryIcon: \"simple-icons:traefikproxy\",\n category: \"Network\",\n },\n\n source: {\n package: \"@highstate/apps\",\n path: \"traefik\",\n },\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { createArgs, createInputs, createSource } from \"./shared\"\n\nexport const kubernetesDashboard = defineUnit({\n type: \"apps.kubernetes-dashboard\",\n\n args: createArgs(\"kubernetes-dashboard\", [\"fqdn\"]),\n inputs: createInputs([\"accessPoint\"]),\n\n meta: {\n displayName: \"Kubernetes Dashboard\",\n description: \"The Kubernetes Dashboard deployed on Kubernetes.\",\n primaryIcon: \"devicon:kubernetes\",\n secondaryIcon: \"material-symbols:dashboard\",\n category: \"Kubernetes\",\n },\n\n source: createSource(\"kubernetes-dashboard\"),\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { createArgs, createInputs, createSecrets, createSource } from \"./shared\"\n\nexport const grocy = defineUnit({\n type: \"apps.grocy\",\n\n args: createArgs(\"grocy\", [\"fqdn\"]),\n secrets: createSecrets([\"backupPassword\"]),\n inputs: createInputs([\"accessPoint\", \"resticRepo\"]),\n\n meta: {\n displayName: \"Grocy\",\n description:\n \"Grocy is a web-based self-hosted groceries & household management solution for your home.\",\n primaryIcon: \"simple-icons:grocy\",\n category: \"Productivity\",\n },\n\n source: createSource(\"grocy\"),\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { createArgs, createInputs, createSecrets, createSource } from \"./shared\"\n\nexport const maybe = defineUnit({\n type: \"apps.maybe\",\n\n args: createArgs(\"maybe\", [\"fqdn\"]),\n\n secrets: {\n ...createSecrets([\"backupPassword\"]),\n postgresqlPassword: Type.Optional(Type.String()),\n secretKey: Type.Optional(Type.String()),\n },\n\n inputs: createInputs([\"accessPoint\", \"resticRepo\", \"postgresql\"]),\n\n meta: {\n displayName: \"Maybe\",\n description: \"The OS for your personal finances.\",\n primaryIcon: \"arcticons:finance-manager\",\n category: \"Finance\",\n },\n\n source: createSource(\"maybe\"),\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { deploymentEntity, serviceEntity, serviceTypeSchema } from \"../k8s\"\nimport { createInputs, createSource } from \"./shared\"\n\nexport const deployment = defineUnit({\n type: \"apps.deployment\",\n\n args: {\n appName: Type.Optional(Type.String()),\n\n fqdn: Type.Optional(Type.String()),\n serviceType: Type.Optional(serviceTypeSchema),\n\n image: Type.Optional(Type.String()),\n port: Type.Optional(Type.Number()),\n replicas: Type.Optional(Type.Number()),\n\n dataPath: Type.Optional(Type.String()),\n\n env: Type.Optional(Type.Record(Type.String(), Type.Any())),\n\n mariadbEnvMapping: Type.Optional(Type.Record(Type.String(), Type.Any())),\n postgresqlEnvMapping: Type.Optional(Type.Record(Type.String(), Type.Any())),\n mongodbEnvMapping: Type.Optional(Type.Record(Type.String(), Type.Any())),\n\n manifest: Type.Optional(Type.Record(Type.String(), Type.Any())),\n serviceManifest: Type.Optional(Type.Record(Type.String(), Type.Any())),\n httpRouteManifest: Type.Optional(Type.Record(Type.String(), Type.Any())),\n },\n\n secrets: {\n mariadbPassword: Type.Optional(Type.String()),\n postgresqlPassword: Type.Optional(Type.String()),\n mongodbPassword: Type.Optional(Type.String()),\n },\n\n inputs: createInputs([\n \"accessPoint\",\n \"mariadb\",\n \"postgresql\",\n \"mongodb\",\n \"resticRepo\",\n \"dnsProviders\",\n ]),\n\n outputs: {\n deployment: deploymentEntity,\n service: serviceEntity,\n },\n\n meta: {\n displayName: \"Kubernetes Deployment\",\n description: \"A generic Kubernetes deployment with optional service and gateway routes.\",\n primaryIcon: \"devicon:kubernetes\",\n secondaryIcon: \"mdi:cube-outline\",\n category: \"Kubernetes\",\n },\n\n source: createSource(\"deployment\"),\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { persistentVolumeClaimEntity, serviceEntity } from \"../k8s\"\nimport { l4EndpointEntity } from \"../network\"\nimport { createArgs, createInputs, createSecrets, createSource } from \"./shared\"\n\nexport const backupModeSchema = Type.StringEnum([\"state\", \"full\"])\n\nexport const syncthing = defineUnit({\n type: \"apps.syncthing\",\n\n args: {\n ...createArgs(\"syncthing\", [\"fqdn\", \"external\"]),\n\n /**\n * The FQDN of the Syncthing instance used to sync with other devices.\n *\n * The `fqdn` argument unlike this one points to the gateway and used to\n * access the Syncthing Web UI.\n */\n deviceFqdn: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The FQDN of the Syncthing instance used to sync with other devices.\n\n The \\`fqdn\\` argument unlike this one points to the gateway and used to\n access the Syncthing Web UI.`,\n },\n},\n\n /**\n * The backup mode to use for the Syncthing instance.\n *\n * - `state`: Only the state is backed up. When the instance is restored, it will\n * sync files from the other devices automatically.\n * - `full`: A full backup is created including all files.\n *\n * The default is `state`.\n */\n backupMode: {\n schema: Type.Default(backupModeSchema, \"state\"),\n meta: {\n description: `The backup mode to use for the Syncthing instance.\n\n - \\`state\\`: Only the state is backed up. When the instance is restored, it will\n sync files from the other devices automatically.\n - \\`full\\`: A full backup is created including all files.\n\n The default is \\`state\\`.`,\n },\n},\n },\n\n secrets: createSecrets([\"backupPassword\"]),\n inputs: createInputs([\"accessPoint\", \"resticRepo\", \"volume\"]),\n\n outputs: {\n volume: persistentVolumeClaimEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"Syncthing\",\n description: \"The Syncthing instance deployed on Kubernetes.\",\n primaryIcon: \"simple-icons:syncthing\",\n category: \"File Sync\",\n },\n\n source: createSource(\"syncthing\"),\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { persistentVolumeClaimEntity, statefulSetEntity } from \"../k8s\"\nimport { createArgs, createInputs, createSecrets } from \"./shared\"\n\nexport const codeServer = defineUnit({\n type: \"apps.code-server\",\n\n args: createArgs(\"code-server\", [\"fqdn\"]),\n\n secrets: {\n ...createSecrets([\"backupPassword\"]),\n password: Type.Optional(Type.String()),\n sudoPassword: Type.Optional(Type.String()),\n },\n\n inputs: createInputs([\"accessPoint\", \"resticRepo\", \"dnsProviders\", \"volume\"]),\n\n outputs: {\n statefulSet: statefulSetEntity,\n volume: persistentVolumeClaimEntity,\n },\n\n meta: {\n displayName: \"Code Server\",\n description: \"The Code Server instance deployed on Kubernetes.\",\n primaryIcon: \"material-icon-theme:vscode\",\n category: \"Development\",\n },\n\n source: {\n package: \"@highstate/apps\",\n path: \"code-server\",\n },\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { createArgs, createInputs, createSource } from \"./shared\"\n\nexport const hubble = defineUnit({\n type: \"apps.hubble\",\n\n args: createArgs(\"hubble\", [\"fqdn\"]),\n inputs: createInputs([\"accessPoint\"]),\n\n meta: {\n displayName: \"Hubble\",\n description:\n \"Exposes Hubble UI to the user. It must be already installed in the cluster as part of the Cilium.\",\n primaryIcon: \"mdi:eye\",\n secondaryIcon: \"simple-icons:cilium\",\n category: \"Observability\",\n },\n\n source: createSource(\"hubble\"),\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { providerEntity } from \"./dns\"\n\nexport const connection = defineUnit({\n type: \"cloudflare.connection\",\n\n secrets: {\n apiToken: Type.String(),\n },\n\n outputs: {\n dnsProvider: providerEntity,\n },\n\n meta: {\n displayName: \"Cloudflare Connection\",\n description: \"Creates a new Cloudflare connection for one zone.\",\n primaryIcon: \"simple-icons:cloudflare\",\n category: \"Cloudflare\",\n },\n\n source: {\n package: \"@highstate/cloudflare\",\n path: \"connection\",\n },\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { clusterInputs, clusterOutputs } from \"./k8s\"\n\nexport const packagedComponents = [\n \"coredns\",\n \"servicelb\",\n \"traefik\",\n \"local-storage\",\n \"metrics-server\",\n \"runtimes\",\n] as const\n\nexport const internalComponents = [\n \"scheduler\",\n \"cloud-controller\",\n \"kube-proxy\",\n \"network-policy\",\n \"helm-controller\",\n] as const\n\nexport const componentSchema = Type.StringEnum([...packagedComponents, ...internalComponents])\n\nexport const cniSchema = Type.StringEnum([\"none\", \"flannel\"])\n\nexport const cluster = defineUnit({\n type: \"k3s.cluster\",\n\n args: {\n /**\n * The components to disable in the K3S cluster.\n */\n disabledComponents: {\n schema: Type.Default(Type.Array(componentSchema), []),\n meta: {\n description: `The components to disable in the K3S cluster.`,\n },\n},\n\n /**\n * The CNI to use in the K3S cluster.\n *\n * Setting this to \"none\" will disable default Flannel CNI, but will not disable network policy controller and kube-proxy.\n * If needed, you can disable them using `disabledComponents` argument.\n */\n cni: {\n schema: Type.Default(cniSchema, \"flannel\"),\n meta: {\n description: `The CNI to use in the K3S cluster.\n\n Setting this to \"none\" will disable default Flannel CNI, but will not disable network policy controller and kube-proxy.\n If needed, you can disable them using \\`disabledComponents\\` argument.`,\n },\n},\n\n /**\n * The K3S configuration to pass to each server or agent in the cluster.\n *\n * See: https://docs.k3s.io/installation/configuration\n */\n config: {\n schema: Type.Optional(Type.Record(Type.String(), Type.Any())),\n meta: {\n description: `The K3S configuration to pass to each server or agent in the cluster.\n\n See: https://docs.k3s.io/installation/configuration`,\n },\n},\n\n /**\n * The configuration of the registries to use for the K3S cluster.\n *\n * See: https://docs.k3s.io/installation/private-registry\n */\n registries: {\n schema: Type.Optional(Type.Record(Type.String(), Type.Any())),\n meta: {\n description: `The configuration of the registries to use for the K3S cluster.\n\n See: https://docs.k3s.io/installation/private-registry`,\n },\n},\n },\n\n inputs: clusterInputs,\n outputs: clusterOutputs,\n\n meta: {\n displayName: \"K3s Cluster\",\n description: \"The K3s cluster created on top of the server.\",\n category: \"k3s\",\n primaryIcon: \"devicon:k3s\",\n secondaryIcon: \"devicon:kubernetes\",\n },\n\n source: {\n package: \"@highstate/k3s\",\n path: \"cluster\",\n },\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { networkEntity, peerEntity } from \"./wireguard\"\nimport { l4EndpointEntity } from \"./network\"\n\nexport const peer = defineUnit({\n type: \"mullvad.peer\",\n\n args: {\n hostname: Type.Optional(Type.String()),\n\n /**\n * Whether to include Mullvad DNS servers in the peer configuration.\n */\n includeDns: {\n schema: Type.Default(Type.Boolean(), true),\n meta: {\n description: `Whether to include Mullvad DNS servers in the peer configuration.`,\n },\n},\n },\n\n inputs: {\n /**\n * The network to use for the WireGuard peer.\n *\n * If not provided, the peer will use default network configuration.\n */\n network: {\n entity: networkEntity,\n required: false,\n \n meta: {\n description: `The network to use for the WireGuard peer.\n\n If not provided, the peer will use default network configuration.`,\n },\n},\n },\n\n outputs: {\n peer: peerEntity,\n\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n displayName: \"Mullvad Peer\",\n description: \"The Mullvad WireGuard peer fetched from the Mullvad API.\",\n primaryIcon: \"simple-icons:mullvad\",\n secondaryIcon: \"cib:wireguard\",\n secondaryIconColor: \"#88171a\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/mullvad\",\n path: \"peer\",\n },\n})\n","import { defineEntity, defineUnit, Type } from \"@highstate/contract\"\nimport { serverEntity } from \"./common\"\nimport { keyPairEntity } from \"./ssh\"\n\nexport const connectionEntity = defineEntity({\n type: \"timeweb.connection\",\n\n schema: Type.Object({\n name: Type.String(),\n apiToken: Type.String(),\n }),\n})\n\nexport const connection = defineUnit({\n type: \"timeweb.connection\",\n\n secrets: {\n apiToken: Type.String(),\n },\n\n outputs: {\n connection: connectionEntity,\n },\n\n meta: {\n displayName: \"Timeweb Connection\",\n description: \"Creates a new Timeweb connection.\",\n primaryIcon: \"material-symbols:cloud\",\n category: \"Timeweb\",\n },\n\n source: {\n package: \"@highstate/timeweb\",\n path: \"connection\",\n },\n})\n\nexport const virtualMachine = defineUnit({\n type: \"timeweb.virtual-machine\",\n\n args: {\n presetId: Type.Optional(Type.Number()),\n osId: Type.Optional(Type.Number()),\n availabilityZone: Type.String(),\n },\n\n inputs: {\n connection: connectionEntity,\n sshKeyPair: {\n entity: keyPairEntity,\n required: false,\n },\n },\n\n secrets: {\n sshPrivateKey: Type.Optional(Type.String()),\n },\n\n outputs: {\n server: serverEntity,\n },\n\n meta: {\n displayName: \"Timeweb Virtual Machine\",\n description: \"Creates a new Timeweb virtual machine.\",\n primaryIcon: \"material-symbols:cloud\",\n secondaryIcon: \"codicon:vm\",\n category: \"Timeweb\",\n },\n\n source: {\n package: \"@highstate/timeweb\",\n path: \"virtual-machine\",\n },\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { fileEntity, folderEntity } from \"./files\"\nimport { serverEntity } from \"./common\"\n\n// export const moduleEntity = defineEntity({\n// type: \"nixos.module\",\n\n// schema: Type.Object({\n// /**\n// * The folder containing the NixOS module files.\n// *\n// * @schema\n// */\n// folder: folderEntity.schema,\n\n// /**\n// * The name of the module file entrypoint to use when importing this module.\n// *\n// * @schema\n// */\n// entrypoint: Type.String(),\n// }),\n\n// meta: {\n// displayName: \"NixOS Module\",\n// description: \"The NixOS module reference.\",\n// color: \"#5277c3\",\n// },\n// })\n\nexport const inlineModule = defineUnit({\n type: \"nixos.inline-module\",\n\n args: {\n /**\n * The name of the module file.\n *\n * If not provided, the name will be the name of the unit.\n */\n moduleName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the module file.\n\n If not provided, the name will be the name of the unit.`,\n },\n},\n\n /**\n * The code of the NixOS module.\n *\n * In this code you can reference other modules and files by their names.\n */\n code: {\n schema: Type.String({ language: \"nix\" }),\n meta: {\n description: `The code of the NixOS module.\n\n In this code you can reference other modules and files by their names.`,\n },\n},\n },\n\n inputs: {\n files: {\n entity: fileEntity,\n required: false,\n multiple: true,\n },\n folders: {\n entity: folderEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n folder: folderEntity,\n },\n\n meta: {\n displayName: \"NixOS Inline Module\",\n description: \"Creates a NixOS module from inline code.\",\n primaryIcon: \"simple-icons:nixos\",\n primaryIconColor: \"#7ebae4\",\n secondaryIcon: \"mdi:file-code\",\n category: \"NixOS\",\n },\n\n source: {\n package: \"@highstate/nixos\",\n path: \"inline-module\",\n },\n})\n\n// export const flakeEntity = defineEntity({\n// type: \"nixos.flake\",\n\n// schema: Type.Object({\n// /**\n// * The git repository where the flake is stored.\n// *\n// * @schema\n// */\n// repository: repositoryEntity.schema,\n\n// /**\n// * The relative path to the folder containing the flake.nix file.\n// *\n// * If not provided, the root of the repository will be used.\n// *\n// * @schema\n// */\n// flakePath: Type.Optional(Type.String()),\n// }),\n\n// meta: {\n// displayName: \"NixOS Flake\",\n// description: \"The NixOS flake reference.\",\n// color: \"#5277c3\",\n// },\n// })\n\nexport const inlineFlake = defineUnit({\n type: \"nixos.inline-flake\",\n\n args: {\n /**\n * The name of the flake folder.\n *\n * If not provided, the name will be the name of the unit.\n */\n flakeName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the flake folder.\n\n If not provided, the name will be the name of the unit.`,\n },\n},\n\n /**\n * The code of the `flake.nix` file.\n *\n * In this code you can reference other flakes, modules, files, and folders by their names.\n */\n code: {\n schema: Type.String({ language: \"nix\" }),\n meta: {\n description: `The code of the \\`flake.nix\\` file.\n\n In this code you can reference other flakes, modules, files, and folders by their names.`,\n },\n},\n },\n\n inputs: {\n files: {\n entity: fileEntity,\n required: false,\n multiple: true,\n },\n folders: {\n entity: folderEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n folder: folderEntity,\n },\n\n meta: {\n displayName: \"NixOS Inline Flake\",\n description: \"Creates a NixOS flake from inline code.\",\n primaryIcon: \"simple-icons:nixos\",\n primaryIconColor: \"#7ebae4\",\n secondaryIcon: \"mdi:file-code\",\n category: \"NixOS\",\n },\n\n source: {\n package: \"@highstate/nixos\",\n path: \"inline-flake\",\n },\n})\n\nexport const system = defineUnit({\n type: \"nixos.system\",\n\n args: {\n system: Type.Optional(Type.String()),\n },\n\n inputs: {\n server: serverEntity,\n flake: folderEntity,\n },\n\n outputs: {\n server: serverEntity,\n },\n\n meta: {\n displayName: \"NixOS System\",\n description: \"Creates a NixOS system on top of any server.\",\n primaryIcon: \"simple-icons:nixos\",\n primaryIconColor: \"#7ebae4\",\n secondaryIcon: \"codicon:vm\",\n category: \"NixOS\",\n },\n\n source: {\n package: \"@highstate/nixos\",\n path: \"system\",\n },\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { fileEntity } from \"./files\"\nimport { serverEntity } from \"./common\"\n\nexport const secrets = defineUnit({\n type: \"sops.secrets\",\n\n secrets: {\n data: Type.Record(Type.String(), Type.Any()),\n },\n\n inputs: {\n servers: {\n entity: serverEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n file: fileEntity,\n },\n\n meta: {\n displayName: \"SOPS Secrets\",\n description: \"Encrypts secrets using SOPS for the specified servers.\",\n primaryIcon: \"mdi:file-lock\",\n category: \"Secrets\",\n },\n\n source: {\n package: \"@highstate/sops\",\n path: \"secrets\",\n },\n})\n","export * from \"./shared\"\nexport * as phantun from \"./phantun\"\n","import { $args, $inputs, $outputs, Type, type Static, type TObject } from \"@highstate/contract\"\nimport { clusterEntity } from \"../k8s\"\nimport { l4EndpointEntity } from \"../network\"\n\nexport const deobfuscatorSpec = {\n args: $args({\n /**\n * The name of the namespace and deployment to deploy the deobfuscator on.\n *\n * By default, calculated as `deobfs-{type}-{name}`.\n */\n appName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the namespace and deployment to deploy the deobfuscator on.\n\n By default, calculated as \\`deobfs-{type}-{name}\\`.`,\n },\n},\n\n /**\n * The L4 endpoint to forward deobfuscated traffic to.\n *\n * Will take precedence over the `targetEndpoint` input.\n */\n targetEndpoints: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `The L4 endpoint to forward deobfuscated traffic to.\n\n Will take precedence over the \\`targetEndpoint\\` input.`,\n },\n},\n\n /**\n * Whether to expose the deobfuscator service by \"NodePort\" or \"LoadBalancer\".\n *\n * By default, the service is not exposed and only accessible from within the cluster.\n */\n external: {\n schema: Type.Default(Type.Boolean(), false),\n meta: {\n description: `Whether to expose the deobfuscator service by \"NodePort\" or \"LoadBalancer\".\n\n By default, the service is not exposed and only accessible from within the cluster.`,\n },\n},\n }),\n\n inputs: $inputs({\n /**\n * The Kubernetes cluster to deploy the deobfuscator on.\n */\n k8sCluster: {\n entity: clusterEntity,\n meta: {\n description: `The Kubernetes cluster to deploy the deobfuscator on.`,\n },\n},\n\n /**\n * The L4 endpoints to forward deobfuscated traffic to.\n *\n * Will select the most appropriate endpoint based on the environment.\n */\n targetEndpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n \n meta: {\n description: `The L4 endpoints to forward deobfuscated traffic to.\n\n Will select the most appropriate endpoint based on the environment.`,\n },\n},\n }),\n\n outputs: $outputs({\n /**\n * The L4 endpoints of the deobfuscator accepting obfuscated traffic.\n */\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n \n meta: {\n description: `The L4 endpoints of the deobfuscator accepting obfuscated traffic.`,\n },\n},\n }),\n}\n\nexport const obfuscatorSpec = {\n args: $args({\n /**\n * The name of the namespace and deployment to deploy the obfuscator on.\n *\n * By default, calculated as `obfs-{type}-{name}`.\n */\n appName: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The name of the namespace and deployment to deploy the obfuscator on.\n\n By default, calculated as \\`obfs-{type}-{name}\\`.`,\n },\n},\n\n /**\n * The endpoint of the deobfuscator to pass obfuscated traffic to.\n *\n * Will take precedence over the `endpoint` input.\n */\n endpoints: {\n schema: Type.Default(Type.Array(Type.String()), []),\n meta: {\n description: `The endpoint of the deobfuscator to pass obfuscated traffic to.\n\n Will take precedence over the \\`endpoint\\` input.`,\n },\n},\n\n /**\n * Whether to expose the obfuscator service by \"NodePort\" or \"LoadBalancer\".\n *\n * By default, the service is not exposed and only accessible from within the cluster.\n */\n external: {\n schema: Type.Default(Type.Boolean(), false),\n meta: {\n description: `Whether to expose the obfuscator service by \"NodePort\" or \"LoadBalancer\".\n\n By default, the service is not exposed and only accessible from within the cluster.`,\n },\n},\n }),\n\n inputs: $inputs({\n /**\n * The Kubernetes cluster to deploy the obfuscator on.\n */\n k8sCluster: {\n entity: clusterEntity,\n meta: {\n description: `The Kubernetes cluster to deploy the obfuscator on.`,\n },\n},\n\n /**\n * The L4 endpoints of the deobfuscator to pass obfuscated traffic to.\n *\n * Will select the most appropriate endpoint based on the environment.\n */\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n \n meta: {\n description: `The L4 endpoints of the deobfuscator to pass obfuscated traffic to.\n\n Will select the most appropriate endpoint based on the environment.`,\n },\n},\n }),\n\n outputs: $outputs({\n /**\n * The L4 endpoints accepting unobfuscated traffic.\n */\n entryEndpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n \n meta: {\n description: `The L4 endpoints accepting unobfuscated traffic.`,\n },\n},\n }),\n}\n\nexport type DeobfuscatorArgs = Static<TObject<(typeof deobfuscatorSpec)[\"args\"]>>\nexport type ObfuscatorArgs = Static<TObject<(typeof obfuscatorSpec)[\"args\"]>>\n","import { defineUnit } from \"@highstate/contract\"\nimport { deobfuscatorSpec, obfuscatorSpec } from \"./shared\"\n\nexport const deobfuscator = defineUnit({\n type: \"obfuscators.phantun.deobfuscator\",\n ...deobfuscatorSpec,\n\n meta: {\n displayName: \"Phantun Deobfuscator\",\n description: \"The Phantun Deobfuscator deployed on Kubernetes.\",\n primaryIcon: \"mdi:network-outline\",\n secondaryIcon: \"mdi:hide\",\n category: \"Obfuscators\",\n },\n\n source: {\n package: \"@highstate/obfuscators\",\n path: \"phantun/deobfuscator\",\n },\n})\n\nexport const obfuscator = defineUnit({\n type: \"obfuscators.phantun.obfuscator\",\n ...obfuscatorSpec,\n\n meta: {\n displayName: \"Phantun Obfuscator\",\n description: \"The Phantun Obfuscator deployed on Kubernetes.\",\n primaryIcon: \"mdi:network-outline\",\n secondaryIcon: \"mdi:hide\",\n category: \"Obfuscators\",\n },\n\n source: {\n package: \"@highstate/obfuscators\",\n path: \"phantun/obfuscator\",\n },\n})\n","export * from \"./ubuntu\"\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { fileEntity } from \"../files\"\n\nexport const ubuntuVersionSchema = Type.StringEnum([\"22.04\", \"24.04\", \"24.10\", \"25.04\", \"25.10\"])\nexport const ubuntuArchitectureSchema = Type.StringEnum([\"amd64\", \"arm64\"])\n\nexport const ubuntu = defineUnit({\n type: \"distributions.ubuntu\",\n\n args: {\n version: Type.Default(ubuntuVersionSchema, \"24.04\"),\n architecture: Type.Default(ubuntuArchitectureSchema, \"amd64\"),\n },\n\n outputs: {\n image: fileEntity,\n cloudConfig: fileEntity,\n },\n\n meta: {\n displayName: \"Ubuntu\",\n description: \"Ubuntu distribution with image and cloud-config.\",\n primaryIcon: \"mdi:ubuntu\",\n primaryIconColor: \"#E95420\",\n category: \"Distributions\",\n },\n\n source: {\n package: \"@highstate/distributions\",\n path: \"ubuntu\",\n },\n})\n","import { defineUnit, Type } from \"@highstate/contract\"\nimport { l7EndpointEntity } from \"./network\"\nimport { folderEntity } from \"./files\"\n\nexport const remoteRepository = defineUnit({\n type: \"git.remote-repository\",\n\n args: {\n /**\n * The URL of the remote repository.\n */\n url: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The URL of the remote repository.`,\n },\n},\n\n /**\n * The ref of the remote repository to checkout.\n *\n * If not specified, the default branch will be used.\n */\n ref: {\n schema: Type.Optional(Type.String()),\n meta: {\n description: `The ref of the remote repository to checkout.\n\n If not specified, the default branch will be used.`,\n },\n},\n\n /**\n * Whether to include the .git directory in the packed artifact.\n *\n * Do not enable this unless you need the full git history.\n */\n includeGit: {\n schema: Type.Default(Type.Boolean(), false),\n meta: {\n description: `Whether to include the .git directory in the packed artifact.\n\n Do not enable this unless you need the full git history.`,\n },\n},\n },\n\n inputs: {\n /**\n * The L7 endpoint of the remote repository.\n */\n endpoint: {\n entity: l7EndpointEntity,\n required: false,\n \n meta: {\n description: `The L7 endpoint of the remote repository.`,\n },\n},\n },\n\n outputs: {\n /**\n * The folder containing the repository content.\n */\n folder: {\n entity: folderEntity,\n meta: {\n description: `The folder containing the repository content.`,\n },\n},\n },\n\n meta: {\n displayName: \"Git Remote Repository\",\n description: \"References a remote Git repository.\",\n primaryIcon: \"simple-icons:git\",\n primaryIconColor: \"#f1502f\",\n category: \"Git\",\n },\n\n source: {\n package: \"@highstate/git\",\n path: \"remote-repository\",\n },\n})\n"]}
1
+ {"version":3,"sources":["../src/abbreviations.ts","../src/common/index.ts","../src/dns.ts","../src/impl-ref.ts","../src/network.ts","../src/utils.ts","../src/common/access-point.ts","../src/common/files.ts","../src/ssh.ts","../src/common/server.ts","../src/databases/index.ts","../src/databases/shared.ts","../src/databases/mariadb.ts","../src/databases/mongodb.ts","../src/databases/postgresql.ts","../src/distributions/index.ts","../src/distributions/ubuntu.ts","../src/git.ts","../src/k3s.ts","../src/k8s/resources.ts","../src/k8s/shared.ts","../src/k8s/index.ts","../src/k8s/apps/index.ts","../src/k8s/service.ts","../src/k8s/workload.ts","../src/restic.ts","../src/k8s/apps/shared.ts","../src/k8s/apps/code-server.ts","../src/k8s/apps/grocy.ts","../src/k8s/apps/hubble.ts","../src/k8s/apps/kubernetes-dashboard.ts","../src/k8s/apps/mariadb.ts","../src/k8s/apps/maybe.ts","../src/k8s/apps/mongodb.ts","../src/k8s/apps/postgresql.ts","../src/k8s/apps/syncthing.ts","../src/k8s/apps/traefik.ts","../src/k8s/apps/vaultwarden.ts","../src/k8s/apps/workload.ts","../src/k8s/cert-manager.ts","../src/k8s/cilium.ts","../src/k8s/gateway.ts","../src/k8s/obfuscators/index.ts","../src/k8s/obfuscators/phantun.ts","../src/k8s/obfuscators/shared.ts","../src/nixos.ts","../src/proxmox.ts","../src/sops.ts","../src/talos.ts","../src/third-party/cloudflare.ts","../src/third-party/mullvad.ts","../src/wireguard.ts","../src/third-party/timeweb.ts"],"names":["__camelCaseToHumanReadable","z","defineEntity","defineUnit","$addArgumentDescription","$addInputDescription","baseFileContentSchema","baseFileMetaSchema","inputs","$secrets","$inputs","gatewayEntity","$args","sharedArgs","sharedInputs","sharedSecrets","pick","$outputs","clusterEntity","secrets","cluster","cniSchema","connection","peer","virtualMachine"],"mappings":";;;;;;;;AAEA,0BAAA,CAA2B;AAAA,EACzB,IAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AA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\n \"ID\",\n \"URL\",\n \"IP\",\n \"IPs\",\n \"IPv4\",\n \"IPv6\",\n \"DNS\",\n \"FQDN\",\n \"SSH\",\n \"WireGuard\",\n \"API\",\n \"k8s\",\n \"TLS\",\n \"HTTP\",\n \"HTTPS\",\n \"TCP\",\n \"UDP\",\n \"CIDR\",\n \"CPU\",\n \"RAM\",\n \"GPU\",\n \"SSD\",\n \"HDD\",\n \"VM\",\n \"CNI\",\n \"CSI\",\n \"MariaDB\",\n \"PostgreSQL\",\n \"MongoDB\",\n])\n\nexport const noop = () => {}\n","export * from \"./access-point\"\nexport * from \"./files\"\nexport * from \"./server\"\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { implementationReferenceSchema } from \"./impl-ref\"\nimport { endpointFilterSchema, l3EndpointEntity, l4EndpointEntity } from \"./network\"\nimport { arrayPatchModeSchema, prefixKeysWith } from \"./utils\"\n\nexport const providerEntity = defineEntity({\n type: \"dns.provider.v1\",\n\n schema: z.object({\n /**\n * The ID of the DNS provider unique within the system.\n */\n id: z.string().meta({ title: __camelCaseToHumanReadable(\"id\"), description: `The ID of the DNS provider unique within the system.` }),\n\n /**\n * The domain apex for which the DNS records will be created.\n *\n * If the provider manages multiple domains, the separate provider entity should be created for each domain.\n */\n domain: z.string().meta({ title: __camelCaseToHumanReadable(\"domain\"), description: `The domain apex for which the DNS records will be created.\n\n If the provider manages multiple domains, the separate provider entity should be created for each domain.` }),\n\n /**\n * The reference to the implementation of the DNS provider.\n */\n implRef: implementationReferenceSchema.meta({ title: __camelCaseToHumanReadable(\"implRef\"), description: `The reference to the implementation of the DNS provider.` }),\n }),\n\n meta: {\n color: \"#FF5722\",\n },\n})\n\nexport const recordSet = defineUnit({\n type: \"dns.record-set.v1\",\n\n args: {\n ...createArgs(),\n\n /**\n * The values of the DNS record.\n */\n values: $addArgumentDescription(z.string().array().default([]), `The values of the DNS record.`),\n\n /**\n * The TTL of the DNS record.\n */\n ttl: $addArgumentDescription(z.number().optional(), `The TTL of the DNS record.`),\n\n /**\n * The priority of the DNS record.\n */\n priority: $addArgumentDescription(z.number().optional(), `The priority of the DNS record.`),\n\n /**\n * Whether the DNS record is proxied.\n *\n * Available only for public IPs and some DNS providers like Cloudflare.\n */\n proxied: $addArgumentDescription(z.boolean().default(false), `Whether the DNS record is proxied.\n\n Available only for public IPs and some DNS providers like Cloudflare.`),\n },\n\n inputs: {\n /**\n * The DNS providers to use to create the DNS records.\n *\n * For each provider, a separate DNS record will be created.\n */\n dnsProviders: $addInputDescription({\n entity: providerEntity,\n multiple: true,\n }, `The DNS providers to use to create the DNS records.\n\n For each provider, a separate DNS record will be created.`),\n\n /**\n * The L3 endpoints to use as values of the DNS records.\n */\n l3Endpoints: $addInputDescription({\n entity: l3EndpointEntity,\n required: false,\n multiple: true,\n }, `The L3 endpoints to use as values of the DNS records.`),\n\n /**\n * The L4 endpoints to use as values of the DNS records.\n */\n l4Endpoints: $addInputDescription({\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n }, `The L4 endpoints to use as values of the DNS records.`),\n },\n\n outputs: {\n l3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n\n l4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n title: \"DNS Record Set\",\n description: \"A set of DNS records to be created.\",\n icon: \"mdi:server\",\n defaultNamePrefix: \"record\",\n category: \"Network\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/dns/record-set\",\n },\n})\n\nexport function createArgs<TPrefix extends string = \"\">(prefix?: TPrefix) {\n return prefixKeysWith(prefix, {\n /**\n * The FQDN to register the existing endpoints with.\n *\n * Will be inserted at the beginning of the resulting endpoint list.\n *\n * Will throw an error if no matching provider is found.\n */\n fqdn: z.string().optional(),\n\n /**\n * The endpoint filter to filter the endpoints before creating the DNS records.\n *\n * Possible values:\n *\n * - `public`: only endpoints exposed to the public internet;\n * - `external`: reachable from outside the system but not public (e.g., LAN, VPC);\n * - `internal`: reachable only from within the system boundary (e.g., inside a cluster).\n *\n * You can select one or more values.\n *\n * If no value is provided, the endpoints will be filtered by the most accessible type:\n *\n * - if any public endpoints exist, all public endpoints are selected;\n * - otherwise, if any external endpoints exist, all external endpoints are selected;\n * - if neither exist, all internal endpoints are selected.\n */\n endpointFilter: endpointFilterSchema.default([]),\n\n /**\n * The mode to use for patching the existing endpoints.\n *\n * - `prepend`: Prepend the FQDN to the existing endpoints. It will make them prioritized.\n * - `replace`: Replace the existing endpoints with the FQDN. It will ensure that the only the FQDN is used.\n *\n * The default is `prepend`.\n */\n patchMode: arrayPatchModeSchema.default(\"prepend\"),\n })\n}\n\nexport const inputs = {\n /**\n * The DNS providers to use to create the DNS records.\n *\n * If multiple providers match the domain, all of them will be used and multiple DNS records will be created.\n */\n dnsProviders: {\n entity: providerEntity,\n multiple: true,\n },\n} as const\n\nexport type Provider = z.infer<typeof providerEntity.schema>\n","import { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { z } from \"@highstate/contract\"\n\n/**\n * The schema which represents some generic reference to an implementation of some functionality.\n *\n * The implementation is dynamically loaded from the provided package and can be used to create resources or perform actions.\n *\n * It can be used for:\n *\n * - creating DNS records for different providers;\n * - creating access points for different gateways in different environments;\n * - creating network policies for different CNIs.\n */\nexport const implementationReferenceSchema = z.object({\n /**\n * The name of the package which contains the implementation.\n */\n package: z.string().meta({ title: __camelCaseToHumanReadable(\"package\"), description: `The name of the package which contains the implementation.` }),\n\n /**\n * The implementation specific data.\n */\n data: z.record(z.string(), z.unknown()).meta({ title: __camelCaseToHumanReadable(\"data\"), description: `The implementation specific data.` }),\n})\n\nexport type ImplementationReference = z.infer<typeof implementationReferenceSchema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport type { Simplify } from \"type-fest\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\n\nexport const endpointVisibilitySchema = z.enum([\n \"public\", // reachable from the public internet\n \"external\", // reachable from outside the system boundary, but not public\n \"internal\", // reachable only from within the system or cluster\n])\n\nexport const endpointFilterSchema = endpointVisibilitySchema.array()\n\n/**\n * The L3 endpoint for some service.\n *\n * May be a domain name or an IP address.\n */\nexport const l3EndpointEntity = defineEntity({\n type: \"network.l3-endpoint.v1\",\n\n schema: z.intersection(\n z.object({\n /**\n * The generic visibility of an endpoint.\n *\n * - `public`: reachable from the public internet;\n * - `external`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n * - `internal`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n */\n visibility: endpointVisibilitySchema.meta({ title: __camelCaseToHumanReadable(\"visibility\"), description: `The generic visibility of an endpoint.\n\n - \\`public\\`: reachable from the public internet;\n - \\`external\\`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n - \\`internal\\`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).` }),\n\n /**\n * The extra metadata for the endpoint.\n *\n * In most cases, this is provided by the endpoint origin (e.g., a Kubernetes service).\n */\n metadata: z.record(z.string(), z.unknown()).optional().meta({ title: __camelCaseToHumanReadable(\"metadata\"), description: `The extra metadata for the endpoint.\n\n In most cases, this is provided by the endpoint origin (e.g., a Kubernetes service).` }),\n }),\n z.union([\n z.object({\n type: z.literal(\"hostname\"),\n\n /**\n * The hostname of the endpoint in the format of a domain name.\n */\n hostname: z.string().meta({ title: __camelCaseToHumanReadable(\"hostname\"), description: `The hostname of the endpoint in the format of a domain name.` }),\n }),\n z.object({\n type: z.literal(\"ipv4\"),\n\n /**\n * The IPv4 address of the endpoint.\n */\n address: z.string().meta({ title: __camelCaseToHumanReadable(\"address\"), description: `The IPv4 address of the endpoint.` }),\n }),\n z.object({\n type: z.literal(\"ipv6\"),\n\n /**\n * The IPv6 address of the endpoint.\n */\n address: z.string().meta({ title: __camelCaseToHumanReadable(\"address\"), description: `The IPv6 address of the endpoint.` }),\n }),\n ]),\n ),\n\n meta: {\n description: `The L3 endpoint for some service.\n\n May be a domain name or an IP address.`,\n color: \"#4CAF50\",\n },\n})\n\nexport const l4ProtocolSchema = z.enum([\"tcp\", \"udp\"])\n\n/**\n * The schema for a TCP/UDP port.\n */\nexport const portSchema = z.number().int().min(1).max(65535)\n\n/**\n * The schema for an IPv4 prefix length.\n */\nexport const ipv4PrefixSchema = z.number().int().min(0).max(32)\n\n/**\n * The schema for address that can be either IPv4 or IPv6.\n */\nexport const ipv46Schema = z.union([z.ipv4(), z.ipv6()])\n\nexport const l4PortInfoSchema = z.object({\n port: portSchema,\n protocol: l4ProtocolSchema,\n})\n\n/**\n * The L4 endpoint for some service.\n *\n * Extends an L3 endpoint with a port and protocol.\n */\nexport const l4EndpointEntity = defineEntity({\n type: \"network.l4-endpoint.v1\",\n\n schema: z.intersection(l3EndpointEntity.schema, l4PortInfoSchema),\n\n meta: {\n description: `The L4 endpoint for some service.\n\n Extends an L3 endpoint with a port and protocol.`,\n color: \"#2196F3\",\n },\n})\n\nexport const l7AppInfoSchema = z.object({\n /**\n * The name of the application protocol used by the endpoint.\n */\n appProtocol: z.string().meta({ title: __camelCaseToHumanReadable(\"appProtocol\"), description: `The name of the application protocol used by the endpoint.` }),\n\n /**\n * The resource path of the application endpoint, including query parameters.\n * Must not start with a slash (`/`).\n *\n * Example: `api/v1/resource?query=value`, `database?param=value`, `user/repo.git`.\n */\n resource: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"resource\"), description: `The resource path of the application endpoint, including query parameters.\n Must not start with a slash (\\`/\\`).\n\n Example: \\`api/v1/resource?query=value\\`, \\`database?param=value\\`, \\`user/repo.git\\`.` }),\n})\n\n/**\n * The L7 endpoint for some service.\n *\n * Extends an L4 endpoint with application protocol information.\n */\nexport const l7EndpointEntity = defineEntity({\n type: \"network.l7-endpoint.v1\",\n\n schema: z.intersection(l4EndpointEntity.schema, l7AppInfoSchema),\n\n meta: {\n description: `The L7 endpoint for some service.\n\n Extends an L4 endpoint with application protocol information.`,\n color: \"#FF9800\",\n },\n})\n\n/**\n * The component which creates an L3 endpoint.\n */\nexport const l3Endpoint = defineUnit({\n type: \"network.l3-endpoint.v1\",\n\n args: {\n /**\n * The string representation of the endpoint.\n *\n * May be a domain name or an IP address.\n */\n endpoint: $addArgumentDescription(z.string(), `The string representation of the endpoint.\n\n May be a domain name or an IP address.`),\n\n /**\n * The visibility of the endpoint.\n *\n * The visibility levels are:\n * - `public`: reachable from the public internet;\n * - `external`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n * - `internal`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n *\n * If not specified, defaults to `public`.\n */\n visibility: $addArgumentDescription(endpointVisibilitySchema.default(\"public\"), `The visibility of the endpoint.\n\n The visibility levels are:\n - \\`public\\`: reachable from the public internet;\n - \\`external\\`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n - \\`internal\\`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n\n If not specified, defaults to \\`public\\`.`),\n },\n\n outputs: {\n endpoint: l3EndpointEntity,\n },\n\n meta: {\n description: `The component which creates an L3 endpoint.`,\n title: \"L3 Endpoint\",\n icon: \"mdi:network-outline\",\n iconColor: \"#4CAF50\",\n defaultNamePrefix: \"endpoint\",\n category: \"Network\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/network/l3-endpoint\",\n },\n})\n\n/**\n * The component which creates an L4 endpoint.\n */\nexport const l4Endpoint = defineUnit({\n type: \"network.l4-endpoint.v1\",\n\n args: {\n /**\n * The string representation of the endpoint.\n *\n * May be a domain name or an IP address + port/protocol.\n *\n * The possible formats are:\n *\n * - `endpoint:port` (TCP by default)\n * - `tcp://endpoint:port`\n * - `udp://endpoint:port`\n */\n endpoint: $addArgumentDescription(z.string(), `The string representation of the endpoint.\n\n May be a domain name or an IP address + port/protocol.\n\n The possible formats are:\n\n - \\`endpoint:port\\` (TCP by default)\n - \\`tcp://endpoint:port\\`\n - \\`udp://endpoint:port\\``),\n\n /**\n * The visibility of the endpoint.\n *\n * The visibility levels are:\n * - `public`: reachable from the public internet;\n * - `external`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n * - `internal`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n *\n * If not specified, defaults to `public`.\n */\n visibility: $addArgumentDescription(endpointVisibilitySchema.default(\"public\"), `The visibility of the endpoint.\n\n The visibility levels are:\n - \\`public\\`: reachable from the public internet;\n - \\`external\\`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n - \\`internal\\`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n\n If not specified, defaults to \\`public\\`.`),\n },\n\n outputs: {\n endpoint: l4EndpointEntity,\n },\n\n meta: {\n description: `The component which creates an L4 endpoint.`,\n title: \"L4 Endpoint\",\n icon: \"mdi:network-outline\",\n iconColor: \"#2196F3\",\n defaultNamePrefix: \"endpoint\",\n category: \"Network\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/network/l4-endpoint\",\n },\n})\n\n/**\n * The component which creates an L7 endpoint.\n */\nexport const l7Endpoint = defineUnit({\n type: \"network.l7-endpoint.v1\",\n\n args: {\n /**\n * The string representation of the endpoint.\n *\n * The possible formats are:\n *\n * - `https://endpoint:port/resource`\n * - `ftp://endpoint:port/resource`\n * - `someotherprotocol://endpoint:port/resource`\n */\n endpoint: $addArgumentDescription(z.string(), `The string representation of the endpoint.\n\n The possible formats are:\n\n - \\`https://endpoint:port/resource\\`\n - \\`ftp://endpoint:port/resource\\`\n - \\`someotherprotocol://endpoint:port/resource\\``),\n\n /**\n * The visibility of the endpoint.\n *\n * The visibility levels are:\n * - `public`: reachable from the public internet;\n * - `external`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n * - `internal`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n *\n * If not specified, defaults to `public`.\n */\n visibility: $addArgumentDescription(endpointVisibilitySchema.default(\"public\"), `The visibility of the endpoint.\n\n The visibility levels are:\n - \\`public\\`: reachable from the public internet;\n - \\`external\\`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n - \\`internal\\`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n\n If not specified, defaults to \\`public\\`.`),\n },\n\n outputs: {\n endpoint: l7EndpointEntity,\n },\n\n meta: {\n description: `The component which creates an L7 endpoint.`,\n title: \"L7 Endpoint\",\n icon: \"mdi:network-outline\",\n iconColor: \"#FF9800\",\n defaultNamePrefix: \"endpoint\",\n category: \"Network\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/network/l7-endpoint\",\n },\n})\n\n/**\n * Explicitly filter endpoints by their accessibility.\n */\nexport const endpointFilter = defineUnit({\n type: \"network.endpoint-filter.v1\",\n\n args: {\n /**\n * The endpoint filter to filter the endpoints before creating the DNS records.\n *\n * Possible values:\n *\n * - `public`: only endpoints exposed to the public internet;\n * - `external`: reachable from outside the system but not public (e.g., LAN, VPC);\n * - `internal`: reachable only from within the system boundary (e.g., inside a cluster).\n *\n * You can select one or more values.\n *\n * If no value is provided, the endpoints will be filtered by the most accessible type:\n *\n * - if any public endpoints exist, all public endpoints are selected;\n * - otherwise, if any external endpoints exist, all external endpoints are selected;\n * - if neither exist, all internal endpoints are selected.\n */\n endpointFilter: $addArgumentDescription(endpointFilterSchema.default([]), `The endpoint filter to filter the endpoints before creating the DNS records.\n\n Possible values:\n\n - \\`public\\`: only endpoints exposed to the public internet;\n - \\`external\\`: reachable from outside the system but not public (e.g., LAN, VPC);\n - \\`internal\\`: reachable only from within the system boundary (e.g., inside a cluster).\n\n You can select one or more values.\n\n If no value is provided, the endpoints will be filtered by the most accessible type:\n\n - if any public endpoints exist, all public endpoints are selected;\n - otherwise, if any external endpoints exist, all external endpoints are selected;\n - if neither exist, all internal endpoints are selected.`),\n },\n\n inputs: {\n l3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n required: false,\n },\n l4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n required: false,\n },\n },\n\n outputs: {\n l3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n l4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n description: `Explicitly filter endpoints by their accessibility.`,\n title: \"Endpoint Filter\",\n icon: \"mdi:network-outline\",\n iconColor: \"#FF9800\",\n secondaryIcon: \"mdi:filter-outline\",\n category: \"Network\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/network/endpoint-filter\",\n },\n})\n\n/**\n * The generic visibility of an endpoint.\n *\n * - `public`: reachable from the public internet;\n * - `external`: reachable from outside the system boundary (e.g., LAN, VPC), but not public;\n * - `internal`: reachable only from within the application or infrastructure boundary (e.g., within a cluster).\n */\nexport type EndpointVisibility = z.infer<typeof endpointVisibilitySchema>\n\n/**\n * The list of endpoint visibility levels used to filter endpoints.\n *\n * If empty, it will filter the most widely accessible endpoints, prefering visibility in the following order:\n * - If any public endpoints exist, all public endpoints are selected.\n * - Otherwise, if any external endpoints exist, all external endpoints are selected.\n * - If neither exist, all internal endpoints are selected.\n */\nexport type EndpointFilter = z.infer<typeof endpointFilterSchema>\n\nexport type L3Endpoint = Simplify<z.infer<typeof l3EndpointEntity.schema>>\nexport type L4Endpoint = Simplify<z.infer<typeof l4EndpointEntity.schema>>\nexport type L4Protocol = z.infer<typeof l4ProtocolSchema>\nexport type L4PortInfo = z.infer<typeof l4PortInfoSchema>\nexport type L7Endpoint = Simplify<z.infer<typeof l7EndpointEntity.schema>>\nexport type L7AppInfo = z.infer<typeof l7AppInfoSchema>\n\nexport const l34EndpointSchema = z.union([\n z.intersection(\n l3EndpointEntity.schema,\n z.object({\n port: z.undefined().optional(),\n protocol: z.undefined().optional(),\n }),\n ),\n l4EndpointEntity.schema,\n])\n\n/**\n * The L3 or L4 endpoint for some service.\n *\n * For convenience, L3 case have `port` and `protocol` fields as `undefined`,\n * so you can check any of them to determine if it's an L3 or L4 endpoint.\n */\nexport type L34Endpoint = Simplify<z.infer<typeof l34EndpointSchema>>\n","import { z } from \"@highstate/contract\"\n\ntype PrefixWith<TString extends string, TPrefix extends string> = TPrefix extends \"\"\n ? TString\n : `${TPrefix}${Capitalize<TString>}`\n\nfunction prefixWith<TString extends string, TPrefix extends string>(\n string: TString,\n prefix?: TPrefix,\n): PrefixWith<TString, TPrefix> {\n return (\n prefix ? `${prefix}${string.charAt(0).toUpperCase()}${string.slice(1)}` : string\n ) as PrefixWith<TString, TPrefix>\n}\n\ntype PrefixedKeys<T extends Record<string, unknown>, Prefix extends string> = {\n [K in keyof T as PrefixWith<Extract<K, string>, Prefix>]: T[K]\n}\n\n/**\n * The helper function to prefix the keys of an object with a given prefix.\n *\n * If the prefix is not provided, the keys will not be modified.\n *\n * All keys after prefixing will be capitalized.\n *\n * @param prefix The prefix to use. If not provided, the keys will not be modified.\n * @param obj The object to prefix the keys of.\n * @returns The object with prefixed keys.\n */\nexport function prefixKeysWith<T extends Record<string, unknown>, Prefix extends string>(\n prefix: Prefix | undefined,\n obj: T,\n): PrefixedKeys<T, Prefix> {\n return Object.fromEntries(\n Object.entries(obj).map(([key, value]) => [prefixWith(key, prefix), value]),\n ) as PrefixedKeys<T, Prefix>\n}\n\nexport const arrayPatchModeSchema = z.enum([\"prepend\", \"replace\"])\nexport const booleanPatchSchema = z.enum([\"keep\", \"true\", \"false\"])\n\n/**\n * The mode to use when patching some array:\n *\n * - `prepend`: prepend the values of the new array to the existing array;\n * - `replace`: replace the existing array with the new array.\n */\nexport type ArrayPatchMode = z.infer<typeof arrayPatchModeSchema>\n\n/**\n * The boolean patch:\n *\n * - `keep`: keep the existing value;\n * - `true`: set the value to `true`;\n * - `false`: set the value to `false`.\n */\nexport type BooleanPatch = z.infer<typeof booleanPatchSchema>\n","import { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport * as dns from \"../dns\"\nimport { implementationReferenceSchema } from \"../impl-ref\"\n\nexport const gatewayEntity = defineEntity({\n type: \"common.gateway.v1\",\n\n schema: z.object({\n /**\n * The reference to the implementation of the gateway.\n */\n implRef: implementationReferenceSchema.meta({ title: __camelCaseToHumanReadable(\"implRef\"), description: `The reference to the implementation of the gateway.` }),\n }),\n\n meta: {\n color: \"#F57F17\",\n },\n})\n\nexport const tlsIssuerEntity = defineEntity({\n type: \"common.tls-issuer.v1\",\n\n schema: z.object({\n /**\n * The domain apex for which the TLS issuer will manage certificates.\n */\n domain: z.string().meta({ title: __camelCaseToHumanReadable(\"domain\"), description: `The domain apex for which the TLS issuer will manage certificates.` }),\n\n /**\n * The reference to the implementation of the TLS issuer.\n */\n implRef: implementationReferenceSchema.meta({ title: __camelCaseToHumanReadable(\"implRef\"), description: `The reference to the implementation of the TLS issuer.` }),\n }),\n\n meta: {\n color: \"#F57F17\",\n },\n})\n\nexport const accessPointEntity = defineEntity({\n type: \"common.access-point.v1\",\n\n schema: z.object({\n /**\n * The gateway of the access point.\n */\n gateway: gatewayEntity.schema.meta({ title: __camelCaseToHumanReadable(\"gateway\"), description: `The gateway of the access point.` }),\n\n /**\n * The TLS issuers used to manage TLS certificates for the access point.\n */\n tlsIssuers: tlsIssuerEntity.schema.array().meta({ title: __camelCaseToHumanReadable(\"tlsIssuers\"), description: `The TLS issuers used to manage TLS certificates for the access point.` }),\n\n /**\n * The DNS providers used to manage the DNS records for the access point.\n */\n dnsProviders: dns.providerEntity.schema.array().meta({ title: __camelCaseToHumanReadable(\"dnsProviders\"), description: `The DNS providers used to manage the DNS records for the access point.` }),\n }),\n\n meta: {\n color: \"#F57F17\",\n },\n})\n\n/**\n * The access point unit which can be used to connect to services.\n *\n * It can be used to expose services and applications running in Kubernetes clusters or other environments.\n */\nexport const accessPoint = defineUnit({\n type: \"common.access-point.v1\",\n\n inputs: {\n gateway: gatewayEntity,\n tlsIssuers: {\n entity: tlsIssuerEntity,\n required: false,\n multiple: true,\n },\n dnsProviders: {\n entity: dns.providerEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n accessPoint: accessPointEntity,\n },\n\n meta: {\n description: `The access point unit which can be used to connect to services.\n\n It can be used to expose services and applications running in Kubernetes clusters or other environments.`,\n title: \"Access Point\",\n icon: \"mdi:access-point\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/access-point\",\n },\n})\n\nexport type Gateway = z.infer<typeof gatewayEntity.schema>\nexport type AccessPoint = z.infer<typeof accessPointEntity.schema>\nexport type TlsIssuer = z.infer<typeof tlsIssuerEntity.schema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport {\n fileContentSchema as baseFileContentSchema,\n fileMetaSchema as baseFileMetaSchema,\n defineEntity,\n defineUnit,\n unitArtifactSchema,\n z,\n} from \"@highstate/contract\"\nimport { l7EndpointEntity } from \"../network\"\n\nexport const checksumAlgorithmSchema = z.enum([\"md5\", \"sha1\", \"sha256\", \"sha384\", \"sha512\"])\n\nexport const checksumSchema = z.object({\n algorithm: checksumAlgorithmSchema,\n value: z.string(),\n})\n\nexport const fileContentSchema = z.union([\n baseFileContentSchema,\n z.object({\n type: z.literal(\"local\"),\n path: z.string(),\n }),\n z.object({\n type: z.literal(\"remote\"),\n endpoint: l7EndpointEntity.schema,\n checksum: checksumSchema.optional(),\n }),\n])\n\nexport const fileEntity = defineEntity({\n type: \"common.file.v1\",\n\n schema: z.object({\n meta: baseFileMetaSchema,\n content: fileContentSchema,\n }),\n\n meta: {\n color: \"#FF5722\",\n },\n})\n\nexport const folderMetaSchema = z.object({\n name: z.string(),\n mode: z.number().optional(),\n})\n\nexport const folderContentSchema = z.union([\n z.object({\n type: z.literal(\"embedded\"),\n files: fileEntity.schema.array(),\n folders: z\n .object({\n meta: folderMetaSchema,\n get content() {\n return folderContentSchema\n },\n })\n .array(),\n }),\n z.object({\n type: z.literal(\"artifact\"),\n ...unitArtifactSchema.shape,\n }),\n z.object({\n type: z.literal(\"local\"),\n path: z.string(),\n }),\n z.object({\n type: z.literal(\"remote\"),\n endpoint: l7EndpointEntity.schema,\n }),\n])\n\nexport const folderEntity = defineEntity({\n type: \"common.folder.v1\",\n\n schema: z.object({\n meta: folderMetaSchema,\n content: folderContentSchema,\n }),\n\n meta: {\n color: \"#FF9800\",\n },\n})\n\n/**\n * References a file from a remote URL.\n */\nexport const remoteFile = defineUnit({\n type: \"common.remote-file.v1\",\n\n args: {\n /**\n * The URL of the remote file.\n */\n url: $addArgumentDescription(z.string().optional(), `The URL of the remote file.`),\n },\n\n inputs: {\n /**\n * The L7 endpoint of the remote file.\n */\n endpoint: $addInputDescription({\n entity: l7EndpointEntity,\n required: false,\n }, `The L7 endpoint of the remote file.`),\n },\n\n outputs: {\n file: fileEntity,\n },\n\n meta: {\n description: `References a file from a remote URL.`,\n title: \"Remote File\",\n icon: \"mdi:file-download\",\n category: \"Files\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/remote-file\",\n },\n})\n\nexport type File = z.infer<typeof fileEntity.schema>\nexport type FileMeta = z.infer<typeof baseFileMetaSchema>\nexport type FileContent = z.infer<typeof fileContentSchema>\n\nexport type Folder = z.infer<typeof folderEntity.schema>\nexport type FolderMeta = z.infer<typeof folderMetaSchema>\nexport type FolderContent = z.infer<typeof folderContentSchema>\n\nexport type Checksum = z.infer<typeof checksumSchema>\nexport type ChecksumAlgorithm = z.infer<typeof checksumAlgorithmSchema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { $inputs, $secrets, defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { fileEntity } from \"./common/files\"\nimport { l4EndpointEntity, portSchema } from \"./network\"\n\nexport const keyTypeSchema = z.enum([\"ed25519\"])\n\n/**\n * The entity representing an SSH key pair.\n */\nexport const keyPairEntity = defineEntity({\n type: \"ssh.key-pair.v1\",\n\n schema: z.object({\n /**\n * The type of the SSH key.\n *\n * For now, only `ed25519` is supported.\n */\n type: keyTypeSchema.meta({ title: __camelCaseToHumanReadable(\"type\"), description: `The type of the SSH key.\n\n For now, only \\`ed25519\\` is supported.` }),\n\n /**\n * The fingerprint of the SSH key.\n */\n fingerprint: z.string().meta({ title: __camelCaseToHumanReadable(\"fingerprint\"), description: `The fingerprint of the SSH key.` }),\n\n /**\n * The public key in OpenSSH format.\n */\n publicKey: z.string().meta({ title: __camelCaseToHumanReadable(\"publicKey\"), description: `The public key in OpenSSH format.` }),\n\n /**\n * The private key in PEM format.\n */\n privateKey: z.string().meta({ title: __camelCaseToHumanReadable(\"privateKey\"), description: `The private key in PEM format.` }),\n }),\n\n meta: {\n description: `The entity representing an SSH key pair.`,\n color: \"#2b5797\",\n },\n})\n\n/**\n * The schema for the SSH connection configuration.\n *\n * Contains enough information to connect to an SSH server.\n */\nexport const connectionSchema = z.object({\n /**\n * The list of L4 endpoints which can be used to connect to the SSH server.\n */\n endpoints: l4EndpointEntity.schema.array().meta({ title: __camelCaseToHumanReadable(\"endpoints\"), description: `The list of L4 endpoints which can be used to connect to the SSH server.` }),\n\n /**\n * The host key of the SSH server which will be used to verify the server's identity.\n */\n hostKey: z.string().meta({ title: __camelCaseToHumanReadable(\"hostKey\"), description: `The host key of the SSH server which will be used to verify the server's identity.` }),\n\n /**\n * The user to connect as.\n */\n user: z.string().meta({ title: __camelCaseToHumanReadable(\"user\"), description: `The user to connect as.` }),\n\n /**\n * The password to use for authentication.\n */\n password: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"password\"), description: `The password to use for authentication.` }),\n\n /**\n * The SSH key pair to use for authentication.\n */\n keyPair: keyPairEntity.schema.optional().meta({ title: __camelCaseToHumanReadable(\"keyPair\"), description: `The SSH key pair to use for authentication.` }),\n})\n\nexport const argsSchema = z.object({\n /**\n * Whether the SSH is enabled on the server.\n *\n * If set to `false`, all SSH-related functionality will be disabled.\n */\n enabled: z.boolean().default(true).meta({ title: __camelCaseToHumanReadable(\"enabled\"), description: `Whether the SSH is enabled on the server.\n\n If set to \\`false\\`, all SSH-related functionality will be disabled.` }),\n\n /**\n * The alternate host to connect to.\n */\n host: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"host\"), description: `The alternate host to connect to.` }),\n\n /**\n * The SSH port to connect to.\n */\n port: portSchema.default(22).meta({ title: __camelCaseToHumanReadable(\"port\"), description: `The SSH port to connect to.` }),\n\n /**\n * The SSH user to connect as.\n */\n user: z.string().default(\"root\").meta({ title: __camelCaseToHumanReadable(\"user\"), description: `The SSH user to connect as.` }),\n})\n\nexport const secrets = $secrets({\n /**\n * The SSH private key in PEM format.\n */\n sshPrivateKey: z.string().optional().meta({ multiline: true }),\n\n /**\n * The SSH password to use for authentication.\n */\n sshPassword: z.string().optional(),\n})\n\nexport const inputs = $inputs({\n /**\n * The SSH key pair to use for authentication.\n */\n sshKeyPair: {\n entity: keyPairEntity,\n required: false,\n },\n})\n\n/**\n * Holds the ED25519 SSH key pair and generates the private key if not provided.\n */\nexport const keyPair = defineUnit({\n type: \"ssh.key-pair.v1\",\n\n secrets: {\n /**\n * The SSH private key in PEM format.\n *\n * If not provided, a new key pair will be generated and stored.\n */\n privateKey: $addArgumentDescription(z.string().optional().meta({ multiline: true }), `The SSH private key in PEM format.\n\n If not provided, a new key pair will be generated and stored.`),\n },\n\n outputs: {\n keyPair: keyPairEntity,\n publicKeyFile: fileEntity,\n },\n\n meta: {\n description: `Holds the ED25519 SSH key pair and generates the private key if not provided.`,\n title: \"SSH Key Pair\",\n category: \"ssh\",\n icon: \"charm:key\",\n iconColor: \"#ffffff\",\n secondaryIcon: \"mdi:lock\",\n secondaryIconColor: \"#ffffff\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/ssh/key-pair\",\n },\n})\n\nexport type Args = z.infer<typeof argsSchema>\nexport type KeyType = z.infer<typeof keyTypeSchema>\nexport type KeyPair = z.infer<typeof keyPairEntity.schema>\nexport type Connection = z.infer<typeof connectionSchema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { $outputs, $secrets, defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport * as dns from \"../dns\"\nimport { l3EndpointEntity } from \"../network\"\nimport * as ssh from \"../ssh\"\nimport { arrayPatchModeSchema } from \"../utils\"\n\n/**\n * The server entity represents a server with its hostname, endpoints, and optional SSH configuration.\n *\n * The OS of the server is not specified (but in most cases it will one of the Linux distributions).\n *\n * In fact, anything that have hostname (which can be any string) and L3 endpoints can be represented by this entity.\n */\nexport const serverEntity = defineEntity({\n type: \"common.server.v1\",\n\n schema: z.object({\n hostname: z.string(),\n endpoints: l3EndpointEntity.schema.array(),\n ssh: ssh.connectionSchema.optional(),\n }),\n\n meta: {\n description: `The server entity represents a server with its hostname, endpoints, and optional SSH configuration.\n\n The OS of the server is not specified (but in most cases it will one of the Linux distributions).\n\n In fact, anything that have hostname (which can be any string) and L3 endpoints can be represented by this entity.`,\n color: \"#009688\",\n },\n})\n\n/**\n * The common outputs for units which create or modify a server.\n */\nexport const serverOutputs = $outputs({\n /**\n * The server entity representing the server.\n */\n server: serverEntity,\n\n /**\n * The L3 endpoints of the server.\n */\n endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n})\n\nexport const vmSshArgs = ssh.argsSchema.omit({ user: true }).prefault({})\n\nexport const vmSecrets = $secrets({\n /**\n * The root password for the virtual machine.\n *\n * If not specified, will be generated automatically.\n */\n rootPassword: z.string().optional(),\n\n /**\n * The SSH private for the `root` user of the virtual machine in PEM format.\n *\n * If not specified or provided via `keyPair`, will be generated automatically.\n */\n sshPrivateKey: ssh.secrets.sshPrivateKey,\n})\n\n/**\n * The existing server created outside of the Highstate.\n */\nexport const existingServer = defineUnit({\n type: \"common.existing-server.v1\",\n\n args: {\n /**\n * The endpoint of the server.\n *\n * Takes precedence over the `endpoint` input.\n */\n endpoint: $addArgumentDescription(z.string().optional(), `The endpoint of the server.\n\n Takes precedence over the \\`endpoint\\` input.`),\n\n /**\n * The SSH confuguration for the server.\n */\n ssh: $addArgumentDescription(ssh.argsSchema.prefault({}), `The SSH confuguration for the server.`),\n },\n\n secrets: {\n ...ssh.secrets,\n },\n\n inputs: {\n endpoint: {\n entity: l3EndpointEntity,\n required: false,\n },\n\n ...ssh.inputs,\n },\n\n outputs: serverOutputs,\n\n meta: {\n description: `The existing server created outside of the Highstate.`,\n title: \"Existing Server\",\n icon: \"mdi:server\",\n defaultNamePrefix: \"server\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/existing-server\",\n },\n})\n\n/**\n * Patches some properties of the server and outputs the updated server.\n */\nexport const serverPatch = defineUnit({\n type: \"common.server-patch.v1\",\n\n args: {\n /**\n * The endpoints of the server.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same server may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n endpoints: $addArgumentDescription(z.string().array().default([]), `The endpoints of the server.\n\n The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n\n The same server may also be represented by multiple entries (e.g. a node with private and public IP).`),\n\n /**\n * The mode to use for patching the endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n endpointsPatchMode: $addArgumentDescription(arrayPatchModeSchema.default(\"prepend\"), `The mode to use for patching the endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`),\n },\n\n inputs: {\n server: serverEntity,\n endpoints: {\n entity: l3EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n ...serverOutputs,\n },\n\n meta: {\n description: `Patches some properties of the server and outputs the updated server.`,\n title: \"Server Patch\",\n icon: \"mdi:server\",\n secondaryIcon: \"fluent:patch-20-filled\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/server-patch\",\n },\n})\n\n/**\n * Creates a DNS record for the server and updates the endpoints.\n *\n * The DNS record will be created with the provided FQDN and the endpoints will be updated with the DNS record.\n */\nexport const serverDns = defineUnit({\n type: \"common.server-dns.v1\",\n\n args: dns.createArgs(),\n\n inputs: {\n server: serverEntity,\n ...dns.inputs,\n },\n\n outputs: {\n server: serverEntity,\n endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n description: `Creates a DNS record for the server and updates the endpoints.\n\n The DNS record will be created with the provided FQDN and the endpoints will be updated with the DNS record.`,\n title: \"Server DNS\",\n icon: \"mdi:server\",\n secondaryIcon: \"mdi:dns\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/server-dns\",\n },\n})\n\n/**\n * Runs a shell script on the server.\n */\nexport const script = defineUnit({\n type: \"common.script.v1\",\n\n args: {\n script: z.string().meta({ language: \"shell\" }),\n updateScript: z.string().optional().meta({ language: \"shell\" }),\n deleteScript: z.string().optional().meta({ language: \"shell\" }),\n },\n\n inputs: {\n server: serverEntity,\n },\n\n outputs: {\n server: serverEntity,\n },\n\n meta: {\n description: `Runs a shell script on the server.`,\n title: \"Shell Script\",\n icon: \"mdi:bash\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"units/script\",\n },\n})\n\nexport type Server = z.infer<typeof serverEntity.schema>\n","export * from \"./mariadb\"\nexport * from \"./mongodb\"\nexport * from \"./postgresql\"\nexport * from \"./shared\"\n","import { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { $args, $inputs, $secrets, z } from \"@highstate/contract\"\nimport { l4EndpointEntity } from \"../network\"\n\nexport const sharedSchema = z.object({\n /**\n * The endpoints to connect to the database.\n */\n endpoints: l4EndpointEntity.schema.array().meta({ title: __camelCaseToHumanReadable(\"endpoints\"), description: `The endpoints to connect to the database.` }),\n\n /**\n * The username to connect to the database with.\n */\n username: z.string().meta({ title: __camelCaseToHumanReadable(\"username\"), description: `The username to connect to the database with.` }),\n\n /**\n * The password to connect to the database with.\n */\n password: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"password\"), description: `The password to connect to the database with.` }),\n\n /**\n * The name of the database to connect to.\n */\n database: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"database\"), description: `The name of the database to connect to.` }),\n})\n\nexport const sharedArgs = $args({\n /**\n * The endpoints to connect to the database in form of `host:port`.\n */\n endpoints: z.string().array().min(1),\n\n /**\n * The username to connect to the database with.\n *\n * If not provided, defaults to `root`.\n */\n username: z.string().default(\"root\"),\n\n /**\n * The name of the database to connect to.\n */\n database: z.string().optional(),\n})\n\nexport const sharedSecrets = $secrets({\n /**\n * The password to connect to the database with.\n */\n password: z.string().optional(),\n})\n\nexport const sharedInputs = $inputs({\n /**\n * The endpoints to connect to the database.\n */\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n required: false,\n },\n})\n","import { defineEntity, defineUnit, type z } from \"@highstate/contract\"\nimport { sharedArgs, sharedInputs, sharedSchema, sharedSecrets } from \"./shared\"\n\n/**\n * Represents the MariaDB database or virtual database behind it.\n */\nexport const mariadbEntity = defineEntity({\n type: \"databases.mariadb.v1\",\n\n schema: sharedSchema,\n\n meta: {\n description: `Represents the MariaDB database or virtual database behind it.`,\n color: \"#f06292\",\n },\n})\n\n/**\n * The existing MariaDB database or virtual database behind it.\n */\nexport const existingMariadb = defineUnit({\n type: \"databases.mariadb.existing.v1\",\n\n args: sharedArgs,\n secrets: sharedSecrets,\n inputs: sharedInputs,\n\n outputs: {\n mariadb: mariadbEntity,\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"databases/existing-mariadb\",\n },\n\n meta: {\n description: `The existing MariaDB database or virtual database behind it.`,\n },\n})\n\nexport type MariaDB = z.infer<typeof mariadbEntity.schema>\n","import { defineEntity, defineUnit, type z } from \"@highstate/contract\"\nimport { sharedArgs, sharedInputs, sharedSchema, sharedSecrets } from \"./shared\"\n\n/**\n * Represents the MongoDB database or virtual database behind it.\n */\nexport const mongodbEntity = defineEntity({\n type: \"databases.mongodb.v1\",\n\n schema: sharedSchema,\n\n meta: {\n description: `Represents the MongoDB database or virtual database behind it.`,\n color: \"#13aa52\",\n },\n})\n\n/**\n * The existing MongoDB database or virtual database behind it.\n */\nexport const existingMongodb = defineUnit({\n type: \"databases.mongodb.existing.v1\",\n\n args: sharedArgs,\n secrets: sharedSecrets,\n inputs: sharedInputs,\n\n outputs: {\n mongodb: mongodbEntity,\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"databases/existing-mongodb\",\n },\n\n meta: {\n description: `The existing MongoDB database or virtual database behind it.`,\n },\n})\n\nexport type MongoDB = z.infer<typeof mongodbEntity.schema>\n","import { defineEntity, defineUnit, type z } from \"@highstate/contract\"\nimport { sharedArgs, sharedInputs, sharedSchema, sharedSecrets } from \"./shared\"\n\n/**\n * Represents the PostgreSQL database or virtual database behind it.\n */\nexport const postgresqlEntity = defineEntity({\n type: \"databases.postgresql.v1\",\n\n schema: sharedSchema,\n\n meta: {\n description: `Represents the PostgreSQL database or virtual database behind it.`,\n color: \"#336791\",\n },\n})\n\n/**\n * The existing PostgreSQL database or virtual database behind it.\n */\nexport const existingPostgresql = defineUnit({\n type: \"databases.postgresql.existing.v1\",\n\n args: sharedArgs,\n secrets: sharedSecrets,\n inputs: sharedInputs,\n\n outputs: {\n postgresql: postgresqlEntity,\n },\n\n source: {\n package: \"@highstate/common\",\n path: \"databases/existing-postgresql\",\n },\n\n meta: {\n description: `The existing PostgreSQL database or virtual database behind it.`,\n },\n})\n\nexport type PostgreSQL = z.infer<typeof postgresqlEntity.schema>\n","export * from \"./ubuntu\"\n","import { defineUnit, z } from \"@highstate/contract\"\nimport { fileEntity } from \"../common/files\"\n\nexport const ubuntuVersionSchema = z.enum([\"22.04\", \"24.04\", \"25.04\", \"25.10\"])\nexport const ubuntuArchitectureSchema = z.enum([\"amd64\", \"arm64\"])\n\n/**\n * Ubuntu distribution with image and cloud-config.\n */\nexport const ubuntu = defineUnit({\n type: \"distributions.ubuntu.v1\",\n\n args: {\n version: ubuntuVersionSchema.default(\"24.04\"),\n architecture: ubuntuArchitectureSchema.default(\"amd64\"),\n },\n\n outputs: {\n image: fileEntity,\n cloudConfig: fileEntity,\n },\n\n meta: {\n description: `Ubuntu distribution with image and cloud-config.`,\n title: \"Ubuntu\",\n icon: \"mdi:ubuntu\",\n iconColor: \"#E95420\",\n category: \"Distributions\",\n },\n\n source: {\n package: \"@highstate/distributions\",\n path: \"ubuntu\",\n },\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { folderEntity } from \"./common/files\"\nimport { l7EndpointEntity } from \"./network\"\n\n/**\n * References a remote Git repository.\n *\n * The repository will be cloned or fetched from the specified URL and the content will be packed into a folder.\n */\nexport const remoteRepository = defineUnit({\n type: \"git.remote-repository.v1\",\n\n args: {\n /**\n * The URL of the remote repository.\n */\n url: $addArgumentDescription(z.string().optional(), `The URL of the remote repository.`),\n\n /**\n * The ref of the remote repository to checkout.\n *\n * If not specified, the default branch will be used.\n */\n ref: $addArgumentDescription(z.string().optional(), `The ref of the remote repository to checkout.\n\n If not specified, the default branch will be used.`),\n\n /**\n * Whether to include the .git directory in the packed artifact.\n *\n * Do not enable this unless you need the full git history.\n */\n includeGit: $addArgumentDescription(z.boolean().default(false), `Whether to include the .git directory in the packed artifact.\n\n Do not enable this unless you need the full git history.`),\n },\n\n inputs: {\n /**\n * The L7 endpoint of the remote repository.\n */\n endpoint: $addInputDescription({\n entity: l7EndpointEntity,\n required: false,\n }, `The L7 endpoint of the remote repository.`),\n },\n\n outputs: {\n /**\n * The folder containing the repository content.\n */\n folder: $addInputDescription(folderEntity, `The folder containing the repository content.`),\n },\n\n meta: {\n description: `References a remote Git repository.\n\n The repository will be cloned or fetched from the specified URL and the content will be packed into a folder.`,\n title: \"Git Remote Repository\",\n icon: \"simple-icons:git\",\n iconColor: \"#f1502f\",\n category: \"Git\",\n },\n\n source: {\n package: \"@highstate/git\",\n path: \"remote-repository\",\n },\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { clusterInputs, clusterOutputs } from \"./k8s/shared\"\n\nexport const packagedComponents = [\n \"coredns\",\n \"servicelb\",\n \"traefik\",\n \"local-storage\",\n \"metrics-server\",\n \"runtimes\",\n] as const\n\nexport const internalComponents = [\n \"scheduler\",\n \"cloud-controller\",\n \"kube-proxy\",\n \"network-policy\",\n \"helm-controller\",\n] as const\n\nexport const componentSchema = z.enum([...packagedComponents, ...internalComponents])\n\nexport const cniSchema = z.enum([\"none\", \"flannel\"])\n\n/**\n * The K3s cluster created on top of the server.\n */\nexport const cluster = defineUnit({\n type: \"k3s.cluster.v1\",\n\n args: {\n /**\n * The components to disable in the K3S cluster.\n */\n disabledComponents: $addArgumentDescription(componentSchema.array().default([]), `The components to disable in the K3S cluster.`),\n\n /**\n * The CNI to use in the K3S cluster.\n *\n * Setting this to \"none\" will disable default Flannel CNI, but will not disable network policy controller and kube-proxy.\n * If needed, you can disable them using `disabledComponents` argument.\n */\n cni: $addArgumentDescription(cniSchema.default(\"flannel\"), `The CNI to use in the K3S cluster.\n\n Setting this to \"none\" will disable default Flannel CNI, but will not disable network policy controller and kube-proxy.\n If needed, you can disable them using \\`disabledComponents\\` argument.`),\n\n /**\n * The K3S configuration to pass to each server or agent in the cluster.\n *\n * See: https://docs.k3s.io/installation/configuration\n */\n config: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The K3S configuration to pass to each server or agent in the cluster.\n\n See: https://docs.k3s.io/installation/configuration`),\n\n /**\n * The configuration of the registries to use for the K3S cluster.\n *\n * See: https://docs.k3s.io/installation/private-registry\n */\n registries: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The configuration of the registries to use for the K3S cluster.\n\n See: https://docs.k3s.io/installation/private-registry`),\n },\n\n inputs: clusterInputs,\n outputs: clusterOutputs,\n\n meta: {\n description: `The K3s cluster created on top of the server.`,\n title: \"K3s Cluster\",\n category: \"k3s\",\n icon: \"devicon:k3s\",\n secondaryIcon: \"devicon:kubernetes\",\n },\n\n source: {\n package: \"@highstate/k3s\",\n path: \"cluster\",\n },\n})\n","import { defineEntity, z } from \"@highstate/contract\"\n\n/**\n * The generic metadata schema for Kubernetes resources.\n */\nexport const metadataSchema = z.object({\n name: z.string(),\n labels: z.record(z.string(), z.string()).optional(),\n annotations: z.record(z.string(), z.string()).optional(),\n uid: z.string(),\n})\n\n/**\n * The metadata schema for Kubernetes resources that are scoped to a namespace.\n *\n * It includes the namespace field.\n */\nexport const scopedMetadataSchema = z.object({\n ...metadataSchema.shape,\n namespace: z.string(),\n})\n\n/**\n * The base schema for Kubernetes resources.\n *\n * It includes the cluster ID and name, which are required for all Kubernetes resources.\n */\nexport const resourceSchema = z.object({\n clusterId: z.string(),\n clusterName: z.string(),\n type: z.string(),\n metadata: metadataSchema,\n})\n\n/**\n * The schema for Kubernetes resources that are scoped to a namespace.\n *\n * Extends the base resource schema with the scoped metadata.\n */\nexport const scopedResourceSchema = z.object({\n ...resourceSchema.shape,\n metadata: scopedMetadataSchema,\n})\n\n/**\n * The entity which represents a Kubernetes namespace managed by Highstate.\n */\nexport const namespaceEntity = defineEntity({\n type: \"k8s.namespace.v1\",\n\n schema: z.object({\n ...resourceSchema.shape,\n type: z.literal(\"namespace\"),\n }),\n\n meta: {\n description: `The entity which represents a Kubernetes namespace managed by Highstate.`,\n color: \"#9E9E9E\",\n },\n})\n\n/**\n * The entity which represents a Kubernetes persistent volume claim managed by Highstate.\n */\nexport const persistentVolumeClaimEntity = defineEntity({\n type: \"k8s.persistent-volume-claim.v1\",\n\n schema: z.object({\n ...scopedResourceSchema.shape,\n type: z.literal(\"persistent-volume-claim\"),\n }),\n\n meta: {\n description: `The entity which represents a Kubernetes persistent volume claim managed by Highstate.`,\n color: \"#FFC107\",\n },\n})\n\n/**\n * The entity which represents a Gateway resource from the Gateway API.\n */\nexport const gatewayEntity = defineEntity({\n type: \"k8s.gateway.v1\",\n\n schema: z.object({\n ...scopedResourceSchema.shape,\n type: z.literal(\"gateway\"),\n }),\n\n meta: {\n description: `The entity which represents a Gateway resource from the Gateway API.`,\n color: \"#4CAF50\",\n },\n})\n\nexport const certificateEntity = defineEntity({\n type: \"k8s.certificate.v1\",\n\n schema: z.object({\n ...scopedResourceSchema.shape,\n type: z.literal(\"certificate\"),\n }),\n})\n\nexport type Metadata = z.infer<typeof metadataSchema>\nexport type Resource = z.infer<typeof resourceSchema>\n\nexport type ScopedMetadata = z.infer<typeof scopedMetadataSchema>\nexport type ScopedResource = z.infer<typeof scopedResourceSchema>\n\nexport type Namespace = z.infer<typeof namespaceEntity.schema>\nexport type PersistentVolumeClaim = z.infer<typeof persistentVolumeClaimEntity.schema>\nexport type Gateway = z.infer<typeof gatewayEntity.schema>\nexport type Certificate = z.infer<typeof certificateEntity.schema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { $args, defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { serverEntity } from \"../common\"\nimport * as dns from \"../dns\"\nimport { implementationReferenceSchema } from \"../impl-ref\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"../network\"\nimport { arrayPatchModeSchema } from \"../utils\"\nimport { scopedResourceSchema } from \"./resources\"\n\nexport const fallbackKubeApiAccessSchema = z.object({\n serverIp: z.string(),\n serverPort: z.number(),\n})\n\nexport const tunDevicePolicySchema = z.union([\n z.object({\n type: z.literal(\"host\"),\n }),\n z.object({\n type: z.literal(\"plugin\"),\n resourceName: z.string(),\n resourceValue: z.string(),\n }),\n])\n\nexport const externalServiceTypeSchema = z.enum([\"NodePort\", \"LoadBalancer\"])\nexport const scheduleOnMastersPolicySchema = z.enum([\"always\", \"when-no-workers\", \"never\"])\n\nexport const clusterQuirksSchema = z.object({\n /**\n * The IP and port of the kube-apiserver available from the cluster.\n *\n * Will be used to create fallback network policy in CNIs which does not support allowing access to the kube-apiserver.\n */\n fallbackKubeApiAccess: fallbackKubeApiAccessSchema.optional().meta({ title: __camelCaseToHumanReadable(\"fallbackKubeApiAccess\"), description: `The IP and port of the kube-apiserver available from the cluster.\n\n Will be used to create fallback network policy in CNIs which does not support allowing access to the kube-apiserver.` }),\n\n /**\n * Specifies the policy for using the tun device inside containers.\n *\n * If not provided, the default policy is `host` which assumes just mounting /dev/net/tun from the host.\n *\n * For some runtimes, like Talos's one, the /dev/net/tun device is not available in the host, so the plugin policy should be used.\n */\n tunDevicePolicy: tunDevicePolicySchema.optional().meta({ title: __camelCaseToHumanReadable(\"tunDevicePolicy\"), description: `Specifies the policy for using the tun device inside containers.\n\n If not provided, the default policy is \\`host\\` which assumes just mounting /dev/net/tun from the host.\n\n For some runtimes, like Talos's one, the /dev/net/tun device is not available in the host, so the plugin policy should be used.` }),\n\n /**\n * The service type to use for external services.\n *\n * If not provided, the default service type is `NodePort` since `LoadBalancer` may not be available.\n */\n externalServiceType: externalServiceTypeSchema.optional().meta({ title: __camelCaseToHumanReadable(\"externalServiceType\"), description: `The service type to use for external services.\n\n If not provided, the default service type is \\`NodePort\\` since \\`LoadBalancer\\` may not be available.` }),\n})\n\nexport const clusterInfoProperties = {\n /**\n * The unique identifier of the cluster.\n *\n * Should be defined as a `uid` of the `kube-system` namespace which is always present in the cluster.\n */\n id: z.string(),\n\n /**\n * The ID of the connection to the cluster.\n *\n * If not explicitly set, should be the same as the cluster ID.\n *\n * When reducing cluster access, the `uid` of the service account should be used instead.\n */\n connectionId: z.string(),\n\n /**\n * The name of the cluster.\n */\n name: z.string(),\n\n /**\n * The optional reference to the network policy implementation.\n *\n * If not provided, the native Kubernetes NetworkPolicy implementation will be used.\n */\n networkPolicyImplRef: implementationReferenceSchema.optional(),\n\n /**\n * The endpoints of the cluster nodes.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same node may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n endpoints: l3EndpointEntity.schema.array(),\n\n /**\n * The endpoints of the API server.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same node may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n apiEndpoints: l4EndpointEntity.schema.array(),\n\n /**\n * The external IPs of the cluster nodes allowed to be used for external access.\n */\n externalIps: z.string().array(),\n\n /**\n * The extra quirks of the cluster to improve compatibility.\n */\n quirks: clusterQuirksSchema.optional(),\n\n /**\n * The extra metadata to attach to the cluster.\n */\n metadata: z.record(z.string(), z.unknown()).optional(),\n} as const\n\nexport const clusterEntity = defineEntity({\n type: \"k8s.cluster.v1\",\n\n schema: z.object({\n ...clusterInfoProperties,\n kubeconfig: z.string(),\n }),\n\n meta: {\n color: \"#2196F3\",\n },\n})\n\nexport const internalIpsPolicySchema = z.enum([\"always\", \"public\", \"never\"])\n\nexport const scheduleOnMastersPolicyArgs = $args({\n /**\n * The policy for scheduling workloads on master nodes.\n *\n * - `always`: always schedule workloads on master nodes regardless of the number of workers;\n * - `when-no-workers`: schedule workloads on master nodes only if there are no workers (default);\n * - `never`: never schedule workloads on master nodes.\n */\n scheduleOnMastersPolicy: scheduleOnMastersPolicySchema.default(\"when-no-workers\"),\n})\n\nexport const clusterInputs = {\n masters: {\n entity: serverEntity,\n multiple: true,\n },\n workers: {\n entity: serverEntity,\n multiple: true,\n required: false,\n },\n} as const\n\nexport const clusterOutputs = {\n k8sCluster: clusterEntity,\n apiEndpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n },\n} as const\n\n/**\n * The existing Kubernetes cluster created outside of the Highstate.\n */\nexport const existingCluster = defineUnit({\n type: \"k8s.existing-cluster.v1\",\n\n args: {\n /**\n * The list of external IPs of the cluster nodes allowed to be used for external access.\n *\n * If not provided, will be automatically detected by querying the cluster nodes.\n */\n externalIps: $addArgumentDescription(z.string().array().optional(), `The list of external IPs of the cluster nodes allowed to be used for external access.\n\n If not provided, will be automatically detected by querying the cluster nodes.`),\n\n /**\n * The policy for using internal IPs of the nodes as external IPs.\n *\n * - `always`: always use internal IPs as external IPs;\n * - `public`: use internal IPs as external IPs only if they are (theoretically) routable from the public internet **(default)**;\n * - `never`: never use internal IPs as external IPs.\n */\n internalIpsPolicy: $addArgumentDescription(internalIpsPolicySchema.default(\"public\"), `The policy for using internal IPs of the nodes as external IPs.\n\n - \\`always\\`: always use internal IPs as external IPs;\n - \\`public\\`: use internal IPs as external IPs only if they are (theoretically) routable from the public internet **(default)**;\n - \\`never\\`: never use internal IPs as external IPs.`),\n\n /**\n * The extra quirks of the cluster to improve compatibility.\n */\n quirks: $addArgumentDescription(clusterQuirksSchema.optional(), `The extra quirks of the cluster to improve compatibility.`),\n },\n\n secrets: {\n /**\n * The kubeconfig of the cluster to use for connecting to the cluster.\n *\n * Will be available for all components using `cluster` output of this unit.\n */\n kubeconfig: $addArgumentDescription(z.record(z.string(), z.unknown()), `The kubeconfig of the cluster to use for connecting to the cluster.\n\n Will be available for all components using \\`cluster\\` output of this unit.`),\n },\n\n outputs: clusterOutputs,\n\n meta: {\n description: `The existing Kubernetes cluster created outside of the Highstate.`,\n title: \"Existing Cluster\",\n icon: \"devicon:kubernetes\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/existing-cluster\",\n },\n})\n\n/**\n * Patches some properties of the cluster and outputs the updated cluster.\n */\nexport const clusterPatch = defineUnit({\n type: \"k8s.cluster-patch.v1\",\n\n args: {\n /**\n * The endpoints of the API server.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same node may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n apiEndpoints: $addArgumentDescription(z.string().array().default([]), `The endpoints of the API server.\n\n The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n\n The same node may also be represented by multiple entries (e.g. a node with private and public IP).`),\n\n /**\n * The mode to use for patching the API endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n apiEndpointsPatchMode: $addArgumentDescription(arrayPatchModeSchema.default(\"prepend\"), `The mode to use for patching the API endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`),\n\n /**\n * The endpoints of the cluster nodes.\n *\n * The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n *\n * The same node may also be represented by multiple entries (e.g. a node with private and public IP).\n */\n endpoints: $addArgumentDescription(z.string().array().default([]), `The endpoints of the cluster nodes.\n\n The entry may represent real node endpoint or virtual endpoint (like a load balancer).\n\n The same node may also be represented by multiple entries (e.g. a node with private and public IP).`),\n\n /**\n * The mode to use for patching the endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n endpointsPatchMode: $addArgumentDescription(arrayPatchModeSchema.default(\"prepend\"), `The mode to use for patching the endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`),\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n apiEndpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n endpoints: {\n entity: l3EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: clusterOutputs,\n\n meta: {\n description: `Patches some properties of the cluster and outputs the updated cluster.`,\n title: \"Cluster Patch\",\n icon: \"devicon:kubernetes\",\n secondaryIcon: \"fluent:patch-20-filled\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/cluster-patch\",\n },\n})\n\n/**\n * Creates a set of DNS records for the cluster and updates the endpoints.\n */\nexport const clusterDns = defineUnit({\n type: \"k8s.cluster-dns.v1\",\n\n args: {\n ...dns.createArgs(),\n ...dns.createArgs(\"api\"),\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n ...dns.inputs,\n },\n\n outputs: clusterOutputs,\n\n meta: {\n description: `Creates a set of DNS records for the cluster and updates the endpoints.`,\n title: \"Cluster DNS\",\n icon: \"devicon:kubernetes\",\n secondaryIcon: \"mdi:dns\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/cluster-dns\",\n },\n})\n\nexport const monitorWorkerResourceGroupSchema = z.object({\n type: z.enum([\"deployment\", \"statefulset\", \"pod\", \"service\"]),\n namespace: z.string(),\n names: z.string().array().optional(),\n})\n\nexport const monitorWorkerParamsSchema = z.object({\n /**\n * The content of the kubeconfig to use for monitoring.\n */\n kubeconfig: z.string().meta({ title: __camelCaseToHumanReadable(\"kubeconfig\"), description: `The content of the kubeconfig to use for monitoring.` }),\n\n /**\n * The resources to monitor in the cluster.\n */\n resources: scopedResourceSchema.array().meta({ title: __camelCaseToHumanReadable(\"resources\"), description: `The resources to monitor in the cluster.` }),\n})\n\nexport type Cluster = z.infer<typeof clusterEntity.schema>\n\nexport type InternalIpsPolicy = z.infer<typeof internalIpsPolicySchema>\n\nexport type MonitorWorkerParams = z.infer<typeof monitorWorkerParamsSchema>\nexport type MonitorWorkerResourceGroup = z.infer<typeof monitorWorkerResourceGroupSchema>\n","export * as apps from \"./apps\"\nexport * from \"./cert-manager\"\nexport * from \"./cilium\"\nexport * from \"./gateway\"\nexport * as obfuscators from \"./obfuscators\"\nexport * from \"./resources\"\nexport * from \"./service\"\nexport * from \"./shared\"\nexport * from \"./workload\"\n","export * from \"./code-server\"\nexport * from \"./grocy\"\nexport * from \"./hubble\"\nexport * from \"./kubernetes-dashboard\"\nexport * from \"./mariadb\"\nexport * from \"./maybe\"\nexport * from \"./mongodb\"\nexport * from \"./postgresql\"\nexport {\n appName,\n optionalSharedArgs,\n optionalSharedInputs,\n sharedArgs,\n sharedInputs,\n} from \"./shared\"\nexport * from \"./syncthing\"\n// export * from \"./zitadel\"\n// export * from \"./gitea\"\nexport * from \"./traefik\"\nexport * from \"./vaultwarden\"\nexport * from \"./workload\"\n","import { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, z } from \"@highstate/contract\"\nimport { l4EndpointEntity } from \"../network\"\nimport { scopedResourceSchema } from \"./resources\"\n\nexport const endpointServiceMetadataSchema = z.object({\n \"k8s.service\": z.object({\n /**\n * The ID of the cluster where the service is located.\n */\n clusterId: z.string().meta({ title: __camelCaseToHumanReadable(\"clusterId\"), description: `The ID of the cluster where the service is located.` }),\n\n /**\n * The name of the cluster where the service is located.\n */\n clusterName: z.string().meta({ title: __camelCaseToHumanReadable(\"clusterName\"), description: `The name of the cluster where the service is located.` }),\n\n /**\n * The name of the service.\n */\n name: z.string().meta({ title: __camelCaseToHumanReadable(\"name\"), description: `The name of the service.` }),\n\n /**\n * The namespace of the service.\n */\n namespace: z.string().meta({ title: __camelCaseToHumanReadable(\"namespace\"), description: `The namespace of the service.` }),\n\n /**\n * The selector of the service.\n */\n selector: z.record(z.string(), z.string()).meta({ title: __camelCaseToHumanReadable(\"selector\"), description: `The selector of the service.` }),\n\n /**\n * The target port of the service.\n */\n targetPort: z.union([z.string(), z.number()]).meta({ title: __camelCaseToHumanReadable(\"targetPort\"), description: `The target port of the service.` }),\n }),\n})\n\nexport const serviceEndpointSchema = z.intersection(\n l4EndpointEntity.schema,\n z.object({\n metadata: endpointServiceMetadataSchema,\n }),\n)\n\nexport const serviceEntity = defineEntity({\n type: \"k8s.service.v1\",\n\n schema: z.object({\n ...scopedResourceSchema.shape,\n type: z.literal(\"service\"),\n endpoints: serviceEndpointSchema.array(),\n }),\n\n meta: {\n color: \"#2196F3\",\n },\n})\n\nexport const serviceTypeSchema = z.enum([\"NodePort\", \"LoadBalancer\", \"ClusterIP\"])\n\nexport type EndpointServiceMetadata = z.infer<typeof endpointServiceMetadataSchema>\nexport type ServiceEndpoint = z.infer<typeof serviceEndpointSchema>\nexport type ServiceType = z.infer<typeof serviceTypeSchema>\nexport type Service = z.infer<typeof serviceEntity.schema>\n","import { defineEntity, z } from \"@highstate/contract\"\nimport { scopedResourceSchema } from \"./resources\"\nimport { serviceEntity } from \"./service\"\n\n/**\n * The entity which represents a Kubernetes deployment managed by Highstate.\n *\n * Also includes a service associated with the deployment.\n */\nexport const deploymentEntity = defineEntity({\n type: \"k8s.deployment.v1\",\n\n schema: z.object({\n ...scopedResourceSchema.shape,\n type: z.literal(\"deployment\"),\n service: serviceEntity.schema.optional(),\n }),\n\n meta: {\n description: `The entity which represents a Kubernetes deployment managed by Highstate.\n\n Also includes a service associated with the deployment.`,\n color: \"#4CAF50\",\n },\n})\n\n/**\n * The entity which represents a Kubernetes stateful set managed by Highstate.\n *\n * Also includes a service associated with the stateful set.\n */\nexport const statefulSetEntity = defineEntity({\n type: \"k8s.stateful-set.v1\",\n\n schema: z.object({\n ...scopedResourceSchema.shape,\n type: z.literal(\"stateful-set\"),\n service: serviceEntity.schema,\n }),\n\n meta: {\n description: `The entity which represents a Kubernetes stateful set managed by Highstate.\n\n Also includes a service associated with the stateful set.`,\n color: \"#FFC107\",\n },\n})\n\n/**\n * The entity which represents a Kubernetes workload exposed via a service.\n *\n * It can be either a deployment or a stateful set.\n */\nexport const exposableWorkloadEntity = defineEntity({\n type: \"k8s.exposable-workload.v1\",\n\n schema: z.union([deploymentEntity.schema, statefulSetEntity.schema]),\n\n meta: {\n description: `The entity which represents a Kubernetes workload exposed via a service.\n\n It can be either a deployment or a stateful set.`,\n color: \"#4CAF50\",\n },\n})\n\n/**\n * The network interface in a network namespace of the pod which can accept and transmit network traffic.\n */\nexport const networkInterfaceEntity = defineEntity({\n type: \"k8s.network-interface.v1\",\n\n schema: z.object({\n name: z.string(),\n workload: exposableWorkloadEntity.schema,\n }),\n\n meta: {\n description: `The network interface in a network namespace of the pod which can accept and transmit network traffic.`,\n color: \"#2196F3\",\n },\n})\n\nexport type Deployment = z.infer<typeof deploymentEntity.schema>\nexport type StatefulSet = z.infer<typeof statefulSetEntity.schema>\nexport type ExposableWorkload = z.infer<typeof exposableWorkloadEntity.schema>\nexport type NetworkInterface = z.infer<typeof networkInterfaceEntity.schema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"./network\"\n\nexport const repositoryEntity = defineEntity({\n type: \"restic.repository.v1\",\n\n schema: z.object({\n remoteEndpoints: z.union([l3EndpointEntity.schema, l4EndpointEntity.schema]).array(),\n\n type: z.literal(\"rclone\"),\n rcloneConfig: z.string(),\n remoteName: z.string(),\n pathPattern: z.string(),\n }),\n\n meta: {\n color: \"#e56901\",\n },\n})\n\n/**\n * Holds the configuration for a Restic repository and its remote storage.\n */\nexport const repository = defineUnit({\n type: \"restic.repository.v1\",\n\n args: {\n /**\n * The remote endpoints of the cloud storage where the Restic repository will be stored.\n *\n * They will be used to create network policies to allow access to the storage.\n *\n * For some cloud providers, these endpoints can be automatically discovered.\n */\n remoteEndpoints: $addArgumentDescription(z.string().array().default([]), `The remote endpoints of the cloud storage where the Restic repository will be stored.\n\n They will be used to create network policies to allow access to the storage.\n\n For some cloud providers, these endpoints can be automatically discovered.`),\n\n /**\n * The pattern for the path where backups will be stored for the specific application.\n *\n * Available variables:\n *\n * - `$clusterName`: The name of the Kubernetes cluster where the application is deployed.\n * - `$appName`: The name of the application for which the backups are being created. Corresponds to the `appName` argument of the unit.\n * - `$unitName`: The name of the unit, which deploys the application, provided by the user.\n *\n * By default, the path pattern is `backups/$clusterName/$appName`.\n */\n pathPattern: $addArgumentDescription(z.string().default(\"backups/$clusterName/$appName\"), `The pattern for the path where backups will be stored for the specific application.\n\n Available variables:\n\n - \\`$clusterName\\`: The name of the Kubernetes cluster where the application is deployed.\n - \\`$appName\\`: The name of the application for which the backups are being created. Corresponds to the \\`appName\\` argument of the unit.\n - \\`$unitName\\`: The name of the unit, which deploys the application, provided by the user.\n\n By default, the path pattern is \\`backups/$clusterName/$appName\\`.`),\n },\n\n secrets: {\n rcloneConfig: z.string().meta({ language: \"ini\" }),\n },\n\n inputs: {\n remoteL3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n required: false,\n },\n remoteL4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n required: false,\n },\n },\n\n outputs: {\n repo: repositoryEntity,\n },\n\n meta: {\n description: `Holds the configuration for a Restic repository and its remote storage.`,\n title: \"Restic Repo\",\n iconColor: \"#e56901\",\n icon: \"material-symbols:backup\",\n category: \"Infrastructure\",\n },\n\n source: {\n package: \"@highstate/restic\",\n path: \"repository\",\n },\n})\n\nexport type Repository = z.infer<typeof repositoryEntity.schema>\n","/** biome-ignore-all lint/style/noNonNullAssertion: to define shared inputs */\n\nimport type { Simplify } from \"type-fest\"\nimport {\n $args,\n $inputs,\n $secrets,\n type FullComponentArgumentOptions,\n type FullComponentInputOptions,\n z,\n} from \"@highstate/contract\"\nimport { mapValues } from \"remeda\"\nimport { accessPointEntity } from \"../../common\"\nimport { mariadbEntity, mongodbEntity, postgresqlEntity } from \"../../databases\"\nimport { providerEntity } from \"../../dns\"\nimport { repositoryEntity } from \"../../restic\"\nimport { namespaceEntity, persistentVolumeClaimEntity } from \"../resources\"\nimport { clusterEntity } from \"../shared\"\n\nexport const sharedArgs = $args({\n /**\n * The FQDN where the application will be accessible.\n */\n fqdn: z.string(),\n\n /**\n * The endpoints where the application will or should be accessible.\n */\n endpoints: z.string().array(),\n\n /**\n * Whether the application should be exposed externally by NodePort or LoadBalancer service.\n */\n external: z.boolean().default(false),\n\n /**\n * The number of replicas for the application.\n */\n replicas: z.number().default(1),\n})\n\ntype ToOptionalArgs<T extends Record<string, FullComponentArgumentOptions>> = Simplify<{\n [K in keyof T]: Simplify<Omit<T[K], \"schema\"> & { schema: z.ZodOptional<T[K][\"schema\"]> }>\n}>\n\nexport const optionalSharedArgs = mapValues(sharedArgs, arg => ({\n ...arg,\n schema: arg.schema.optional(),\n})) as ToOptionalArgs<typeof sharedArgs>\n\n/**\n * Return the arguments definition for the application name.\n *\n * @param defaultAppName The default name of the application.\n */\nexport function appName(defaultAppName: string) {\n return {\n appName: {\n schema: z.string().default(defaultAppName),\n meta: {\n description: \"The name of the application to deploy.\",\n },\n },\n }\n}\n\nexport const sharedSecrets = $secrets({\n /**\n * The root password for the database instance. If not provided, a random password will be generated.\n */\n rootPassword: z.string().optional(),\n\n /**\n * The password to use for backup encryption. If not provided, a random password will be generated.\n */\n backupPassword: z.string().optional(),\n})\n\nexport const sharedDatabaseArgs = $args({\n /**\n * The username for the database user.\n *\n * If not provided, defaults to the name of the instance.\n */\n username: z.string().optional(),\n\n /**\n * The name of the database to create.\n *\n * If not provided, defaults to the username.\n */\n database: z.string().optional(),\n})\n\nexport const sharedDatabaseSecrets = $secrets({\n /**\n * The password for the database user.\n *\n * If not provided, a random password will be generated.\n */\n password: z.string().optional(),\n})\n\nexport const sharedInputs = $inputs({\n k8sCluster: {\n entity: clusterEntity,\n },\n namespace: {\n entity: namespaceEntity,\n },\n accessPoint: {\n entity: accessPointEntity,\n },\n resticRepo: {\n entity: repositoryEntity,\n },\n dnsProviders: {\n entity: providerEntity,\n multiple: true,\n },\n volume: {\n entity: persistentVolumeClaimEntity,\n },\n mariadb: {\n entity: mariadbEntity,\n },\n postgresql: {\n entity: postgresqlEntity,\n },\n mongodb: {\n entity: mongodbEntity,\n },\n})\n\ntype ToOptionalInputs<T extends Record<string, FullComponentInputOptions>> = Simplify<{\n [K in keyof T]: T[K] & { required: false }\n}>\n\nexport const optionalSharedInputs = mapValues(sharedInputs, input => ({\n ...input,\n required: false,\n})) as ToOptionalInputs<typeof sharedInputs>\n\nexport function source(path: string) {\n return {\n package: \"@highstate/k8s.apps\",\n path,\n }\n}\n","import { defineUnit, z } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { persistentVolumeClaimEntity } from \"../resources\"\nimport { statefulSetEntity } from \"../workload\"\nimport {\n appName,\n optionalSharedInputs,\n sharedArgs,\n sharedInputs,\n sharedSecrets,\n source,\n} from \"./shared\"\n\n/**\n * The Code Server instance deployed on Kubernetes.\n */\nexport const codeServer = defineUnit({\n type: \"k8s.apps.code-server.v1\",\n\n args: {\n ...appName(\"code-server\"),\n ...pick(sharedArgs, [\"fqdn\"]),\n },\n\n secrets: {\n ...pick(sharedSecrets, [\"backupPassword\"]),\n password: z.string().optional(),\n sudoPassword: z.string().optional(),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\", \"dnsProviders\", \"volume\"]),\n },\n\n outputs: {\n statefulSet: statefulSetEntity,\n volume: persistentVolumeClaimEntity,\n },\n\n meta: {\n description: `The Code Server instance deployed on Kubernetes.`,\n title: \"Code Server\",\n icon: \"material-icon-theme:vscode\",\n category: \"Development\",\n },\n\n source: source(\"code-server\"),\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport {\n appName,\n optionalSharedInputs,\n sharedArgs,\n sharedInputs,\n sharedSecrets,\n source,\n} from \"./shared\"\n\n/**\n * The Grocy application deployed on Kubernetes.\n *\n * Grocy is a web-based self-hosted groceries & household management solution for your home.\n */\nexport const grocy = defineUnit({\n type: \"k8s.apps.grocy.v1\",\n\n args: {\n ...appName(\"grocy\"),\n ...pick(sharedArgs, [\"fqdn\"]),\n },\n secrets: {\n ...pick(sharedSecrets, [\"backupPassword\"]),\n },\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\"]),\n },\n\n meta: {\n description: `The Grocy application deployed on Kubernetes.\n\n Grocy is a web-based self-hosted groceries & household management solution for your home.`,\n title: \"Grocy\",\n icon: \"simple-icons:grocy\",\n category: \"Productivity\",\n },\n\n source: source(\"grocy\"),\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { appName, sharedArgs, sharedInputs, source } from \"./shared\"\n\n/**\n * Exposes Hubble UI to the user.\n *\n * It must be already installed in the cluster as part of the Cilium.\n */\nexport const hubble = defineUnit({\n type: \"k8s.apps.hubble.v1\",\n\n args: {\n ...appName(\"hubble\"),\n ...pick(sharedArgs, [\"fqdn\"]),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\"]),\n },\n\n meta: {\n description: `Exposes Hubble UI to the user.\n\n It must be already installed in the cluster as part of the Cilium.`,\n title: \"Hubble\",\n icon: \"mdi:eye\",\n secondaryIcon: \"simple-icons:cilium\",\n category: \"Observability\",\n },\n\n source: source(\"hubble\"),\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { appName, sharedArgs, sharedInputs, source } from \"./shared\"\n\n/**\n * The Kubernetes Dashboard deployed on Kubernetes.\n */\nexport const kubernetesDashboard = defineUnit({\n type: \"k8s.apps.kubernetes-dashboard.v1\",\n\n args: {\n ...appName(\"kubernetes-dashboard\"),\n ...pick(sharedArgs, [\"fqdn\"]),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\"]),\n },\n\n meta: {\n description: `The Kubernetes Dashboard deployed on Kubernetes.`,\n title: \"Kubernetes Dashboard\",\n icon: \"devicon:kubernetes\",\n secondaryIcon: \"material-symbols:dashboard\",\n category: \"Kubernetes\",\n },\n\n source: source(\"kubernetes-dashboard\"),\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport * as databases from \"../../databases\"\nimport { l4EndpointEntity } from \"../../network\"\nimport { serviceEntity } from \"../service\"\nimport {\n appName,\n optionalSharedInputs,\n sharedArgs,\n sharedDatabaseArgs,\n sharedDatabaseSecrets,\n sharedInputs,\n sharedSecrets,\n source,\n} from \"./shared\"\n\n/**\n * The MariaDB database deployed on Kubernetes.\n */\nexport const mariadb = defineUnit({\n type: \"k8s.apps.mariadb.v1\",\n args: {\n ...appName(\"mariadb\"),\n ...pick(sharedArgs, [\"external\"]),\n },\n\n secrets: {\n ...pick(sharedSecrets, [\"rootPassword\", \"backupPassword\"]),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\"]),\n },\n\n outputs: {\n mariadb: databases.mariadbEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n description: `The MariaDB database deployed on Kubernetes.`,\n title: \"MariaDB\",\n icon: \"simple-icons:mariadb\",\n secondaryIcon: \"mdi:database\",\n category: \"Databases\",\n },\n\n source: source(\"mariadb/app\"),\n})\n\n/**\n * The virtual MariaDB database created on the MariaDB instance.\n *\n * Requires a Kubernetes cluster to place init jobs and secrets.\n */\nexport const mariadbDatabase = defineUnit({\n type: \"k8s.apps.mariadb.database.v1\",\n\n args: sharedDatabaseArgs,\n secrets: sharedDatabaseSecrets,\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"mariadb\"]),\n ...pick(optionalSharedInputs, [\"namespace\"]),\n },\n\n outputs: {\n mariadb: databases.mariadbEntity,\n },\n\n meta: {\n description: `The virtual MariaDB database created on the MariaDB instance.\n\n Requires a Kubernetes cluster to place init jobs and secrets.`,\n title: \"MariaDB Database\",\n icon: \"simple-icons:mariadb\",\n secondaryIcon: \"mdi:database-plus\",\n category: \"Databases\",\n },\n\n source: source(\"mariadb/database\"),\n})\n","import { defineUnit, z } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport {\n appName,\n optionalSharedInputs,\n sharedArgs,\n sharedInputs,\n sharedSecrets,\n source,\n} from \"./shared\"\n\nexport const maybe = defineUnit({\n type: \"k8s.apps.maybe.v1\",\n\n args: {\n ...appName(\"maybe\"),\n ...pick(sharedArgs, [\"fqdn\"]),\n },\n\n secrets: {\n ...pick(sharedSecrets, [\"backupPassword\"]),\n postgresqlPassword: z.string().optional(),\n secretKey: z.string().optional(),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\", \"postgresql\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\"]),\n },\n\n meta: {\n title: \"Maybe\",\n description: \"The OS for your personal finances.\",\n icon: \"arcticons:finance-manager\",\n category: \"Finance\",\n },\n\n source: source(\"maybe\"),\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport * as databases from \"../../databases\"\nimport { l4EndpointEntity } from \"../../network\"\nimport { serviceEntity } from \"../service\"\nimport {\n appName,\n optionalSharedInputs,\n sharedArgs,\n sharedDatabaseArgs,\n sharedDatabaseSecrets,\n sharedInputs,\n sharedSecrets,\n source,\n} from \"./shared\"\n\n/**\n * The MongoDB instance deployed on Kubernetes.\n */\nexport const mongodb = defineUnit({\n type: \"k8s.apps.mongodb.v1\",\n\n args: {\n ...appName(\"mongodb\"),\n ...pick(sharedArgs, [\"external\"]),\n },\n\n secrets: {\n ...pick(sharedSecrets, [\"rootPassword\", \"backupPassword\"]),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\"]),\n },\n\n outputs: {\n mongodb: databases.mongodbEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n description: `The MongoDB instance deployed on Kubernetes.`,\n title: \"MongoDB\",\n icon: \"simple-icons:mongodb\",\n secondaryIcon: \"mdi:database\",\n category: \"Databases\",\n },\n\n source: source(\"mongodb/app\"),\n})\n\n/**\n * The virtual MongoDB database created on the MongoDB instance.\n *\n * Requires a Kubernetes cluster to place init jobs and secrets.\n */\nexport const mongodbDatabase = defineUnit({\n type: \"k8s.apps.mongodb.database.v1\",\n\n args: sharedDatabaseArgs,\n secrets: sharedDatabaseSecrets,\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"mongodb\"]),\n ...pick(optionalSharedInputs, [\"namespace\"]),\n },\n\n outputs: {\n mongodb: databases.mongodbEntity,\n },\n\n meta: {\n description: `The virtual MongoDB database created on the MongoDB instance.\n\n Requires a Kubernetes cluster to place init jobs and secrets.`,\n title: \"MongoDB Database\",\n icon: \"simple-icons:mongodb\",\n secondaryIcon: \"mdi:database-plus\",\n category: \"Databases\",\n },\n\n source: source(\"mongodb/database\"),\n})\n","import { defineUnit } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport * as databases from \"../../databases\"\nimport { l4EndpointEntity } from \"../../network\"\nimport { serviceEntity } from \"../service\"\nimport {\n appName,\n optionalSharedInputs,\n sharedArgs,\n sharedDatabaseArgs,\n sharedDatabaseSecrets,\n sharedInputs,\n sharedSecrets,\n source,\n} from \"./shared\"\n\n/**\n * The PostgreSQL instance deployed on Kubernetes.\n */\nexport const postgresql = defineUnit({\n type: \"k8s.apps.postgresql.v1\",\n\n args: {\n ...appName(\"postgresql\"),\n ...pick(sharedArgs, [\"external\"]),\n },\n\n secrets: {\n ...pick(sharedSecrets, [\"rootPassword\", \"backupPassword\"]),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\"]),\n },\n\n outputs: {\n postgresql: databases.postgresqlEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n description: `The PostgreSQL instance deployed on Kubernetes.`,\n title: \"PostgreSQL\",\n icon: \"simple-icons:postgresql\",\n secondaryIcon: \"mdi:database\",\n category: \"Databases\",\n },\n\n source: source(\"postgresql/app\"),\n})\n\n/**\n * The virtual PostgreSQL database created on the PostgreSQL instance.\n *\n * The provided database must be authorized to create databases and users.\n *\n * Requires a Kubernetes cluster to place init jobs and secrets.\n */\nexport const postgresqlDatabase = defineUnit({\n type: \"k8s.apps.postgresql.database.v1\",\n\n args: sharedDatabaseArgs,\n secrets: sharedDatabaseSecrets,\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"postgresql\"]),\n ...pick(optionalSharedInputs, [\"namespace\"]),\n },\n\n outputs: {\n postgresql: databases.postgresqlEntity,\n },\n\n meta: {\n description: `The virtual PostgreSQL database created on the PostgreSQL instance.\n\n The provided database must be authorized to create databases and users.\n\n Requires a Kubernetes cluster to place init jobs and secrets.`,\n title: \"PostgreSQL Database\",\n icon: \"simple-icons:postgresql\",\n secondaryIcon: \"mdi:database-plus\",\n category: \"Databases\",\n },\n\n source: source(\"postgresql/database\"),\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { l4EndpointEntity } from \"../../network\"\nimport { persistentVolumeClaimEntity } from \"../resources\"\nimport { serviceEntity } from \"../service\"\nimport {\n appName,\n optionalSharedInputs,\n sharedArgs,\n sharedInputs,\n sharedSecrets,\n source,\n} from \"./shared\"\n\nexport const backupModeSchema = z.enum([\"state\", \"full\"])\n\n/**\n * The Syncthing instance deployed on Kubernetes.\n */\nexport const syncthing = defineUnit({\n type: \"k8s.apps.syncthing.v1\",\n\n args: {\n ...appName(\"syncthing\"),\n ...pick(sharedArgs, [\"fqdn\", \"external\"]),\n\n /**\n * The FQDN of the Syncthing instance used to sync with other devices.\n *\n * The `fqdn` argument unlike this one points to the gateway and used to\n * access the Syncthing Web UI.\n */\n deviceFqdn: $addArgumentDescription(z.string().optional(), `The FQDN of the Syncthing instance used to sync with other devices.\n\n The \\`fqdn\\` argument unlike this one points to the gateway and used to\n access the Syncthing Web UI.`),\n\n /**\n * The backup mode to use for the Syncthing instance.\n *\n * - `state`: Only the state is backed up. When the instance is restored, it will\n * sync files from the other devices automatically.\n * - `full`: A full backup is created including all files.\n *\n * The default is `state`.\n */\n backupMode: $addArgumentDescription(backupModeSchema.default(\"state\"), `The backup mode to use for the Syncthing instance.\n\n - \\`state\\`: Only the state is backed up. When the instance is restored, it will\n sync files from the other devices automatically.\n - \\`full\\`: A full backup is created including all files.\n\n The default is \\`state\\`.`),\n },\n\n secrets: {\n ...pick(sharedSecrets, [\"backupPassword\"]),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\", \"volume\"]),\n },\n\n outputs: {\n volume: persistentVolumeClaimEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n description: `The Syncthing instance deployed on Kubernetes.`,\n title: \"Syncthing\",\n icon: \"simple-icons:syncthing\",\n category: \"File Sync\",\n },\n\n source: source(\"syncthing\"),\n})\n","import { defineUnit, z } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { gatewayEntity } from \"../../common\"\nimport { l4EndpointEntity } from \"../../network\"\nimport { serviceEntity } from \"../service\"\nimport { appName, sharedArgs, sharedInputs, source } from \"./shared\"\n\n/**\n * The Traefik instance + gateway implementation.\n */\nexport const traefik = defineUnit({\n type: \"k8s.apps.traefik.v1\",\n\n args: {\n ...appName(\"traefik\"),\n ...pick(sharedArgs, [\"external\", \"replicas\"]),\n className: z.string().optional(),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\"]),\n },\n\n outputs: {\n gateway: gatewayEntity,\n service: serviceEntity,\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n description: `The Traefik instance + gateway implementation.`,\n title: \"Traefik Gateway\",\n icon: \"simple-icons:traefikproxy\",\n category: \"Network\",\n },\n\n source: source(\"traefik\"),\n})\n","import { defineUnit, z } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { appName, sharedArgs, sharedInputs, source } from \"./shared\"\n\n/**\n * The Vaultwarden password manager deployed on Kubernetes.\n */\nexport const vaultwarden = defineUnit({\n type: \"k8s.apps.vaultwarden.v1\",\n\n args: {\n ...appName(\"vaultwarden\"),\n ...pick(sharedArgs, [\"fqdn\"]),\n },\n\n secrets: {\n mariadbPassword: z.string().optional(),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\", \"mariadb\"]),\n },\n\n meta: {\n description: `The Vaultwarden password manager deployed on Kubernetes.`,\n title: \"Vaultwarden\",\n icon: \"simple-icons:vaultwarden\",\n category: \"Security\",\n },\n\n source: source(\"vaultwarden\"),\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { portSchema } from \"../../network\"\nimport { serviceEntity, serviceTypeSchema } from \"../service\"\nimport { deploymentEntity } from \"../workload\"\nimport { optionalSharedInputs, sharedInputs, source } from \"./shared\"\n\nexport const databaseConfigKeySchema = z.enum([\n \"url\",\n \"host\",\n \"port\",\n \"username\",\n \"password\",\n \"database\",\n])\n\nexport const environmentVariableSchema = z.union([\n z.string(),\n z.object({\n dependencyKey: z.templateLiteral([\n z.enum([\"mariadb\", \"postgresql\", \"mongodb\"]),\n z.literal(\".\"),\n databaseConfigKeySchema,\n ]),\n }),\n z.object({\n configKey: z.string(),\n }),\n z.object({\n secretKey: z.string(),\n }),\n])\n\n/**\n * The generic Kubernetes workload with optional service and gateway routes.\n *\n * May reference known databases and other services.\n */\nexport const workload = defineUnit({\n type: \"k8s.apps.workload.v1\",\n\n args: {\n /**\n * The name of the application.\n *\n * If not provided, the name of the unit will be used.\n */\n appName: $addArgumentDescription(z.string().optional(), `The name of the application.\n\n If not provided, the name of the unit will be used.`),\n\n /**\n * The name of the new namespace to create for the workload.\n *\n * If not provided, the `appName` will be used as the namespace name.\n */\n namespace: $addArgumentDescription(z.string().optional(), `The name of the new namespace to create for the workload.\n\n If not provided, the \\`appName\\` will be used as the namespace name.`),\n\n /**\n * The name of the existing namespace to use for the workload.\n */\n existingNamespace: $addArgumentDescription(z.string().optional(), `The name of the existing namespace to use for the workload.`),\n\n /**\n * The type of the workload to create.\n */\n type: $addArgumentDescription(z\n .enum([\"Deployment\", \"StatefulSet\", \"DaemonSet\", \"Job\", \"CronJob\"])\n .default(\"Deployment\"), `The type of the workload to create.`),\n\n /**\n * The image to use for the workload.\n */\n image: $addArgumentDescription(z.string(), `The image to use for the workload.`),\n\n /**\n * The port to expose for the workload.\n *\n * If specified, a service will be created for the workload.\n */\n port: $addArgumentDescription(portSchema.optional(), `The port to expose for the workload.\n\n If specified, a service will be created for the workload.`),\n\n /**\n * The FQDN of the workload.\n *\n * If specified, a service and an HTTP route will be created for the workload.\n */\n fqdn: $addArgumentDescription(z.string().optional(), `The FQDN of the workload.\n\n If specified, a service and an HTTP route will be created for the workload.`),\n\n /**\n * The type of the service to create for the workload.\n */\n serviceType: $addArgumentDescription(serviceTypeSchema.default(\"ClusterIP\"), `The type of the service to create for the workload.`),\n\n /**\n * The number of replicas for the workload.\n *\n * By default, it is set to 1.\n */\n replicas: $addArgumentDescription(z.number().default(1), `The number of replicas for the workload.\n\n By default, it is set to 1.`),\n\n /**\n * The path where the workload data will be stored.\n *\n * If specified, a persistent volume claim will be created for the workload.\n *\n * If `resticRepo` input is provided, the automatic backup will be enabled for this path.\n */\n dataPath: $addArgumentDescription(z.string().optional(), `The path where the workload data will be stored.\n\n If specified, a persistent volume claim will be created for the workload.\n\n If \\`resticRepo\\` input is provided, the automatic backup will be enabled for this path.`),\n\n /**\n * The environment variables to set for the workload.\n *\n * The values can be:\n * 1. a static string value;\n * 2. a dependency key to service configuration (e.g., `mariadb.username`);\n * 3. a config key to reference a configuration value provided via `config` argument;\n * 4. a secret key to reference a secret value provided via `secretData` secret.\n */\n env: $addArgumentDescription(z.record(z.string(), environmentVariableSchema).default({}), `The environment variables to set for the workload.\n\n The values can be:\n 1. a static string value;\n 2. a dependency key to service configuration (e.g., \\`mariadb.username\\`);\n 3. a config key to reference a configuration value provided via \\`config\\` argument;\n 4. a secret key to reference a secret value provided via \\`secretData\\` secret.`),\n\n /**\n * The configuration for the workload.\n *\n * If provided, the config map will be created.\n *\n * You can reference the configuration values in the environment variables using `configKey`.\n */\n config: $addArgumentDescription(z.record(z.string(), z.unknown()).default({}), `The configuration for the workload.\n\n If provided, the config map will be created.\n\n You can reference the configuration values in the environment variables using \\`configKey\\`.`),\n\n /**\n * The Kubernetes manifest patch for the deployment.\n *\n * Will be applied to the deployment manifest before it is created.\n */\n manifest: $addArgumentDescription(z.record(z.string(), z.unknown()).default({}), `The Kubernetes manifest patch for the deployment.\n\n Will be applied to the deployment manifest before it is created.`),\n\n /**\n * The Kubernetes service manifest for the deployment.\n *\n * Will be applied to the service manifest before it is created.\n */\n serviceManifest: $addArgumentDescription(z.record(z.string(), z.unknown()).default({}), `The Kubernetes service manifest for the deployment.\n\n Will be applied to the service manifest before it is created.`),\n\n /**\n * The Kubernetes HTTP route manifest for the deployment.\n *\n * Will be applied to the HTTP route manifest before it is created.\n */\n httpRouteManifest: $addArgumentDescription(z.record(z.string(), z.unknown()).default({}), `The Kubernetes HTTP route manifest for the deployment.\n\n Will be applied to the HTTP route manifest before it is created.`),\n },\n\n secrets: {\n /**\n * The password for the MariaDB database.\n *\n * If not provided and requested, a random password will be generated.\n */\n mariadbPassword: $addArgumentDescription(z.string().optional(), `The password for the MariaDB database.\n\n If not provided and requested, a random password will be generated.`),\n\n /**\n * The password for the PostgreSQL database.\n *\n * If not provided and requested, a random password will be generated.\n */\n postgresqlPassword: $addArgumentDescription(z.string().optional(), `The password for the PostgreSQL database.\n\n If not provided and requested, a random password will be generated.`),\n\n /**\n * The password for the MongoDB database.\n *\n * If not provided and requested, a random password will be generated.\n */\n mongodbPassword: $addArgumentDescription(z.string().optional(), `The password for the MongoDB database.\n\n If not provided and requested, a random password will be generated.`),\n\n /**\n * The password for the backup.\n *\n * If not provided and requested, a random password will be generated.\n */\n backupPassword: $addArgumentDescription(z.string().optional(), `The password for the backup.\n\n If not provided and requested, a random password will be generated.`),\n\n /**\n * The secret configuration for the workload.\n *\n * If provided, the secret will be created with the specified content.\n *\n * You can reference the secret values in the environment variables using `secretKey`.\n */\n secretData: $addArgumentDescription(z.record(z.string(), z.string()).default({}), `The secret configuration for the workload.\n\n If provided, the secret will be created with the specified content.\n\n You can reference the secret values in the environment variables using \\`secretKey\\`.`),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\"]),\n ...pick(optionalSharedInputs, [\n \"accessPoint\",\n \"resticRepo\",\n \"mariadb\",\n \"postgresql\",\n \"mongodb\",\n ]),\n },\n\n outputs: {\n deployment: deploymentEntity,\n service: serviceEntity,\n },\n\n meta: {\n description: `The generic Kubernetes workload with optional service and gateway routes.\n\n May reference known databases and other services.`,\n title: \"Kubernetes Workload\",\n icon: \"devicon:kubernetes\",\n secondaryIcon: \"mdi:cube-outline\",\n category: \"Kubernetes\",\n },\n\n source: source(\"deployment\"),\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { tlsIssuerEntity } from \"../common\"\nimport * as dns from \"../dns\"\nimport { clusterEntity } from \"./shared\"\n\nexport const tlsIssuerDataSchema = z.object({\n /**\n * The Kubernetes cluster to use for creating gateway routes.\n */\n cluster: clusterEntity.schema.meta({ title: __camelCaseToHumanReadable(\"cluster\"), description: `The Kubernetes cluster to use for creating gateway routes.` }),\n\n /**\n * The name of the cluster issuer which should be used to issue TLS certificates.\n */\n clusterIssuerName: z.string().meta({ title: __camelCaseToHumanReadable(\"clusterIssuerName\"), description: `The name of the cluster issuer which should be used to issue TLS certificates.` }),\n})\n\n/**\n * The cert-manager installed on the Kubernetes cluster.\n */\nexport const certManager = defineUnit({\n type: \"k8s.cert-manager.v1\",\n\n args: {\n /**\n * Whether to enable the native support for Gateway API in cert-manager.\n *\n * Note that this can conflict with \"Gateway API\" unit since it is bringing its own CRDs.\n */\n enableGatewayApi: $addArgumentDescription(z.boolean().default(false), `Whether to enable the native support for Gateway API in cert-manager.\n\n Note that this can conflict with \"Gateway API\" unit since it is bringing its own CRDs.`),\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n },\n\n outputs: {\n k8sCluster: clusterEntity,\n },\n\n meta: {\n description: `The cert-manager installed on the Kubernetes cluster.`,\n title: \"Cert Manager\",\n icon: \"simple-icons:letsencrypt\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/cert-manager\",\n },\n})\n\n/**\n * The DNS01 TLS issuer for issuing certificates using DNS01 challenge.\n */\nexport const dns01TlsIssuer = defineUnit({\n type: \"k8s.dns01-issuer.v1\",\n\n inputs: {\n k8sCluster: clusterEntity,\n dnsProvider: dns.providerEntity,\n },\n\n outputs: {\n tlsIssuer: tlsIssuerEntity,\n },\n\n meta: {\n description: `The DNS01 TLS issuer for issuing certificates using DNS01 challenge.`,\n title: \"DNS01 Issuer\",\n icon: \"mdi:certificate\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/dns01-issuer\",\n },\n})\n\nexport type TlsIssuerData = z.infer<typeof tlsIssuerDataSchema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { clusterEntity } from \"./shared\"\n\n/**\n * The Cilium CNI deployed on Kubernetes.\n */\nexport const cilium = defineUnit({\n type: \"k8s.cilium.v1\",\n\n args: {\n /**\n * If set to `true`, the generated network policy will allow\n * all DNS queries to be resolved, even if they are\n * for forbidden (non-allowed) FQDNs.\n *\n * By default, is `false`.\n */\n allowForbiddenFqdnResolution: $addArgumentDescription(z.boolean().default(false), `If set to \\`true\\`, the generated network policy will allow\n all DNS queries to be resolved, even if they are\n for forbidden (non-allowed) FQDNs.\n\n By default, is \\`false\\`.`),\n\n /**\n * Whether to enable Hubble Relay and UI for observability.\n *\n * By default, this is `true`.\n *\n * To expose the Hubble UI, you can use `k8s.apps.hubble-ui` unit.\n */\n enableHubble: $addArgumentDescription(z.boolean().default(true), `Whether to enable Hubble Relay and UI for observability.\n\n By default, this is \\`true\\`.\n\n To expose the Hubble UI, you can use \\`k8s.apps.hubble-ui\\` unit.`),\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n },\n\n outputs: {\n k8sCluster: clusterEntity,\n },\n\n meta: {\n description: `The Cilium CNI deployed on Kubernetes.`,\n title: \"Cilium\",\n icon: \"simple-icons:cilium\",\n secondaryIcon: \"devicon:kubernetes\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/cilium\",\n path: \"unit\",\n },\n})\n\nexport const ciliumClusterMetadata = z.object({\n cilium: z.object({\n /**\n * If set to `true`, the generated network policy will allow\n * all DNS queries to be resolved, even if they are\n * for forbidden (non-allowed) FQDNs.\n *\n * By default, is `false`.\n */\n allowForbiddenFqdnResolution: z.boolean().default(false).meta({ title: __camelCaseToHumanReadable(\"allowForbiddenFqdnResolution\"), description: `If set to \\`true\\`, the generated network policy will allow\n all DNS queries to be resolved, even if they are\n for forbidden (non-allowed) FQDNs.\n\n By default, is \\`false\\`.` }),\n }),\n})\n\nexport type CiliumClusterMetadata = z.infer<typeof ciliumClusterMetadata>\n","import { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { namespaceEntity } from \"./resources\"\nimport { clusterEntity } from \"./shared\"\n\nexport const gatewayDataSchema = z.object({\n /**\n * The Kubernetes cluster to use for creating gateway routes.\n */\n cluster: clusterEntity.schema.meta({ title: __camelCaseToHumanReadable(\"cluster\"), description: `The Kubernetes cluster to use for creating gateway routes.` }),\n\n /**\n * The namespace where the gateway controller of the class is running.\n */\n namespace: namespaceEntity.schema.meta({ title: __camelCaseToHumanReadable(\"namespace\"), description: `The namespace where the gateway controller of the class is running.` }),\n\n /**\n * The name of the gateway class to use.\n */\n className: z.string().meta({ title: __camelCaseToHumanReadable(\"className\"), description: `The name of the gateway class to use.` }),\n\n /**\n * The port to use for HTTP in listener.\n *\n * If not provided, defaults to 80.\n */\n httpPort: z.number().default(80).meta({ title: __camelCaseToHumanReadable(\"httpPort\"), description: `The port to use for HTTP in listener.\n\n If not provided, defaults to 80.` }),\n\n /**\n * The port to use for HTTPS in listener.\n *\n * If not provided, defaults to 443.\n */\n httpsPort: z.number().default(443).meta({ title: __camelCaseToHumanReadable(\"httpsPort\"), description: `The port to use for HTTPS in listener.\n\n If not provided, defaults to 443.` }),\n})\n\nexport const gatewayImplRefSchema = z.object({\n package: z.literal(\"@highstate/k8s\"),\n data: gatewayDataSchema,\n})\n\n/**\n * Installs the Gateway API CRDs to the cluster.\n */\nexport const gatewayApi = defineUnit({\n type: \"k8s.gateway-api.v1\",\n\n inputs: {\n k8sCluster: clusterEntity,\n },\n\n outputs: {\n k8sCluster: clusterEntity,\n },\n\n meta: {\n description: `Installs the Gateway API CRDs to the cluster.`,\n title: \"Gateway API\",\n icon: \"devicon:kubernetes\",\n secondaryIcon: \"mdi:api\",\n secondaryIconColor: \"#4CAF50\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/gateway-api\",\n },\n})\n\nexport type GatewayData = z.infer<typeof gatewayDataSchema>\nexport type GatewayImplRef = z.infer<typeof gatewayImplRefSchema>\n","export * as phantun from \"./phantun\"\nexport * from \"./shared\"\n","import { defineUnit } from \"@highstate/contract\"\nimport { deobfuscatorSpec, obfuscatorSpec } from \"./shared\"\n\n/**\n * The Phantun Deobfuscator deployed on Kubernetes.\n */\nexport const deobfuscator = defineUnit({\n type: \"k8s.obfuscators.phantun.deobfuscator.v1\",\n ...deobfuscatorSpec,\n\n meta: {\n description: `The Phantun Deobfuscator deployed on Kubernetes.`,\n title: \"Phantun Deobfuscator\",\n icon: \"mdi:network-outline\",\n secondaryIcon: \"mdi:hide\",\n category: \"Obfuscators\",\n },\n\n source: {\n package: \"@highstate/k8s.obfuscators\",\n path: \"phantun/deobfuscator\",\n },\n})\n\n/**\n * The Phantun Obfuscator deployed on Kubernetes.\n */\nexport const obfuscator = defineUnit({\n type: \"k8s.obfuscators.phantun.obfuscator.v1\",\n ...obfuscatorSpec,\n\n meta: {\n description: `The Phantun Obfuscator deployed on Kubernetes.`,\n title: \"Phantun Obfuscator\",\n icon: \"mdi:network-outline\",\n secondaryIcon: \"mdi:hide\",\n category: \"Obfuscators\",\n },\n\n source: {\n package: \"@highstate/k8s.obfuscators\",\n path: \"phantun/obfuscator\",\n },\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { $args, $inputs, $outputs, type FullComponentArgumentOptions, z } from \"@highstate/contract\"\nimport { l4EndpointEntity } from \"../../network\"\nimport { clusterEntity } from \"../shared\"\n\nexport const deobfuscatorSpec = {\n args: $args({\n /**\n * The name of the namespace and deployment to deploy the deobfuscator on.\n *\n * By default, calculated as `deobfs-{type}-{name}`.\n */\n appName: $addArgumentDescription(z.string().optional(), `The name of the namespace and deployment to deploy the deobfuscator on.\n\n By default, calculated as \\`deobfs-{type}-{name}\\`.`),\n\n /**\n * The L4 endpoint to forward deobfuscated traffic to.\n *\n * Will take precedence over the `targetEndpoint` input.\n */\n targetEndpoints: $addArgumentDescription(z.string().array().default([]), `The L4 endpoint to forward deobfuscated traffic to.\n\n Will take precedence over the \\`targetEndpoint\\` input.`),\n\n /**\n * Whether to expose the deobfuscator service by \"NodePort\" or \"LoadBalancer\".\n *\n * By default, the service is not exposed and only accessible from within the cluster.\n */\n external: $addArgumentDescription(z.boolean().default(false), `Whether to expose the deobfuscator service by \"NodePort\" or \"LoadBalancer\".\n\n By default, the service is not exposed and only accessible from within the cluster.`),\n }),\n\n inputs: $inputs({\n /**\n * The Kubernetes cluster to deploy the deobfuscator on.\n */\n k8sCluster: $addInputDescription(clusterEntity, `The Kubernetes cluster to deploy the deobfuscator on.`),\n\n /**\n * The L4 endpoints to forward deobfuscated traffic to.\n *\n * Will select the most appropriate endpoint based on the environment.\n */\n targetEndpoints: $addInputDescription({\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n }, `The L4 endpoints to forward deobfuscated traffic to.\n\n Will select the most appropriate endpoint based on the environment.`),\n }),\n\n outputs: $outputs({\n /**\n * The L4 endpoints of the deobfuscator accepting obfuscated traffic.\n */\n endpoints: $addInputDescription({\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n }, `The L4 endpoints of the deobfuscator accepting obfuscated traffic.`),\n }),\n}\n\nexport const obfuscatorSpec = {\n args: $args({\n /**\n * The name of the namespace and deployment to deploy the obfuscator on.\n *\n * By default, calculated as `obfs-{type}-{name}`.\n */\n appName: $addArgumentDescription(z.string().optional(), `The name of the namespace and deployment to deploy the obfuscator on.\n\n By default, calculated as \\`obfs-{type}-{name}\\`.`),\n\n /**\n * The endpoint of the deobfuscator to pass obfuscated traffic to.\n *\n * Will take precedence over the `endpoint` input.\n */\n endpoints: $addArgumentDescription(z.string().array().default([]), `The endpoint of the deobfuscator to pass obfuscated traffic to.\n\n Will take precedence over the \\`endpoint\\` input.`),\n\n /**\n * Whether to expose the obfuscator service by \"NodePort\" or \"LoadBalancer\".\n *\n * By default, the service is not exposed and only accessible from within the cluster.\n */\n external: $addArgumentDescription(z.boolean().default(false), `Whether to expose the obfuscator service by \"NodePort\" or \"LoadBalancer\".\n\n By default, the service is not exposed and only accessible from within the cluster.`),\n }),\n\n inputs: $inputs({\n /**\n * The Kubernetes cluster to deploy the obfuscator on.\n */\n k8sCluster: $addInputDescription(clusterEntity, `The Kubernetes cluster to deploy the obfuscator on.`),\n\n /**\n * The L4 endpoints of the deobfuscator to pass obfuscated traffic to.\n *\n * Will select the most appropriate endpoint based on the environment.\n */\n endpoints: $addInputDescription({\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n }, `The L4 endpoints of the deobfuscator to pass obfuscated traffic to.\n\n Will select the most appropriate endpoint based on the environment.`),\n }),\n\n outputs: $outputs({\n /**\n * The L4 endpoints accepting unobfuscated traffic.\n */\n entryEndpoints: $addInputDescription({\n entity: l4EndpointEntity,\n multiple: true,\n }, `The L4 endpoints accepting unobfuscated traffic.`),\n }),\n}\n\ntype ArgsFromSpec<T extends Record<string, FullComponentArgumentOptions>> = z.infer<\n z.ZodObject<{\n [K in keyof T]: T[K][\"schema\"]\n }>\n>\n\nexport type DeobfuscatorArgs = ArgsFromSpec<typeof deobfuscatorSpec.args>\nexport type ObfuscatorArgs = ArgsFromSpec<typeof obfuscatorSpec.args>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { fileEntity, folderEntity } from \"./common/files\"\nimport { serverEntity } from \"./common/server\"\n\n/**\n * Creates a NixOS module from inline code.\n */\nexport const inlineModule = defineUnit({\n type: \"nixos.inline-module.v1\",\n\n args: {\n /**\n * The name of the module file.\n *\n * If not provided, the name will be the name of the unit.\n */\n moduleName: $addArgumentDescription(z.string().optional(), `The name of the module file.\n\n If not provided, the name will be the name of the unit.`),\n\n /**\n * The code of the NixOS module.\n *\n * In this code you can reference other modules and files by their names.\n */\n code: $addArgumentDescription(z.string().meta({ language: \"nix\" }), `The code of the NixOS module.\n\n In this code you can reference other modules and files by their names.`),\n },\n\n inputs: {\n files: {\n entity: fileEntity,\n required: false,\n multiple: true,\n },\n folders: {\n entity: folderEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n folder: folderEntity,\n },\n\n meta: {\n description: `Creates a NixOS module from inline code.`,\n title: \"NixOS Inline Module\",\n icon: \"simple-icons:nixos\",\n iconColor: \"#7ebae4\",\n secondaryIcon: \"mdi:file-code\",\n category: \"NixOS\",\n },\n\n source: {\n package: \"@highstate/nixos\",\n path: \"inline-module\",\n },\n})\n\n/**\n * Creates a NixOS flake from inline code.\n *\n * This unit allows you to define a NixOS flake directly in the unit code.\n * It can reference other flakes, modules, files, and folders by their names.\n */\nexport const inlineFlake = defineUnit({\n type: \"nixos.inline-flake.v1\",\n\n args: {\n /**\n * The name of the flake folder.\n *\n * If not provided, the name will be the name of the unit.\n */\n flakeName: $addArgumentDescription(z.string().optional(), `The name of the flake folder.\n\n If not provided, the name will be the name of the unit.`),\n\n /**\n * The code of the `flake.nix` file.\n *\n * In this code you can reference other flakes, modules, files, and folders by their names.\n */\n code: $addArgumentDescription(z.string().meta({ language: \"nix\" }), `The code of the \\`flake.nix\\` file.\n\n In this code you can reference other flakes, modules, files, and folders by their names.`),\n },\n\n inputs: {\n files: {\n entity: fileEntity,\n required: false,\n multiple: true,\n },\n folders: {\n entity: folderEntity,\n required: false,\n multiple: true,\n },\n },\n\n outputs: {\n folder: folderEntity,\n },\n\n meta: {\n description: `Creates a NixOS flake from inline code.\n\n This unit allows you to define a NixOS flake directly in the unit code.\n It can reference other flakes, modules, files, and folders by their names.`,\n title: \"NixOS Inline Flake\",\n icon: \"simple-icons:nixos\",\n iconColor: \"#7ebae4\",\n secondaryIcon: \"mdi:file-code\",\n category: \"NixOS\",\n },\n\n source: {\n package: \"@highstate/nixos\",\n path: \"inline-flake\",\n },\n})\n\n/**\n * Creates a NixOS system on top of any server.\n *\n * This unit allows you to define a NixOS system configuration that will be applied to the server.\n * It can reference other modules, files, and folders by their names.\n *\n * To create a NixOS system, it will use `nixos-anywhere` which will use kexec\n * to boot into the new kernel to install NixOS.\n */\nexport const system = defineUnit({\n type: \"nixos.system.v1\",\n\n args: {\n system: z.string().optional(),\n },\n\n inputs: {\n server: serverEntity,\n flake: folderEntity,\n },\n\n outputs: {\n server: serverEntity,\n },\n\n meta: {\n description: `Creates a NixOS system on top of any server.\n\n This unit allows you to define a NixOS system configuration that will be applied to the server.\n It can reference other modules, files, and folders by their names.\n\n To create a NixOS system, it will use \\`nixos-anywhere\\` which will use kexec\n to boot into the new kernel to install NixOS.`,\n title: \"NixOS System\",\n icon: \"simple-icons:nixos\",\n iconColor: \"#7ebae4\",\n secondaryIcon: \"codicon:vm\",\n category: \"NixOS\",\n },\n\n source: {\n package: \"@highstate/nixos\",\n path: \"system\",\n },\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport {\n checksumSchema,\n fileEntity,\n serverEntity,\n serverOutputs,\n vmSecrets,\n vmSshArgs,\n} from \"./common\"\nimport { ipv4PrefixSchema, ipv46Schema, l7EndpointEntity } from \"./network\"\nimport * as ssh from \"./ssh\"\n\nexport const clusterEntity = defineEntity({\n type: \"proxmox.cluster.v1\",\n\n schema: z.object({\n endpoint: l7EndpointEntity.schema,\n insecure: z.boolean().optional(),\n username: z.string().optional(),\n\n defaultNodeName: z.string(),\n defaultDatastoreId: z.string(),\n\n password: z.string().optional(),\n apiToken: z.string().optional(),\n\n ssh: ssh.connectionSchema.optional(),\n }),\n\n meta: {\n color: \"#e56901\",\n },\n})\n\nexport const imageEntity = defineEntity({\n type: \"proxmox.image.v1\",\n\n schema: z.object({\n id: z.string(),\n }),\n\n meta: {\n color: \"#e56901\",\n },\n})\n\n/**\n * The connection to an existing Proxmox cluster.\n */\nexport const connection = defineUnit({\n type: \"proxmox.connection.v1\",\n\n args: {\n /**\n * The endpoint of the Proxmox API.\n */\n endpoint: $addArgumentDescription(z.string(), `The endpoint of the Proxmox API.`),\n\n /**\n * Whether to allow insecure connections to the Proxmox API.\n */\n insecure: $addArgumentDescription(z.boolean().optional(), `Whether to allow insecure connections to the Proxmox API.`),\n\n /**\n * The username to use for the Proxmox API.\n *\n * Only required for password token authentication.\n */\n username: $addArgumentDescription(z.string().optional(), `The username to use for the Proxmox API.\n\n Only required for password token authentication.`),\n\n /**\n * The name of the default Proxmox node to use for operations.\n *\n * If not specified, the first node in the cluster will be used.\n */\n defaultNodeName: $addArgumentDescription(z.string().optional(), `The name of the default Proxmox node to use for operations.\n\n If not specified, the first node in the cluster will be used.`),\n\n /**\n * The ID of the default Proxmox datastore to use for operations.\n *\n * If not specified, the first datastore in the cluster will be used.\n */\n defaultDatastoreId: $addArgumentDescription(z.string().optional(), `The ID of the default Proxmox datastore to use for operations.\n\n If not specified, the first datastore in the cluster will be used.`),\n\n /**\n * The SSH configuration to use for connecting to the Proxmox nodes.\n */\n ssh: $addArgumentDescription(ssh.argsSchema.prefault({}), `The SSH configuration to use for connecting to the Proxmox nodes.`),\n },\n\n secrets: {\n /**\n * The password to use for the Proxmox API.\n *\n * Requires `username` to be set.\n */\n password: $addArgumentDescription({\n schema: z.string().optional(),\n meta: {\n title: \"Proxmox Password\",\n },\n }, `The password to use for the Proxmox API.\n\n Requires \\`username\\` to be set.`),\n\n /**\n * The Proxmox API token to use for authentication.\n */\n apiToken: $addArgumentDescription({\n schema: z.string().optional(),\n meta: {\n title: \"Proxmox API Token\",\n },\n }, `The Proxmox API token to use for authentication.`),\n\n ...ssh.secrets,\n },\n\n inputs: {\n ...ssh.inputs,\n },\n\n outputs: {\n /**\n * The Proxmox cluster.\n */\n proxmoxCluster: $addInputDescription(clusterEntity, `The Proxmox cluster.`),\n\n /**\n * The server representing the Proxmox API endpoint.\n */\n server: $addInputDescription({\n entity: serverEntity,\n required: false,\n }, `The server representing the Proxmox API endpoint.`),\n },\n\n meta: {\n description: `The connection to an existing Proxmox cluster.`,\n title: \"Proxmox Connection\",\n category: \"Proxmox\",\n icon: \"simple-icons:proxmox\",\n iconColor: \"#e56901\",\n },\n\n source: {\n package: \"@highstate/proxmox\",\n path: \"connection\",\n },\n})\n\n/**\n * The image to upload to a Proxmox cluster.\n */\nexport const image = defineUnit({\n type: \"proxmox.image.v1\",\n\n args: {\n /**\n * The name of the image to upload.\n *\n * If not specified, the default name is `<unitName>-<sha256>.<extension>`\n * or `<unitName>.<extension>` if `sha256` is not provided.\n */\n fileName: $addArgumentDescription(z.string().optional(), `The name of the image to upload.\n\n If not specified, the default name is \\`<unitName>-<sha256>.<extension>\\`\n or \\`<unitName>.<extension>\\` if \\`sha256\\` is not provided.`),\n\n /**\n * The URL of the image to upload.\n */\n url: $addArgumentDescription(z.string().optional(), `The URL of the image to upload.`),\n\n /**\n * The checksum of the image file to verify.\n */\n checksum: $addArgumentDescription(checksumSchema.optional(), `The checksum of the image file to verify.`),\n\n /**\n * The name of the Proxmox node to upload the image to.\n *\n * If not specified, the default node name from the cluster will be used.\n */\n nodeName: $addArgumentDescription(z.string().optional(), `The name of the Proxmox node to upload the image to.\n\n If not specified, the default node name from the cluster will be used.`),\n\n /**\n * The ID of the Proxmox datastore to upload the image to.\n *\n * If not specified, the default datastore ID from the cluster will be used.\n */\n datastoreId: $addArgumentDescription(z.string().optional(), `The ID of the Proxmox datastore to upload the image to.\n\n If not specified, the default datastore ID from the cluster will be used.`),\n },\n\n inputs: {\n /**\n * The Proxmox cluster to upload the image to.\n */\n proxmoxCluster: $addInputDescription(clusterEntity, `The Proxmox cluster to upload the image to.`),\n\n /**\n * The file to upload as an image.\n *\n * If `url` is not specified, this file will be used.\n */\n file: $addInputDescription({\n entity: fileEntity,\n required: false,\n }, `The file to upload as an image.\n\n If \\`url\\` is not specified, this file will be used.`),\n },\n\n outputs: {\n image: imageEntity,\n },\n\n meta: {\n description: `The image to upload to a Proxmox cluster.`,\n title: \"Proxmox Image\",\n category: \"Proxmox\",\n icon: \"simple-icons:proxmox\",\n iconColor: \"#e56901\",\n secondaryIcon: \"mage:compact-disk-fill\",\n },\n\n source: {\n package: \"@highstate/proxmox\",\n path: \"image\",\n },\n})\n\n/**\n * The existing image on a Proxmox cluster.\n */\nexport const existingImage = defineUnit({\n type: \"proxmox.existing-image.v1\",\n\n args: {\n id: z.string(),\n },\n\n inputs: {\n proxmoxCluster: clusterEntity,\n },\n\n outputs: {\n image: imageEntity,\n },\n\n meta: {\n description: `The existing image on a Proxmox cluster.`,\n title: \"Proxmox Existing Image\",\n category: \"Proxmox\",\n icon: \"simple-icons:proxmox\",\n iconColor: \"#e56901\",\n secondaryIcon: \"mage:compact-disk-fill\",\n },\n\n source: {\n package: \"@highstate/proxmox\",\n path: \"existing-image\",\n },\n})\n\n/**\n * The virtual machine on a Proxmox cluster.\n */\nexport const virtualMachine = defineUnit({\n type: \"proxmox.virtual-machine.v1\",\n\n args: {\n /**\n * The name of the node to create the virtual machine on.\n *\n * If not specified, the default node name from the cluster will be used.\n */\n nodeName: $addArgumentDescription(z.string().optional(), `The name of the node to create the virtual machine on.\n\n If not specified, the default node name from the cluster will be used.`),\n\n /**\n * The ID of the Proxmox datastore to create the virtual machine on.\n *\n * If not specified, the default datastore ID from the cluster will be used.\n */\n datastoreId: $addArgumentDescription(z.string().optional(), `The ID of the Proxmox datastore to create the virtual machine on.\n\n If not specified, the default datastore ID from the cluster will be used.`),\n\n /**\n * The type of CPU to use for the virtual machine.\n *\n * By default, this is set to \"host\" which offers the best performance.\n */\n cpuType: $addArgumentDescription(z.string().default(\"host\"), `The type of CPU to use for the virtual machine.\n\n By default, this is set to \"host\" which offers the best performance.`),\n\n /**\n * The resources to allocate to the virtual machine.\n */\n resources: $addArgumentDescription(z\n .object({\n /**\n * The number of CPU cores to allocate to the virtual machine.\n *\n * By default, this is set to 1.\n */\n cores: z.number().default(1).meta({ title: __camelCaseToHumanReadable(\"cores\"), description: `The number of CPU cores to allocate to the virtual machine.\n\n By default, this is set to 1.` }),\n\n /**\n * The number of CPU sockets to allocate to the virtual machine.\n *\n * By default, this is set to 1.\n */\n sockets: z.number().default(1).meta({ title: __camelCaseToHumanReadable(\"sockets\"), description: `The number of CPU sockets to allocate to the virtual machine.\n\n By default, this is set to 1.` }),\n\n /**\n * The amount of dedicated memory to allocate to the virtual machine, in MB.\n *\n * By default, this is set to 512 MB.\n */\n memory: z.number().default(512).meta({ title: __camelCaseToHumanReadable(\"memory\"), description: `The amount of dedicated memory to allocate to the virtual machine, in MB.\n\n By default, this is set to 512 MB.` }),\n\n /**\n * The size of the disk to create for the virtual machine, in GB.\n *\n * By default, this is set to 8 GB.\n */\n diskSize: z.number().default(8).meta({ title: __camelCaseToHumanReadable(\"diskSize\"), description: `The size of the disk to create for the virtual machine, in GB.\n\n By default, this is set to 8 GB.` }),\n })\n .prefault({}), `The resources to allocate to the virtual machine.`),\n\n /**\n * The IPv4 address configuration for the virtual machine.\n */\n ipv4: $addArgumentDescription(z\n .discriminatedUnion(\"type\", [\n z.object({\n type: z.literal(\"dhcp\"),\n }),\n z.object({\n type: z.literal(\"static\"),\n\n /**\n * The IPv4 address to assign to the virtual machine.\n */\n address: z.ipv4().meta({ title: __camelCaseToHumanReadable(\"address\"), description: `The IPv4 address to assign to the virtual machine.` }),\n\n /**\n * The CIDR prefix for the IPv4 address.\n *\n * By default, this is set to 24.\n */\n prefix: ipv4PrefixSchema.default(24).meta({ title: __camelCaseToHumanReadable(\"prefix\"), description: `The CIDR prefix for the IPv4 address.\n\n By default, this is set to 24.` }),\n\n /**\n * The IPv4 gateway for the virtual machine.\n *\n * If not specified, will be set to the first address in the subnet.\n */\n gateway: z.ipv4().optional().meta({ title: __camelCaseToHumanReadable(\"gateway\"), description: `The IPv4 gateway for the virtual machine.\n\n If not specified, will be set to the first address in the subnet.` }),\n }),\n ])\n .default({ type: \"dhcp\" }), `The IPv4 address configuration for the virtual machine.`),\n\n /**\n * The network configuration for the virtual machine.\n */\n network: $addArgumentDescription(z\n .object({\n /**\n * The list of DNS servers to use for the virtual machine.\n */\n dns: ipv46Schema.array().default([]).meta({ title: __camelCaseToHumanReadable(\"dns\"), description: `The list of DNS servers to use for the virtual machine.` }),\n\n /**\n * The name of the network bridge to connect the virtual machine to.\n *\n * By default, this is set to \"vmbr0\".\n */\n bridge: z.string().default(\"vmbr0\").meta({ title: __camelCaseToHumanReadable(\"bridge\"), description: `The name of the network bridge to connect the virtual machine to.\n\n By default, this is set to \"vmbr0\".` }),\n })\n .prefault({}), `The network configuration for the virtual machine.`),\n\n /**\n * The SSH configuration for the virtual machine.\n */\n ssh: $addArgumentDescription(vmSshArgs, `The SSH configuration for the virtual machine.`),\n\n /**\n * Whether to wait for the Proxmox agent to be ready before returning.\n */\n waitForAgent: $addArgumentDescription(z.boolean().default(true), `Whether to wait for the Proxmox agent to be ready before returning.`),\n\n /**\n * The cloud-init vendor data to use for the virtual machine.\n *\n * Will take precedence over the `vendorData` input.\n */\n vendorData: $addArgumentDescription(z.string().optional().meta({ multiline: true }), `The cloud-init vendor data to use for the virtual machine.\n\n Will take precedence over the \\`vendorData\\` input.`),\n },\n\n secrets: {\n ...vmSecrets,\n },\n\n inputs: {\n proxmoxCluster: clusterEntity,\n image: imageEntity,\n\n /**\n * The cloud-init vendor data to use for the virtual machine.\n *\n * You can provide a cloud-config from the distribution component.\n */\n vendorData: $addInputDescription({\n entity: fileEntity,\n required: false,\n }, `The cloud-init vendor data to use for the virtual machine.\n\n You can provide a cloud-config from the distribution component.`),\n\n ...ssh.inputs,\n },\n\n outputs: serverOutputs,\n\n meta: {\n description: `The virtual machine on a Proxmox cluster.`,\n title: \"Proxmox Virtual Machine\",\n category: \"Proxmox\",\n icon: \"simple-icons:proxmox\",\n iconColor: \"#e56901\",\n secondaryIcon: \"codicon:vm\",\n },\n\n source: {\n package: \"@highstate/proxmox\",\n path: \"virtual-machine\",\n },\n})\n\nexport type Cluster = z.infer<typeof clusterEntity.schema>\nexport type Image = z.infer<typeof imageEntity.schema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { fileEntity } from \"./common/files\"\nimport { serverEntity } from \"./common/server\"\n\n/**\n * Encrypts secrets using SOPS for the specified servers.\n */\nexport const secrets = defineUnit({\n type: \"sops.secrets.v1\",\n\n secrets: {\n /**\n * The content of the SOPS secrets file.\n *\n * Will take precedence over the `data` input.\n */\n data: $addArgumentDescription(z.record(z.string(), z.unknown()), `The content of the SOPS secrets file.\n\n Will take precedence over the \\`data\\` input.`),\n },\n\n inputs: {\n servers: {\n entity: serverEntity,\n required: false,\n multiple: true,\n },\n data: {\n entity: fileEntity,\n required: false,\n },\n },\n\n outputs: {\n file: fileEntity,\n },\n\n meta: {\n description: `Encrypts secrets using SOPS for the specified servers.`,\n title: \"SOPS Secrets\",\n icon: \"mdi:file-lock\",\n category: \"Secrets\",\n },\n\n source: {\n package: \"@highstate/sops\",\n path: \"secrets\",\n },\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { clusterInputs, clusterOutputs, scheduleOnMastersPolicyArgs } from \"./k8s/shared\"\n\nexport const clusterEntity = defineEntity({\n type: \"talos.cluster.v1\",\n\n schema: z.object({\n clientConfiguration: z.string(),\n machineSecrets: z.string(),\n }),\n\n meta: {\n color: \"#2d2d2d\",\n },\n})\n\nexport const cniSchema = z.enum([\"none\", \"cilium\", \"flannel\"])\nexport const csiSchema = z.enum([\"none\", \"local-path-provisioner\"])\n\n/**\n * The Talos cluster created on top of the server.\n */\nexport const cluster = defineUnit({\n type: \"talos.cluster.v1\",\n\n args: {\n ...scheduleOnMastersPolicyArgs,\n\n /**\n * The name of the cluster.\n *\n * By default, the name of the instance is used.\n */\n clusterName: $addArgumentDescription(z.string().optional(), `The name of the cluster.\n\n By default, the name of the instance is used.`),\n\n /**\n * The CNI plugin to use.\n *\n * The following options are available:\n * - \"cilium\" (default)\n * - \"flannel\" (built-in in Talos)\n * - \"none\" (disable CNI, must be installed manually)\n *\n * The \"cilium\" CNI plugin is recommended to cover advanced network policies like FQDNs.\n */\n cni: $addArgumentDescription(cniSchema.default(\"cilium\"), `The CNI plugin to use.\n\n The following options are available:\n - \"cilium\" (default)\n - \"flannel\" (built-in in Talos)\n - \"none\" (disable CNI, must be installed manually)\n\n The \"cilium\" CNI plugin is recommended to cover advanced network policies like FQDNs.`),\n\n /**\n * The CSI plugin to use.\n *\n * The following options are available:\n * - \"local-path-provisioner\" (default)\n * - \"none\" (disable CSI, must be installed manually if needed)\n */\n csi: $addArgumentDescription(csiSchema.default(\"local-path-provisioner\"), `The CSI plugin to use.\n\n The following options are available:\n - \"local-path-provisioner\" (default)\n - \"none\" (disable CSI, must be installed manually if needed)`),\n\n /**\n * The shared configuration patch.\n * It will be applied to all nodes.\n */\n sharedConfigPatch: $addArgumentDescription(z.record(z.string(), z.any()).optional(), `The shared configuration patch.\n It will be applied to all nodes.`),\n\n /**\n * The master configuration patch.\n * It will be applied to all master nodes.\n */\n masterConfigPatch: $addArgumentDescription(z.record(z.string(), z.any()).optional(), `The master configuration patch.\n It will be applied to all master nodes.`),\n\n /**\n * The worker configuration patch.\n * It will be applied to all worker nodes.\n */\n workerConfigPatch: $addArgumentDescription(z.record(z.string(), z.any()).optional(), `The worker configuration patch.\n It will be applied to all worker nodes.`),\n\n /**\n * Whether to enable the Tun device plugin.\n *\n * There is the only option for Talos to get tun device in containers.\n *\n * By default, this option is set to true.\n */\n enableTunDevicePlugin: $addArgumentDescription(z.boolean().default(true), `Whether to enable the Tun device plugin.\n\n There is the only option for Talos to get tun device in containers.\n\n By default, this option is set to true.`),\n },\n\n inputs: clusterInputs,\n\n outputs: {\n ...clusterOutputs,\n talosCluster: clusterEntity,\n },\n\n meta: {\n description: `The Talos cluster created on top of the server.`,\n title: \"Talos Cluster\",\n category: \"Talos\",\n color: \"#2d2d2d\",\n icon: \"simple-icons:talos\",\n secondaryIcon: \"devicon:kubernetes\",\n },\n\n source: {\n package: \"@highstate/talos\",\n path: \"cluster\",\n },\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { providerEntity } from \"../dns\"\n\nexport const providerDataSchema = z.object({\n /**\n * The zone ID of the Cloudflare zone.\n */\n zoneId: z.string().meta({ title: __camelCaseToHumanReadable(\"zoneId\"), description: `The zone ID of the Cloudflare zone.` }),\n\n /**\n * The API token for the Cloudflare account.\n *\n * The API key must have permissions to manage DNS records for exactly one zone.\n * If multiple zones are specified, the unit will fail.\n *\n * The required permissions are:\n * - `Zone:Read`\n * - `Zone:DNS:Edit`\n */\n apiToken: z.string().meta({ title: __camelCaseToHumanReadable(\"apiToken\"), description: `The API token for the Cloudflare account.\n\n The API key must have permissions to manage DNS records for exactly one zone.\n If multiple zones are specified, the unit will fail.\n\n The required permissions are:\n - \\`Zone:Read\\`\n - \\`Zone:DNS:Edit\\`` }),\n})\n\n/**\n * The Cloudflare connection for a single zone.\n */\nexport const connection = defineUnit({\n type: \"cloudflare.connection.v1\",\n\n secrets: {\n /**\n * The API token for the Cloudflare account.\n *\n * The API key must have permissions to manage DNS records for exactly one zone.\n * If multiple zones are specified, the unit will fail.\n *\n * The required permissions are:\n * - `Zone.Zone:Read`\n * - `Zone.DNS:Edit`\n */\n apiToken: $addArgumentDescription(z.string(), `The API token for the Cloudflare account.\n\n The API key must have permissions to manage DNS records for exactly one zone.\n If multiple zones are specified, the unit will fail.\n\n The required permissions are:\n - \\`Zone.Zone:Read\\`\n - \\`Zone.DNS:Edit\\``),\n },\n\n outputs: {\n dnsProvider: providerEntity,\n },\n\n meta: {\n description: `The Cloudflare connection for a single zone.`,\n title: \"Cloudflare Connection\",\n icon: \"simple-icons:cloudflare\",\n category: \"Cloudflare\",\n },\n\n source: {\n package: \"@highstate/cloudflare\",\n path: \"connection\",\n },\n})\n\nexport type ProviderData = z.infer<typeof providerDataSchema>\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineUnit, z } from \"@highstate/contract\"\nimport { l4EndpointEntity } from \"../network\"\nimport { networkEntity, peerEntity } from \"../wireguard\"\n\n/**\n * The Mullvad WireGuard peer fetched from the Mullvad API.\n */\nexport const peer = defineUnit({\n type: \"mullvad.peer.v1\",\n\n args: {\n hostname: z.string().optional(),\n\n /**\n * Whether to include Mullvad DNS servers in the peer configuration.\n */\n includeDns: $addArgumentDescription(z.boolean().default(true), `Whether to include Mullvad DNS servers in the peer configuration.`),\n },\n\n inputs: {\n /**\n * The network to use for the WireGuard peer.\n *\n * If not provided, the peer will use default network configuration.\n */\n network: $addInputDescription({\n entity: networkEntity,\n required: false,\n }, `The network to use for the WireGuard peer.\n\n If not provided, the peer will use default network configuration.`),\n },\n\n outputs: {\n peer: peerEntity,\n\n endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n },\n },\n\n meta: {\n description: `The Mullvad WireGuard peer fetched from the Mullvad API.`,\n title: \"Mullvad Peer\",\n icon: \"simple-icons:mullvad\",\n secondaryIcon: \"cib:wireguard\",\n secondaryIconColor: \"#88171a\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/mullvad\",\n path: \"peer\",\n },\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { omit } from \"remeda\"\nimport { serverEntity } from \"./common/server\"\nimport { exposableWorkloadEntity, networkInterfaceEntity } from \"./k8s\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"./network\"\nimport { clusterEntity } from \"./k8s\"\nimport { arrayPatchModeSchema } from \"./utils\"\n\nexport const backendSchema = z.enum([\"wireguard\", \"amneziawg\"])\n\nexport type Backend = z.infer<typeof backendSchema>\n\nconst networkArgs = {\n /**\n * The backend to use for the WireGuard network.\n *\n * Possible values are:\n * - `wireguard` - the default backend;\n * - `amneziawg` - the censorship-resistant fork of WireGuard.\n */\n backend: backendSchema.default(\"wireguard\"),\n\n /**\n * Whether to enable IPv4 support in the network.\n *\n * By default, IPv4 support is enabled.\n */\n ipv4: z.boolean().default(true),\n\n /**\n * Whether to enable IPv6 support in the network.\n *\n * By default, IPv6 support is disabled.\n */\n ipv6: z.boolean().default(false),\n}\n\n/**\n * The entity representing the WireGuard network configuration.\n *\n * It holds shared configuration for WireGuard identities, peers, and nodes.\n */\nexport const networkEntity = defineEntity({\n type: \"wireguard.network.v1\",\n\n schema: z.object(networkArgs),\n\n meta: {\n description: `The entity representing the WireGuard network configuration.\n\n It holds shared configuration for WireGuard identities, peers, and nodes.`,\n },\n})\n\nexport const nodeExposePolicySchema = z.enum([\"always\", \"when-has-endpoint\", \"never\"])\n\nexport const peerEntity = defineEntity({\n type: \"wireguard.peer.v1\",\n\n schema: z.object({\n name: z.string(),\n network: networkEntity.schema.optional(),\n publicKey: z.string(),\n address: z.string().optional(),\n allowedIps: z.string().array(),\n endpoints: l4EndpointEntity.schema.array(),\n allowedEndpoints: z.union([l3EndpointEntity.schema, l4EndpointEntity.schema]).array(),\n\n /**\n * The pre-shared key of the WireGuard peer.\n *\n * If one of two peers has `presharedKey` set, the other peer must have `presharedKey` set too and they must be equal.\n *\n * Will be ignored if both peers have `presharedKeyPart` set.\n */\n presharedKey: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"presharedKey\"), description: `The pre-shared key of the WireGuard peer.\n\n If one of two peers has \\`presharedKey\\` set, the other peer must have \\`presharedKey\\` set too and they must be equal.\n\n Will be ignored if both peers have \\`presharedKeyPart\\` set.` }),\n\n /**\n * The pre-shared key part of the WireGuard peer.\n *\n * If both peers have `presharedKeyPart` set, their `presharedKey` will be calculated as XOR of the two parts.\n */\n presharedKeyPart: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"presharedKeyPart\"), description: `The pre-shared key part of the WireGuard peer.\n\n If both peers have \\`presharedKeyPart\\` set, their \\`presharedKey\\` will be calculated as XOR of the two parts.` }),\n\n excludedIps: z.string().array(),\n dns: z.string().array(),\n listenPort: z.number().optional(),\n }),\n\n meta: {\n color: \"#673AB7\",\n },\n})\n\nexport const identityEntity = defineEntity({\n type: \"wireguard.identity.v1\",\n\n schema: z.object({\n peer: peerEntity.schema,\n privateKey: z.string(),\n }),\n\n meta: {\n color: \"#F44336\",\n },\n})\n\nexport type Network = z.infer<typeof networkEntity.schema>\nexport type Identity = z.infer<typeof identityEntity.schema>\nexport type Peer = z.infer<typeof peerEntity.schema>\nexport type NodeExposePolicy = z.infer<typeof nodeExposePolicySchema>\n\n/**\n * Holds the shared configuration for WireGuard identities, peers, and nodes.\n */\nexport const network = defineUnit({\n type: \"wireguard.network.v1\",\n\n args: networkArgs,\n\n outputs: {\n network: networkEntity,\n },\n\n meta: {\n description: `Holds the shared configuration for WireGuard identities, peers, and nodes.`,\n icon: \"simple-icons:wireguard\",\n iconColor: \"#88171a\",\n secondaryIcon: \"mdi:local-area-network-connect\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"network\",\n },\n})\n\nconst sharedPeerArgs = {\n /**\n * The name of the WireGuard peer.\n *\n * If not provided, the peer will be named after the unit.\n */\n peerName: z.string().optional(),\n\n /**\n * The address of the WireGuard interface.\n *\n * The address may be any IPv4 or IPv6 address. CIDR notation is also supported.\n */\n address: z.string().optional(),\n\n /**\n * The convenience option to set `allowedIps` to `0.0.0.0/0, ::/0`.\n *\n * Will be merged with the `allowedIps` if provided.\n */\n exitNode: z.boolean().default(false),\n\n /**\n * The list of IP ranges to exclude from the tunnel.\n *\n * Implementation notes:\n *\n * - this list will not be used to generate the allowed IPs for the peer;\n * - instead, the node will setup extra direct routes to these IPs via default gateway;\n * - this allows to use `0.0.0.0/0, ::/0` in the `allowedIps` (and corresponding fwmark magic) and still have some IPs excluded from the tunnel.\n */\n excludedIps: z.string().array().default([]),\n\n /**\n * The convenience option to exclude private IPs from the tunnel.\n *\n * For IPv4, the private IPs are:\n *\n * - `10.0.0.0/8`\n * - `172.16.0.0/12`\n * - `192.168.0.0/16`\n *\n * For IPv6, the private IPs are:\n *\n * - `fc00::/7`\n * - `fe80::/10`\n *\n * Will be merged with `excludedIps` if provided.\n */\n excludePrivateIps: z.boolean().default(false),\n\n /**\n * The endpoints of the WireGuard peer.\n */\n endpoints: z.string().array().default([]),\n\n /**\n * The allowed endpoints of the WireGuard peer.\n *\n * The non `hostname` endpoints will be added to the `allowedIps` of the peer.\n */\n allowedEndpoints: z.string().array().default([]),\n\n /**\n * The DNS servers that should be used by the interface connected to the WireGuard peer.\n *\n * If multiple peers define DNS servers, the node will merge them into a single list (but this is discouraged).\n */\n dns: z.string().array().default([]),\n\n /**\n * The convenience option to include the DNS servers to the allowed IPs.\n *\n * By default, is `true`.\n */\n includeDns: z.boolean().default(true),\n\n /**\n * The port to listen on.\n */\n listenPort: z.number().optional(),\n}\n\nconst sharedPeerInputs = {\n /**\n * The network to use for the WireGuard identity.\n *\n * If not provided, the identity will use default network configuration.\n */\n network: {\n entity: networkEntity,\n required: false,\n },\n\n /**\n * The L3 endpoints of the identity.\n *\n * Will produce L4 endpoints for each of the provided L3 endpoints.\n */\n l3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n required: false,\n },\n\n /**\n * The L4 endpoints of the identity.\n *\n * Will take priority over all calculated endpoints if provided.\n */\n l4Endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n\n /**\n * The L3 endpoints to add to the allowed IPs of the identity.\n *\n * `hostname` endpoints will be ignored.\n *\n * If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,\n * the corresponding network policy will be created.\n */\n allowedL3Endpoints: {\n entity: l3EndpointEntity,\n multiple: true,\n required: false,\n },\n\n /**\n * The L4 endpoints to add to the allowed IPs of the identity.\n *\n * If the endpoint contains k8s service metadata of the cluster where the identity node is deployed,\n * the corresponding network policy will be created.\n */\n allowedL4Endpoints: {\n entity: l4EndpointEntity,\n multiple: true,\n required: false,\n },\n} as const\n\nconst sharedPeerOutputs = {\n peer: peerEntity,\n\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n} as const\n\nexport type SharedPeerArgs = {\n peerName?: string\n address?: string\n exitNode: boolean\n excludedIps: string[]\n excludePrivateIps: boolean\n endpoints: string[]\n allowedEndpoints: string[]\n dns: string[]\n includeDns: boolean\n listenPort?: number\n}\n\n/**\n * The WireGuard peer with the public key.\n */\nexport const peer = defineUnit({\n type: \"wireguard.peer.v1\",\n\n args: {\n ...sharedPeerArgs,\n\n /**\n * The public key of the WireGuard peer.\n */\n publicKey: $addArgumentDescription(z.string(), `The public key of the WireGuard peer.`),\n },\n\n secrets: {\n /**\n * The pre-shared key which should be used for the peer.\n */\n presharedKey: $addArgumentDescription(z.string().optional(), `The pre-shared key which should be used for the peer.`),\n },\n\n inputs: sharedPeerInputs,\n outputs: sharedPeerOutputs,\n\n meta: {\n description: `The WireGuard peer with the public key.`,\n icon: \"simple-icons:wireguard\",\n iconColor: \"#88171a\",\n secondaryIcon: \"mdi:badge-account-horizontal\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"peer\",\n },\n})\n\n/**\n * Patches some properties of the WireGuard peer.\n */\nexport const peerPatch = defineUnit({\n type: \"wireguard.peer-patch.v1\",\n\n args: {\n /**\n * The endpoints of the WireGuard peer.\n */\n endpoints: $addArgumentDescription(z.string().array().default([]), `The endpoints of the WireGuard peer.`),\n\n /**\n * The mode to use for patching the endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n endpointsPatchMode: $addArgumentDescription(arrayPatchModeSchema.default(\"prepend\"), `The mode to use for patching the endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`),\n\n /**\n * The allowed endpoints of the WireGuard peer.\n *\n * The non `hostname` endpoints will be added to the `allowedIps` of the peer.\n */\n allowedEndpoints: $addArgumentDescription(z.string().array().default([]), `The allowed endpoints of the WireGuard peer.\n\n The non \\`hostname\\` endpoints will be added to the \\`allowedIps\\` of the peer.`),\n\n /**\n * The mode to use for patching the allowed endpoints.\n *\n * - `prepend`: prepend the new endpoints to the existing ones (default);\n * - `replace`: replace the existing endpoints with the new ones.\n */\n allowedEndpointsPatchMode: $addArgumentDescription(arrayPatchModeSchema.default(\"prepend\"), `The mode to use for patching the allowed endpoints.\n\n - \\`prepend\\`: prepend the new endpoints to the existing ones (default);\n - \\`replace\\`: replace the existing endpoints with the new ones.`),\n\n ...omit(sharedPeerArgs, [\"endpoints\", \"allowedEndpoints\"]),\n },\n\n inputs: {\n peer: peerEntity,\n ...sharedPeerInputs,\n },\n\n outputs: {\n peer: peerEntity,\n\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n meta: {\n description: `Patches some properties of the WireGuard peer.`,\n title: \"WireGuard Peer Patch\",\n icon: \"simple-icons:wireguard\",\n iconColor: \"#88171a\",\n secondaryIcon: \"mdi:badge-account-horizontal\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"peer-patch\",\n },\n})\n\n/**\n * The WireGuard identity with the public key.\n */\nexport const identity = defineUnit({\n type: \"wireguard.identity.v1\",\n\n args: {\n ...sharedPeerArgs,\n\n /**\n * The port to listen on.\n *\n * Used by the implementation of the identity and to calculate the endpoint of the peer.\n */\n listenPort: $addArgumentDescription(z.number().optional(), `The port to listen on.\n\n Used by the implementation of the identity and to calculate the endpoint of the peer.`),\n\n /**\n * The endpoint of the WireGuard peer.\n *\n * If overridden, does not affect node which implements the identity, but is used in the peer configuration of other nodes.\n *\n * Will take priority over all calculated endpoints and `l4Endpoint` input.\n */\n endpoints: $addArgumentDescription(z.string().array().default([]), `The endpoint of the WireGuard peer.\n\n If overridden, does not affect node which implements the identity, but is used in the peer configuration of other nodes.\n\n Will take priority over all calculated endpoints and \\`l4Endpoint\\` input.`),\n },\n\n secrets: {\n /**\n * The private key of the WireGuard identity.\n *\n * If not provided, the key will be generated automatically.\n */\n privateKey: $addArgumentDescription(z.string().optional(), `The private key of the WireGuard identity.\n\n If not provided, the key will be generated automatically.`),\n\n /**\n * The part of the pre-shared of the WireGuard identity.\n *\n * Will be generated automatically if not provided.\n */\n presharedKeyPart: $addArgumentDescription(z.string().optional(), `The part of the pre-shared of the WireGuard identity.\n\n Will be generated automatically if not provided.`),\n },\n\n inputs: sharedPeerInputs,\n\n outputs: {\n identity: identityEntity,\n ...sharedPeerOutputs,\n },\n\n meta: {\n description: `The WireGuard identity with the public key.`,\n icon: \"simple-icons:wireguard\",\n iconColor: \"#88171a\",\n secondaryIcon: \"mdi:account\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"identity\",\n },\n})\n\n/**\n * The WireGuard node deployed in the Kubernetes cluster.\n */\nexport const nodeK8s = defineUnit({\n type: \"wireguard.node.k8s.v1\",\n\n args: {\n /**\n * The name of the namespace/deployment/statefulset where the WireGuard node will be deployed.\n *\n * By default, the name is `wg-${identity.name}`.\n */\n appName: $addArgumentDescription(z.string().optional(), `The name of the namespace/deployment/statefulset where the WireGuard node will be deployed.\n\n By default, the name is \\`wg-\\${identity.name}\\`.`),\n\n /**\n * Whether to expose the WireGuard node to the outside world.\n */\n external: $addArgumentDescription(z.boolean().default(false), `Whether to expose the WireGuard node to the outside world.`),\n\n /**\n * The policy to use for exposing the WireGuard node.\n *\n * - `always` - The node will be exposed and the service will be created.\n * - `when-has-endpoint` - The node will be exposed only if the provided idenity has at least one endpoint.\n * - `never` - The node will not be exposed and the service will not be created.\n *\n * * By default, the `when-has-endpoint` policy is used.\n */\n exposePolicy: $addArgumentDescription(nodeExposePolicySchema.default(\"when-has-endpoint\"), `The policy to use for exposing the WireGuard node.\n\n - \\`always\\` - The node will be exposed and the service will be created.\n - \\`when-has-endpoint\\` - The node will be exposed only if the provided idenity has at least one endpoint.\n - \\`never\\` - The node will not be exposed and the service will not be created.\n\n * By default, the \\`when-has-endpoint\\` policy is used.`),\n\n /**\n * The extra specification of the container which runs the WireGuard node.\n *\n * Will override any overlapping fields.\n */\n containerSpec: $addArgumentDescription(z.record(z.string(), z.unknown()).optional(), `The extra specification of the container which runs the WireGuard node.\n\n Will override any overlapping fields.`),\n\n /**\n * List of CIDR blocks that should be blocked from forwarding through this WireGuard node.\n *\n * This prevents other peers from reaching these destination CIDRs while still allowing\n * the peers in those CIDRs to access the internet and other allowed endpoints.\n *\n * Useful for peer isolation where you want to prevent cross-peer communication.\n */\n forwardRestrictedIps: $addArgumentDescription(z.string().array().default([]), `List of CIDR blocks that should be blocked from forwarding through this WireGuard node.\n\n This prevents other peers from reaching these destination CIDRs while still allowing\n the peers in those CIDRs to access the internet and other allowed endpoints.\n\n Useful for peer isolation where you want to prevent cross-peer communication.`),\n },\n\n inputs: {\n identity: identityEntity,\n k8sCluster: clusterEntity,\n\n workload: {\n entity: exposableWorkloadEntity,\n required: false,\n },\n\n interface: {\n entity: networkInterfaceEntity,\n required: false,\n },\n\n peers: {\n entity: peerEntity,\n multiple: true,\n required: false,\n },\n },\n\n outputs: {\n interface: {\n entity: networkInterfaceEntity,\n required: false,\n },\n\n peer: {\n entity: peerEntity,\n required: false,\n },\n\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n meta: {\n description: `The WireGuard node deployed in the Kubernetes cluster.`,\n title: \"WireGuard Kubernetes Node\",\n icon: \"simple-icons:wireguard\",\n iconColor: \"#88171a\",\n secondaryIcon: \"devicon:kubernetes\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"node.k8s\",\n },\n})\n\n/**\n * The WireGuard node deployed on a server using wg-quick systemd service.\n */\nexport const node = defineUnit({\n type: \"wireguard.node.v1\",\n\n args: {\n /**\n * The name of the WireGuard interface.\n *\n * By default, the name is `wg-${identity.name}` (truncated to 15 characters).\n */\n interfaceName: $addArgumentDescription(z.string().optional(), `The name of the WireGuard interface.\n\n By default, the name is \\`wg-\\${identity.name}\\` (truncated to 15 characters).`),\n\n /**\n * The name of the default interface for excluded routes.\n *\n * This is used to route excluded IPs through the default interface instead of the WireGuard tunnel.\n */\n defaultInterface: $addArgumentDescription(z.string().default(\"eth0\"), `The name of the default interface for excluded routes.\n\n This is used to route excluded IPs through the default interface instead of the WireGuard tunnel.`),\n\n /**\n * List of CIDR blocks that should be blocked from forwarding through this WireGuard node.\n *\n * This prevents other peers from reaching these destination CIDRs while still allowing\n * the peers in those CIDRs to access the internet and other allowed endpoints.\n *\n * Useful for peer isolation where you want to prevent cross-peer communication.\n */\n forwardRestrictedIps: $addArgumentDescription(z.string().array().default([]), `List of CIDR blocks that should be blocked from forwarding through this WireGuard node.\n\n This prevents other peers from reaching these destination CIDRs while still allowing\n the peers in those CIDRs to access the internet and other allowed endpoints.\n\n Useful for peer isolation where you want to prevent cross-peer communication.`),\n\n /**\n * Whether to enable IP masquerading (NAT) for outgoing traffic.\n *\n * By default, IP masquerading is enabled.\n */\n enableMasquerade: $addArgumentDescription(z.boolean().default(true), `Whether to enable IP masquerading (NAT) for outgoing traffic.\n\n By default, IP masquerading is enabled.`),\n\n /**\n * Script to run before bringing up the interface.\n */\n preUpScript: $addArgumentDescription(z.string().optional().meta({ language: \"shell\" }), `Script to run before bringing up the interface.`),\n\n /**\n * Script to run after bringing up the interface.\n */\n postUpScript: $addArgumentDescription(z.string().optional().meta({ language: \"shell\" }), `Script to run after bringing up the interface.`),\n\n /**\n * Script to run before bringing down the interface.\n */\n preDownScript: $addArgumentDescription(z.string().optional().meta({ language: \"shell\" }), `Script to run before bringing down the interface.`),\n\n /**\n * Script to run after bringing down the interface.\n */\n postDownScript: $addArgumentDescription(z.string().optional().meta({ language: \"shell\" }), `Script to run after bringing down the interface.`),\n },\n\n inputs: {\n identity: identityEntity,\n server: {\n entity: serverEntity,\n required: true,\n },\n\n peers: {\n entity: peerEntity,\n multiple: true,\n required: false,\n },\n },\n\n outputs: {\n peer: {\n entity: peerEntity,\n required: false,\n },\n\n endpoints: {\n entity: l4EndpointEntity,\n required: false,\n multiple: true,\n },\n },\n\n meta: {\n description: `The WireGuard node deployed on a server using wg-quick systemd service.`,\n title: \"WireGuard Server Node\",\n icon: \"simple-icons:wireguard\",\n iconColor: \"#88171a\",\n secondaryIcon: \"mdi:server\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"node\",\n },\n})\n\n/**\n * Just the WireGuard configuration for the identity and peers.\n */\nexport const config = defineUnit({\n type: \"wireguard.config.v1\",\n\n args: {\n /**\n * The name of the \"default\" interface where non-tunneled traffic should go.\n *\n * If not provided, the config will not respect `excludedIps`.\n */\n defaultInterface: $addArgumentDescription(z.string().optional(), `The name of the \"default\" interface where non-tunneled traffic should go.\n\n If not provided, the config will not respect \\`excludedIps\\`.`),\n },\n\n inputs: {\n identity: identityEntity,\n peers: {\n entity: peerEntity,\n multiple: true,\n required: false,\n },\n },\n\n meta: {\n description: `Just the WireGuard configuration for the identity and peers.`,\n title: \"WireGuard Config\",\n icon: \"simple-icons:wireguard\",\n iconColor: \"#88171a\",\n secondaryIcon: \"mdi:settings\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"config\",\n },\n})\n\n/**\n * The WireGuard configuration bundle for the identity and peers.\n */\nexport const configBundle = defineUnit({\n type: \"wireguard.config-bundle.v1\",\n\n inputs: {\n identity: identityEntity,\n peers: {\n entity: peerEntity,\n multiple: true,\n },\n sharedPeers: {\n entity: peerEntity,\n multiple: true,\n required: false,\n },\n },\n\n meta: {\n description: `The WireGuard configuration bundle for the identity and peers.`,\n title: \"WireGuard Config Bundle\",\n icon: \"simple-icons:wireguard\",\n iconColor: \"#88171a\",\n secondaryIcon: \"mdi:folder-settings-variant\",\n category: \"VPN\",\n },\n\n source: {\n package: \"@highstate/wireguard\",\n path: \"config-bundle\",\n },\n})\n","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { serverOutputs, vmSecrets, vmSshArgs } from \"../common\"\nimport * as ssh from \"../ssh\"\n\nexport const connectionEntity = defineEntity({\n type: \"timeweb.connection.v1\",\n\n schema: z.object({\n name: z.string(),\n apiToken: z.string(),\n }),\n})\n\n/**\n * The Timeweb connection for a single account.\n */\nexport const connection = defineUnit({\n type: \"timeweb.connection.v1\",\n\n secrets: {\n /**\n * The API token for the Timeweb account.\n *\n * Can be obtained from the Timeweb control panel.\n */\n apiToken: $addArgumentDescription(z.string(), `The API token for the Timeweb account.\n\n Can be obtained from the Timeweb control panel.`),\n },\n\n outputs: {\n connection: connectionEntity,\n },\n\n meta: {\n description: `The Timeweb connection for a single account.`,\n title: \"Timeweb Connection\",\n icon: \"material-symbols:cloud\",\n category: \"Timeweb\",\n },\n\n source: {\n package: \"@highstate/timeweb\",\n path: \"connection\",\n },\n})\n\nexport const virtualMachine = defineUnit({\n type: \"timeweb.virtual-machine.v1\",\n\n args: {\n /**\n * The ID of the preset to use for the virtual machine.\n *\n * Can be obtained from the Timeweb control panel when creating a new virtual machine.\n */\n presetId: $addArgumentDescription(z.number().optional(), `The ID of the preset to use for the virtual machine.\n\n Can be obtained from the Timeweb control panel when creating a new virtual machine.`),\n\n /**\n * The ID of the operating system to use for the virtual machine.\n *\n * Can be obtained from the Timeweb control panel when creating a new virtual machine.\n */\n osId: $addArgumentDescription(z.number().optional(), `The ID of the operating system to use for the virtual machine.\n\n Can be obtained from the Timeweb control panel when creating a new virtual machine.`),\n\n /**\n * The ID of the connection to use for the virtual machine.\n *\n * Can be obtained from the Timeweb control panel when creating a new virtual machine.\n */\n availabilityZone: $addArgumentDescription(z.string(), `The ID of the connection to use for the virtual machine.\n\n Can be obtained from the Timeweb control panel when creating a new virtual machine.`),\n\n /**\n * The SSH arguments to use for the virtual machine.\n */\n ssh: $addArgumentDescription(vmSshArgs, `The SSH arguments to use for the virtual machine.`),\n },\n\n inputs: {\n connection: connectionEntity,\n ...ssh.inputs,\n },\n\n secrets: vmSecrets,\n\n outputs: {\n ...serverOutputs,\n },\n\n meta: {\n title: \"Timeweb Virtual Machine\",\n description: \"Creates a new Timeweb virtual machine.\",\n icon: \"material-symbols:cloud\",\n secondaryIcon: \"codicon:vm\",\n category: \"Timeweb\",\n },\n\n source: {\n package: \"@highstate/timeweb\",\n path: \"virtual-machine\",\n },\n})\n"]}