@happyvertical/smrt-config 0.61.0 → 0.61.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/AGENTS.md +13 -0
- package/README.md +8 -0
- package/dist/chunks/hosted-app-BomhfPIt.js +813 -0
- package/dist/chunks/hosted-app-BomhfPIt.js.map +1 -0
- package/dist/deployment/compose-source.d.ts +55 -0
- package/dist/deployment/compose-source.d.ts.map +1 -0
- package/dist/deployment/hosted-app-applier.d.ts +32 -0
- package/dist/deployment/hosted-app-applier.d.ts.map +1 -0
- package/dist/deployment/hosted-app.d.ts +131 -0
- package/dist/deployment/hosted-app.d.ts.map +1 -0
- package/dist/deployment/sha256.d.ts +9 -0
- package/dist/deployment/sha256.d.ts.map +1 -0
- package/dist/deployment-hosting.d.ts +12 -0
- package/dist/deployment-hosting.d.ts.map +1 -0
- package/dist/deployment-hosting.js +122 -0
- package/dist/deployment-hosting.js.map +1 -0
- package/dist/deployment.d.ts +4 -2
- package/dist/deployment.d.ts.map +1 -1
- package/dist/deployment.js +4 -506
- package/dist/deployment.js.map +1 -1
- package/dist/smrt-knowledge.okf.md +3 -2
- package/package.json +8 -3
package/AGENTS.md
CHANGED
|
@@ -60,6 +60,19 @@ file an application's deployment declaration. Guide:
|
|
|
60
60
|
validates the inputs (hand-written JSON), renders `target` only (`current`
|
|
61
61
|
is passed through, never synthesized), and requires an explicit
|
|
62
62
|
`entrypoint` because the chart's `command` replaces the image's.
|
|
63
|
+
- `src/deployment/hosted-app.ts`: `composeHostedApp()` renders a `deploy`-stage
|
|
64
|
+
declaration plus caller-supplied `entitlements` into the operator's `HostedApp`
|
|
65
|
+
(`smrt` preset; see `docs/smrt-preset.md` in happyvertical-operator) or
|
|
66
|
+
structured `{ code, message }` rejections. Pure and browser-safe; the release
|
|
67
|
+
id hash is `sha256.ts` (no `node:crypto`). Policy (which bindings/domains/volume
|
|
68
|
+
size an app may have) stays with the caller: it passes the result in. Never
|
|
69
|
+
throws, never carries secrets. The operator rejects unknown preset parameters,
|
|
70
|
+
so add one only after the operator does.
|
|
71
|
+
- `src/deployment-hosting.ts` (`./deployment/hosting`): the I/O half, kept out of
|
|
72
|
+
the browser-safe entry: `readGitHubComposeDeclaration()` (contents API,
|
|
73
|
+
`ref=<commit>` only, alias and size caps, no `<<` expansion) and
|
|
74
|
+
`createHostedAppApplier()` (server-side apply/delete of the one `HostedApp`
|
|
75
|
+
kind). Errors carry codes and statuses, never tokens, bodies or file text.
|
|
63
76
|
- `charts/smrt-app/fixtures/starter.json` is generated from
|
|
64
77
|
`packages/template-sveltekit/template/compose.yaml` by
|
|
65
78
|
`scripts/compose-contract-fixture.mjs --write`; `scripts/compose-contract.test.mjs`
|
package/README.md
CHANGED
|
@@ -153,6 +153,14 @@ and are never deployed. The JSON Schema for the annotations is published as
|
|
|
153
153
|
`@happyvertical/smrt-config/schemas/x-happyvertical.v1.schema.json`. From a
|
|
154
154
|
terminal, use `smrt deploy:check` and `smrt deploy:chart-values`.
|
|
155
155
|
|
|
156
|
+
To host the same declaration on the platform operator, `composeHostedApp()`
|
|
157
|
+
(same entry) turns it plus caller-supplied entitlements (approved bindings,
|
|
158
|
+
verified domains, volume size) into a `HostedApp` manifest or structured
|
|
159
|
+
rejections. `@happyvertical/smrt-config/deployment/hosting` holds the I/O:
|
|
160
|
+
`readGitHubComposeDeclaration()` reads the file at an exact commit and
|
|
161
|
+
`createHostedAppApplier()` server-side-applies the manifest. See the
|
|
162
|
+
deployment guide's "Hosting a declaration on the platform operator".
|
|
163
|
+
|
|
156
164
|
### Use config in code
|
|
157
165
|
|
|
158
166
|
```typescript
|