@spooky-sync/core 0.0.1-canary.141 → 0.0.1-canary.142
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/dist/index.js
CHANGED
|
@@ -1469,7 +1469,9 @@ const SYSTEM_TABLES = [
|
|
|
1469
1469
|
"_00_query",
|
|
1470
1470
|
"_00_preload",
|
|
1471
1471
|
"_00_schema",
|
|
1472
|
-
"_00_pending_mutations"
|
|
1472
|
+
"_00_pending_mutations",
|
|
1473
|
+
"_00_user_feature",
|
|
1474
|
+
"_00_app_release"
|
|
1473
1475
|
];
|
|
1474
1476
|
function pureWriteOpResult(op) {
|
|
1475
1477
|
switch (op.kind) {
|
|
@@ -3361,7 +3363,10 @@ var DataModule = class {
|
|
|
3361
3363
|
return hash;
|
|
3362
3364
|
}
|
|
3363
3365
|
async createNewQuery({ recordId, surql: surqlString, params, ttl, tableName, plan }) {
|
|
3364
|
-
const tableSchema = this.schema.tables.find((t) => t.name === tableName)
|
|
3366
|
+
const tableSchema = this.schema.tables.find((t) => t.name === tableName) ?? (String(tableName).startsWith("_00_") ? {
|
|
3367
|
+
name: tableName,
|
|
3368
|
+
columns: {}
|
|
3369
|
+
} : void 0);
|
|
3365
3370
|
if (!tableSchema) throw new Error(`Table ${tableName} not found`);
|
|
3366
3371
|
let [configRecord] = await withRetry(this.logger, () => this.local.query("SELECT * FROM ONLY $id", { id: recordId }));
|
|
3367
3372
|
if (!configRecord) {
|
|
@@ -5107,8 +5112,8 @@ function parseBackendInfo(raw) {
|
|
|
5107
5112
|
|
|
5108
5113
|
//#endregion
|
|
5109
5114
|
//#region src/modules/devtools/index.ts
|
|
5110
|
-
const CORE_VERSION = "0.0.1-canary.
|
|
5111
|
-
const WASM_VERSION = "0.0.1-canary.
|
|
5115
|
+
const CORE_VERSION = "0.0.1-canary.142";
|
|
5116
|
+
const WASM_VERSION = "0.0.1-canary.142";
|
|
5112
5117
|
const SURREAL_VERSION = "3.0.3";
|
|
5113
5118
|
var DevToolsService = class {
|
|
5114
5119
|
eventsHistory = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spooky-sync/core",
|
|
3
|
-
"version": "0.0.1-canary.
|
|
3
|
+
"version": "0.0.1-canary.142",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@spooky-sync/query-builder": "0.0.1-canary.
|
|
64
|
-
"@spooky-sync/ssp-wasm": "0.0.1-canary.
|
|
63
|
+
"@spooky-sync/query-builder": "0.0.1-canary.142",
|
|
64
|
+
"@spooky-sync/ssp-wasm": "0.0.1-canary.142",
|
|
65
65
|
"@sqlite.org/sqlite-wasm": "3.53.0-build1",
|
|
66
66
|
"@surrealdb/wasm": "^3.0.3",
|
|
67
67
|
"fast-json-patch": "^3.1.1",
|
|
@@ -1779,7 +1779,16 @@ export class DataModule<S extends SchemaStructure> {
|
|
|
1779
1779
|
tableName: T;
|
|
1780
1780
|
plan?: QueryPlan;
|
|
1781
1781
|
}): Promise<QueryState> {
|
|
1782
|
-
|
|
1782
|
+
// `_00_*` meta tables (feature flags, app releases) are framework-owned:
|
|
1783
|
+
// they exist in the client db schema by construction but are never part of
|
|
1784
|
+
// the app's generated `schema.tables`, so give them an empty column map
|
|
1785
|
+
// instead of the not-found error (which silently broke every meta-table
|
|
1786
|
+
// live query, e.g. feature flags never updating on this path).
|
|
1787
|
+
const tableSchema =
|
|
1788
|
+
this.schema.tables.find((t) => t.name === tableName) ??
|
|
1789
|
+
(String(tableName).startsWith('_00_')
|
|
1790
|
+
? ({ name: tableName, columns: {} } as any)
|
|
1791
|
+
: undefined);
|
|
1783
1792
|
if (!tableSchema) {
|
|
1784
1793
|
throw new Error(`Table ${tableName} not found`);
|
|
1785
1794
|
}
|
|
@@ -47,6 +47,12 @@ const SYSTEM_TABLES = [
|
|
|
47
47
|
'_00_preload',
|
|
48
48
|
'_00_schema',
|
|
49
49
|
'_00_pending_mutations',
|
|
50
|
+
// Server-written, synced-down meta tables (see meta_tables_client.surql).
|
|
51
|
+
// DEFINE is a noop on this engine, so without seeding them here their synced
|
|
52
|
+
// rows have no local table to land in: feature flags silently fall back to
|
|
53
|
+
// defaults and app-release update notifications never show.
|
|
54
|
+
'_00_user_feature',
|
|
55
|
+
'_00_app_release',
|
|
50
56
|
] as const;
|
|
51
57
|
|
|
52
58
|
export function pureWriteOpResult(op: SqlOp): unknown {
|