openwrangler 0.0.1

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.
@@ -0,0 +1,15 @@
1
+ import { R2Bucket, KVNamespace, D1Database } from '@cloudflare/workers-types/experimental';
2
+
3
+ interface BindingsConfig {
4
+ accountId: string;
5
+ apiToken: string;
6
+ }
7
+ interface Bindings {
8
+ r2: R2Bucket;
9
+ kv: KVNamespace;
10
+ d1: D1Database;
11
+ }
12
+ declare function getBindings(config: BindingsConfig): Bindings;
13
+
14
+ export { getBindings };
15
+ export type { Bindings, BindingsConfig };
@@ -0,0 +1,15 @@
1
+ import { R2Bucket, KVNamespace, D1Database } from '@cloudflare/workers-types/experimental';
2
+
3
+ interface BindingsConfig {
4
+ accountId: string;
5
+ apiToken: string;
6
+ }
7
+ interface Bindings {
8
+ r2: R2Bucket;
9
+ kv: KVNamespace;
10
+ d1: D1Database;
11
+ }
12
+ declare function getBindings(config: BindingsConfig): Bindings;
13
+
14
+ export { getBindings };
15
+ export type { Bindings, BindingsConfig };
package/dist/index.mjs ADDED
@@ -0,0 +1,18 @@
1
+ function getBindings(config) {
2
+ return {
3
+ r2: createR2Binding(),
4
+ kv: createKVBinding(),
5
+ d1: createD1Binding()
6
+ };
7
+ }
8
+ function createR2Binding(config) {
9
+ throw new Error("Not implemented");
10
+ }
11
+ function createKVBinding(config) {
12
+ throw new Error("Not implemented");
13
+ }
14
+ function createD1Binding(config) {
15
+ throw new Error("Not implemented");
16
+ }
17
+
18
+ export { getBindings };
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "openwrangler",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "import": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts"
9
+ }
10
+ },
11
+ "main": "./dist/index.mjs",
12
+ "types": "./dist/index.d.ts",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "scripts": {
17
+ "dev": "nuxi dev playground",
18
+ "build": "unbuild"
19
+ },
20
+ "devDependencies": {
21
+ "@binochoi/nitro-cloudflare-dev": "workspace:*",
22
+ "@cloudflare/workers-types": "^4.20251231.0",
23
+ "nuxt": "^3.15.0",
24
+ "typescript": "^5.7.2",
25
+ "unbuild": "^3.3.1",
26
+ "wrangler": "^3.99.0"
27
+ }
28
+ }