@highstate/library 0.9.32 → 0.9.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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/game-servers/index.ts","../src/k8s/game-servers/satisfactory.ts","../src/k8s/gateway.ts","../src/k8s/obfuscators/index.ts","../src/k8s/obfuscators/phantun.ts","../src/k8s/obfuscators/shared.ts","../src/k8s/reduced-access.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","../src/third-party/yandex.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;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;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,uBAAA,EAAA,MAAA,uBAAA;AAAA,EAAA,cAAA,EAAA,MAAA,cAAA;AAAA,EAAA,cAAA,EAAA,MAAA,cAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,mBAAA,EAAA,MAAA,mBAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,gBAAA,EAAA,MAAA,gBAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAA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;AAAA,GACT;AAAA,EAEA,OAAA,EAAS,aAAA;AAAA,EAET,IAAA,EAAM;AAAA,IACJ,WAAA,EAAa,CAAA,oCAAA,CAAA;AAAA,IACb,KAAA,EAAO,8BAAA;AAAA,IACP,QAAA,EAAU,cAAA;AAAA,IACV,IAAA,EAAM,0BAAA;AAAA,IACN,SAAA,EAAW,SAAA;AAAA,IACX,aAAA,EAAe;AAAA,GACjB;AAAA,EAEA,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,IAAA,EAAM;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","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 { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport * as dns from \"../dns\"\nimport { implementationReferenceSchema } from \"../impl-ref\"\nimport { l3EndpointEntity } from \"../network\"\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 * The public L3 endpoints of the gateway.\n *\n * If not provided, should be automatically detected by the implementation.\n */\n endpoints: l3EndpointEntity.schema.array().default([]).meta({ title: __camelCaseToHumanReadable(\"endpoints\"), description: `The public L3 endpoints of the gateway.\n\n If not provided, should be automatically detected by the implementation.` }),\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 * Whether the DNS records created for the access point should be proxied.\n */\n proxied: z.boolean().default(false).meta({ title: __camelCaseToHumanReadable(\"proxied\"), description: `Whether the DNS records created for the access point should be proxied.` }),\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 args: {\n /**\n * Whether the DNS records created for the access point should be proxied.\n *\n * This option is specific to certain DNS providers that support proxying, such as Cloudflare.\n * When enabled, the DNS records will be proxied through the provider's network, providing additional security and performance benefits.\n *\n * Defaults to `false`.\n */\n proxied: $addArgumentDescription(z.boolean().default(false), `Whether the DNS records created for the access point should be proxied.\n\n This option is specific to certain DNS providers that support proxying, such as Cloudflare.\n When enabled, the DNS records will be proxied through the provider's network, providing additional security and performance benefits.\n\n Defaults to \\`false\\`.`),\n },\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: \"units/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: \"units/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: \"units/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 * as gameServers from \"./game-servers\"\nexport * from \"./gateway\"\nexport * as obfuscators from \"./obfuscators\"\nexport * from \"./reduced-access\"\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 sharedSecrets,\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 text,\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 * Can be both L3 (IP addresses) or L4 (IP:port) endpoints and the interpretation is up to the application.\n */\n endpoints: z.string().array().default([]),\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: text`\n The name of the application to deploy.\n Defines the name of the namespace and other resources.\n\n If not provided, defaults to \"${defaultAppName}\".\n `,\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 key to use for backup encryption. If not provided, a random key will be generated.\n */\n backupKey: 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, [\"backupKey\"]),\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\", \"endpoints\"]),\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 { namespaceEntity } from \"../resources\"\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.v0\",\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 command to run in the container.\n */\n command: $addArgumentDescription(z.array(z.string()).default([]), `The command to run in the container.`),\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 namespace: namespaceEntity,\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(\"workload\"),\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","export * from \"./satisfactory\"\n","import { defineUnit, z } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { appName, optionalSharedInputs, sharedArgs, sharedInputs, sharedSecrets } from \"../apps\"\n\nexport const satisfactory = defineUnit({\n type: \"k8s.game-servers.satisfactory.v1\",\n\n args: {\n ...appName(\"satisfactory-server\"),\n ...pick(sharedArgs, [\"fqdn\"]),\n\n port: z.number().default(7777).describe(\"The port the game server will be exposed on.\"),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\"]),\n },\n\n secrets: {\n ...pick(sharedSecrets, [\"backupKey\"]),\n },\n\n source: {\n package: \"@highstate/k8s.game-servers\",\n path: \"satisfactory\",\n },\n\n meta: {\n title: \"Satisfactory Server\",\n description: \"The dedicated server for the Satisfactory game.\",\n icon: \"mdi:google-gamepad\",\n },\n})\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 { certificateEntity, namespaceEntity, persistentVolumeClaimEntity } from \"./resources\"\nimport { serviceEntity } from \"./service\"\nimport { clusterEntity } from \"./shared\"\nimport { deploymentEntity, statefulSetEntity } from \"./workload\"\n\nconst k8sVerbsSchema = z.enum([\n \"get\",\n \"list\",\n \"watch\",\n \"create\",\n \"update\",\n \"patch\",\n \"delete\",\n \"deletecollection\",\n])\n\n/**\n * Creates a reduced access cluster with ServiceAccount-based authentication for specific Kubernetes resources.\n */\nexport const reducedAccessCluster = defineUnit({\n type: \"k8s.reduced-access-cluster.v0\",\n\n args: {\n /**\n * The verbs to allow on the specified resources.\n *\n * Defaults to read-only access (get, list, watch).\n */\n verbs: $addArgumentDescription(k8sVerbsSchema.array().default([\"get\", \"list\", \"watch\"]), `The verbs to allow on the specified resources.\n\n Defaults to read-only access (get, list, watch).`),\n\n /**\n * The name of the ServiceAccount to create.\n *\n * If not provided, will be the same as the unit name.\n */\n serviceAccountName: $addArgumentDescription(z.string().optional(), `The name of the ServiceAccount to create.\n\n If not provided, will be the same as the unit name.`),\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n\n /**\n * The namespace where the ServiceAccount will be created.\n */\n namespace: $addInputDescription(namespaceEntity, `The namespace where the ServiceAccount will be created.`),\n\n /**\n * The deployments to grant access to.\n */\n deployments: $addInputDescription({\n entity: deploymentEntity,\n multiple: true,\n required: false,\n }, `The deployments to grant access to.`),\n\n /**\n * The stateful sets to grant access to.\n */\n statefulSets: $addInputDescription({\n entity: statefulSetEntity,\n multiple: true,\n required: false,\n }, `The stateful sets to grant access to.`),\n\n /**\n * The services to grant access to.\n */\n services: $addInputDescription({\n entity: serviceEntity,\n multiple: true,\n required: false,\n }, `The services to grant access to.`),\n\n /**\n * The persistent volume claims to grant access to.\n */\n persistentVolumeClaims: $addInputDescription({\n entity: persistentVolumeClaimEntity,\n multiple: true,\n required: false,\n }, `The persistent volume claims to grant access to.`),\n\n /**\n * The secrets to grant access to.\n */\n secrets: $addInputDescription({\n entity: certificateEntity,\n multiple: true,\n required: false,\n }, `The secrets to grant access to.`),\n\n /**\n * The config maps to grant access to.\n */\n configMaps: $addInputDescription({\n entity: certificateEntity,\n multiple: true,\n required: false,\n }, `The config maps to grant access to.`),\n },\n\n outputs: {\n k8sCluster: clusterEntity,\n },\n\n meta: {\n description: `Creates a reduced access cluster with ServiceAccount-based authentication for specific Kubernetes resources.`,\n title: \"Reduced Access Cluster\",\n icon: \"devicon:kubernetes\",\n secondaryIcon: \"mdi:shield-lock\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/reduced-access-cluster\",\n },\n})\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 { clusterEntity, exposableWorkloadEntity, networkInterfaceEntity } from \"./k8s\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"./network\"\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 * The keepalive interval in seconds that will be used by all nodes connecting to this peer.\n *\n * If set to 0, keepalive is disabled.\n */\n persistentKeepalive: z.number().int().nonnegative().default(0).meta({ title: __camelCaseToHumanReadable(\"persistentKeepalive\"), description: `The keepalive interval in seconds that will be used by all nodes connecting to this peer.\n\n If set to 0, keepalive is disabled.` }),\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","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { serverOutputs, vmSecrets, vmSshArgs } from \"../common\"\nimport { ipv4PrefixSchema, ipv46Schema } from \"../network\"\nimport * as ssh from \"../ssh\"\n\nexport const cloudEntity = defineEntity({\n type: \"yandex.cloud.v1\",\n\n schema: z.object({\n token: z.string().optional(),\n serviceAccountKeyFile: z.string().optional(),\n cloudId: z.string(),\n defaultFolderId: z.string(),\n defaultZone: z.string(),\n regionId: z.string().optional(),\n }),\n\n meta: {\n color: \"#0080ff\",\n },\n})\n\n/**\n * The connection to a Yandex Cloud account.\n */\nexport const connection = defineUnit({\n type: \"yandex.connection.v1\",\n\n args: {\n /**\n * The availability zone for resources.\n */\n defaultZone: $addArgumentDescription(z.string().default(\"ru-central1-d\"), `The availability zone for resources.`),\n\n /**\n * The region ID for resources.\n */\n regionId: $addArgumentDescription(z.string().default(\"ru-central1\"), `The region ID for resources.`),\n },\n\n secrets: {\n /**\n * The service account key file content (JSON).\n */\n serviceAccountKeyFile: $addArgumentDescription({\n schema: z.string().meta({ language: \"json\" }),\n meta: {\n title: \"Service Account Key File\",\n },\n }, `The service account key file content (JSON).`),\n },\n\n inputs: {\n ...ssh.inputs,\n },\n\n outputs: {\n /**\n * The Yandex Cloud connection.\n */\n yandexCloud: $addInputDescription(cloudEntity, `The Yandex Cloud connection.`),\n },\n\n meta: {\n description: `The connection to a Yandex Cloud account.`,\n title: \"Yandex Cloud Connection\",\n category: \"Yandex Cloud\",\n icon: \"simple-icons:yandexcloud\",\n iconColor: \"#0080ff\",\n },\n\n source: {\n package: \"@highstate/yandex\",\n path: \"connection\",\n },\n})\n\n/**\n * The virtual machine on Yandex Cloud.\n */\nexport const virtualMachine = defineUnit({\n type: \"yandex.virtual-machine.v1\",\n\n args: {\n /**\n * The platform ID for the instance.\n */\n platformId: $addArgumentDescription(z.string().default(\"standard-v3\"), `The platform ID for the instance.`),\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.\n */\n cores: z.number().default(2).meta({ title: __camelCaseToHumanReadable(\"cores\"), description: `The number of CPU cores.` }),\n\n /**\n * The amount of memory in GB.\n */\n memory: z.number().default(4).meta({ title: __camelCaseToHumanReadable(\"memory\"), description: `The amount of memory in GB.` }),\n\n /**\n * The core fraction (10-100).\n */\n coreFraction: z.number().min(10).max(100).optional().meta({ title: __camelCaseToHumanReadable(\"coreFraction\"), description: `The core fraction (10-100).` }),\n })\n .prefault({}), `The resources to allocate to the virtual machine.`),\n\n /**\n * The boot disk configuration.\n */\n disk: $addArgumentDescription(z\n .object({\n /**\n * The disk size in GB.\n *\n * For `network-ssd-nonreplicated` must be multiple of 93.\n */\n size: z.number().default(20).meta({ title: __camelCaseToHumanReadable(\"size\"), description: `The disk size in GB.\n\n For \\`network-ssd-nonreplicated\\` must be multiple of 93.` }),\n\n /**\n * The disk type.\n */\n type: z.string().default(\"network-ssd-nonreplicated\").meta({ title: __camelCaseToHumanReadable(\"type\"), description: `The disk type.` }),\n\n /**\n * The image family to use.\n */\n imageFamily: z.string().default(\"ubuntu-2204-lts\").meta({ title: __camelCaseToHumanReadable(\"imageFamily\"), description: `The image family to use.` }),\n })\n .prefault({}), `The boot disk configuration.`),\n\n /**\n * The network configuration.\n */\n network: $addArgumentDescription(z\n .object({\n /**\n * The subnet ID to connect to.\n * If not specified, will auto-discover the default subnet for the zone.\n */\n subnetId: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"subnetId\"), description: `The subnet ID to connect to.\n If not specified, will auto-discover the default subnet for the zone.` }),\n\n /**\n * Whether to assign a public IP.\n */\n assignPublicIp: z.boolean().default(true).meta({ title: __camelCaseToHumanReadable(\"assignPublicIp\"), description: `Whether to assign a public IP.` }),\n\n /**\n * The list of DNS servers.\n */\n dns: ipv46Schema.array().default([]).meta({ title: __camelCaseToHumanReadable(\"dns\"), description: `The list of DNS servers.` }),\n })\n .prefault({}), `The network configuration.`),\n\n /**\n * The IPv4 address configuration.\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 address: z.string(),\n prefix: ipv4PrefixSchema.default(24),\n gateway: z.string().optional(),\n }),\n ])\n .default({ type: \"dhcp\" }), `The IPv4 address configuration.`),\n\n /**\n * The SSH configuration.\n */\n ssh: $addArgumentDescription(vmSshArgs, `The SSH configuration.`),\n\n /**\n * Additional metadata for cloud-init.\n */\n metadata: $addArgumentDescription(z.record(z.string(), z.string()).default({}), `Additional metadata for cloud-init.`),\n },\n\n secrets: {\n ...vmSecrets,\n },\n\n inputs: {\n yandexCloud: cloudEntity,\n ...ssh.inputs,\n },\n\n outputs: serverOutputs,\n\n meta: {\n description: `The virtual machine on Yandex Cloud.`,\n title: \"Yandex Cloud Virtual Machine\",\n category: \"Yandex Cloud\",\n icon: \"simple-icons:yandexcloud\",\n iconColor: \"#0080ff\",\n secondaryIcon: \"codicon:vm\",\n },\n\n source: {\n package: \"@highstate/yandex\",\n path: \"virtual-machine\",\n },\n})\n\nexport type Cloud = z.infer<typeof cloudEntity.schema>\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/game-servers/index.ts","../src/k8s/game-servers/satisfactory.ts","../src/k8s/gateway.ts","../src/k8s/obfuscators/index.ts","../src/k8s/obfuscators/phantun.ts","../src/k8s/obfuscators/shared.ts","../src/k8s/reduced-access.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","../src/third-party/yandex.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;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;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,uBAAA,EAAA,MAAA,uBAAA;AAAA,EAAA,cAAA,EAAA,MAAA,cAAA;AAAA,EAAA,c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AAA;AAAA;AAAA,IAK/D,GAAA,EAAKG,uBAAAA,CAAwB,SAAA,EAAW,CAAA,sBAAA,CAAwB,CAAA;AAAA;AAAA;AAAA;AAAA,IAKhE,QAAA,EAAUA,uBAAAA,CAAwBH,CAAAA,CAAE,MAAA,CAAOA,EAAE,MAAA,EAAO,EAAGA,CAAAA,CAAE,MAAA,EAAQ,CAAA,CAAE,OAAA,CAAQ,EAAE,GAAG,CAAA,mCAAA,CAAqC;AAAA,GACvH;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,GAAG;AAAA,GACL;AAAA,EAEA,MAAA,EAAQ;AAAA,IACN,WAAA,EAAa,WAAA;AAAA,IACb,GAAOO;AAAA,GACT;AAAA,EAEA,OAAA,EAAS,aAAA;AAAA,EAET,IAAA,EAAM;AAAA,IACJ,WAAA,EAAa,CAAA,oCAAA,CAAA;AAAA,IACb,KAAA,EAAO,8BAAA;AAAA,IACP,QAAA,EAAU,cAAA;AAAA,IACV,IAAA,EAAM,0BAAA;AAAA,IACN,SAAA,EAAW,SAAA;AAAA,IACX,aAAA,EAAe;AAAA,GACjB;AAAA,EAEA,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,IAAA,EAAM;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","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 { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport * as dns from \"../dns\"\nimport { implementationReferenceSchema } from \"../impl-ref\"\nimport { l3EndpointEntity } from \"../network\"\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 * The public L3 endpoints of the gateway.\n *\n * If not provided, should be automatically detected by the implementation.\n */\n endpoints: l3EndpointEntity.schema.array().default([]).meta({ title: __camelCaseToHumanReadable(\"endpoints\"), description: `The public L3 endpoints of the gateway.\n\n If not provided, should be automatically detected by the implementation.` }),\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 * Whether the DNS records created for the access point should be proxied.\n */\n proxied: z.boolean().default(false).meta({ title: __camelCaseToHumanReadable(\"proxied\"), description: `Whether the DNS records created for the access point should be proxied.` }),\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 args: {\n /**\n * Whether the DNS records created for the access point should be proxied.\n *\n * This option is specific to certain DNS providers that support proxying, such as Cloudflare.\n * When enabled, the DNS records will be proxied through the provider's network, providing additional security and performance benefits.\n *\n * Defaults to `false`.\n */\n proxied: $addArgumentDescription(z.boolean().default(false), `Whether the DNS records created for the access point should be proxied.\n\n This option is specific to certain DNS providers that support proxying, such as Cloudflare.\n When enabled, the DNS records will be proxied through the provider's network, providing additional security and performance benefits.\n\n Defaults to \\`false\\`.`),\n },\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 type { Simplify } from \"type-fest\"\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 EmbeddedFile = Simplify<File & { content: { type: \"embedded\" } }>\nexport type ArtifactFile = Simplify<File & { content: { type: \"artifact\" } }>\nexport type LocalFile = Simplify<File & { content: { type: \"local\" } }>\nexport type RemoteFile = Simplify<File & { content: { type: \"remote\" } }>\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 EmbeddedFolder = Simplify<Folder & { content: { type: \"embedded\" } }>\nexport type ArtifactFolder = Simplify<Folder & { content: { type: \"artifact\" } }>\nexport type LocalFolder = Simplify<Folder & { content: { type: \"local\" } }>\nexport type RemoteFolder = Simplify<Folder & { content: { type: \"remote\" } }>\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: \"units/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: \"units/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: \"units/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 * as gameServers from \"./game-servers\"\nexport * from \"./gateway\"\nexport * as obfuscators from \"./obfuscators\"\nexport * from \"./reduced-access\"\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 sharedSecrets,\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 text,\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 * Can be both L3 (IP addresses) or L4 (IP:port) endpoints and the interpretation is up to the application.\n */\n endpoints: z.string().array().default([]),\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: text`\n The name of the application to deploy.\n Defines the name of the namespace and other resources.\n\n If not provided, defaults to \"${defaultAppName}\".\n `,\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 key to use for backup encryption. If not provided, a random key will be generated.\n */\n backupKey: 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, [\"backupKey\"]),\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\", \"endpoints\"]),\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 { namespaceEntity } from \"../resources\"\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.v0\",\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 command to run in the container.\n */\n command: $addArgumentDescription(z.array(z.string()).default([]), `The command to run in the container.`),\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 namespace: namespaceEntity,\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(\"workload\"),\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","export * from \"./satisfactory\"\n","import { defineUnit, z } from \"@highstate/contract\"\nimport { pick } from \"remeda\"\nimport { appName, optionalSharedInputs, sharedArgs, sharedInputs, sharedSecrets } from \"../apps\"\n\nexport const satisfactory = defineUnit({\n type: \"k8s.game-servers.satisfactory.v1\",\n\n args: {\n ...appName(\"satisfactory-server\"),\n ...pick(sharedArgs, [\"fqdn\"]),\n\n port: z.number().default(7777).describe(\"The port the game server will be exposed on.\"),\n },\n\n inputs: {\n ...pick(sharedInputs, [\"k8sCluster\", \"accessPoint\"]),\n ...pick(optionalSharedInputs, [\"resticRepo\"]),\n },\n\n secrets: {\n ...pick(sharedSecrets, [\"backupKey\"]),\n },\n\n source: {\n package: \"@highstate/k8s.game-servers\",\n path: \"satisfactory\",\n },\n\n meta: {\n title: \"Satisfactory Server\",\n description: \"The dedicated server for the Satisfactory game.\",\n icon: \"mdi:google-gamepad\",\n },\n})\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 { certificateEntity, namespaceEntity, persistentVolumeClaimEntity } from \"./resources\"\nimport { serviceEntity } from \"./service\"\nimport { clusterEntity } from \"./shared\"\nimport { deploymentEntity, statefulSetEntity } from \"./workload\"\n\nconst k8sVerbsSchema = z.enum([\n \"get\",\n \"list\",\n \"watch\",\n \"create\",\n \"update\",\n \"patch\",\n \"delete\",\n \"deletecollection\",\n])\n\n/**\n * Creates a reduced access cluster with ServiceAccount-based authentication for specific Kubernetes resources.\n */\nexport const reducedAccessCluster = defineUnit({\n type: \"k8s.reduced-access-cluster.v0\",\n\n args: {\n /**\n * The verbs to allow on the specified resources.\n *\n * Defaults to read-only access (get, list, watch).\n */\n verbs: $addArgumentDescription(k8sVerbsSchema.array().default([\"get\", \"list\", \"watch\"]), `The verbs to allow on the specified resources.\n\n Defaults to read-only access (get, list, watch).`),\n\n /**\n * The name of the ServiceAccount to create.\n *\n * If not provided, will be the same as the unit name.\n */\n serviceAccountName: $addArgumentDescription(z.string().optional(), `The name of the ServiceAccount to create.\n\n If not provided, will be the same as the unit name.`),\n },\n\n inputs: {\n k8sCluster: clusterEntity,\n\n /**\n * The namespace where the ServiceAccount will be created.\n */\n namespace: $addInputDescription(namespaceEntity, `The namespace where the ServiceAccount will be created.`),\n\n /**\n * The deployments to grant access to.\n */\n deployments: $addInputDescription({\n entity: deploymentEntity,\n multiple: true,\n required: false,\n }, `The deployments to grant access to.`),\n\n /**\n * The stateful sets to grant access to.\n */\n statefulSets: $addInputDescription({\n entity: statefulSetEntity,\n multiple: true,\n required: false,\n }, `The stateful sets to grant access to.`),\n\n /**\n * The services to grant access to.\n */\n services: $addInputDescription({\n entity: serviceEntity,\n multiple: true,\n required: false,\n }, `The services to grant access to.`),\n\n /**\n * The persistent volume claims to grant access to.\n */\n persistentVolumeClaims: $addInputDescription({\n entity: persistentVolumeClaimEntity,\n multiple: true,\n required: false,\n }, `The persistent volume claims to grant access to.`),\n\n /**\n * The secrets to grant access to.\n */\n secrets: $addInputDescription({\n entity: certificateEntity,\n multiple: true,\n required: false,\n }, `The secrets to grant access to.`),\n\n /**\n * The config maps to grant access to.\n */\n configMaps: $addInputDescription({\n entity: certificateEntity,\n multiple: true,\n required: false,\n }, `The config maps to grant access to.`),\n },\n\n outputs: {\n k8sCluster: clusterEntity,\n },\n\n meta: {\n description: `Creates a reduced access cluster with ServiceAccount-based authentication for specific Kubernetes resources.`,\n title: \"Reduced Access Cluster\",\n icon: \"devicon:kubernetes\",\n secondaryIcon: \"mdi:shield-lock\",\n category: \"Kubernetes\",\n },\n\n source: {\n package: \"@highstate/k8s\",\n path: \"units/reduced-access-cluster\",\n },\n})\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 * The inputs for them will be automatically added to the `inputs` attribute of the flake.\n *\n * You can run this component to see the generated `flake.nix` file in pages.\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 The inputs for them will be automatically added to the \\`inputs\\` attribute of the flake.\n\n You can run this component to see the generated \\`flake.nix\\` file in pages.`),\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 { clusterEntity, exposableWorkloadEntity, networkInterfaceEntity } from \"./k8s\"\nimport { l3EndpointEntity, l4EndpointEntity } from \"./network\"\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 * The keepalive interval in seconds that will be used by all nodes connecting to this peer.\n *\n * If set to 0, keepalive is disabled.\n */\n persistentKeepalive: z.number().int().nonnegative().default(0).meta({ title: __camelCaseToHumanReadable(\"persistentKeepalive\"), description: `The keepalive interval in seconds that will be used by all nodes connecting to this peer.\n\n If set to 0, keepalive is disabled.` }),\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","import { $addArgumentDescription, $addInputDescription } from \"@highstate/contract\"\nimport { camelCaseToHumanReadable as __camelCaseToHumanReadable } from \"@highstate/contract\"\nimport { defineEntity, defineUnit, z } from \"@highstate/contract\"\nimport { serverOutputs, vmSecrets, vmSshArgs } from \"../common\"\nimport { ipv4PrefixSchema, ipv46Schema } from \"../network\"\nimport * as ssh from \"../ssh\"\n\nexport const cloudEntity = defineEntity({\n type: \"yandex.cloud.v0\",\n\n schema: z.object({\n token: z.string().optional(),\n serviceAccountKeyFile: z.string().optional(),\n cloudId: z.string(),\n defaultFolderId: z.string(),\n defaultZone: z.string(),\n regionId: z.string().optional(),\n }),\n\n meta: {\n color: \"#0080ff\",\n },\n})\n\n/**\n * The connection to a Yandex Cloud account.\n */\nexport const connection = defineUnit({\n type: \"yandex.connection.v0\",\n\n args: {\n /**\n * The availability zone for resources.\n */\n defaultZone: $addArgumentDescription(z.string().default(\"ru-central1-d\"), `The availability zone for resources.`),\n\n /**\n * The region ID for resources.\n */\n regionId: $addArgumentDescription(z.string().default(\"ru-central1\"), `The region ID for resources.`),\n },\n\n secrets: {\n /**\n * The service account key file content (JSON).\n */\n serviceAccountKeyFile: $addArgumentDescription({\n schema: z.string().meta({ language: \"json\" }),\n meta: {\n title: \"Service Account Key File\",\n },\n }, `The service account key file content (JSON).`),\n },\n\n inputs: {\n ...ssh.inputs,\n },\n\n outputs: {\n /**\n * The Yandex Cloud connection.\n */\n yandexCloud: $addInputDescription(cloudEntity, `The Yandex Cloud connection.`),\n },\n\n meta: {\n description: `The connection to a Yandex Cloud account.`,\n title: \"Yandex Cloud Connection\",\n category: \"Yandex Cloud\",\n icon: \"simple-icons:yandexcloud\",\n iconColor: \"#0080ff\",\n },\n\n source: {\n package: \"@highstate/yandex\",\n path: \"connection\",\n },\n})\n\n/**\n * The virtual machine on Yandex Cloud.\n */\nexport const virtualMachine = defineUnit({\n type: \"yandex.virtual-machine.v0\",\n\n args: {\n /**\n * The platform ID for the instance.\n */\n platformId: $addArgumentDescription(z.string().default(\"standard-v3\"), `The platform ID for the instance.`),\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.\n */\n cores: z.number().default(2).meta({ title: __camelCaseToHumanReadable(\"cores\"), description: `The number of CPU cores.` }),\n\n /**\n * The amount of memory in GB.\n */\n memory: z.number().default(4).meta({ title: __camelCaseToHumanReadable(\"memory\"), description: `The amount of memory in GB.` }),\n\n /**\n * The core fraction (10-100).\n */\n coreFraction: z.number().min(10).max(100).optional().meta({ title: __camelCaseToHumanReadable(\"coreFraction\"), description: `The core fraction (10-100).` }),\n })\n .prefault({}), `The resources to allocate to the virtual machine.`),\n\n /**\n * The boot disk configuration.\n */\n disk: $addArgumentDescription(z\n .object({\n /**\n * The disk size in GB.\n *\n * For `network-ssd-nonreplicated` must be multiple of 93.\n */\n size: z.number().default(20).meta({ title: __camelCaseToHumanReadable(\"size\"), description: `The disk size in GB.\n\n For \\`network-ssd-nonreplicated\\` must be multiple of 93.` }),\n\n /**\n * The disk type.\n */\n type: z.string().default(\"network-ssd-nonreplicated\").meta({ title: __camelCaseToHumanReadable(\"type\"), description: `The disk type.` }),\n\n /**\n * The image family to use.\n */\n imageFamily: z.string().default(\"ubuntu-2204-lts\").meta({ title: __camelCaseToHumanReadable(\"imageFamily\"), description: `The image family to use.` }),\n })\n .prefault({}), `The boot disk configuration.`),\n\n /**\n * The network configuration.\n */\n network: $addArgumentDescription(z\n .object({\n /**\n * The subnet ID to connect to.\n * If not specified, will auto-discover the default subnet for the zone.\n */\n subnetId: z.string().optional().meta({ title: __camelCaseToHumanReadable(\"subnetId\"), description: `The subnet ID to connect to.\n If not specified, will auto-discover the default subnet for the zone.` }),\n\n /**\n * Whether to assign a public IP.\n */\n assignPublicIp: z.boolean().default(true).meta({ title: __camelCaseToHumanReadable(\"assignPublicIp\"), description: `Whether to assign a public IP.` }),\n\n /**\n * The list of DNS servers.\n */\n dns: ipv46Schema.array().default([]).meta({ title: __camelCaseToHumanReadable(\"dns\"), description: `The list of DNS servers.` }),\n })\n .prefault({}), `The network configuration.`),\n\n /**\n * The IPv4 address configuration.\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 address: z.string(),\n prefix: ipv4PrefixSchema.default(24),\n gateway: z.string().optional(),\n }),\n ])\n .default({ type: \"dhcp\" }), `The IPv4 address configuration.`),\n\n /**\n * The SSH configuration.\n */\n ssh: $addArgumentDescription(vmSshArgs, `The SSH configuration.`),\n\n /**\n * Additional metadata for cloud-init.\n */\n metadata: $addArgumentDescription(z.record(z.string(), z.string()).default({}), `Additional metadata for cloud-init.`),\n },\n\n secrets: {\n ...vmSecrets,\n },\n\n inputs: {\n yandexCloud: cloudEntity,\n ...ssh.inputs,\n },\n\n outputs: serverOutputs,\n\n meta: {\n description: `The virtual machine on Yandex Cloud.`,\n title: \"Yandex Cloud Virtual Machine\",\n category: \"Yandex Cloud\",\n icon: \"simple-icons:yandexcloud\",\n iconColor: \"#0080ff\",\n secondaryIcon: \"codicon:vm\",\n },\n\n source: {\n package: \"@highstate/yandex\",\n path: \"virtual-machine\",\n },\n})\n\nexport type Cloud = z.infer<typeof cloudEntity.schema>\n"]}