@spooky-sync/cli 0.0.1-canary.246 → 0.0.1-canary.248
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 +17 -0
- package/package.json +6 -6
package/AGENTS.md
CHANGED
|
@@ -140,6 +140,23 @@ apps:
|
|
|
140
140
|
- "gomod:/go"
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
## Sync transport (`sync.transport`)
|
|
144
|
+
|
|
145
|
+
`sync.transport: changefeed` changes what the schema pipeline emits, in three
|
|
146
|
+
places that must agree: `sp00ky::generate_sp00ky_events` keeps the
|
|
147
|
+
`_00_version` bookkeeping but drops the `http::post` (`post_ingest`),
|
|
148
|
+
`schema_builder::add_changefeed_clauses` puts `CHANGEFEED <retention> INCLUDE
|
|
149
|
+
ORIGINAL` on every synced `DEFINE TABLE` in the desired schema (after
|
|
150
|
+
`COMMENT`, before `PERMISSIONS`, the order SurrealDB renders, or `schema
|
|
151
|
+
diff` sees a phantom change forever), and `migrate::apply_internal_schema`
|
|
152
|
+
emits `ALTER TABLE IF EXISTS ... CHANGEFEED` for every synced user table after
|
|
153
|
+
the events (a user migration's `DEFINE TABLE OVERWRITE` without the clause
|
|
154
|
+
drops the feed; the ALTER puts it back on every deploy) plus `REMOVE EVENT
|
|
155
|
+
_00_dbsp_cleanup`. `backend::sync_settings_for(config_path)` is the single
|
|
156
|
+
reader of the setting. The scheduler/SSP get `SPKY_INGEST_TRANSPORT` through
|
|
157
|
+
`deployment.env` (cloud) or the dev launch specs. Retention must be in
|
|
158
|
+
SurrealDB's rendered form (`1d`, not `24h`): `valid_changefeed_retention`.
|
|
159
|
+
|
|
143
160
|
## Common gotchas
|
|
144
161
|
|
|
145
162
|
- **`schema.gen.ts` must be regenerated after every `.surql` change.** `spky generate`. CI typically asserts no drift.
|
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.248",
|
|
4
4
|
"description": "Generate TypeScript/Dart types from SurrealDB schema files",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/syncgen.cjs",
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
"vitest": "^1.0.0"
|
|
63
63
|
},
|
|
64
64
|
"optionalDependencies": {
|
|
65
|
-
"@spooky-sync/cli-darwin-arm64": "0.0.1-canary.
|
|
66
|
-
"@spooky-sync/cli-darwin-x64": "0.0.1-canary.
|
|
67
|
-
"@spooky-sync/cli-linux-arm64": "0.0.1-canary.
|
|
68
|
-
"@spooky-sync/cli-linux-x64": "0.0.1-canary.
|
|
69
|
-
"@spooky-sync/cli-win32-x64": "0.0.1-canary.
|
|
65
|
+
"@spooky-sync/cli-darwin-arm64": "0.0.1-canary.248",
|
|
66
|
+
"@spooky-sync/cli-darwin-x64": "0.0.1-canary.248",
|
|
67
|
+
"@spooky-sync/cli-linux-arm64": "0.0.1-canary.248",
|
|
68
|
+
"@spooky-sync/cli-linux-x64": "0.0.1-canary.248",
|
|
69
|
+
"@spooky-sync/cli-win32-x64": "0.0.1-canary.248"
|
|
70
70
|
}
|
|
71
71
|
}
|