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/README.md +17 -1
- package/dist/{chunk-C45YPXCX.js → chunk-ENWMSERJ.js} +814 -63
- package/dist/chunk-ENWMSERJ.js.map +1 -0
- package/dist/{chunk-EGP3QRLV.js → chunk-IUY5BJHA.js} +69 -16
- package/dist/chunk-IUY5BJHA.js.map +1 -0
- package/dist/{chunk-G3BMCQKU.js → chunk-JJRF37BP.js} +188 -31
- package/dist/chunk-JJRF37BP.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-CiAMlpWO.d.ts +1443 -0
- package/llm-guide.md +48 -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/README.md
CHANGED
|
@@ -20,7 +20,7 @@ The result is a practical server automation tool with a compact mental model: mo
|
|
|
20
20
|
- **Structured orchestration**: recipes and signals keep service reloads and grouped changes explicit.
|
|
21
21
|
- **Declarative host guards**: gate modules on package, command, file, directory, symlink, or socket state without embedding shell checks in strings.
|
|
22
22
|
- **Strong bootstrap story**: supports explicit first-run flows and strict host-key handling.
|
|
23
|
-
- **Practical built-in modules**: packages, files, services, users, SSH, firewall, systemd, sysctl, mount, rsync, and more.
|
|
23
|
+
- **Practical built-in modules**: packages, files, services, users, SSH, firewall, systemd, sysctl, swap, mount, rsync, and more.
|
|
24
24
|
|
|
25
25
|
## Getting Started
|
|
26
26
|
|
|
@@ -86,6 +86,8 @@ A playbook is a TypeScript file that default-exports `server(...)`. It defines t
|
|
|
86
86
|
|
|
87
87
|
Modules are the smallest units of work. Each module checks whether its target state already exists and only applies changes when needed.
|
|
88
88
|
|
|
89
|
+
For filesystem metadata, you can now also use dedicated modules such as `file.chmod(...)` and `file.chown(...)` when you want to manage permissions or ownership without coupling that change to a file upload or template render.
|
|
90
|
+
|
|
89
91
|
### Recipes
|
|
90
92
|
|
|
91
93
|
Recipes group related modules into a named unit. They help structure larger playbooks and keep the CLI output readable.
|
|
@@ -94,10 +96,24 @@ Recipes group related modules into a named unit. They help structure larger play
|
|
|
94
96
|
|
|
95
97
|
Signals are deferred side effects such as `service.reload(...)` or `service.restart(...)`. They run when the surrounding scope actually changed, and can also be flushed explicitly with `signals.flush()` when you need a checkpoint inside a larger flow.
|
|
96
98
|
|
|
99
|
+
### Compose + systemd
|
|
100
|
+
|
|
101
|
+
`compose.systemd(...)` can generate a native systemd unit for Docker Compose or Podman Compose projects. By default it now starts the stack with `compose up --remove-orphans`; set `detached: true` if you explicitly want the old `-d` behaviour in the generated `ExecStart`.
|
|
102
|
+
|
|
103
|
+
### Podman Quadlets
|
|
104
|
+
|
|
105
|
+
For Podman-native services, Paratix now also includes `quadlet.container(...)`. It writes a `.container` file under `/etc/containers/systemd`, reloads systemd when the content changes, and works cleanly with `service.enabled(...)` and `service.running(...)` for the generated service.
|
|
106
|
+
|
|
107
|
+
When you need a targeted image refresh outside the normal deploy flow, `quadlet.updateImage(...)` pulls exactly one image, reuses existing Podman registry auth on the host, optionally supports `authFile`, and only restarts the generated service when the pull actually downloaded a newer image.
|
|
108
|
+
|
|
97
109
|
### Guards
|
|
98
110
|
|
|
99
111
|
Paratix also supports declarative host-state guards. Use `when.packageInstalled(...)`, `when.commandExists(...)`, `when.fileExists(...)`, `when.pathExists(...)`, `when.symlinkExists(...)`, or `when.socketExists(...)` and their inverted forms to gate modules or recipes on remote host state without shell-heavy playbooks.
|
|
100
112
|
|
|
113
|
+
### Swap
|
|
114
|
+
|
|
115
|
+
Paratix can also manage file-backed swap directly. Use `swap.file(...)` to provision and persist a swap file, then tune common memory behaviour with `swap.swappiness(...)` or `swap.vfsCachePressure(...)`.
|
|
116
|
+
|
|
101
117
|
## CLI
|
|
102
118
|
|
|
103
119
|
```text
|