@highstate/library 0.9.16 → 0.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/highstate.library.msgpack +0 -0
- package/dist/index.js +3548 -2985
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/common/access-point.ts +105 -0
- package/src/common/files.ts +137 -0
- package/src/common/index.ts +3 -0
- package/src/common/server.ts +231 -0
- package/src/databases/index.ts +4 -0
- package/src/databases/mariadb.ts +37 -0
- package/src/databases/mongodb.ts +37 -0
- package/src/databases/postgresql.ts +37 -0
- package/src/databases/shared.ts +61 -0
- package/src/distributions/ubuntu.ts +13 -11
- package/src/dns.ts +116 -18
- package/src/git.ts +14 -10
- package/src/impl-ref.ts +26 -0
- package/src/index.ts +14 -15
- package/src/k3s.ts +14 -12
- package/src/k8s/apps/code-server.ts +48 -0
- package/src/k8s/apps/gitea.ts +25 -0
- package/src/k8s/apps/grocy.ts +39 -0
- package/src/k8s/apps/hubble.ts +30 -0
- package/src/{apps → k8s/apps}/index.ts +16 -13
- package/src/k8s/apps/kubernetes-dashboard.ts +28 -0
- package/src/k8s/apps/mariadb.ts +83 -0
- package/src/k8s/apps/maybe.ts +39 -0
- package/src/k8s/apps/mongodb.ts +84 -0
- package/src/k8s/apps/postgresql.ts +86 -0
- package/src/k8s/apps/shared.ts +149 -0
- package/src/k8s/apps/syncthing.ts +72 -0
- package/src/k8s/apps/traefik.ts +40 -0
- package/src/k8s/apps/vaultwarden.ts +31 -0
- package/src/k8s/apps/workload.ts +214 -0
- package/src/k8s/apps/zitadel.ts +26 -0
- package/src/k8s/cert-manager.ts +80 -0
- package/src/k8s/cilium.ts +64 -0
- package/src/k8s/gateway.ts +70 -0
- package/src/k8s/index.ts +9 -0
- package/src/{obfuscators → k8s/obfuscators}/phantun.ts +14 -10
- package/src/{obfuscators → k8s/obfuscators}/shared.ts +17 -11
- package/src/k8s/resources.ts +111 -0
- package/src/k8s/service.ts +65 -0
- package/src/k8s/shared.ts +343 -0
- package/src/k8s/workload.ts +77 -0
- package/src/network.ts +249 -63
- package/src/nixos.ts +38 -77
- package/src/proxmox.ts +203 -96
- package/src/restic.ts +28 -19
- package/src/sops.ts +19 -8
- package/src/ssh.ts +122 -24
- package/src/talos.ts +21 -19
- package/src/third-party/cloudflare.ts +59 -0
- package/src/third-party/index.ts +3 -0
- package/src/{mullvad.ts → third-party/mullvad.ts} +11 -9
- package/src/third-party/timeweb.ts +99 -0
- package/src/utils.ts +27 -6
- package/src/wireguard.ts +249 -115
- package/src/apps/code-server.ts +0 -34
- package/src/apps/deployment.ts +0 -60
- package/src/apps/dns.ts +0 -107
- package/src/apps/gitea.ts +0 -18
- package/src/apps/grocy.ts +0 -20
- package/src/apps/hubble.ts +0 -20
- package/src/apps/kubernetes-dashboard.ts +0 -19
- package/src/apps/mariadb.ts +0 -81
- package/src/apps/maybe.ts +0 -25
- package/src/apps/mongodb.ts +0 -81
- package/src/apps/network.ts +0 -55
- package/src/apps/postgresql.ts +0 -81
- package/src/apps/shared.ts +0 -290
- package/src/apps/syncthing.ts +0 -54
- package/src/apps/test.ts +0 -19
- package/src/apps/traefik.ts +0 -36
- package/src/apps/vaultwarden.ts +0 -23
- package/src/apps/zitadel.ts +0 -21
- package/src/cloudflare.ts +0 -26
- package/src/common.ts +0 -200
- package/src/files.ts +0 -146
- package/src/k8s.ts +0 -638
- package/src/timeweb.ts +0 -75
- package/src/{obfuscators → k8s/obfuscators}/index.ts +1 -1
package/src/files.ts
DELETED
@@ -1,146 +0,0 @@
|
|
1
|
-
import type { Static } from "@sinclair/typebox"
|
2
|
-
import {
|
3
|
-
defineEntity,
|
4
|
-
defineUnit,
|
5
|
-
HighstateSignature,
|
6
|
-
Type,
|
7
|
-
fileContentSchema as baseFileContentSchema,
|
8
|
-
fileMetaSchema as baseFileMetaSchema,
|
9
|
-
unitArtifactSchema,
|
10
|
-
} from "@highstate/contract"
|
11
|
-
import { l7EndpointEntity } from "./network"
|
12
|
-
|
13
|
-
export const checksumAlgorithmSchema = Type.StringEnum([
|
14
|
-
"md5",
|
15
|
-
"sha1",
|
16
|
-
"sha256",
|
17
|
-
"sha384",
|
18
|
-
"sha512",
|
19
|
-
])
|
20
|
-
|
21
|
-
export const checksumSchema = Type.Object({
|
22
|
-
algorithm: checksumAlgorithmSchema,
|
23
|
-
value: Type.String(),
|
24
|
-
})
|
25
|
-
|
26
|
-
export const fileContentSchema = Type.Union([
|
27
|
-
baseFileContentSchema,
|
28
|
-
Type.Object({
|
29
|
-
type: Type.Literal("local"),
|
30
|
-
path: Type.String(),
|
31
|
-
}),
|
32
|
-
Type.Object({
|
33
|
-
type: Type.Literal("remote"),
|
34
|
-
endpoint: l7EndpointEntity.schema,
|
35
|
-
checksum: Type.Optional(checksumSchema),
|
36
|
-
}),
|
37
|
-
])
|
38
|
-
|
39
|
-
export const fileEntity = defineEntity({
|
40
|
-
type: "common.file",
|
41
|
-
|
42
|
-
schema: Type.Object({
|
43
|
-
meta: baseFileMetaSchema,
|
44
|
-
content: fileContentSchema,
|
45
|
-
}),
|
46
|
-
|
47
|
-
meta: {
|
48
|
-
color: "#FF5722",
|
49
|
-
},
|
50
|
-
})
|
51
|
-
|
52
|
-
export const folderMetaSchema = Type.Object({
|
53
|
-
name: Type.String(),
|
54
|
-
mode: Type.Optional(Type.Number()),
|
55
|
-
})
|
56
|
-
|
57
|
-
export const folderContentSchema = Type.Recursive(
|
58
|
-
TSelf => {
|
59
|
-
return Type.Union([
|
60
|
-
Type.Object({
|
61
|
-
type: Type.Literal("embedded"),
|
62
|
-
files: Type.Array(fileEntity.schema),
|
63
|
-
folders: Type.Array(
|
64
|
-
Type.Object({
|
65
|
-
meta: folderMetaSchema,
|
66
|
-
content: TSelf,
|
67
|
-
}),
|
68
|
-
),
|
69
|
-
}),
|
70
|
-
Type.Object({
|
71
|
-
type: Type.Literal("artifact"),
|
72
|
-
[HighstateSignature.Artifact]: unitArtifactSchema,
|
73
|
-
}),
|
74
|
-
Type.Object({
|
75
|
-
type: Type.Literal("local"),
|
76
|
-
path: Type.String(),
|
77
|
-
}),
|
78
|
-
Type.Object({
|
79
|
-
type: Type.Literal("remote"),
|
80
|
-
endpoint: l7EndpointEntity.schema,
|
81
|
-
}),
|
82
|
-
])
|
83
|
-
},
|
84
|
-
{ $id: "common.folder.content" },
|
85
|
-
)
|
86
|
-
|
87
|
-
export const folderEntity = defineEntity({
|
88
|
-
type: "common.folder",
|
89
|
-
|
90
|
-
schema: Type.Object({
|
91
|
-
meta: folderMetaSchema,
|
92
|
-
content: folderContentSchema,
|
93
|
-
}),
|
94
|
-
|
95
|
-
meta: {
|
96
|
-
color: "#FF9800",
|
97
|
-
},
|
98
|
-
})
|
99
|
-
|
100
|
-
export const remoteFile = defineUnit({
|
101
|
-
type: "common.remote-file",
|
102
|
-
|
103
|
-
args: {
|
104
|
-
/**
|
105
|
-
* The URL of the remote file.
|
106
|
-
*/
|
107
|
-
url: Type.Optional(Type.String()),
|
108
|
-
},
|
109
|
-
|
110
|
-
inputs: {
|
111
|
-
/**
|
112
|
-
* The L7 endpoint of the remote file.
|
113
|
-
*/
|
114
|
-
endpoint: {
|
115
|
-
entity: l7EndpointEntity,
|
116
|
-
required: false,
|
117
|
-
},
|
118
|
-
},
|
119
|
-
|
120
|
-
outputs: {
|
121
|
-
file: fileEntity,
|
122
|
-
},
|
123
|
-
|
124
|
-
meta: {
|
125
|
-
displayName: "Remote File",
|
126
|
-
description: "References a file from a remote URL.",
|
127
|
-
primaryIcon: "mdi:file-download",
|
128
|
-
category: "Files",
|
129
|
-
},
|
130
|
-
|
131
|
-
source: {
|
132
|
-
package: "@highstate/common",
|
133
|
-
path: "units/remote-file",
|
134
|
-
},
|
135
|
-
})
|
136
|
-
|
137
|
-
export type File = Static<typeof fileEntity.schema>
|
138
|
-
export type FileMeta = Static<typeof baseFileMetaSchema>
|
139
|
-
export type FileContent = Static<typeof fileContentSchema>
|
140
|
-
|
141
|
-
export type Folder = Static<typeof folderEntity.schema>
|
142
|
-
export type FolderMeta = Static<typeof folderMetaSchema>
|
143
|
-
export type FolderContent = Static<typeof folderContentSchema>
|
144
|
-
|
145
|
-
export type Checksum = Static<typeof checksumSchema>
|
146
|
-
export type ChecksumAlgorithm = Static<typeof checksumAlgorithmSchema>
|