ziex 0.1.0-dev.1389 → 0.1.0-dev.1466

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 (49) hide show
  1. package/README.md +4 -1
  2. package/app.d.ts +6 -6
  3. package/build.zig.zon +1 -1
  4. package/index.js +490 -174
  5. package/package.json +7 -5
  6. package/{aws-lambda → platforms/aws-lambda}/index.js +1 -1
  7. package/platforms/cloudflare/app.d.ts +2 -0
  8. package/platforms/cloudflare/db.d.ts +6 -0
  9. package/{cloudflare → platforms/cloudflare}/do.d.ts +5 -5
  10. package/platforms/cloudflare/index.d.ts +4 -0
  11. package/{cloudflare → platforms/cloudflare}/index.js +1959 -1532
  12. package/platforms/cloudflare/kv.d.ts +5 -0
  13. package/platforms/cloudflare/worker.d.ts +3 -0
  14. package/{vercel → platforms/vercel}/index.js +1 -1
  15. package/runtime/db/extern.d.ts +38 -0
  16. package/runtime/db/sqlite.d.ts +7 -0
  17. package/runtime/db.d.ts +3 -0
  18. package/runtime/db.js +419 -0
  19. package/{fetch.d.ts → runtime/fetch.d.ts} +1 -1
  20. package/{runtime.d.ts → runtime/index.d.ts} +6 -15
  21. package/runtime/kv/extern.d.ts +11 -0
  22. package/runtime/kv/indexdb.d.ts +7 -0
  23. package/runtime/kv/localstorage.d.ts +6 -0
  24. package/runtime/kv/memory.d.ts +6 -0
  25. package/runtime/kv.d.ts +45 -0
  26. package/runtime/kv.js +543 -0
  27. package/wasm/constants.d.ts +33 -0
  28. package/wasm/core.d.ts +23 -33
  29. package/wasm/dom_cmd.d.ts +15 -0
  30. package/wasm/generated/event_bits.d.ts +2 -0
  31. package/wasm/generated/events.d.ts +1 -0
  32. package/wasm/generated/tag_indices.d.ts +2 -0
  33. package/wasm/generated/tags.d.ts +1 -0
  34. package/wasm/index.d.ts +15 -13
  35. package/wasm/index.js +911 -676
  36. package/wasm/init.dev.js +895 -674
  37. package/wasm/init.js +3 -3
  38. package/wasm/wasi.d.ts +1 -5
  39. package/browser/kv.d.ts +0 -13
  40. package/cloudflare/app.d.ts +0 -2
  41. package/cloudflare/db.d.ts +0 -2
  42. package/cloudflare/index.d.ts +0 -4
  43. package/cloudflare/kv.d.ts +0 -2
  44. package/cloudflare/worker.d.ts +0 -3
  45. package/db.d.ts +0 -22
  46. package/kv.d.ts +0 -42
  47. /package/{aws-lambda → platforms/aws-lambda}/index.d.ts +0 -0
  48. /package/{vercel → platforms/vercel}/index.d.ts +0 -0
  49. /package/{wasi.d.ts → runtime/wasi.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ziex",
3
- "version": "0.1.0-dev.1389",
3
+ "version": "0.1.0-dev.1466",
4
4
  "types": "index.d.ts",
5
5
  "description": "Ziex is a framework for building web applications with Zig.",
6
6
  "main": "index.js",
@@ -13,9 +13,11 @@
13
13
  "./jsx": "./jsx/index.js",
14
14
  "./wasm": "./wasm/index.js",
15
15
  "./wasm/init": "./wasm/init.js",
16
- "./cloudflare": "./cloudflare/index.js",
17
- "./aws-lambda": "./aws-lambda/index.js",
18
- "./vercel": "./vercel/index.js"
16
+ "./cloudflare": "./platforms/cloudflare/index.js",
17
+ "./aws-lambda": "./platforms/aws-lambda/index.js",
18
+ "./vercel": "./platforms/vercel/index.js",
19
+ "./kv": "./runtime/kv.js",
20
+ "./db": "./runtime/db.js"
19
21
  },
20
22
  "homepage": "https://ziex.dev",
21
23
  "repository": {
@@ -38,7 +40,7 @@
38
40
  "license": "MIT",
39
41
  "scripts": {},
40
42
  "dependencies": {
41
- "@ziex/cli": "0.1.0-dev.1389"
43
+ "@ziex/cli": "0.1.0-dev.1466"
42
44
  },
43
45
  "module": "index.js"
44
46
  }
@@ -1,4 +1,4 @@
1
- // src/aws-lambda/index.ts
1
+ // src/platforms/aws-lambda/index.ts
2
2
  function isV2(event) {
3
3
  return "requestContext" in event && event.requestContext !== null && "http" in event.requestContext;
4
4
  }
@@ -0,0 +1,2 @@
1
+ export { Ziex, resolveModule } from "../../app";
2
+ export type { WasmInput } from "../../app";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Cloudflare D1 implements the generic {@link Database} binding.
3
+ * Prefer the generic names; D1* aliases are for Workers-typed `env.DB`.
4
+ */
5
+ export { createDbImports } from "../../runtime/db";
6
+ export type { Database, Database as D1Database, PreparedStatement, PreparedStatement as D1PreparedStatement, ExecResult, ExecResult as D1ExecResult, DbValue, DbValue as D1Value, } from "../../runtime/db";
@@ -1,6 +1,6 @@
1
- import type { WsState } from "../runtime";
2
- import type { KVNamespace } from "../kv";
3
- import type { D1Database } from "../db";
1
+ import type { WsState } from "../../runtime";
2
+ import { type KVNamespace } from "../../runtime/kv";
3
+ import type { Database } from "../../runtime/db";
4
4
  type ConnState = WsState & {
5
5
  topics: Set<string>;
6
6
  };
@@ -36,8 +36,8 @@ export declare function createWebSocketDO(module: WebAssembly.Module, options?:
36
36
  * ```
37
37
  */
38
38
  kv?: (env: any) => Record<string, KVNamespace>;
39
- db?: (env: any) => Record<string, D1Database>;
40
- imports?: (mem: () => WebAssembly.Memory) => Record<string, Record<string, unknown>>;
39
+ db?: (env: any) => Record<string, Database>;
40
+ imports?: (mem: () => WebAssembly.Memory) => WebAssembly.Imports;
41
41
  }): {
42
42
  new (state: any, env: any): {
43
43
  readonly doState: any;
@@ -0,0 +1,4 @@
1
+ export * as worker from "../../runtime";
2
+ export * as kv from "../../runtime/kv";
3
+ export { Ziex } from "../../app";
4
+ export { createWebSocketDO } from "./do";