quilt-sdk 0.0.5 → 0.0.6
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 +62 -6
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -74,19 +74,49 @@ Primary SDK surfaces:
|
|
|
74
74
|
- `client.events` for SSE streams
|
|
75
75
|
- `client.raw(...)` for authenticated access to backend routes that are intentionally still exposed as raw contract calls
|
|
76
76
|
|
|
77
|
+
## Docker-Compatible Images
|
|
78
|
+
|
|
79
|
+
Quilt supports Docker-compatible registry image ingress through the OCI image routes and normal container create.
|
|
80
|
+
|
|
81
|
+
That means:
|
|
82
|
+
|
|
83
|
+
- pull an image from Docker Hub or another OCI-compatible registry
|
|
84
|
+
- inspect or list the stored image metadata
|
|
85
|
+
- create a container from that pulled image with `oci: true`
|
|
86
|
+
|
|
87
|
+
This is image compatibility, not Docker Engine API compatibility.
|
|
88
|
+
|
|
89
|
+
Registry pull:
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
const pulled = await client.platform.ociPull({
|
|
93
|
+
reference: "docker.io/library/alpine:3.20",
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Create from the pulled image:
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const accepted = await client.containers.create(
|
|
101
|
+
{
|
|
102
|
+
name: "oci-demo",
|
|
103
|
+
image: "docker.io/library/alpine:3.20",
|
|
104
|
+
oci: true,
|
|
105
|
+
command: ["sleep", "60"],
|
|
106
|
+
},
|
|
107
|
+
"async",
|
|
108
|
+
);
|
|
109
|
+
```
|
|
110
|
+
|
|
77
111
|
## Public Types
|
|
78
112
|
|
|
79
|
-
The SDK ships declarations automatically.
|
|
113
|
+
The SDK ships declarations automatically through the package export.
|
|
80
114
|
|
|
81
115
|
Use the client-owned type surface when you need explicit types:
|
|
82
116
|
|
|
83
117
|
```ts
|
|
84
118
|
import { QuiltClient } from "quilt-sdk";
|
|
85
119
|
|
|
86
|
-
const client = QuiltClient.connect({
|
|
87
|
-
apiKey: process.env.QUILT_API_KEY,
|
|
88
|
-
});
|
|
89
|
-
|
|
90
120
|
const options: QuiltClient.Options = {
|
|
91
121
|
baseUrl: "https://backend.quilt.sh",
|
|
92
122
|
apiKey: process.env.QUILT_API_KEY,
|
|
@@ -138,21 +168,25 @@ ws.addEventListener("message", (msg) => {
|
|
|
138
168
|
|
|
139
169
|
## Examples
|
|
140
170
|
|
|
141
|
-
The
|
|
171
|
+
The repository ships a production-validated example set in [`examples/`](./examples).
|
|
142
172
|
|
|
143
173
|
Example files:
|
|
144
174
|
|
|
145
175
|
- `examples/containers-volumes-and-network.ts`
|
|
176
|
+
- `examples/docker-and-oci-images.ts`
|
|
146
177
|
- `examples/sdk-runtime-and-functions.ts`
|
|
147
178
|
- `examples/clusters-nodes-workloads-and-k8s.ts`
|
|
148
179
|
- `examples/terminal-and-icc.ts`
|
|
149
180
|
- `examples/elasticity-control.ts`
|
|
150
181
|
- `examples/lifecycle-and-failures.ts`
|
|
151
182
|
|
|
183
|
+
The example guide is in [`examples/README.md`](./examples/README.md).
|
|
184
|
+
|
|
152
185
|
Run them from the repo root:
|
|
153
186
|
|
|
154
187
|
```bash
|
|
155
188
|
bun run example:containers
|
|
189
|
+
bun run example:images
|
|
156
190
|
bun run example:sdk
|
|
157
191
|
bun run example:clusters
|
|
158
192
|
bun run example:terminal
|
|
@@ -185,6 +219,28 @@ bun run build
|
|
|
185
219
|
bun run examples:all
|
|
186
220
|
```
|
|
187
221
|
|
|
222
|
+
`prepublishOnly` runs:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
bun run clean
|
|
226
|
+
bun run lint
|
|
227
|
+
bun run typecheck
|
|
228
|
+
bun run examples:typecheck
|
|
229
|
+
bun run test
|
|
230
|
+
bun run build
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Package Contents
|
|
234
|
+
|
|
235
|
+
The published npm package includes:
|
|
236
|
+
|
|
237
|
+
- compiled runtime in `dist/`
|
|
238
|
+
- generated `.d.ts` declarations
|
|
239
|
+
- `README.md`
|
|
240
|
+
- `LICENSE`
|
|
241
|
+
|
|
242
|
+
The repository also includes the example app and validation setup used to verify the SDK against production.
|
|
243
|
+
|
|
188
244
|
## License
|
|
189
245
|
|
|
190
246
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quilt-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Fully type-safe TypeScript SDK for Quilt HTTP APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,14 +27,15 @@
|
|
|
27
27
|
"lint:fix": "biome check --write .",
|
|
28
28
|
"test": "bun test",
|
|
29
29
|
"test:coverage": "bun test --coverage",
|
|
30
|
-
"examples:all": "bun run example:containers && bun run example:sdk && bun run example:clusters && bun run example:terminal && bun run example:elasticity && bun run example:lifecycle",
|
|
30
|
+
"examples:all": "bun run example:containers && bun run example:images && bun run example:sdk && bun run example:clusters && bun run example:terminal && bun run example:elasticity && bun run example:lifecycle",
|
|
31
31
|
"example:containers": "node --env-file=.env --import tsx examples/containers-volumes-and-network.ts",
|
|
32
|
+
"example:images": "node --env-file=.env --import tsx examples/docker-and-oci-images.ts",
|
|
32
33
|
"example:sdk": "node --env-file=.env --import tsx examples/sdk-runtime-and-functions.ts",
|
|
33
34
|
"example:clusters": "node --env-file=.env --import tsx examples/clusters-nodes-workloads-and-k8s.ts",
|
|
34
35
|
"example:terminal": "node --env-file=.env --import tsx examples/terminal-and-icc.ts",
|
|
35
36
|
"example:elasticity": "node --env-file=.env --import tsx examples/elasticity-control.ts",
|
|
36
37
|
"example:lifecycle": "node --env-file=.env --import tsx examples/lifecycle-and-failures.ts",
|
|
37
|
-
"prepublishOnly": "bun run clean && bun run lint && bun run typecheck && bun run test && bun run build"
|
|
38
|
+
"prepublishOnly": "bun run clean && bun run lint && bun run typecheck && bun run examples:typecheck && bun run test && bun run build"
|
|
38
39
|
},
|
|
39
40
|
"keywords": ["quilt", "sdk", "api", "typescript", "bun"],
|
|
40
41
|
"license": "MIT",
|
|
@@ -49,5 +50,8 @@
|
|
|
49
50
|
"tsx": "^4.20.3",
|
|
50
51
|
"typescript": "^5.8.3",
|
|
51
52
|
"ws": "^8.20.0"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"quilt-sdk": "^0.0.5"
|
|
52
56
|
}
|
|
53
57
|
}
|