{"_id":"@cadriciel/module-db","_rev":"5-3e1bcace0bc396a34be8ad21aab2bfb2","name":"@cadriciel/module-db","dist-tags":{"latest":"0.3.2"},"versions":{"0.1.2":{"name":"@cadriciel/module-db","version":"0.1.2","_id":"@cadriciel/module-db@0.1.2","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"dist":{"shasum":"9dadb685478f4fa157ddb33540e8cf13e525c95d","tarball":"https://registry.npmjs.org/@cadriciel/module-db/-/module-db-0.1.2.tgz","fileCount":29,"integrity":"sha512-BmIpPVgefSewsqkHsvm0iAIpO9I9UBRZ3I3j8bMQyiiQL4fPdBpls5aIUmO6vSeWb7tU3UdVqI0nzvkofO4K+w==","signatures":[{"sig":"MEQCIDzpvVp7yx40n+m159S07z4GouAnhbnAJV/jwH/kQe8dAiB1yoPQBEkEFpIC1UUbFwWztCTQjVBDNqGFmMg+QHHmPg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30714},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"f74e84fa30d74a84360e54c1ca70f1a9d1c6ce21","scripts":{"dev":"tsc --watch","test":"bun test","build":"tsc"},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.20.0","dependencies":{"pg":"^8.11.3","pg-hstore":"^2.3.4","sequelize":"^6.37.1","@cadriciel/kernel":"^0.1.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.16"},"_npmOperationalInternal":{"tmp":"tmp/module-db_0.1.2_1769125477671_0.18981937827083417","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@cadriciel/module-db","version":"0.1.4","_id":"@cadriciel/module-db@0.1.4","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"dist":{"shasum":"fb4fe81b3858a0e818384f60715aed2051ec3791","tarball":"https://registry.npmjs.org/@cadriciel/module-db/-/module-db-0.1.4.tgz","fileCount":30,"integrity":"sha512-ow9wFtH5Awswzkz+s2sR5gWXs49huT29VsO0qXMKF+n9710RltS7szf7wjA4VqcXeC2T90T+gHj25eh9MsDSAg==","signatures":[{"sig":"MEYCIQD5DFyaF5YjGvH8IJUqEeIz3hbAE3gObSki3OzDguZCtgIhAJlZgzLwI7YvCa2/XceDABBZnP86rgNfTuIEXh7Unz7q","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39246},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"ee460fe33f2016308e40b69efe326982cee17e52","scripts":{"dev":"tsc --watch","test":"bun test","build":"tsc"},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"_npmVersion":"10.8.2","description":"The persistence layer for the Cadriciel framework. It abstracts **Sequelize** and provides a centralized model registry and connection pooling.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"pg":"^8.11.3","pg-hstore":"^2.3.4","sequelize":"^6.37.1","@cadriciel/kernel":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.16"},"_npmOperationalInternal":{"tmp":"tmp/module-db_0.1.4_1769288269200_0.6781533527328938","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@cadriciel/module-db","version":"0.2.1","_id":"@cadriciel/module-db@0.2.1","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"dist":{"shasum":"8ebd2249432ffce15b6732d205feec98f4d84636","tarball":"https://registry.npmjs.org/@cadriciel/module-db/-/module-db-0.2.1.tgz","fileCount":17,"integrity":"sha512-CV/rjpscPuVlOXTuxHsBVtoy/1vAs/t2DlgB3q2I4oIKC2JWsxpHdK7NI4gfKq4fmzyhVuiOI7oyUkyhZyq2YQ==","signatures":[{"sig":"MEQCICvWGum0aNltB+5Ya6bQtRJnbMHKlWhfZZyunQnloDYfAiBmeIuxLwrGAfjseWi3Mq+dIBCVbxo7N4H2/L52Kku1hA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35110},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"bc18f7cc510f309ee7547671ab2b526aba7b2ab5","scripts":{"dev":"tsc --watch","test":"bun test","build":"tsc"},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"_npmVersion":"10.8.2","description":"The persistence layer for the Cadriciel framework. It abstracts **Sequelize** and provides a centralized model registry and connection pooling.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"pg":"^8.11.3","pg-hstore":"^2.3.4","sequelize":"^6.37.1","@cadriciel/kernel":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"hono":"^4.0.0","typescript":"^5.3.3","@types/node":"^20.11.16"},"peerDependencies":{"hono":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/module-db_0.2.1_1769596736993_0.7631547219799735","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@cadriciel/module-db","version":"0.3.1","_id":"@cadriciel/module-db@0.3.1","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"dist":{"shasum":"29af835150548fc2c40256598355c761a4668ed5","tarball":"https://registry.npmjs.org/@cadriciel/module-db/-/module-db-0.3.1.tgz","fileCount":10,"integrity":"sha512-0dK53DCjQwnWGo++oTkM1N6pEC0R/2h9ZKYPuNVEI3CLhYRqgXlurxyJPJ//+AIvmaqPung58A+KibR9s46GKg==","signatures":[{"sig":"MEYCIQDH9vffAyiRnOCjoStNKyy/ejOuPD1yV3MxvhKJtnsfZgIhAPqSwEWPs30OidldIFKMtjTdYeOuUrA/CrdNC3ZzNXBE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14646},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"9cab0b2e4d869b3ce19160f938ee7985000582a4","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"_npmVersion":"10.8.2","description":"Database module for Cadriciel","directories":{},"_nodeVersion":"20.20.0","dependencies":{"pg":"^8.11.3","pg-hstore":"^2.3.4","sequelize":"^6.37.1","@cadriciel/kernel":"^0.3.1"},"_hasShrinkwrap":false,"devDependencies":{"hono":"^4.0.0","typescript":"^5.3.3","@types/node":"^20.11.16"},"peerDependencies":{"hono":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/module-db_0.3.1_1769599746676_0.7986882652646419","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@cadriciel/module-db","version":"0.3.2","description":"Database module for Cadriciel","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"dependencies":{"@cadriciel/kernel":"^0.3.2","sequelize":"^6.37.1","pg":"^8.11.3","pg-hstore":"^2.3.4"},"peerDependencies":{"hono":"^4.0.0"},"devDependencies":{"@types/node":"^20.11.16","typescript":"^5.3.3","hono":"^4.0.0"},"_id":"@cadriciel/module-db@0.3.2","gitHead":"53da9048cd30a615fc609814ac919518df3d14c3","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-vbbwxolwH3t5Iga/RtQeEjkCD2XCpihz7KW8aW+1bAHgb2YrHeRg+csRrGxitR/A/Tt2lUjCGkKB2evRAvfBwA==","shasum":"ebcb6a300cc00fd4ba2c4d29403bb1bbe86828a3","tarball":"https://registry.npmjs.org/@cadriciel/module-db/-/module-db-0.3.2.tgz","fileCount":10,"unpackedSize":14646,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBn+OkG3S3JkxWoLeqy0mefJGho73c9/AutkxKgFe1leAiEAhXj+9t8af8jd6bKg1QmC5DCp0Vy5xRmL52mcrRyle0Q="}]},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"directories":{},"maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/module-db_0.3.2_1769607881703_0.4537924518803398"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-22T23:44:37.552Z","modified":"2026-01-28T13:44:41.995Z","0.1.2":"2026-01-22T23:44:37.817Z","0.1.4":"2026-01-24T20:57:49.330Z","0.2.1":"2026-01-28T10:38:57.147Z","0.3.1":"2026-01-28T11:29:06.850Z","0.3.2":"2026-01-28T13:44:41.873Z"},"description":"Database module for Cadriciel","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"readme":"# 🗄️ @cadriciel/module-db\n\nThe persistence layer for the Cadriciel framework. It abstracts **Sequelize** and provides a centralized model registry and connection pooling.\n\n## Features\n\n- **Multi-tenant Ready**: Supports multiple database connections (e.g., `sysadyp`, `auth`).\n- **Unified Registry**: Centralizes all Sequelize models from different modules.\n- **Auto-Injection**: Injects database models into the Hono context (`c.get('db:models')`).\n- **Re-exports**: Provides access to `Sequelize`, `Model`, `DataTypes`, and `Op` to keep dependencies clean.\n\n## Usage\n\n```typescript\nimport DbModule from \"@cadriciel/module-db\";\n\nkernel.load(DbModule);\n```\n\n### Accessing Models in a Route\n\n```typescript\nexport const GET = async (c: Context) => {\n  const models = c.get(\"db:models\");\n  const users = await models.sysadyp.Utilisateur.findAll();\n  return c.json(users);\n};\n```\n","readmeFilename":"readme.md"}