latticesql 1.16.3 → 1.16.5
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/README.md +17 -5
- package/dist/cli.js +678 -553
- package/dist/index.cjs +27 -7
- package/dist/index.d.cts +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +30 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -191,6 +191,7 @@ new Lattice(config: LatticeConfigInput, options?: LatticeOptions)
|
|
|
191
191
|
interface LatticeOptions {
|
|
192
192
|
wal?: boolean; // WAL journal mode (default: true — recommended for concurrent reads)
|
|
193
193
|
busyTimeout?: number; // SQLite busy_timeout in ms (default: 5000)
|
|
194
|
+
renderSkipsEmpty?: boolean; // Skip the read + write for spec-less tables on render() (default: false)
|
|
194
195
|
security?: {
|
|
195
196
|
sanitize?: boolean; // Strip control characters from string inputs (default: true)
|
|
196
197
|
auditTables?: string[]; // Tables that emit 'audit' events on write
|
|
@@ -2095,13 +2096,24 @@ a parent link, while the reverse side (other entities that point here) plus
|
|
|
2095
2096
|
many-to-many junctions become the drill-in sub-folders. Declare `ref:` on your
|
|
2096
2097
|
foreign-key fields to get the nested file tree.
|
|
2097
2098
|
|
|
2098
|
-
The header carries the logo, undo/redo, the workspace
|
|
2099
|
-
**settings gear** (top-right). The gear opens a slide-over drawer with **
|
|
2099
|
+
The header carries the logo, undo/redo, the **workspace switcher**, and a
|
|
2100
|
+
**settings gear** (top-right). The gear opens a slide-over drawer with **Workspace**,
|
|
2100
2101
|
**Lattice**, and **User** settings plus an **Advanced mode** toggle. Turn Advanced
|
|
2101
2102
|
mode on to switch the object/row views back to the classic editable **table + row**
|
|
2102
2103
|
interface (below); turn it off for the file-system workspace. The left sidebar is
|
|
2103
2104
|
slim and collapsible. The assistant rail is unchanged in either mode.
|
|
2104
2105
|
|
|
2106
|
+
**One workspace model (v1.16.4+).** A workspace _is_ a Lattice DB. The header has a
|
|
2107
|
+
single workspace switcher listing every database — local or cloud, created or joined —
|
|
2108
|
+
and its "+ New workspace…" button opens the create/join wizard (New local / New cloud /
|
|
2109
|
+
Join existing cloud). The GUI always operates inside a `.lattice` root: opening a bare
|
|
2110
|
+
config adopts it (and its database, referenced in place — nothing is moved) as the
|
|
2111
|
+
active workspace. There is no separate "database mode". The word "database" is reserved
|
|
2112
|
+
for a specific workspace's connection details (the connection panel in Workspace
|
|
2113
|
+
Settings). This applies to the GUI/CLI app only — the `latticesql` library API and the
|
|
2114
|
+
headless `render`/`generate`/`watch` commands still run against a bare config or
|
|
2115
|
+
Postgres URL with no root.
|
|
2116
|
+
|
|
2105
2117
|
### Assistant sidebar (v2.0+)
|
|
2106
2118
|
|
|
2107
2119
|
The GUI has a fixed right sidebar with a live **activity feed** — every change
|
|
@@ -2142,9 +2154,9 @@ Chat threads, files, and secrets are all stored as native Lattice entities.
|
|
|
2142
2154
|
|
|
2143
2155
|
The convergence means you don't need to duplicate entity-context definitions in YAML for the GUI to find rendered files.
|
|
2144
2156
|
|
|
2145
|
-
**Database wizard form (v1.13.2+).** The Postgres connection form (used by Migrate to cloud +
|
|
2157
|
+
**Database wizard form (v1.13.2+).** The Postgres connection form (used by Migrate to cloud + the Join-a-team invite flow) disables browser autocapitalize, autocorrect, and spellcheck on every text input, and trims whitespace on every read. This avoids silent failure modes where macOS Safari / iOS turned a Supabase tenant user `postgres.<ref>` into `Postgres.<ref>` on submit, and where pasted credentials carrying a trailing newline produced opaque "zero-length delimiter identifier" or SCRAM-mismatch errors. `probeCloud` also folds SQLSTATE + `routine` into `result.error` so the GUI's "Unreachable: …" surface is actionable.
|
|
2146
2158
|
|
|
2147
|
-
**
|
|
2159
|
+
**Migrate vs. join (1.16.4).** The standalone "Connect to existing cloud" wizard (which switched a project's `db:` line to a raw cloud on its own) was removed — the two cloud operations are now **Migrate to cloud** (push your local workspace's data into a fresh cloud Postgres; you become the owner) and **Join a team (invite)** (redeem an invite token to join a workspace someone shared with you). The `connect-existing` endpoint still backs the invite‑redeem path for an active cloud that needs an invite.
|
|
2148
2160
|
|
|
2149
2161
|
**Cloud workspaces initialize automatically (v1.16.3+).** A cloud database _is_ a cloud workspace with members — there is no separate "upgrade to team" step. The moment a database is migrated or connected to Postgres, its member/share machinery is created automatically (the workspace name is used as the identity; an existing un-initialized cloud initializes on open, with the opener as owner). The underlying mechanism is the `registerDirectViaPostgres()` helper, which drives the identity/member INSERT sequence directly against the cloud Postgres (the older HTTP `/api/auth/register` path is still used when the cloud URL is `http(s)://`). The standalone "Upgrade to team cloud" action and its `/api/dbconfig/upgrade-to-team` route were removed in 1.16.3.
|
|
2150
2162
|
|
|
@@ -2381,7 +2393,7 @@ await client.ensureCloudWorkspaceIdentity({
|
|
|
2381
2393
|
});
|
|
2382
2394
|
```
|
|
2383
2395
|
|
|
2384
|
-
GUI consumers don't need to call these directly — the Database panel surfaces
|
|
2396
|
+
GUI consumers don't need to call these directly — the Database panel surfaces `Migrate to cloud →`, and joining a shared workspace goes through `Join a team (invite)`; workspace initialization is automatic. (The standalone "Connect to existing cloud" wizard was removed in 1.16.4.)
|
|
2385
2397
|
|
|
2386
2398
|
HTTP surface (all under `/api/dbconfig/*`, localhost-only, same auth model as the rest of `lattice gui`):
|
|
2387
2399
|
|