@syncular/typegen 0.15.8 → 0.15.9

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 CHANGED
@@ -236,12 +236,14 @@ and Rust clients create a contentful FTS table with a private stable source-ID
236
236
  column and deterministic maintenance triggers. FTS is local-only: it is not a
237
237
  wire/server table, cannot be subscribed or mutated, and maps back to its owner
238
238
  for named-query invalidation. Columns must precede options, be distinct
239
- non-encrypted strings, and number 1–32. `content` is required. Supported
240
- tokenizers are `unicode61` (default), its `remove_diacritics 0|1|2` variants,
241
- `porter unicode61`, and `trigram`. Other modules/options/tokenizers, encrypted
242
- columns, or schema-object name collisions fail generation. There is no
243
- automatic `LIKE` fallback when FTS5 is unavailable; local schema creation
244
- fails loudly.
239
+ declared strings, and number 1–32. Encrypted declared-string columns are
240
+ allowed because the projection is built only from the decrypted local mirror;
241
+ ciphertext remains the only wire and server representation. `content` is
242
+ required. Supported tokenizers are `unicode61` (default), its
243
+ `remove_diacritics 0|1|2` variants, `porter unicode61`, and `trigram`. Other
244
+ modules/options/tokenizers or schema-object name collisions fail generation.
245
+ There is no automatic `LIKE` fallback when FTS5 is unavailable; local schema
246
+ creation fails loudly.
245
247
 
246
248
  **Hard errors** (each names the construct and source file): any other
247
249
  statement (`CREATE TRIGGER/VIEW`, `DROP INDEX`, DML, `ALTER … RENAME`, …); unknown
@@ -252,7 +254,7 @@ or parameterized types (`VARCHAR(36)`); quoted identifiers
252
254
  or missing primary keys; `PRIMARY KEY` on `ADD COLUMN`; duplicate
253
255
  tables/columns; ASC/DESC, expression, or partial (`WHERE`) index columns; a
254
256
  duplicate or unknown-column index; unsupported virtual-table modules or FTS5
255
- options; an FTS projection without an owner or with invalid/encrypted columns;
257
+ options; an FTS projection without an owner or with invalid columns;
256
258
  trailing clauses (`STRICT`).
257
259
 
258
260
  **`DEFAULT` literals are accepted and ignored**: typegen extracts the
package/dist/generate.js CHANGED
@@ -50,14 +50,6 @@ function buildTable(manifestTable, parsed) {
50
50
  }
51
51
  }
52
52
  const columns = applyEncryption(parsed, scopes, manifestTable.encryptedColumns);
53
- for (const ftsIndex of parsed.ftsIndexes) {
54
- for (const columnName of ftsIndex.columns) {
55
- const column = columns.find((candidate) => candidate.name === columnName);
56
- if (column?.encrypted === true) {
57
- throw new TypegenError(MANIFEST_FILENAME, `table ${parsed.name}: FTS index ${JSON.stringify(ftsIndex.name)} cannot index encrypted column ${JSON.stringify(columnName)}`);
58
- }
59
- }
60
- }
61
53
  return {
62
54
  name: parsed.name,
63
55
  primaryKey: parsed.primaryKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/typegen",
3
- "version": "0.15.8",
3
+ "version": "0.15.9",
4
4
  "description": "Syncular schema-to-TypeScript type generator and the `syncular` CLI",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Benjamin Kniffler",
@@ -48,7 +48,7 @@
48
48
  "!dist/**/*.test.d.ts"
49
49
  ],
50
50
  "devDependencies": {
51
- "@syncular/core": "0.15.8",
52
- "@syncular/server": "0.15.8"
51
+ "@syncular/core": "0.15.9",
52
+ "@syncular/server": "0.15.9"
53
53
  }
54
54
  }
package/src/generate.ts CHANGED
@@ -113,17 +113,6 @@ function buildTable(
113
113
  scopes,
114
114
  manifestTable.encryptedColumns,
115
115
  );
116
- for (const ftsIndex of parsed.ftsIndexes) {
117
- for (const columnName of ftsIndex.columns) {
118
- const column = columns.find((candidate) => candidate.name === columnName);
119
- if (column?.encrypted === true) {
120
- throw new TypegenError(
121
- MANIFEST_FILENAME,
122
- `table ${parsed.name}: FTS index ${JSON.stringify(ftsIndex.name)} cannot index encrypted column ${JSON.stringify(columnName)}`,
123
- );
124
- }
125
- }
126
- }
127
116
  return {
128
117
  name: parsed.name,
129
118
  primaryKey: parsed.primaryKey,