{"_id":"@heojeongbo/calque-dexie","_rev":"3-feb4000a5bb9ab1f9a3c85c7d03969aa","name":"@heojeongbo/calque-dexie","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@heojeongbo/calque-dexie","version":"0.1.0","keywords":["calque","protobuf","orm","dexie","indexeddb","codegen"],"author":{"url":"https://github.com/HeoJeongBo","name":"heojeongbo","email":"heojungbo@gmail.com"},"license":"MIT","_id":"@heojeongbo/calque-dexie@0.1.0","maintainers":[{"name":"heojeongbo","email":"heojungbo@gmail.com"}],"homepage":"https://github.com/HeoJeongBo/calque#readme","bugs":{"url":"https://github.com/HeoJeongBo/calque/issues"},"dist":{"shasum":"f39397dc6a99a2dd9349c0aeb70b3b35870a4ecd","tarball":"https://registry.npmjs.org/@heojeongbo/calque-dexie/-/calque-dexie-0.1.0.tgz","fileCount":5,"integrity":"sha512-1BMIgrWl46yUUA+VZdVcSbFbG0/x+8HnAMND2Z9AwKs1LyiG/XjiEQzpndidY61O0VMqUYVmx5g3tPP8HZWIaA==","signatures":[{"sig":"MEYCIQCa8OV0bDccevI72NQgojvPJQQSKeabUt74g8XrWaWPIAIhAKo0Q3KMRSc7b/Kw7bwLnysOsKPpXVpUoGJd8LuqjUBA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19019},"main":"./dist/index.js","type":"module","_from":"file:heojeongbo-calque-dexie-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","release":"release-it","typecheck":"tsc --noEmit","test:watch":"vitest","release:dry":"release-it --dry-run","release:major":"release-it major","release:minor":"release-it minor","release:patch":"release-it patch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"heojeongbo","email":"heojungbo@gmail.com"},"_resolved":"/private/var/folders/bk/pnm1xqz17gz0dfh_gp638hh80000gn/T/466a0e6ad04245d6f3f7b39c3f9574dc/heojeongbo-calque-dexie-0.1.0.tgz","_integrity":"sha512-1BMIgrWl46yUUA+VZdVcSbFbG0/x+8HnAMND2Z9AwKs1LyiG/XjiEQzpndidY61O0VMqUYVmx5g3tPP8HZWIaA==","repository":{"url":"git+https://github.com/HeoJeongBo/calque.git","type":"git","directory":"ts/packages/dexie"},"_npmVersion":"11.6.2","description":"Dexie/IndexedDB backend runtime for calque-generated ORM code.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","dependencies":{"@heojeongbo/calque-runtime":"0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","dexie":"^4.4.3","vitest":"^4.1.4","typescript":"^5.5.4","fake-indexeddb":"^6.2.4","@bufbuild/protobuf":"^2.12.0","@connectrpc/connect":"^2.1.1","@vitest/coverage-v8":"^4.1.4"},"peerDependencies":{"dexie":"^4.0.0","@bufbuild/protobuf":"^2.10.0","@connectrpc/connect":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/calque-dexie_0.1.0_1786947413033_0.506023965119174","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@heojeongbo/calque-dexie","version":"0.2.0","keywords":["calque","protobuf","orm","dexie","indexeddb","codegen"],"author":{"url":"https://github.com/heojeongbo","name":"heojeongbo","email":"heojungbo@gmail.com"},"license":"MIT","_id":"@heojeongbo/calque-dexie@0.2.0","maintainers":[{"name":"heojeongbo","email":"heojungbo@gmail.com"}],"homepage":"https://github.com/heojeongbo/calque#readme","bugs":{"url":"https://github.com/heojeongbo/calque/issues"},"dist":{"shasum":"fb82b6709f3e0e5a5d2f7e922d319bbee2dd6f8d","tarball":"https://registry.npmjs.org/@heojeongbo/calque-dexie/-/calque-dexie-0.2.0.tgz","fileCount":5,"integrity":"sha512-TworZHdXAi9yx07pCiGvss51yDyWzgz/lqpfndxZUij9O5qSFVwFJ+F62qLWbNZjCffaXcs8e0zGcGAQZTsibw==","signatures":[{"sig":"MEQCIBRpbs2wE12Dfn6ixb9g6uAQvbktBNxD1OmB9fM2MyLeAiACGbxLfSidMrNMWDqJoxM3Sob6WmGJ4tlfV0SCoBq/4A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19896},"main":"./dist/index.js","type":"module","_from":"file:heojeongbo-calque-dexie-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","release":"pnpm publish --access public","typecheck":"tsc --noEmit","test:watch":"vitest","release:dry":"pnpm publish --access public --dry-run","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"heojeongbo","email":"heojungbo@gmail.com"},"_resolved":"/private/var/folders/bk/pnm1xqz17gz0dfh_gp638hh80000gn/T/496bc84523f72d40f5500c42069e23a4/heojeongbo-calque-dexie-0.2.0.tgz","_integrity":"sha512-TworZHdXAi9yx07pCiGvss51yDyWzgz/lqpfndxZUij9O5qSFVwFJ+F62qLWbNZjCffaXcs8e0zGcGAQZTsibw==","repository":{"url":"git+https://github.com/heojeongbo/calque.git","type":"git","directory":"ts/packages/dexie"},"_npmVersion":"11.6.2","description":"Dexie/IndexedDB backend runtime for calque-generated ORM code.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","dependencies":{"@heojeongbo/calque-runtime":"0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","dexie":"^4.4.3","vitest":"^4.1.4","typescript":"^5.5.4","fake-indexeddb":"^6.2.4","@bufbuild/protobuf":"^2.12.0","@connectrpc/connect":"^2.1.1","@vitest/coverage-v8":"^4.1.4"},"peerDependencies":{"dexie":"^4.0.0","@bufbuild/protobuf":"^2.10.0","@connectrpc/connect":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/calque-dexie_0.2.0_1787033699841_0.9674674653268307","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@heojeongbo/calque-dexie","version":"0.3.0","description":"Dexie/IndexedDB backend runtime for calque-generated ORM code.","type":"module","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"keywords":["calque","protobuf","orm","dexie","indexeddb","codegen"],"author":{"name":"heojeongbo","email":"heojungbo@gmail.com","url":"https://github.com/heojeongbo"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/heojeongbo/calque.git","directory":"ts/packages/dexie"},"homepage":"https://github.com/heojeongbo/calque#readme","bugs":{"url":"https://github.com/heojeongbo/calque/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"engines":{"node":">=20"},"dependencies":{"@heojeongbo/calque-runtime":"0.1.0"},"peerDependencies":{"@bufbuild/protobuf":"^2.10.0","@connectrpc/connect":"^2.1.0","dexie":"^4.0.0"},"devDependencies":{"@bufbuild/protobuf":"^2.12.0","@connectrpc/connect":"^2.1.1","@vitest/coverage-v8":"^4.1.4","dexie":"^4.4.3","fake-indexeddb":"^6.2.4","tsup":"^8.2.4","typescript":"^5.5.4","vitest":"^4.1.4"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","release":"pnpm publish --access public","release:dry":"pnpm publish --access public --dry-run"},"_id":"@heojeongbo/calque-dexie@0.3.0","_integrity":"sha512-UXF6eeUkzvoeh8W2FsqOIwG8M9znDxzG7jtS6ak8wC+C1loLRHvV76B+Nc/ceMyzuUst1a9aKqbeUhGx06b7qA==","_resolved":"/private/var/folders/bk/pnm1xqz17gz0dfh_gp638hh80000gn/T/f92b151e38d33f1f1f609114db94fc26/heojeongbo-calque-dexie-0.3.0.tgz","_from":"file:heojeongbo-calque-dexie-0.3.0.tgz","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-UXF6eeUkzvoeh8W2FsqOIwG8M9znDxzG7jtS6ak8wC+C1loLRHvV76B+Nc/ceMyzuUst1a9aKqbeUhGx06b7qA==","shasum":"c54984b78058d2823c0416aa579aa1f851ed4aa4","tarball":"https://registry.npmjs.org/@heojeongbo/calque-dexie/-/calque-dexie-0.3.0.tgz","fileCount":5,"unpackedSize":27202,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCX4o1blKDkeGC99zYjCkFjgw7SSzTr7LK/tg+GGBY4VQIgOwtZPuNCVXoBgf4XqeNfeq4mN1QU/e9ZT18qvTTnqa8="}]},"_npmUser":{"name":"heojeongbo","email":"heojungbo@gmail.com"},"directories":{},"maintainers":[{"name":"heojeongbo","email":"heojungbo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/calque-dexie_0.3.0_1788246319253_0.5532849117399101"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T06:16:52.791Z","modified":"2026-09-01T07:05:19.577Z","0.1.0":"2026-08-17T06:16:53.160Z","0.2.0":"2026-08-18T06:15:00.013Z","0.3.0":"2026-09-01T07:05:19.397Z"},"bugs":{"url":"https://github.com/heojeongbo/calque/issues"},"author":{"name":"heojeongbo","email":"heojungbo@gmail.com","url":"https://github.com/heojeongbo"},"license":"MIT","homepage":"https://github.com/heojeongbo/calque#readme","keywords":["calque","protobuf","orm","dexie","indexeddb","codegen"],"repository":{"type":"git","url":"git+https://github.com/heojeongbo/calque.git","directory":"ts/packages/dexie"},"description":"Dexie/IndexedDB backend runtime for calque-generated ORM code.","maintainers":[{"name":"heojeongbo","email":"heojungbo@gmail.com"}],"readme":"# @heojeongbo/calque-dexie\n\nThe [Dexie](https://dexie.org) adapter for code generated by\n[calque](https://github.com/heojeongbo/calque).\n\n```sh\nnpm install @heojeongbo/calque-dexie dexie @bufbuild/protobuf @connectrpc/connect\n```\n\nThis is the specifier generated code imports. It re-exports\n[`@heojeongbo/calque-runtime`](https://www.npmjs.com/package/@heojeongbo/calque-runtime)\nin full, so a generated file needs one import line rather than two.\n\n## Using it\n\ncalque emits a `schemas()` per proto package. Hand it to Dexie:\n\n```ts\nimport Dexie from \"dexie\"\nimport { schemas, DbService, type Db } from \"./gen/apptest/db.g\"\n\nconst db = new Dexie(\"app\") as Db\ndb.version(1).stores(schemas())\n```\n\nand construct the tables:\n\n```ts\nconst user = new DbService[\"apptest.User\"](db)\nconst u = await user.get({ ref: { key: { case: \"id\", value: id } } })\n```\n\n## API\n\n### `TableBase<Desc>`\n\nThe base class every generated `TableService` extends. It holds the Dexie\nhandle and the message descriptor, and provides:\n\n| | |\n|---|---|\n| `_query(fn)` | run a Dexie query and throw `NotFound` if it returns nothing |\n| `_insert(v)` | dehydrate and `add` |\n| `_reconcile(v)` | compare against what is stored and keep the newer |\n| `_compare(a, b)` | version comparison; the generated subclass overrides it when the entity has a version field |\n| `_clone(v)`, `_err(msg, code)` | |\n\n`_dehydrate` and `_hydrate` are abstract in effect — the base throws, and the\ngenerated subclass overrides both.\n\n> **`_reconcile` changed in v0.2.0.** It now returns whether it actually wrote:\n> `false` means the stored value was newer or the same and nothing happened.\n> Until v0.2.0 it resolved `true` whatever the comparison decided, so a caller\n> writing `if (!ok) continue` had a branch that never ran — and now does. That\n> is why this is a minor bump and not a patch. It was\n> [conformance item 5](https://github.com/heojeongbo/calque/blob/main/docs/conformance.md).\n\n### Types\n\n```ts\ntype ValueOf<Desc>    // the decoded message\ntype EntityOf<Desc>   // what is actually stored — the message minus $typeName and $unknown\ntype DbOf<Desc>       // Dexie, plus this entity's table under its full proto name\n```\n\nPlus everything from the runtime package: `Key`, `uuid`, `unsafe`,\n`QueryDescOf`, `QueryDesc`, `InputOf`, `OutputOf`, `RefOf`.\n\n## Peer dependencies\n\n`dexie` `^4.0.0`, `@bufbuild/protobuf` `^2.10.0`, `@connectrpc/connect`\n`^2.1.0`. Node 20 or later.\n\nThey are peers rather than dependencies because your application already has\nthem, and the generated code has to agree with the copy it has.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}