rastack 0.0.43 → 0.0.44
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/CHANGELOG.md +7 -0
- package/admin/AdminApp.tsx +308 -0
- package/admin/adapters.ts +247 -0
- package/admin/index.tsx +88 -0
- package/admin/useAdmin.ts +299 -0
- package/dist/admin.js +81 -0
- package/dist/dev/harness.d.ts +53 -0
- package/dist/dev/harness.js +151 -0
- package/dist/rastack-dev.d.ts +18 -0
- package/dist/rastack-dev.js +197 -0
- package/dist/rastack-wasm-build.d.ts +9 -4
- package/dist/rastack-wasm-build.js +44 -33
- package/dist/rastack.d.ts +1 -2
- package/dist/rastack.js +7 -10
- package/dist/wasm/package.json +4 -0
- package/dist/wasm/rastack_wasm.d.ts +100 -0
- package/dist/wasm/rastack_wasm.js +745 -0
- package/dist/wasm/rastack_wasm_bg.wasm +0 -0
- package/dist/wasm/rastack_wasm_bg.wasm.d.ts +28 -0
- package/package.json +6 -2
- package/scripts/build-admin.js +48 -0
- package/scripts/copy-wasm.js +35 -0
- package/src/dev/harness.ts +130 -0
- package/src/rastack-dev.ts +197 -0
- package/src/rastack-wasm-build.ts +52 -41
- package/src/rastack.ts +7 -10
- package/test/dev.spec.ts +277 -0
- package/wasm/package.json +4 -0
- package/wasm/rastack_wasm.d.ts +100 -0
- package/wasm/rastack_wasm.js +745 -0
- package/wasm/rastack_wasm_bg.wasm +0 -0
- package/wasm/rastack_wasm_bg.wasm.d.ts +28 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The in-browser API engine. Cheap to clone (everything behind `Arc`), which
|
|
6
|
+
* is what lets each async call own its state without borrowing across `await`.
|
|
7
|
+
*/
|
|
8
|
+
export class RastackApi {
|
|
9
|
+
free(): void;
|
|
10
|
+
[Symbol.dispose](): void;
|
|
11
|
+
/**
|
|
12
|
+
* Snapshot the entire warehouse to a blob for persistence (`data/` folder,
|
|
13
|
+
* IndexedDB, or an upload to S3).
|
|
14
|
+
*/
|
|
15
|
+
exportWarehouse(): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Handle one request. `query` is a `{ [k]: string }` object, `body` any
|
|
18
|
+
* JSON value (or `undefined`). Resolves to `{ status, body }`.
|
|
19
|
+
*/
|
|
20
|
+
handle(method: string, path: string, query: any, body: any): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* Seed the warehouse from a blob previously produced by
|
|
23
|
+
* [`export_warehouse`](Self::export_warehouse) (the `data/` folder or an
|
|
24
|
+
* IndexedDB/OPFS snapshot).
|
|
25
|
+
*/
|
|
26
|
+
importWarehouse(blob: Uint8Array): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Build an engine from the compiled manifest (`schema.rastack.json`) and an
|
|
29
|
+
* optional OpenAPI document (`openapi.json`, served at `/api/schema/`).
|
|
30
|
+
*/
|
|
31
|
+
constructor(manifest_json: string, openapi_json?: string | null);
|
|
32
|
+
/**
|
|
33
|
+
* Seed one Iceberg file (metadata or data file) at its warehouse key. The
|
|
34
|
+
* provider walks the committed `data/warehouse` Iceberg tree over HTTP and
|
|
35
|
+
* calls this for each file, so the browser reads the *actual* Iceberg files
|
|
36
|
+
* — no bundled blob.
|
|
37
|
+
*/
|
|
38
|
+
seedFile(key: string, bytes: Uint8Array): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* Run subsequent requests as a signed-in identity (the Cognito `sub` and
|
|
41
|
+
* `cognito:groups` claims). Owner fields are stamped from — and row
|
|
42
|
+
* filters and tenant scoping keyed by — this subject, matching the server
|
|
43
|
+
* byte-for-byte. Pass no subject to fall back to the trusted local
|
|
44
|
+
* context.
|
|
45
|
+
*/
|
|
46
|
+
setAuth(subject: string | null | undefined, groups: any): void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
50
|
+
|
|
51
|
+
export interface InitOutput {
|
|
52
|
+
readonly memory: WebAssembly.Memory;
|
|
53
|
+
readonly __wbg_rastackapi_free: (a: number, b: number) => void;
|
|
54
|
+
readonly rastackapi_exportWarehouse: (a: number) => any;
|
|
55
|
+
readonly rastackapi_handle: (a: number, b: number, c: number, d: number, e: number, f: any, g: any) => any;
|
|
56
|
+
readonly rastackapi_importWarehouse: (a: number, b: number, c: number) => any;
|
|
57
|
+
readonly rastackapi_new: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
58
|
+
readonly rastackapi_seedFile: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
59
|
+
readonly rastackapi_setAuth: (a: number, b: number, c: number, d: any) => [number, number];
|
|
60
|
+
readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
|
|
61
|
+
readonly rust_zstd_wasm_shim_free: (a: number) => void;
|
|
62
|
+
readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
|
|
63
|
+
readonly rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
|
|
64
|
+
readonly rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
|
|
65
|
+
readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
|
|
66
|
+
readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
|
|
67
|
+
readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
|
|
68
|
+
readonly wasm_bindgen_1a7aa9db5392c486___convert__closures_____invoke___wasm_bindgen_1a7aa9db5392c486___JsValue__core_7d5f0a2ba6a62c33___result__Result_____wasm_bindgen_1a7aa9db5392c486___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
69
|
+
readonly wasm_bindgen_1a7aa9db5392c486___convert__closures_____invoke___js_sys_191ff9fb2bd47800___Function_fn_wasm_bindgen_1a7aa9db5392c486___JsValue_____wasm_bindgen_1a7aa9db5392c486___sys__Undefined___js_sys_191ff9fb2bd47800___Function_fn_wasm_bindgen_1a7aa9db5392c486___JsValue_____wasm_bindgen_1a7aa9db5392c486___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
70
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
71
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
72
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
73
|
+
readonly __externref_table_alloc: () => number;
|
|
74
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
75
|
+
readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
|
|
76
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
77
|
+
readonly __wbindgen_start: () => void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
84
|
+
* a precompiled `WebAssembly.Module`.
|
|
85
|
+
*
|
|
86
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
87
|
+
*
|
|
88
|
+
* @returns {InitOutput}
|
|
89
|
+
*/
|
|
90
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
94
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
95
|
+
*
|
|
96
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
97
|
+
*
|
|
98
|
+
* @returns {Promise<InitOutput>}
|
|
99
|
+
*/
|
|
100
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|