Skip to content

Commit f108d47

Browse files
committed
docs: fix deploy summary snippets
1 parent 541466b commit f108d47

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

sdk/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,13 @@ if (result.hasErrors) console.log(result.errors);
154154
The canonical primitive for any deploy (database + migrations + manifest + value-free secret declarations + functions + site + subdomain). Three layers:
155155

156156
```ts
157-
import { summarizeDeployResult } from "@run402/sdk";
157+
import { run402, summarizeDeployResult, type ReleaseSpec } from "@run402/sdk/node";
158+
159+
const r = run402();
160+
const spec: ReleaseSpec = {
161+
project: "prj_...",
162+
site: { patch: { put: { "index.html": "<h1>Hello</h1>" } } },
163+
};
158164

159165
// One-shot — most agents use this.
160166
const result = await r.deploy.apply(spec);
@@ -167,7 +173,7 @@ for await (const ev of op.events()) console.log(ev.type);
167173
const final = await op.result();
168174

169175
// Resume a previously-started deploy by id.
170-
const resumed = await r.deploy.resume(operationId);
176+
const resumed = await r.deploy.resume("op_...");
171177
```
172178

173179
- **All bytes ride through CAS.** The plan request body never carries inline bytes — only `ContentRef` objects. When the spec exceeds 5 MB JSON, the SDK uploads the manifest itself as a CAS object (`manifest_ref` escape hatch).

sdk/llms-sdk.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,13 @@ summarizeDeployResult(result: DeployResult): DeploySummary
615615
Example:
616616

617617
```ts
618-
import { summarizeDeployResult } from "@run402/sdk";
618+
import { run402, summarizeDeployResult, type ReleaseSpec } from "@run402/sdk/node";
619+
620+
const r = run402();
621+
const spec: ReleaseSpec = {
622+
project: "prj_...",
623+
site: { patch: { put: { "index.html": "<h1>Hello</h1>" } } },
624+
};
619625

620626
const result = await r.deploy.apply(spec);
621627
const summary = summarizeDeployResult(result);

0 commit comments

Comments
 (0)