@swirls/deploy 0.5.0 → 0.7.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 +21 -0
- package/dist/index.d.ts +463 -36
- package/dist/index.js +5842 -4014
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,6 +110,27 @@ lowers to `config: { type: 'ai', kind: 'audio', model: 'hexgrad/kokoro-82m', pro
|
|
|
110
110
|
|
|
111
111
|
Lowering refuses a `kind` that is not one of the six. It does not check `options`: an unknown option reaches the definition as written. The schemas of the options (`aiImageOptionsSchema`, `aiAudioOptionsSchema`, `aiVideoOptionsSchema`, `aiEmbedOptionsSchema`) are in `@swirls/definition/schemas`. This package does not export them.
|
|
112
112
|
|
|
113
|
+
## Computers and streams
|
|
114
|
+
|
|
115
|
+
A computer lowers to its recipe (`compileComputerRecipe`) plus `lowerComputerRuntime`: `repos` with the language's defaults applied (`access: 'read'`, `depth: 'shallow'`, `submodules` and `lfs` false; `path` and `ref` only when written), `egress` as `{ host, secrets }` entries (`lowerComputerEgress`; a plain host has no secrets, a header is lower-cased and `format` defaults to `plain`), and `idle:` and `keep:` as `idleSeconds` and `keepSeconds`. `lowerComputerRepo` lowers one entry. A disk adds no packages to the recipe, and there is no `needsMountTooling`: the machine mounts its disks itself.
|
|
116
|
+
|
|
117
|
+
A stream's `retention:` lowers to `retentionSeconds`. A `type: stream` node lowers literal keys to their typed forms and leaves code as code, recorded in `configValueKinds`:
|
|
118
|
+
|
|
119
|
+
```swirls
|
|
120
|
+
node charges_per_day {
|
|
121
|
+
type: stream
|
|
122
|
+
label: "Charges per day"
|
|
123
|
+
stream: guest_charges
|
|
124
|
+
since: "90d"
|
|
125
|
+
group_by: day
|
|
126
|
+
measure: { charges: count, cents: { sum: amount_cents } }
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
lowers to `config: { type: 'stream', stream: 'guest_charges', since: { agoSeconds: 7776000 }, groupBy: { period: 'day' }, measure: { charges: { op: 'count' }, cents: { op: 'sum', field: 'amount_cents' } } }`. A date such as `"2026-01-31"` lowers to `{ at: '2026-01-31T00:00:00Z' }`.
|
|
131
|
+
|
|
132
|
+
A stream trigger, `stream:guest_charges -> notify_owner`, lowers to `resourceType: 'stream'` with the stream's id as `resourceId`, and its `filter:` to the filter object or the code of its `@ts` block.
|
|
133
|
+
|
|
113
134
|
## Several directories as one program
|
|
114
135
|
|
|
115
136
|
`lowerSwirlsMounts(mounts, options?)` lowers several directories, called mounts, into one definition. Each mount is `{ id, files, skillsRoot? }`:
|