@intentic/sdk 1.310.0 → 1.311.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 -18
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# sdk
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The authoring surface of a `deploy.config.ts`: a typed builder that records what infrastructure you have and what you want as a serializable intent.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart LR
|
|
7
|
+
config["deploy.config.ts"] -- "defineIntent(i => …)" --> sdk(["sdk<br/>createStack"])
|
|
8
|
+
sdk -- "IntentSet" --> resolve["intentic deploy resolve"]
|
|
9
|
+
sdk -- "defineStack" --> state["state-resolver<br/>one-shot graph"]
|
|
10
|
+
```
|
|
6
11
|
|
|
7
|
-
-
|
|
8
|
-
- `
|
|
9
|
-
- `
|
|
10
|
-
-
|
|
12
|
+
- `i.have.*` declares inventory intentic reads but never creates or destroys: hosts over SSH, a Cloudflare account, GitHub or GitLab, a backup target, Discord, Stripe.
|
|
13
|
+
- `i.want.*` declares what intentic owns end to end: apps with environments, catalog services, backing databases, caches, auth and object storage, users, teams and per-host agent workspaces.
|
|
14
|
+
- Each call returns a typed handle whose properties are inert refs (`host.internalIp`, `app.environments.production.url`). Passing a handle to another declaration is how wiring happens; nothing is derived here.
|
|
15
|
+
- `defineIntent` is what a config exports. `defineStack` also runs the resolvers, which tests and fixtures use to get a graph without the CLI.
|
|
11
16
|
|
|
12
17
|
## Key files
|
|
13
18
|
|
|
14
|
-
- [src/index.ts](src/index.ts)
|
|
15
|
-
- [src/handles.ts](src/handles.ts)
|
|
16
|
-
- [src/stack.ts](src/stack.ts)
|
|
17
|
-
- [src
|
|
19
|
+
- [src/index.ts](src/index.ts) — `defineIntent` and `defineStack`.
|
|
20
|
+
- [src/handles.ts](src/handles.ts) — the `Have`, `Want` and handle interfaces an author sees.
|
|
21
|
+
- [src/stack.ts](src/stack.ts) — `createStack`, the recorder that turns calls into an `IntentSet`.
|
|
22
|
+
- [src/__fixtures__/deploy.config.ts](src/__fixtures__/deploy.config.ts) — a small config, compiled and asserted against `deploy.graph.ts`.
|
|
23
|
+
- [src/outputs.test.ts](src/outputs.test.ts) — handle output refs must match the `OUTPUTS` table in `resources`.
|
|
18
24
|
|
|
19
|
-
##
|
|
25
|
+
## Commands
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- Authors import `env` (secret refs) from its true source, [`@intentic/graph`](../graph): **not** re-exported here.
|
|
26
|
-
- The fixtures are snapshot-tested ([src/index.test.ts](src/index.test.ts), [src/deploy.config.test.ts](src/deploy.config.test.ts)); changing builder output updates them. See [_tools/examples/deploy.config.ts](../../_tools/examples/deploy.config.ts) and [ARCHITECTURE.md](../../ARCHITECTURE.md).
|
|
27
|
+
```sh
|
|
28
|
+
pnpm --filter @intentic/sdk test
|
|
29
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.311.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@intentic/graph": "1.
|
|
34
|
-
"@intentic/need-resolver": "1.
|
|
35
|
-
"@intentic/resources": "1.
|
|
36
|
-
"@intentic/state-resolver": "1.
|
|
33
|
+
"@intentic/graph": "1.311.0",
|
|
34
|
+
"@intentic/need-resolver": "1.311.0",
|
|
35
|
+
"@intentic/resources": "1.311.0",
|
|
36
|
+
"@intentic/state-resolver": "1.311.0",
|
|
37
37
|
"tslib": "2.8.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|