@spooky-sync/ssp-wasm 0.0.1-canary.69 → 0.0.1-canary.71

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@spooky-sync/ssp-wasm",
3
- "version": "0.0.1-canary.69",
3
+ "version": "0.0.1-canary.71",
4
4
  "main": "pkg/ssp_wasm.js",
5
5
  "types": "pkg/ssp_wasm.d.ts",
6
6
  "files": [
package/pkg/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ssp-wasm",
3
3
  "type": "module",
4
4
  "description": "WASM bindings for ssp",
5
- "version": "0.0.1-canary.69",
5
+ "version": "0.0.1-canary.71",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "ssp_wasm_bg.wasm",
package/pkg/ssp_wasm.d.ts CHANGED
@@ -10,6 +10,14 @@ export interface WasmViewUpdate {
10
10
  removals: string[];
11
11
  updates: [string, number][];
12
12
  };
13
+ // Per-phase SSP processing time (ms). Ingest path: store_apply/circuit_step/
14
+ // transform. Register path: parse/plan/snapshot. Unused side is 0.
15
+ timing_store_apply_ms: number;
16
+ timing_circuit_step_ms: number;
17
+ timing_transform_ms: number;
18
+ timing_parse_ms: number;
19
+ timing_plan_ms: number;
20
+ timing_snapshot_ms: number;
13
21
  }
14
22
 
15
23
  export interface WasmViewConfig {
@@ -52,6 +60,16 @@ export class Sp00kyProcessor {
52
60
  * Save the current circuit state as a JSON string
53
61
  */
54
62
  save_state(): string;
63
+ /**
64
+ * Seed per-table `select` permission predicates so `register_view` can
65
+ * inject them (and so non-`_00_` tables aren't default-denied).
66
+ *
67
+ * Expects a `{ [table]: whereText }` object, where `whereText` is the raw
68
+ * `WHERE` expression from the table's `PERMISSIONS FOR select` clause
69
+ * (e.g. `"true"`, or `"owner = $auth.id"`). Called once at boot after the
70
+ * schema is parsed — mirrors the native boot path that reads `INFO FOR DB`.
71
+ */
72
+ set_permissions(permissions: any): void;
55
73
  /**
56
74
  * Unregister a view by ID
57
75
  */
@@ -74,6 +92,7 @@ export interface InitOutput {
74
92
  readonly sp00kyprocessor_new: () => number;
75
93
  readonly sp00kyprocessor_register_view: (a: number, b: any) => [number, number, number];
76
94
  readonly sp00kyprocessor_save_state: (a: number) => [number, number, number, number];
95
+ readonly sp00kyprocessor_set_permissions: (a: number, b: any) => [number, number];
77
96
  readonly sp00kyprocessor_unregister_view: (a: number, b: number, c: number) => void;
78
97
  readonly __wbindgen_malloc: (a: number, b: number) => number;
79
98
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
package/pkg/ssp_wasm.js CHANGED
@@ -84,6 +84,22 @@ export class Sp00kyProcessor {
84
84
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
85
85
  }
86
86
  }
87
+ /**
88
+ * Seed per-table `select` permission predicates so `register_view` can
89
+ * inject them (and so non-`_00_` tables aren't default-denied).
90
+ *
91
+ * Expects a `{ [table]: whereText }` object, where `whereText` is the raw
92
+ * `WHERE` expression from the table's `PERMISSIONS FOR select` clause
93
+ * (e.g. `"true"`, or `"owner = $auth.id"`). Called once at boot after the
94
+ * schema is parsed — mirrors the native boot path that reads `INFO FOR DB`.
95
+ * @param {any} permissions
96
+ */
97
+ set_permissions(permissions) {
98
+ const ret = wasm.sp00kyprocessor_set_permissions(this.__wbg_ptr, permissions);
99
+ if (ret[1]) {
100
+ throw takeFromExternrefTable0(ret[0]);
101
+ }
102
+ }
87
103
  /**
88
104
  * Unregister a view by ID
89
105
  * @param {string} id
@@ -152,6 +168,10 @@ function __wbg_get_imports() {
152
168
  const ret = typeof(val) === 'object' && val !== null;
153
169
  return ret;
154
170
  },
171
+ __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
172
+ const ret = arg0 === undefined;
173
+ return ret;
174
+ },
155
175
  __wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
156
176
  const ret = arg0 === arg1;
157
177
  return ret;
@@ -262,6 +282,10 @@ function __wbg_get_imports() {
262
282
  const ret = new Uint8Array(arg0);
263
283
  return ret;
264
284
  },
285
+ __wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
286
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
287
+ return ret;
288
+ },
265
289
  __wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
266
290
  const ret = arg0.next();
267
291
  return ret;
@@ -270,6 +294,14 @@ function __wbg_get_imports() {
270
294
  const ret = arg0.next;
271
295
  return ret;
272
296
  },
297
+ __wbg_now_2c95c9de01293173: function(arg0) {
298
+ const ret = arg0.now();
299
+ return ret;
300
+ },
301
+ __wbg_performance_7a3ffd0b17f663ad: function(arg0) {
302
+ const ret = arg0.performance;
303
+ return ret;
304
+ },
273
305
  __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
274
306
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
275
307
  },
@@ -279,6 +311,22 @@ function __wbg_get_imports() {
279
311
  __wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
280
312
  arg0[arg1 >>> 0] = arg2;
281
313
  },
314
+ __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
315
+ const ret = typeof global === 'undefined' ? null : global;
316
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
317
+ },
318
+ __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
319
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
320
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
321
+ },
322
+ __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
323
+ const ret = typeof self === 'undefined' ? null : self;
324
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
325
+ },
326
+ __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
327
+ const ret = typeof window === 'undefined' ? null : window;
328
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
329
+ },
282
330
  __wbg_value_0546255b415e96c1: function(arg0) {
283
331
  const ret = arg0.value;
284
332
  return ret;
Binary file
@@ -8,6 +8,7 @@ export const sp00kyprocessor_load_state: (a: number, b: number, c: number) => [n
8
8
  export const sp00kyprocessor_new: () => number;
9
9
  export const sp00kyprocessor_register_view: (a: number, b: any) => [number, number, number];
10
10
  export const sp00kyprocessor_save_state: (a: number) => [number, number, number, number];
11
+ export const sp00kyprocessor_set_permissions: (a: number, b: any) => [number, number];
11
12
  export const sp00kyprocessor_unregister_view: (a: number, b: number, c: number) => void;
12
13
  export const __wbindgen_malloc: (a: number, b: number) => number;
13
14
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;