jotdb 0.1.1 → 0.1.3

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/package.json CHANGED
@@ -1,18 +1,24 @@
1
1
  {
2
2
  "name": "jotdb",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
- ".": "./dist/index.js"
7
+ ".": {
8
+ "import": "./dist/index.js",
9
+ "types": "./dist/index.d.ts"
10
+ }
8
11
  },
9
12
  "types": "dist/index.d.ts",
10
13
  "scripts": {
11
14
  "dev": "wrangler dev --port 5173 --remote",
12
15
  "test": "bun test jotdb.tests.ts",
13
- "deploy": "wrangler deploy"
16
+ "deploy": "wrangler deploy",
17
+ "patch": "npm version patch && npm publish --access public"
18
+ },
19
+ "dependencies": {
20
+ "typescript": "^5.8.3"
14
21
  },
15
- "dependencies": {},
16
22
  "devDependencies": {
17
23
  "@cloudflare/workers-types": "^4.20250517.0",
18
24
  "hono": "^4.7.10",
package/src/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { z, ZodTypeAny, ZodObject } from "zod";
2
- import type { DurableObjectState } from "@cloudflare/workers-types";
3
2
  import { Hono } from 'hono';
4
3
  import { cors } from 'hono/cors';
5
4
  import { prettyJSON } from 'hono/pretty-json';
@@ -21,7 +20,6 @@ interface AuditLogEntry {
21
20
  }
22
21
 
23
22
  export class JotDB extends DurableObject {
24
- private ctx: DurableObjectState;
25
23
  private data: Record<string, unknown> = {};
26
24
  private rawSchema: SchemaDefinition = {};
27
25
  private zodSchema: ZodObject<any> | null = null;
@@ -31,9 +29,8 @@ export class JotDB extends DurableObject {
31
29
  };
32
30
  private auditLog: AuditLogEntry[] = [];
33
31
 
34
- constructor(state: DurableObjectState, env: Env) {
32
+ constructor(state: any, env: Env) {
35
33
  super(state, env);
36
- this.ctx = state;
37
34
  }
38
35
 
39
36
  async load(): Promise<void> {
@@ -229,6 +226,10 @@ export class JotDB extends DurableObject {
229
226
  }
230
227
  return z.object(shape);
231
228
  }
229
+
230
+ async fetch(request: Request) {
231
+ return new Response("Hello, World!");
232
+ }
232
233
  }
233
234
 
234
235
  export interface Env {
package/tsconfig.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2020",
4
- "module": "ES2020",
4
+ "module": "ESNext",
5
5
  "lib": [
6
6
  "ES2020"
7
7
  ],
8
8
  "types": [
9
9
  "@cloudflare/workers-types"
10
10
  ],
11
+ "declaration": true,
12
+ "emitDeclarationOnly": false,
13
+ "outDir": "dist",
11
14
  "moduleResolution": "node",
12
15
  "strict": true,
13
16
  "noImplicitAny": true,