@rcpooley/concord-kit 0.0.0-stage → 0.3.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Robert Pooley
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,159 @@
1
- # Temporary Holding Version
1
+ # @rcpooley/concord-kit
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Opinionated building blocks for a [Concord](https://www.npmjs.com/package/@rcpooley/concord)
4
+ config repo. Concord's modules are deliberately low-level (a docker module, a
5
+ file module, a systemd module…). This kit is one way of declaring a fleet on top
6
+ of them, with these conventions:
7
+
8
+ - **An app is one file.** Its containers, host files, packages, units, git
9
+ checkouts, routes, certificates and DNS records live together, so adding an
10
+ app is one file and deleting it is deleting that file.
11
+ - **A machine is described once.** From each `Machine`, `assemble()` derives
12
+ Docker (from Docker's apt repo), host metrics (node_exporter), the host
13
+ registry entry, and the machine's edge if it has one.
14
+ - **The edge is generated.** A machine with an `edge` gets an nginx container
15
+ whose config, certificates and published ports are all derived from
16
+ declarations: every route must be covered by exactly one certificate at plan
17
+ time, and Let's Encrypt renewal is convergence rather than a timer.
18
+ - **Order is decided in one place.** `assemble()` returns the whole module
19
+ array in dependency order; the config declares what, never when.
20
+
21
+ Released in lockstep with `@rcpooley/concord`: use the same version of both.
22
+ It imports only Concord's types, from your config's own dev dependency on it.
23
+
24
+ ## Install
25
+
26
+ In your config repo:
27
+
28
+ ```bash
29
+ npm install --save-exact @rcpooley/concord-kit@X.Y.Z
30
+ npm install --save-dev --save-exact @rcpooley/concord@X.Y.Z
31
+ ```
32
+
33
+ The kit is a runtime dependency (the daemon installs it before evaluating your
34
+ config; commit `package-lock.json`). Concord itself stays a dev dependency, for
35
+ types and the `concord` CLI.
36
+
37
+ ## A small config
38
+
39
+ ```ts
40
+ // concord.ts
41
+ import type { ConcordConfig } from '@rcpooley/concord'
42
+ import { assemble, publicIpOf, registry, type App, type Machine, type ZoneMap } from '@rcpooley/concord-kit'
43
+ import { secrets } from './secrets.js'
44
+
45
+ export const fleet = {
46
+ web: {
47
+ ssh: { ip: '10.0.0.1', user: 'deploy', transport: 'local' }, // the machine the daemon runs on
48
+ arch: 'amd64',
49
+ publicIp: '203.0.113.10',
50
+ edge: {
51
+ listeners: {
52
+ public: { containerPort: 443, redirectPort: 80, bind: '203.0.113.10' },
53
+ private: { containerPort: 8444, redirectPort: 8081, bind: '10.0.0.1', allow: ['10.0.0.0/8'] },
54
+ },
55
+ certs: [{ domains: ['example.com', '*.example.com'] }],
56
+ },
57
+ },
58
+ } satisfies Record<string, Machine>
59
+ type Host = keyof typeof fleet
60
+ const publicIp = publicIpOf<Host>(fleet)
61
+
62
+ export const ZONES = {
63
+ 'example.com': {
64
+ provider: 'porkbun',
65
+ records: [{ type: 'A', name: '@', content: publicIp('web') }],
66
+ },
67
+ } as const satisfies ZoneMap
68
+
69
+ const blog: App<Host, typeof ZONES> = {
70
+ name: 'blog',
71
+ host: 'web',
72
+ containers: [{
73
+ name: 'blog',
74
+ source: { image: 'ghost', tag: '5' },
75
+ networks: [{ name: 'apps', aliases: ['blog'] }],
76
+ }],
77
+ routes: [{ names: ['blog.example.com'], listen: 'public', upstream: { container: 'blog', port: 2368 } }],
78
+ dns: [{ zone: 'example.com', records: [{ type: 'A', name: 'blog', content: publicIp('web') }] }],
79
+ }
80
+
81
+ const hosts = registry(fleet)
82
+
83
+ export default {
84
+ schemaVersion: 8,
85
+ hosts,
86
+ modules: assemble({
87
+ fleet,
88
+ network: 'apps',
89
+ apps: [blog],
90
+ zones: ZONES,
91
+ dns: { porkbun: { apiKey: secrets['porkbun-api-key'], secretKey: secrets['porkbun-secret-key'] } },
92
+ acme: {
93
+ email: 'you@example.com',
94
+ defaultDns: 'porkbun',
95
+ dns: {
96
+ porkbun: {
97
+ PORKBUN_API_KEY: secrets['porkbun-api-key'],
98
+ PORKBUN_SECRET_API_KEY: secrets['porkbun-secret-key'],
99
+ },
100
+ },
101
+ },
102
+ }),
103
+ } satisfies ConcordConfig<typeof hosts>
104
+ ```
105
+
106
+ In a real config, put the machines, zones and each app in their own files, and
107
+ declare `type App = KitApp<HostName, typeof ZONES>` once so every app file
108
+ gets checked `host` and `zone` names.
109
+
110
+ ## What `assemble()` emits, in order
111
+
112
+ 1. **Per machine:** Docker (apt repo + packages, `/etc/docker/daemon.json`, a
113
+ restart when it changes), then node_exporter.
114
+ 2. App files and directories.
115
+ 3. App packages and apt repos.
116
+ 4. App git checkouts.
117
+ 5. App scripts.
118
+ 6. One docker module per machine: the networks something there joins, then
119
+ platform containers, then app containers.
120
+ 7. App systemd units.
121
+ 8. One nginx edge per machine that declares `edge`.
122
+ 9. One DNS module per provider that holds a zone.
123
+
124
+ Within each layer, `platform` contributions come before `apps`, and machines
125
+ appear in fleet order.
126
+
127
+ ## Options
128
+
129
+ | | |
130
+ |---|---|
131
+ | `fleet` | `Record<name, Machine>`: how Concord reaches each machine, its `arch`, and optionally `sleeps`, `dev`, `publicIp`, `keepImages`, `edge` |
132
+ | `network` | the docker network every app joins and every edge proxies across |
133
+ | `apps`, `platform` | `App[]`. `platform` is for shared infrastructure many apps need and none owns (a database); it is deployed first |
134
+ | `zones` | every DNS zone and the provider holding it (`porkbun` or `cloudflare`). ⚠️ A Porkbun zone is the whole truth: undeclared live records are deleted. A Cloudflare zone is shared: only records Concord marked are touched |
135
+ | `dns` | credentials per provider; `cloudflare.id` is the ownership marker written into each record (changing it is a migration) |
136
+ | `acme` | Let's Encrypt for the edges: account email, default DNS provider, and per-provider lego environment variables (as secrets) |
137
+ | `nodeExporter` | `false` to turn host metrics off; `bind` to choose the address (default: the machine's `ssh.ip`, assumed private); `after` for a service that must be up first (a VPN) |
138
+ | `dockerDaemonJson` | the `daemon.json` every machine gets (default: bounded json-file logs) |
139
+
140
+ ## The edge
141
+
142
+ An edge machine declares **listeners** (planes). Each maps a host address to
143
+ its own container port, so nginx knows which interface a request came in on:
144
+ a private vhost can never answer on the public address. Each listener gets
145
+ its own config file (`public` → `10-public.conf`, `private` → `20-private.conf`)
146
+ with a catch-all that drops unknown hostnames.
147
+
148
+ Routes are `ServerBlock`s on an app. `upstream: { container, port }` is resolved
149
+ to the container's alias on the shared network at plan time, so a typo is a
150
+ plan error, not a 502. Certificates are declared (on the machine for shared
151
+ wildcards, on an app for names it owns) and every route must be covered by
152
+ exactly one, most specific first.
153
+
154
+ Apps can contribute shared edge material by name: `features` (snippet pairs a
155
+ route opts into), `secretFiles`, `logFormats` and `rateLimits`.
156
+
157
+ Also exported: `nginxEdge()` itself, `certFor`, `covers`, `EDGE_CONF`,
158
+ `PROXY_CONF`, and the per-machine pieces (`dockerAptRepo`, `DOCKER_PACKAGES`,
159
+ `nodeExporterUnit`) if you want to assemble differently.
@@ -0,0 +1,472 @@
1
+ /**
2
+ * assemble() — the whole module array, from a handful of declarations.
3
+ *
4
+ * A config declares WHAT exists in a few places — the machines, the platform,
5
+ * the apps, the zones — and this function is the one place that decides WHEN.
6
+ * Array order is Concord's dependency graph, so the order is an invariant,
7
+ * documented and tested here rather than left on an editing surface.
8
+ *
9
+ * ── The canonical order ──────────────────────────────────────────────────────
10
+ *
11
+ * 1. the machine layer derived from `Machine`, before any app:
12
+ * Docker (apt repo + engine, daemon.json and
13
+ * its watch), then node_exporter
14
+ * 2. app files/directories before packages: a file can configure how a
15
+ * package installs
16
+ * 3. app packages a script that clones needs git, a unit that
17
+ * runs a program needs it installed
18
+ * 4. app checkouts after packages (a clone needs git), before
19
+ * scripts and units — the source has to be on
20
+ * disk before anything builds or runs it
21
+ * 5. app scripts after packages/files/checkouts, before
22
+ * units — a script puts on disk what a unit
23
+ * will run
24
+ * 6. docker, per host the shared network, then platform
25
+ * containers, then app containers — one
26
+ * module per host, so the host's container
27
+ * set has one declared home
28
+ * 7. app systemd units last of the app layers: they run what every
29
+ * earlier step installed
30
+ * 8. the edges after every app, so a host built from
31
+ * nothing has something to route to before it
32
+ * starts routing
33
+ * 9. DNS, one module per the only modules that need a third party's
34
+ * provider network up, so a provider outage cannot
35
+ * block the rest of the fleet
36
+ *
37
+ * The sweeps are not declared here: the loader appends them per host.
38
+ *
39
+ * Within each per-host layer, platform contributions precede app
40
+ * contributions, and hosts appear in fleet order — never in app-list order.
41
+ */
42
+ import type { Secret } from '@rcpooley/concord';
43
+ import { type Machine } from './machine.js';
44
+ import { type Acme } from './nginx-edge.js';
45
+ import type { App, ZoneMap } from './types.js';
46
+ export declare function assemble<H extends string, Z extends ZoneMap>(opts: {
47
+ fleet: Record<H, Machine>;
48
+ /** The shared docker network apps join and every edge proxies across. */
49
+ network: string;
50
+ /**
51
+ * App-SHAPED infrastructure — things many apps depend on and none owns
52
+ * (shared databases, the webhook route). Same type as an app, deliberately a
53
+ * separate list: an app file invites deletion as a unit, and these must not.
54
+ * Deployed first within every layer.
55
+ */
56
+ platform?: App<H, Z>[];
57
+ apps: App<H, Z>[];
58
+ /** Every zone the config manages, and its fleet-owned records. */
59
+ zones: Z;
60
+ /** Provider credentials, one entry per provider that holds a zone. */
61
+ dns?: {
62
+ porkbun?: {
63
+ apiKey: Secret;
64
+ secretKey: Secret;
65
+ };
66
+ /**
67
+ * `id` is written into every record's comment as `concord:<id>`, and that
68
+ * marker is the ONLY thing identifying a record as Concord's. Changing it
69
+ * orphans every record at once: a migration, never a rename.
70
+ */
71
+ cloudflare?: {
72
+ id: string;
73
+ apiToken: Secret;
74
+ accountId?: string;
75
+ };
76
+ };
77
+ /** Let's Encrypt settings. Required when any machine declares an edge. */
78
+ acme?: Acme;
79
+ /**
80
+ * Host metrics on every machine. `false` turns them off. `bind` picks the
81
+ * address per machine (default: the address Concord reaches it at, assumed
82
+ * private); `after` names a service that must be up before that address
83
+ * exists, such as a VPN.
84
+ */
85
+ nodeExporter?: false | {
86
+ bind?: (host: H, m: Machine) => string;
87
+ after?: string[];
88
+ };
89
+ /** /etc/docker/daemon.json on every machine. Default: bounded json-file logs. */
90
+ dockerDaemonJson?: string;
91
+ }): ({
92
+ type: "file";
93
+ id: string;
94
+ host: H;
95
+ files: {
96
+ path: string;
97
+ mode: string;
98
+ content: string;
99
+ }[];
100
+ repos?: undefined;
101
+ packages?: undefined;
102
+ units?: undefined;
103
+ } | {
104
+ type: "systemd";
105
+ id: string;
106
+ host: H;
107
+ units: {
108
+ name: string;
109
+ enabled: boolean;
110
+ active: boolean;
111
+ watches: {
112
+ paths: string[];
113
+ onChange: "restart";
114
+ }[];
115
+ }[];
116
+ repos?: undefined;
117
+ packages?: undefined;
118
+ files?: undefined;
119
+ } | {
120
+ type: "apt";
121
+ id: string;
122
+ host: H;
123
+ packages: string[];
124
+ units?: undefined;
125
+ } | {
126
+ absent?: string[] | undefined;
127
+ files?: {
128
+ path: string;
129
+ owner?: string | number | undefined;
130
+ group?: string | number | undefined;
131
+ mode?: string | undefined;
132
+ content?: string | undefined;
133
+ source?: string | undefined;
134
+ url?: string | undefined;
135
+ sha256?: string | undefined;
136
+ substitutions?: Record<string, Secret> | undefined;
137
+ }[] | undefined;
138
+ directories?: {
139
+ path: string;
140
+ owner?: string | number | undefined;
141
+ group?: string | number | undefined;
142
+ mode?: string | undefined;
143
+ }[] | undefined;
144
+ type: "file";
145
+ id: string;
146
+ host: H;
147
+ } | {
148
+ packages: (string | {
149
+ name: string;
150
+ version: string;
151
+ })[];
152
+ repos?: {
153
+ name: string;
154
+ uri: string;
155
+ suites: string[];
156
+ components: string[];
157
+ key: string;
158
+ architectures?: string[] | undefined;
159
+ types?: ("deb" | "deb-src")[] | undefined;
160
+ }[] | undefined;
161
+ type: "apt";
162
+ id: string;
163
+ host: H;
164
+ } | {
165
+ type: "checkout";
166
+ id: string;
167
+ host: H;
168
+ checkouts: {
169
+ name: string;
170
+ repo: string;
171
+ path: string;
172
+ owner: string;
173
+ track?: {
174
+ branch: string;
175
+ } | undefined;
176
+ pin?: {
177
+ commit: string;
178
+ } | undefined;
179
+ discardLocalChanges?: boolean | undefined;
180
+ timeout?: number | undefined;
181
+ }[];
182
+ } | {
183
+ type: "script";
184
+ id: string;
185
+ host: H;
186
+ scripts: {
187
+ name: string;
188
+ unless: string;
189
+ run: string;
190
+ sudo?: boolean | undefined;
191
+ secrets?: Record<string, Secret> | undefined;
192
+ timeout?: number | undefined;
193
+ }[];
194
+ } | {
195
+ containers: {
196
+ name: string;
197
+ source: {
198
+ repo: string;
199
+ track?: {
200
+ branch: string;
201
+ } | undefined;
202
+ pin?: {
203
+ commit: string;
204
+ } | undefined;
205
+ context?: string | undefined;
206
+ dockerfile?: string | undefined;
207
+ buildArgs?: Record<string, string> | undefined;
208
+ buildTimeout?: number | undefined;
209
+ } | {
210
+ image: string;
211
+ track?: {
212
+ tag: string;
213
+ } | undefined;
214
+ pin?: {
215
+ digest: string;
216
+ } | undefined;
217
+ };
218
+ failureIsWarning?: boolean | undefined;
219
+ env?: Record<string, string> | undefined;
220
+ secretEnv?: Record<string, Secret> | undefined;
221
+ ports?: {
222
+ host: number;
223
+ container: number;
224
+ protocol?: "tcp" | "udp" | undefined;
225
+ bind?: string | undefined;
226
+ }[] | undefined;
227
+ networks?: {
228
+ name: string;
229
+ aliases?: string[] | undefined;
230
+ external?: true | undefined;
231
+ }[] | undefined;
232
+ networkMode?: "host" | undefined;
233
+ privileged?: boolean | undefined;
234
+ containerName?: string | undefined;
235
+ volumes?: {
236
+ mountPath: string;
237
+ name?: string | undefined;
238
+ hostPath?: string | undefined;
239
+ readOnly?: boolean | undefined;
240
+ }[] | undefined;
241
+ healthcheck?: {
242
+ test: string;
243
+ interval?: string | undefined;
244
+ timeout?: string | undefined;
245
+ retries?: number | undefined;
246
+ startPeriod?: string | undefined;
247
+ } | undefined;
248
+ restart?: "always" | "no" | "on-failure" | "unless-stopped" | undefined;
249
+ memory?: string | undefined;
250
+ cpus?: string | undefined;
251
+ user?: string | undefined;
252
+ command?: string | string[] | undefined;
253
+ labels?: Record<string, string> | undefined;
254
+ }[];
255
+ networks?: {
256
+ name: string;
257
+ }[] | undefined;
258
+ keepImages?: number | undefined;
259
+ type: "docker";
260
+ id: string;
261
+ host: H;
262
+ } | {
263
+ type: "systemd";
264
+ id: string;
265
+ host: H;
266
+ units: {
267
+ name: string;
268
+ enabled?: boolean | undefined;
269
+ active?: boolean | undefined;
270
+ unit?: {
271
+ description: string;
272
+ service?: {
273
+ execStart: string | string[];
274
+ type?: "oneshot" | "simple" | "exec" | "forking" | "notify" | "idle" | undefined;
275
+ execStartPre?: string[] | undefined;
276
+ execStartPost?: string[] | undefined;
277
+ execStop?: string | undefined;
278
+ execReload?: string | undefined;
279
+ user?: string | undefined;
280
+ group?: string | undefined;
281
+ workingDirectory?: string | undefined;
282
+ environment?: Record<string, string> | undefined;
283
+ environmentFile?: string | string[] | undefined;
284
+ restart?: "always" | "no" | "on-success" | "on-failure" | "on-abnormal" | "on-abort" | "on-watchdog" | undefined;
285
+ restartSec?: string | number | undefined;
286
+ killMode?: "none" | "control-group" | "mixed" | "process" | undefined;
287
+ successExitStatus?: string | undefined;
288
+ remainAfterExit?: boolean | undefined;
289
+ timeoutStartSec?: string | number | undefined;
290
+ timeoutStopSec?: string | number | undefined;
291
+ standardOutput?: string | undefined;
292
+ standardError?: string | undefined;
293
+ syslogIdentifier?: string | undefined;
294
+ oomScoreAdjust?: number | undefined;
295
+ } | undefined;
296
+ timer?: {
297
+ onCalendar?: string | string[] | undefined;
298
+ onBootSec?: string | number | undefined;
299
+ onStartupSec?: string | number | undefined;
300
+ onActiveSec?: string | number | undefined;
301
+ onUnitActiveSec?: string | number | undefined;
302
+ randomizedDelaySec?: string | number | undefined;
303
+ persistent?: boolean | undefined;
304
+ accuracySec?: string | number | undefined;
305
+ unit?: string | undefined;
306
+ } | undefined;
307
+ path?: {
308
+ pathModified?: string[] | undefined;
309
+ pathExists?: string[] | undefined;
310
+ directoryNotEmpty?: string[] | undefined;
311
+ unit?: string | undefined;
312
+ makeDirectory?: boolean | undefined;
313
+ } | undefined;
314
+ wantedBy?: string[] | undefined;
315
+ requiredBy?: string[] | undefined;
316
+ documentation?: string[] | undefined;
317
+ after?: string[] | undefined;
318
+ before?: string[] | undefined;
319
+ wants?: string[] | undefined;
320
+ requires?: string[] | undefined;
321
+ bindsTo?: string[] | undefined;
322
+ partOf?: string[] | undefined;
323
+ conflicts?: string[] | undefined;
324
+ conditionPathExists?: string | undefined;
325
+ startLimitIntervalSec?: string | number | undefined;
326
+ startLimitBurst?: number | undefined;
327
+ } | undefined;
328
+ watches?: {
329
+ paths: string[];
330
+ onChange: "restart" | "reload";
331
+ }[] | undefined;
332
+ healthTimeout?: number | undefined;
333
+ }[];
334
+ } | {
335
+ type: "script";
336
+ id: string;
337
+ host: H;
338
+ scripts: ({
339
+ name: string;
340
+ unless: string;
341
+ run: string;
342
+ secrets: Record<string, Secret>;
343
+ sudo: boolean;
344
+ timeout: number;
345
+ } | {
346
+ name: string;
347
+ unless: string;
348
+ run: string;
349
+ sudo: boolean;
350
+ timeout: number;
351
+ })[];
352
+ directories?: undefined;
353
+ files?: undefined;
354
+ containers?: undefined;
355
+ units?: undefined;
356
+ } | {
357
+ type: "file";
358
+ id: string;
359
+ host: H;
360
+ directories: {
361
+ path: string;
362
+ owner: number;
363
+ group: number;
364
+ mode: string;
365
+ }[];
366
+ files: {
367
+ path: string;
368
+ mode: string;
369
+ content: string;
370
+ }[];
371
+ scripts?: undefined;
372
+ containers?: undefined;
373
+ units?: undefined;
374
+ } | {
375
+ type: "docker";
376
+ id: string;
377
+ host: H;
378
+ containers: {
379
+ name: string;
380
+ containerName: string;
381
+ source: {
382
+ image: string;
383
+ pin: {
384
+ digest: string;
385
+ };
386
+ };
387
+ restart: "always";
388
+ healthcheck: {
389
+ test: string;
390
+ interval: string;
391
+ timeout: string;
392
+ retries: number;
393
+ startPeriod: string;
394
+ };
395
+ command: string[];
396
+ networks: {
397
+ name: string;
398
+ }[];
399
+ ports: {
400
+ bind: string;
401
+ host: number;
402
+ container: number;
403
+ }[];
404
+ volumes: {
405
+ hostPath: string;
406
+ mountPath: string;
407
+ readOnly: boolean;
408
+ }[];
409
+ }[];
410
+ scripts?: undefined;
411
+ directories?: undefined;
412
+ files?: undefined;
413
+ units?: undefined;
414
+ } | {
415
+ type: "systemd";
416
+ id: string;
417
+ host: H;
418
+ units: {
419
+ name: string;
420
+ enabled: boolean;
421
+ active: boolean;
422
+ unit: {
423
+ description: string;
424
+ after: string[];
425
+ service: {
426
+ type: "oneshot";
427
+ remainAfterExit: boolean;
428
+ execStart: string[];
429
+ };
430
+ };
431
+ watches: {
432
+ paths: string[];
433
+ onChange: "restart";
434
+ }[];
435
+ }[];
436
+ scripts?: undefined;
437
+ directories?: undefined;
438
+ files?: undefined;
439
+ containers?: undefined;
440
+ } | {
441
+ type: "porkbun";
442
+ id: string;
443
+ apiKey: Secret;
444
+ secretKey: Secret;
445
+ zones: Record<string, {
446
+ records: {
447
+ type: string;
448
+ name: string;
449
+ content: string;
450
+ ttl?: number | undefined;
451
+ prio?: number | null | undefined;
452
+ }[];
453
+ }>;
454
+ } | {
455
+ zones: Record<string, {
456
+ records: {
457
+ type: string;
458
+ name: string;
459
+ content: string;
460
+ ttl?: number | undefined;
461
+ priority?: number | null | undefined;
462
+ proxied?: boolean | undefined;
463
+ note?: string | undefined;
464
+ }[];
465
+ }>;
466
+ accountId?: string | undefined;
467
+ type: "cloudflare";
468
+ id: string;
469
+ apiToken: Secret;
470
+ apiKey?: undefined;
471
+ secretKey?: undefined;
472
+ })[];