@computesdk/cloudflare 1.0.1 → 1.1.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.
Files changed (2) hide show
  1. package/README.md +6 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -80,6 +80,8 @@ export default {
80
80
 
81
81
  ```typescript
82
82
  import { cloudflare } from '@computesdk/cloudflare';
83
+ import { createCompute } from 'computesdk';
84
+
83
85
 
84
86
  // Initialize the provider with your Durable Object binding
85
87
  const provider = cloudflare({
@@ -91,8 +93,11 @@ const provider = cloudflare({
91
93
  }
92
94
  });
93
95
 
96
+ // Create a compute instance
97
+ const compute = createCompute({ provider });
98
+
94
99
  // Create a sandbox
95
- const sandbox = await provider.sandbox.create();
100
+ const sandbox = await compute.sandbox.create();
96
101
 
97
102
  // Execute Python code
98
103
  const result = await sandbox.runCode(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@computesdk/cloudflare",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Cloudflare provider for ComputeSDK",
5
5
  "author": "Garrison",
6
6
  "license": "MIT",