@highstate/library 0.9.18 → 0.9.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/highstate.library.msgpack +0 -0
  2. package/dist/index.js +3467 -3083
  3. package/dist/index.js.map +1 -1
  4. package/package.json +5 -4
  5. package/src/common/access-point.ts +105 -0
  6. package/src/{files.ts → common/files.ts} +10 -8
  7. package/src/common/index.ts +3 -0
  8. package/src/{common.ts → common/server.ts} +69 -38
  9. package/src/databases/index.ts +4 -0
  10. package/src/databases/mariadb.ts +37 -0
  11. package/src/databases/mongodb.ts +37 -0
  12. package/src/databases/postgresql.ts +37 -0
  13. package/src/databases/shared.ts +61 -0
  14. package/src/distributions/ubuntu.ts +6 -4
  15. package/src/dns.ts +110 -12
  16. package/src/git.ts +7 -3
  17. package/src/impl-ref.ts +26 -0
  18. package/src/index.ts +14 -15
  19. package/src/k3s.ts +7 -5
  20. package/src/k8s/apps/code-server.ts +48 -0
  21. package/src/k8s/apps/gitea.ts +25 -0
  22. package/src/k8s/apps/grocy.ts +39 -0
  23. package/src/k8s/apps/hubble.ts +30 -0
  24. package/src/{apps → k8s/apps}/index.ts +16 -13
  25. package/src/k8s/apps/kubernetes-dashboard.ts +28 -0
  26. package/src/k8s/apps/mariadb.ts +83 -0
  27. package/src/k8s/apps/maybe.ts +39 -0
  28. package/src/k8s/apps/mongodb.ts +84 -0
  29. package/src/k8s/apps/postgresql.ts +86 -0
  30. package/src/k8s/apps/shared.ts +149 -0
  31. package/src/{apps → k8s/apps}/syncthing.ts +27 -9
  32. package/src/k8s/apps/traefik.ts +40 -0
  33. package/src/k8s/apps/vaultwarden.ts +31 -0
  34. package/src/k8s/apps/workload.ts +214 -0
  35. package/src/k8s/apps/zitadel.ts +26 -0
  36. package/src/k8s/cert-manager.ts +80 -0
  37. package/src/k8s/cilium.ts +64 -0
  38. package/src/k8s/gateway.ts +70 -0
  39. package/src/k8s/index.ts +9 -0
  40. package/src/{obfuscators → k8s/obfuscators}/phantun.ts +10 -6
  41. package/src/{obfuscators → k8s/obfuscators}/shared.ts +11 -5
  42. package/src/k8s/resources.ts +111 -0
  43. package/src/k8s/service.ts +65 -0
  44. package/src/{k8s.ts → k8s/shared.ts} +35 -329
  45. package/src/k8s/workload.ts +77 -0
  46. package/src/network.ts +208 -22
  47. package/src/nixos.ts +23 -8
  48. package/src/proxmox.ts +62 -75
  49. package/src/restic.ts +15 -6
  50. package/src/sops.ts +16 -5
  51. package/src/ssh.ts +107 -9
  52. package/src/talos.ts +6 -4
  53. package/src/third-party/cloudflare.ts +59 -0
  54. package/src/third-party/index.ts +3 -0
  55. package/src/{mullvad.ts → third-party/mullvad.ts} +6 -4
  56. package/src/third-party/timeweb.ts +99 -0
  57. package/src/utils.ts +24 -3
  58. package/src/wireguard.ts +171 -48
  59. package/src/apps/code-server.ts +0 -34
  60. package/src/apps/deployment.ts +0 -60
  61. package/src/apps/dns.ts +0 -107
  62. package/src/apps/gitea.ts +0 -18
  63. package/src/apps/grocy.ts +0 -20
  64. package/src/apps/hubble.ts +0 -20
  65. package/src/apps/kubernetes-dashboard.ts +0 -19
  66. package/src/apps/mariadb.ts +0 -81
  67. package/src/apps/maybe.ts +0 -25
  68. package/src/apps/mongodb.ts +0 -81
  69. package/src/apps/network.ts +0 -55
  70. package/src/apps/postgresql.ts +0 -81
  71. package/src/apps/shared.ts +0 -289
  72. package/src/apps/test.ts +0 -19
  73. package/src/apps/traefik.ts +0 -36
  74. package/src/apps/vaultwarden.ts +0 -23
  75. package/src/apps/zitadel.ts +0 -21
  76. package/src/cloudflare.ts +0 -26
  77. package/src/timeweb.ts +0 -75
  78. package/src/{obfuscators → k8s/obfuscators}/index.ts +1 -1
package/src/apps/test.ts DELETED
@@ -1,19 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- import * as apps from "./mariadb"
3
-
4
- import type { InstanceInput } from "@highstate/contract"
5
-
6
- declare const cluster: InstanceInput<"k8s.cluster">
7
-
8
- const { mariadb, service } = apps.mariadb({
9
- name: "test",
10
- args: {
11
- external: true,
12
- },
13
- inputs: {
14
- k8sCluster: cluster,
15
- },
16
- })
17
-
18
- void mariadb
19
- void service
@@ -1,36 +0,0 @@
1
- import { defineUnit, z } from "@highstate/contract"
2
- import { gatewayEntity, serviceEntity } from "../k8s"
3
- import { l4EndpointEntity } from "../network"
4
- import { createArgs, createInputs } from "./shared"
5
-
6
- export const traefikGateway = defineUnit({
7
- type: "apps.traefik-gateway",
8
-
9
- args: {
10
- ...createArgs("traefik", ["external"]),
11
- className: z.string().optional(),
12
- },
13
-
14
- inputs: createInputs(),
15
-
16
- outputs: {
17
- gateway: gatewayEntity,
18
- service: serviceEntity,
19
- endpoints: {
20
- entity: l4EndpointEntity,
21
- multiple: true,
22
- },
23
- },
24
-
25
- meta: {
26
- title: "Traefik Gateway",
27
- description: "A Traefik gateway for routing traffic to services.",
28
- icon: "simple-icons:traefikproxy",
29
- category: "Network",
30
- },
31
-
32
- source: {
33
- package: "@highstate/apps",
34
- path: "traefik",
35
- },
36
- })
@@ -1,23 +0,0 @@
1
- import { defineUnit, z } from "@highstate/contract"
2
- import { createArgs, createInputs, createSource } from "./shared"
3
-
4
- export const vaultwarden = defineUnit({
5
- type: "apps.vaultwarden",
6
-
7
- args: createArgs("vaultwarden", ["fqdn"]),
8
-
9
- secrets: {
10
- mariadbPassword: z.string().optional(),
11
- },
12
-
13
- inputs: createInputs(["accessPoint", "mariadb"]),
14
-
15
- meta: {
16
- title: "Vaultwarden",
17
- description: "The Vaultwarden password manager deployed on Kubernetes.",
18
- icon: "simple-icons:vaultwarden",
19
- category: "Security",
20
- },
21
-
22
- source: createSource("vaultwarden"),
23
- })
@@ -1,21 +0,0 @@
1
- import { defineUnit } from "@highstate/contract"
2
- import { createArgs, createInputs } from "./shared"
3
-
4
- export const zitadel = defineUnit({
5
- type: "apps.zitadel",
6
-
7
- args: createArgs("zitadel", ["fqdn"]),
8
-
9
- inputs: createInputs(["accessPoint", "postgresql"]),
10
-
11
- meta: {
12
- title: "Zitadel",
13
- description: "The Zitadel IAM deployed on Kubernetes.",
14
- icon: "hugeicons:access",
15
- },
16
-
17
- source: {
18
- package: "@highstate/apps",
19
- path: "zitadel",
20
- },
21
- })
package/src/cloudflare.ts DELETED
@@ -1,26 +0,0 @@
1
- import { defineUnit, z } from "@highstate/contract"
2
- import { providerEntity } from "./dns"
3
-
4
- export const connection = defineUnit({
5
- type: "cloudflare.connection",
6
-
7
- secrets: {
8
- apiToken: z.string(),
9
- },
10
-
11
- outputs: {
12
- dnsProvider: providerEntity,
13
- },
14
-
15
- meta: {
16
- title: "Cloudflare Connection",
17
- description: "Creates a new Cloudflare connection for one zone.",
18
- icon: "simple-icons:cloudflare",
19
- category: "Cloudflare",
20
- },
21
-
22
- source: {
23
- package: "@highstate/cloudflare",
24
- path: "connection",
25
- },
26
- })
package/src/timeweb.ts DELETED
@@ -1,75 +0,0 @@
1
- import { defineEntity, defineUnit, z } from "@highstate/contract"
2
- import { serverEntity } from "./common"
3
- import { keyPairEntity } from "./ssh"
4
-
5
- export const connectionEntity = defineEntity({
6
- type: "timeweb.connection",
7
-
8
- schema: z.object({
9
- name: z.string(),
10
- apiToken: z.string(),
11
- }),
12
- })
13
-
14
- export const connection = defineUnit({
15
- type: "timeweb.connection",
16
-
17
- secrets: {
18
- apiToken: z.string(),
19
- },
20
-
21
- outputs: {
22
- connection: connectionEntity,
23
- },
24
-
25
- meta: {
26
- title: "Timeweb Connection",
27
- description: "Creates a new Timeweb connection.",
28
- icon: "material-symbols:cloud",
29
- category: "Timeweb",
30
- },
31
-
32
- source: {
33
- package: "@highstate/timeweb",
34
- path: "connection",
35
- },
36
- })
37
-
38
- export const virtualMachine = defineUnit({
39
- type: "timeweb.virtual-machine",
40
-
41
- args: {
42
- presetId: z.number().optional(),
43
- osId: z.number().optional(),
44
- availabilityZone: z.string(),
45
- },
46
-
47
- inputs: {
48
- connection: connectionEntity,
49
- sshKeyPair: {
50
- entity: keyPairEntity,
51
- required: false,
52
- },
53
- },
54
-
55
- secrets: {
56
- sshPrivateKey: z.string().optional(),
57
- },
58
-
59
- outputs: {
60
- server: serverEntity,
61
- },
62
-
63
- meta: {
64
- title: "Timeweb Virtual Machine",
65
- description: "Creates a new Timeweb virtual machine.",
66
- icon: "material-symbols:cloud",
67
- secondaryIcon: "codicon:vm",
68
- category: "Timeweb",
69
- },
70
-
71
- source: {
72
- package: "@highstate/timeweb",
73
- path: "virtual-machine",
74
- },
75
- })
@@ -1,2 +1,2 @@
1
- export * from "./shared"
2
1
  export * as phantun from "./phantun"
2
+ export * from "./shared"