diff --git a/apps/reference/deno.lock b/apps/reference/deno.lock index a1d4425..3027c56 100644 --- a/apps/reference/deno.lock +++ b/apps/reference/deno.lock @@ -3028,7 +3028,7 @@ "npm:vite@8.1.4" ], "links": { - "jsr:@nzip/lofi@0.8.1": { + "jsr:@nzip/lofi@0.9.0": { "dependencies": [ "npm:@astrojs/check@0.9.9", "npm:@astrojs/preact@6.0.1", diff --git a/deno.json b/deno.json index 845f9e1..9c085b0 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@nzip/lofi", - "version": "0.8.1", + "version": "0.9.0", "license": "MIT", "description": "A local-first Deno PWA framework with durable local data, recoverable accounts, optional Jazz sync, mutations with sync-boundary effects, and private, direct-share, or group access templates.", "exports": { diff --git a/package/create_core_test.ts b/package/create_core_test.ts index 9320f81..6930fe1 100644 --- a/package/create_core_test.ts +++ b/package/create_core_test.ts @@ -147,9 +147,9 @@ Deno.test("createProject materializes the complete starter snapshot", async () = ); } const config = JSON.parse(await Deno.readTextFile(join(result.destination, "deno.json"))); - assertEquals(config.imports["@nzip/lofi"], "jsr:@nzip/lofi@0.8.1"); - assertEquals(config.imports["@nzip/lofi/"], "jsr:@nzip/lofi@0.8.1/"); - assertEquals(config.imports["@nzip/lofi/testing"], "jsr:@nzip/lofi@0.8.1/testing"); + assertEquals(config.imports["@nzip/lofi"], "jsr:@nzip/lofi@0.9.0"); + assertEquals(config.imports["@nzip/lofi/"], "jsr:@nzip/lofi@0.9.0/"); + assertEquals(config.imports["@nzip/lofi/testing"], "jsr:@nzip/lofi@0.9.0/testing"); const lofiSpecifiers = Object.entries(config.imports) .filter(([name]) => name.startsWith("@nzip/lofi/")) .map(([, specifier]) => String(specifier)); @@ -158,7 +158,7 @@ Deno.test("createProject materializes the complete starter snapshot", async () = `expected one package prefix, access, schema, two integrations, six commands, seven recipes, and testing, received ${lofiSpecifiers.length}`, ); assert( - lofiSpecifiers.every((specifier) => specifier.startsWith("jsr:@nzip/lofi@0.8.1/")), + lofiSpecifiers.every((specifier) => specifier.startsWith("jsr:@nzip/lofi@0.9.0/")), "generated lofi commands do not resolve through one exact package version", ); const appSource = await Deno.readTextFile(join(result.destination, "src", "app.ts")); diff --git a/package/schema/encrypted.ts b/package/schema/encrypted.ts index 6e79780..bc51631 100644 --- a/package/schema/encrypted.ts +++ b/package/schema/encrypted.ts @@ -68,12 +68,20 @@ export interface EncryptedColumn extends TypedColumnBuilder, "default" | "merge" | "transform" | "optional" > { + /** Carries the decrypted view type without affecting the runtime shape. */ readonly [encryptedColumnBrand]?: TView; + /** Encrypted columns cannot define plaintext defaults. */ default(value: never): never; + /** Encrypted columns cannot merge ciphertext values. */ merge(strategy: never): never; + /** Encrypted columns cannot replace their sealing transform. */ transform(transform: never): never; - // The `this: never` parameter keeps the method arity-compatible with the - // base builder while making every call site a compile error. + /** + * Encrypted columns cannot be optional. + * + * The `this: never` parameter keeps the method arity-compatible with the + * base builder while making every call site a compile error. + */ optional(this: never): never; } diff --git a/package/testdata/starter.snapshot.json b/package/testdata/starter.snapshot.json index 2c988e6..8071e02 100644 --- a/package/testdata/starter.snapshot.json +++ b/package/testdata/starter.snapshot.json @@ -1,7 +1,7 @@ { ".env.example": "0cfad81a3ba6442ac15d7cbe44a00374bf4dbf8af68ca412e54fb100241ddeab", ".gitignore": "9b9fa4b95f8f728ce80e93fc224d430328786b620096b80f067a3190c410a00e", - "deno.json": "139c9de9f3feec87bdb5c646ad579e6c5b5278a2360ab897468df41c9c851448", + "deno.json": "e09ff61fcc156190a8d20f0a78a7cf2be74079f75bb08a3bef1867ca74e19e1c", "public/apple-touch-icon.png": "be2b77066d9681709210388413ddcd94318906799ddd6645934b789a04bd4a61", "public/favicon.svg": "35b92ad48231c470b348eaebe6d6fe14acf2ec4a86e6726a03ccb130328a0d85", "public/icon-192.png": "6ee711f9ec990ec55f789d7943813c5193973bf2ca9199078ee85d285317e07c", diff --git a/package/version.ts b/package/version.ts index 8820f1c..6b1cfbb 100644 --- a/package/version.ts +++ b/package/version.ts @@ -1,5 +1,5 @@ /** The single source version for generated @nzip/lofi references. */ -export const LOFI_VERSION = "0.8.1"; +export const LOFI_VERSION = "0.9.0"; /** The exact JSR package prefix emitted into generated projects. */ export const LOFI_PACKAGE_PREFIX = `jsr:@nzip/lofi@${LOFI_VERSION}/`;