paratix 0.4.0 → 0.5.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/README.md +15 -1
- package/dist/{chunk-EGP3QRLV.js → chunk-3WK4QNJK.js} +69 -16
- package/dist/chunk-3WK4QNJK.js.map +1 -0
- package/dist/{chunk-C45YPXCX.js → chunk-LI47NIKN.js} +649 -63
- package/dist/chunk-LI47NIKN.js.map +1 -0
- package/dist/{chunk-G3BMCQKU.js → chunk-MHPFGCEY.js} +158 -34
- package/dist/chunk-MHPFGCEY.js.map +1 -0
- package/dist/cli.js +4 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/modules/index.d.ts +23 -1319
- package/dist/modules/index.js +6 -2
- package/dist/user-CraCJci7.d.ts +1392 -0
- package/llm-guide.md +47 -0
- package/package.json +1 -1
- package/dist/chunk-C45YPXCX.js.map +0 -1
- package/dist/chunk-EGP3QRLV.js.map +0 -1
- package/dist/chunk-G3BMCQKU.js.map +0 -1
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,12 @@ 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: { autoUpdate?: "local" \| "registry"; containerName?: string; description?: string; environment?: Record<string, string>; exec?: string[]; image: string; name: string; networks?: string[]; podmanArgs?: string[]; publishPorts?: string[]; restart?: string; volumes?: string[]; wantedBy?: string }): Module` | Yes |
|
|
242
|
+
|
|
223
243
|
### `releaseUpgrade`
|
|
224
244
|
|
|
225
245
|
| Method | Signature | Idempotent |
|
|
@@ -262,6 +282,14 @@ rsync SSH process and does not depend on a local `known_hosts` entry.
|
|
|
262
282
|
| `sshd.config` | `(settings: Record<string, string>): Module` | Yes |
|
|
263
283
|
| `sshd.port` | `(targetPort: number): Module` | Yes (emits typed `sshd.port` meta) |
|
|
264
284
|
|
|
285
|
+
### `swap`
|
|
286
|
+
|
|
287
|
+
| Method | Signature | Idempotent |
|
|
288
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------- |
|
|
289
|
+
| `swap.file` | `(options: { path: string; size: number \| string; mode?: string; priority?: number; state?: "absent" \| "present" }): Module` | Yes |
|
|
290
|
+
| `swap.swappiness` | `(value: number): Module` | Yes |
|
|
291
|
+
| `swap.vfsCachePressure` | `(value: number): Module` | Yes |
|
|
292
|
+
|
|
265
293
|
### `sysctl`
|
|
266
294
|
|
|
267
295
|
| Method | Signature | Idempotent |
|
|
@@ -492,6 +520,25 @@ when.symlinkExists("/etc/myapp/current", service.restart("myapp"))
|
|
|
492
520
|
when.socketExists("/run/docker.sock", service.running("docker"))
|
|
493
521
|
```
|
|
494
522
|
|
|
523
|
+
### `swap.file(options)`
|
|
524
|
+
|
|
525
|
+
Create, activate, and persist a file-backed swap area.
|
|
526
|
+
|
|
527
|
+
```typescript
|
|
528
|
+
swap.file({ path: "/swapfile", size: "2G" })
|
|
529
|
+
swap.file({ path: "/swapfile", size: "2G", priority: 10 })
|
|
530
|
+
swap.file({ path: "/swapfile", size: "2G", state: "absent" })
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### `swap.swappiness(value)` / `swap.vfsCachePressure(value)`
|
|
534
|
+
|
|
535
|
+
Apply common swap-related sysctl tuning without writing the sysctl keys manually.
|
|
536
|
+
|
|
537
|
+
```typescript
|
|
538
|
+
swap.swappiness(10)
|
|
539
|
+
swap.vfsCachePressure(50)
|
|
540
|
+
```
|
|
541
|
+
|
|
495
542
|
### `debug(message)`
|
|
496
543
|
|
|
497
544
|
Print a debug message during apply. Always runs.
|