paratix 0.4.0 → 0.6.0

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/llm-guide.md CHANGED
@@ -63,6 +63,7 @@ import {
63
63
  service,
64
64
  ssh,
65
65
  sshd,
66
+ swap,
66
67
  sysctl,
67
68
  system,
68
69
  systemd,
@@ -154,6 +155,17 @@ export default server({
154
155
  | ---------- | ----------------------------------------------------------------------------------------------- | ---------- |
155
156
  | `cron.job` | `(user: string, name: string, options: { job: string; state?: "absent" \| "present" }): Module` | Yes |
156
157
 
158
+ ### `compose`
159
+
160
+ | Method | Signature | Idempotent |
161
+ | ----------------- | -------------------------------------------------------------------------------------------------------------------- | ---------- |
162
+ | `compose.config` | `(options: { content?: string; projectDirectory: string; runtime?: "docker" \| "podman"; src?: string }): Module` | Yes |
163
+ | `compose.up` | `(options: { projectDirectory: string; runtime?: "docker" \| "podman"; services?: string[] }): Module` | Yes |
164
+ | `compose.down` | `(options: { projectDirectory: string; runtime?: "docker" \| "podman" }): Module` | Yes |
165
+ | `compose.pull` | `(options: { projectDirectory: string; runtime?: "docker" \| "podman" }): Module` | Partial |
166
+ | `compose.restart` | `(options: { projectDirectory: string; runtime?: "docker" \| "podman" }): Module` | No |
167
+ | `compose.systemd` | `(options: { detached?: boolean; name?: string; projectDirectory: string; runtime?: "docker" \| "podman" }): Module` | Yes |
168
+
157
169
  ### `download`
158
170
 
159
171
  | Method | Signature | Idempotent |
@@ -169,6 +181,8 @@ export default server({
169
181
  | `file.absent` | `(remotePath: string): Module` | Yes |
170
182
  | `file.assemble` | `(remotePath: string, fragments: string[], options?: { mode?: string; owner?: string }): Module` | Yes |
171
183
  | `file.block` | `(remotePath: string, options: { content: string; name: string; prefix?: string }): Module` | Yes |
184
+ | `file.chmod` | `(remotePath: string, mode: string): Module` | Yes |
185
+ | `file.chown` | `(remotePath: string, owner: string): Module` | Yes |
172
186
  | `file.copy` | `(remotePath: string, localPath: string, options?: { mode?: string; owner?: string }): Module` | Yes |
173
187
  | `file.directory` | `(remotePath: string, options?: { mode?: string; owner?: string }): Module` | Yes |
174
188
  | `file.line` | `(remotePath: string, line: string, options?: { match?: string }): Module` | Yes |
@@ -220,6 +234,13 @@ Import with renaming: `import { package as pkg } from "paratix/modules"`. The wo
220
234
  | `package.update` | `(date: string): Module` | Yes (versioned flag) |
221
235
  | `package.upgrade` | `(date: string): Module` | Yes (versioned flag) |
222
236
 
237
+ ### `quadlet`
238
+
239
+ | Method | Signature | Idempotent |
240
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- |
241
+ | `quadlet.container` | `(options: { addCapability?: string[]; addDevice?: string[]; annotation?: Record<string, string>; autoUpdate?: "local" \| "registry"; containerName?: string; description?: string; dns?: string[]; dnsOption?: string[]; dnsSearch?: string[]; dropCapability?: string[]; entrypoint?: string[]; environment?: Record<string, string>; environmentFiles?: string[]; exec?: string[]; exposeHostPort?: string[]; groupAdd?: string[]; healthCmd?: string; healthInterval?: string; healthOnFailure?: "kill" \| "none" \| "restart" \| "stop"; healthRetries?: number; healthStartPeriod?: string; healthTimeout?: string; hostName?: string; image: string; ip?: string; ip6?: string; label?: Record<string, string>; logDriver?: string; mask?: string[]; mount?: string[]; name: string; networks?: string[]; noNewPrivileges?: boolean; notify?: boolean; podmanArgs?: string[]; publishPorts?: string[]; pull?: "always" \| "missing" \| "never" \| "newer"; readOnly?: boolean; restart?: "always" \| "no" \| "on-abnormal" \| "on-abort" \| "on-failure" \| "on-success" \| "on-watchdog"; runInit?: boolean; secret?: string[]; seccompProfile?: string; securityLabelDisable?: boolean; securityLabelType?: string; stopTimeout?: number; sysctl?: Record<string, string>; timeoutStartSec?: number; timeoutStopSec?: number; timezone?: string; tmpfs?: string[]; ulimit?: string[]; unmask?: string[]; user?: string; userNs?: string; volumes?: string[]; wantedBy?: string; workingDir?: string }): Module` | Yes |
242
+ | `quadlet.updateImage` | `(options: { authFile?: string; image: string; name: string; serviceName?: string }): Module` | Partial |
243
+
223
244
  ### `releaseUpgrade`
224
245
 
225
246
  | Method | Signature | Idempotent |
@@ -262,6 +283,14 @@ rsync SSH process and does not depend on a local `known_hosts` entry.
262
283
  | `sshd.config` | `(settings: Record<string, string>): Module` | Yes |
263
284
  | `sshd.port` | `(targetPort: number): Module` | Yes (emits typed `sshd.port` meta) |
264
285
 
286
+ ### `swap`
287
+
288
+ | Method | Signature | Idempotent |
289
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------- |
290
+ | `swap.file` | `(options: { path: string; size: number \| string; mode?: string; priority?: number; state?: "absent" \| "present" }): Module` | Yes |
291
+ | `swap.swappiness` | `(value: number): Module` | Yes |
292
+ | `swap.vfsCachePressure` | `(value: number): Module` | Yes |
293
+
265
294
  ### `sysctl`
266
295
 
267
296
  | Method | Signature | Idempotent |
@@ -492,6 +521,25 @@ when.symlinkExists("/etc/myapp/current", service.restart("myapp"))
492
521
  when.socketExists("/run/docker.sock", service.running("docker"))
493
522
  ```
494
523
 
524
+ ### `swap.file(options)`
525
+
526
+ Create, activate, and persist a file-backed swap area.
527
+
528
+ ```typescript
529
+ swap.file({ path: "/swapfile", size: "2G" })
530
+ swap.file({ path: "/swapfile", size: "2G", priority: 10 })
531
+ swap.file({ path: "/swapfile", size: "2G", state: "absent" })
532
+ ```
533
+
534
+ ### `swap.swappiness(value)` / `swap.vfsCachePressure(value)`
535
+
536
+ Apply common swap-related sysctl tuning without writing the sysctl keys manually.
537
+
538
+ ```typescript
539
+ swap.swappiness(10)
540
+ swap.vfsCachePressure(50)
541
+ ```
542
+
495
543
  ### `debug(message)`
496
544
 
497
545
  Print a debug message during apply. Always runs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paratix",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Idempotent VPS setup tool in TypeScript",
5
5
  "type": "module",
6
6
  "files": [