@spooky-sync/cli 0.0.1-canary.90 → 0.0.1-canary.91
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/AGENTS.md +4 -0
- package/package.json +6 -6
package/AGENTS.md
CHANGED
|
@@ -50,6 +50,7 @@ In your `.surql` source, comment annotations attached to `DEFINE FIELD` / `DEFIN
|
|
|
50
50
|
|
|
51
51
|
- `-- @crdt text` (above a `DEFINE FIELD`) — marks a field as a Loro CRDT text field. Consumers must use `useCrdtField` to read/write it; plain `useQuery` will see stale or unmerged content.
|
|
52
52
|
- `-- @parent` (suffix on `DEFINE FIELD ... TYPE record<...>`) — marks the column as the parent side of a relationship; written automatically from the auth context, never by client code.
|
|
53
|
+
- `-- @nosync` (above a `DEFINE TABLE`) — marks a table as server-only: it is omitted from generated types and relations (and any `record<...>` link pointing at it is dropped), no sync events are emitted for it, and the scheduler/SSP exclude it from snapshots and bootstrap. The table still lives in the main DB and is still backed up. The CLI bakes a `COMMENT 'sp00ky:nosync'` marker onto the server-side `DEFINE TABLE` so the runtime services detect it via `INFO FOR DB`. Distinct from `PERMISSIONS FOR select WHERE false`, which only locks reads — a permission-locked table is still synced.
|
|
53
54
|
|
|
54
55
|
Example:
|
|
55
56
|
```sql
|
|
@@ -59,6 +60,9 @@ DEFINE TABLE thread SCHEMAFULL ...;
|
|
|
59
60
|
DEFINE FIELD content ON TABLE thread TYPE string ASSERT $value != NONE;
|
|
60
61
|
|
|
61
62
|
DEFINE FIELD author ON TABLE thread TYPE record<user>; -- @parent
|
|
63
|
+
|
|
64
|
+
-- @nosync
|
|
65
|
+
DEFINE TABLE audit_log SCHEMALESS;
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
## Common gotchas
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spooky-sync/cli",
|
|
3
|
-
"version": "0.0.1-canary.
|
|
3
|
+
"version": "0.0.1-canary.91",
|
|
4
4
|
"description": "Generate TypeScript/Dart types from SurrealDB schema files",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/syncgen.cjs",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"vitest": "^1.0.0"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@spooky-sync/cli-darwin-arm64": "0.0.1-canary.
|
|
65
|
-
"@spooky-sync/cli-darwin-x64": "0.0.1-canary.
|
|
66
|
-
"@spooky-sync/cli-linux-arm64": "0.0.1-canary.
|
|
67
|
-
"@spooky-sync/cli-linux-x64": "0.0.1-canary.
|
|
68
|
-
"@spooky-sync/cli-win32-x64": "0.0.1-canary.
|
|
64
|
+
"@spooky-sync/cli-darwin-arm64": "0.0.1-canary.91",
|
|
65
|
+
"@spooky-sync/cli-darwin-x64": "0.0.1-canary.91",
|
|
66
|
+
"@spooky-sync/cli-linux-arm64": "0.0.1-canary.91",
|
|
67
|
+
"@spooky-sync/cli-linux-x64": "0.0.1-canary.91",
|
|
68
|
+
"@spooky-sync/cli-win32-x64": "0.0.1-canary.91"
|
|
69
69
|
}
|
|
70
70
|
}
|