Skip to content

An open-source, faster Devin alternative

TypeScript

sdk: export Image and Snapshots as values, not only as types — both were type-only exports, so the import the Image reference documents (import { Image } from "@opencomputer/sdk") failed at runtime with 'does not provide an export named Image', and there was no supported way to define a template through the SDK at all; caught by the first end-to-end template run, which could not import them

Brian Reardon07fcb4a82daa
diff --git a/sdks/typescript/src/index.ts b/sdks/typescript/src/index.ts
index da0ee32a..4fd36271 100644
--- a/sdks/typescript/src/index.ts
+++ b/sdks/typescript/src/index.ts
@@ -100,5 +100,12 @@ export {
type TagKeyInfo,
} from "./usage.js";
// Node.js-only modules (use crypto, fs, path) — import via "@opencomputer/sdk/node".
+// The Image builder and the Snapshots client are exported as VALUES, not only
+// as types. Both were type-only, so `import { Image } from "@opencomputer/sdk"`
+// — which the Image reference documents — failed at runtime with "does not
+// provide an export named 'Image'", and there was no supported way to define a
+// template through the SDK at all.
+export { Image } from "./image.js";
export type { ImageManifest, ImageStep } from "./image.js";
+export { Snapshots } from "./snapshot.js";
export type { SnapshotInfo, CreateSnapshotOpts, WaitForReadyOpts } from "./snapshot.js";