ziex 0.1.0-dev.786 → 0.1.0-dev.804

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.
@@ -1,19 +1,2 @@
1
- export interface KVNamespace {
2
- get(key: string): Promise<string | null>;
3
- put(key: string, value: string, options?: {
4
- expiration?: number;
5
- expirationTtl?: number;
6
- }): Promise<void>;
7
- delete(key: string): Promise<void>;
8
- list(options?: {
9
- prefix?: string;
10
- }): Promise<{
11
- keys: {
12
- name: string;
13
- }[];
14
- }>;
15
- }
16
- /**
17
- * Create a `__zx_kv` import object for use with `worker.run({ kv: ... })`.
18
- */
19
- export declare function createKVImports(bindings: Record<string, KVNamespace>, getMemory: () => WebAssembly.Memory): Record<string, unknown>;
1
+ export { createMemoryKV, createKVImports } from "../kv";
2
+ export type { KVNamespace } from "../kv";
@@ -1,39 +1,3 @@
1
- /**
2
- * Run a WASM module for a single request using JSPI.
3
- *
4
- * Pass `kv` as a map of binding names → KV namespaces. The Zig side selects
5
- * a binding via `zx.kv.scope("name")`; the top-level `zx.kv.*` functions use
6
- * `"default"`.
7
- *
8
- * @example
9
- * ```ts
10
- * return worker.run({
11
- * request, env, ctx, wasmModule,
12
- * kv: { default: env.KV, users: env.USERS_KV },
13
- * });
14
- * ```
15
- */
16
- export declare function run({ request, env, ctx, module, kv: kvBindings, imports, }: {
17
- request: Request;
18
- env?: unknown;
19
- ctx?: unknown;
20
- module: WebAssembly.Module;
21
- /** KV namespace bindings — `{ default: env.KV, otherName: env.OTHER_KV }` */
22
- kv?: Record<string, import("./kv").KVNamespace>;
23
- imports?: (mem: () => WebAssembly.Memory) => Record<string, Record<string, unknown>>;
24
- }): Promise<Response>;
25
- export declare function prepare({ request, env, ctx, }: {
26
- request: Request;
27
- env: unknown;
28
- ctx: unknown;
29
- }): {
30
- args: string[];
31
- stdout: TransformStream<any, any>;
32
- stderr: TransformStream<any, any>;
33
- stdin: ReadableStream<Uint8Array<ArrayBufferLike>> | undefined;
34
- };
35
- export declare function respond({ exec, stdout, stderr, }: {
36
- exec: Promise<number | undefined>;
37
- stdout: TransformStream;
38
- stderr: TransformStream | ReadableStream<Uint8Array>;
39
- }): Promise<Response>;
1
+ export { run, buildWsImports, attachWebSocket } from "../runtime";
2
+ export type { DurableObjectNamespace, WsState } from "../runtime";
3
+ export { createWebSocketDO } from "./do";
package/index.d.ts CHANGED
@@ -1,9 +1,2 @@
1
- export declare const zx: BuildZon;
2
- type BuildZon = {
3
- version: string;
4
- description: string;
5
- repository: string;
6
- fingerprint: number;
7
- minimum_zig_version: string;
8
- };
9
- export {};
1
+ export { Ziex } from "./app";
2
+ export type { WasmInput } from "./app";