{"_id":"@djs-commands/adapter-mongoose","_rev":"4-5cf2690978fb4670f92ea9df6481b2d5","name":"@djs-commands/adapter-mongoose","dist-tags":{"latest":"3.1.0"},"versions":{"2.0.0":{"name":"@djs-commands/adapter-mongoose","version":"2.0.0","keywords":["discord.js","discord","mongoose","mongodb","storage-adapter"],"author":{"name":"D3OXY","email":"hello@deoxy.dev"},"license":"MIT","_id":"@djs-commands/adapter-mongoose@2.0.0","maintainers":[{"name":"d3oxy","email":"ishansachu1@gmail.com"}],"homepage":"https://github.com/D3OXY/djs-commands#readme","bugs":{"url":"https://github.com/D3OXY/djs-commands/issues"},"dist":{"shasum":"eeb4ef4cb1ac3cac60fd31708044cc1df8ab529e","tarball":"https://registry.npmjs.org/@djs-commands/adapter-mongoose/-/adapter-mongoose-2.0.0.tgz","fileCount":8,"integrity":"sha512-7Ld3dlyrioGknGd2zGyG/ukiVZSxP1Qj+txC2H6ODBbxu2+jw2C8y7YpFKTGooy8/n0fNqTE707rfqV7/il7lg==","signatures":[{"sig":"MEUCIQD5hxB08jM/J820ZdnhTvzAedcNTj13CuQxXEf9b9a80AIgA7CLWy2LvpL00arTg4ef5hjKL1BKmaUXowQykxsPQ2Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12423},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./models":{"types":"./dist/models.d.ts","import":"./dist/models.js"}},"gitHead":"e4414d61c537df09b91e66677d3919b4258f65a5","scripts":{"dev":"tsc -p tsconfig.build.json --watch","test":"bun test","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"d3oxy","email":"ishansachu1@gmail.com"},"repository":{"url":"git+https://github.com/D3OXY/djs-commands.git","type":"git","directory":"packages/adapter-mongoose"},"_npmVersion":"11.8.0","description":"Mongoose Storage adapter for djs-commands — MongoDB-backed persistent state","directories":{},"_nodeVersion":"24.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mongoose":"^8.8.3","@types/bun":"catalog:","typescript":"catalog:","@types/node":"catalog:","@djs-commands/core":"workspace:*","@djs-commands/tsconfig":"workspace:*"},"peerDependencies":{"mongoose":"^8.0.0","@djs-commands/core":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/adapter-mongoose_2.0.0_1777967340280_0.09108767835719678","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@djs-commands/adapter-mongoose","version":"2.0.1","keywords":["discord.js","discord","mongoose","mongodb","storage-adapter"],"author":{"name":"D3OXY","email":"hello@deoxy.dev"},"license":"MIT","_id":"@djs-commands/adapter-mongoose@2.0.1","maintainers":[{"name":"d3oxy","email":"ishansachu1@gmail.com"}],"homepage":"https://github.com/D3OXY/djs-commands#readme","bugs":{"url":"https://github.com/D3OXY/djs-commands/issues"},"dist":{"shasum":"e4603011252a17de043cf77567647be1ca75186a","tarball":"https://registry.npmjs.org/@djs-commands/adapter-mongoose/-/adapter-mongoose-2.0.1.tgz","fileCount":8,"integrity":"sha512-de2BpHJd7Ns2QUB/WnyJTsBYvRyLBzuBiwm5RpcShF+0oGRpyaeXhApMhgIGHORwATaLvn+CtMuPSDOlCCb5tw==","signatures":[{"sig":"MEUCIQCfNX/3s6Pzl4NFZ3QgpqCkCBjdcHC/L9zljfVUKpBYkgIgGIEIwJzU+qYKm4Etj0L3lo2L/haMFYFBb3R4cuJ//G8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djs-commands%2fadapter-mongoose@2.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13028},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./models":{"types":"./dist/models.d.ts","import":"./dist/models.js"}},"gitHead":"385b2b519e75a8352e65297aa53c0cf51105ac99","scripts":{"dev":"tsc -p tsconfig.build.json --watch","test":"bun test","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:938be1be-58c7-495a-a916-2be22e22cb53"}},"repository":{"url":"git+https://github.com/D3OXY/djs-commands.git","type":"git","directory":"packages/adapter-mongoose"},"_npmVersion":"11.11.0","description":"Mongoose Storage adapter for djs-commands — MongoDB-backed persistent state","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mongoose":"^8.8.3","@types/bun":"catalog:","typescript":"catalog:","@types/node":"catalog:","@djs-commands/core":"workspace:*","@djs-commands/tsconfig":"workspace:*"},"peerDependencies":{"mongoose":"^8.0.0","@djs-commands/core":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/adapter-mongoose_2.0.1_1777994349138_0.7462814712917119","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@djs-commands/adapter-mongoose","version":"3.0.0","keywords":["discord.js","discord","mongoose","mongodb","storage-adapter"],"author":{"name":"D3OXY","email":"hello@deoxy.dev"},"license":"MIT","_id":"@djs-commands/adapter-mongoose@3.0.0","maintainers":[{"name":"d3oxy","email":"ishansachu1@gmail.com"}],"homepage":"https://github.com/D3OXY/djs-commands#readme","bugs":{"url":"https://github.com/D3OXY/djs-commands/issues"},"dist":{"shasum":"3b18df1a0fd31b17a85244e5cd118619dd245586","tarball":"https://registry.npmjs.org/@djs-commands/adapter-mongoose/-/adapter-mongoose-3.0.0.tgz","fileCount":5,"integrity":"sha512-HBh8G7siWEOkUoiWCOYZRyD0L8ZCZ6FCaVKb/pKm0KDO/aLhWBddSzNhgvGT4sTjtfdg+OwRKT4A0k1G7mfCTA==","signatures":[{"sig":"MEUCIAbcKgkbxpJRdpb+GFji8dl4pcL6t089UEGKSzr4Z5JUAiEAlS2wkpyUA+3YCj1rLcCiscfQLavhjT1LfdcLUTSLKxE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djs-commands%2fadapter-mongoose@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":9707},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"30a619d93df51f37dbc6cca964988ff84daf99c1","scripts":{"dev":"tsc -p tsconfig.build.json --watch","test":"bun test","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:938be1be-58c7-495a-a916-2be22e22cb53"}},"repository":{"url":"git+https://github.com/D3OXY/djs-commands.git","type":"git","directory":"packages/adapter-mongoose"},"_npmVersion":"11.13.0","description":"Mongoose Storage adapter for djs-commands — MongoDB-backed persistent state","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mongoose":"^8.8.3","@types/bun":"catalog:","typescript":"catalog:","@types/node":"catalog:","@djs-commands/core":"workspace:*","@djs-commands/tsconfig":"workspace:*"},"peerDependencies":{"mongoose":"^8.0.0","@djs-commands/core":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/adapter-mongoose_3.0.0_1781470224258_0.39087723124967244","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@djs-commands/adapter-mongoose","version":"3.1.0","description":"Mongoose Storage adapter for djs-commands — MongoDB-backed persistent state","author":{"name":"D3OXY","email":"hello@deoxy.dev"},"license":"MIT","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","dev":"tsc -p tsconfig.build.json --watch","typecheck":"tsc --noEmit","test":"bun test"},"peerDependencies":{"@djs-commands/core":"workspace:^","mongoose":"^8.0.0"},"devDependencies":{"@djs-commands/core":"workspace:*","@djs-commands/tsconfig":"workspace:*","@types/bun":"catalog:","@types/node":"catalog:","mongoose":"^8.8.3","typescript":"catalog:"},"publishConfig":{"access":"public"},"engines":{"node":">=22.0.0"},"repository":{"type":"git","url":"git+https://github.com/D3OXY/djs-commands.git","directory":"packages/adapter-mongoose"},"keywords":["discord.js","discord","mongoose","mongodb","storage-adapter"],"gitHead":"e400478f3eabfa3ef69165430168067eaba7c948","_id":"@djs-commands/adapter-mongoose@3.1.0","bugs":{"url":"https://github.com/D3OXY/djs-commands/issues"},"homepage":"https://github.com/D3OXY/djs-commands#readme","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-sm2bN6hCMS3C8aGcX3Lm4jcsyzoCIzPglS9Ewlt5cA3SrMOr/g7PzHFA3AT/QQKDg/W/DOcXFhfdL4G7jT8q6w==","shasum":"de85ab39d0aa708b4d3d2b61cb3ed22c422d53ae","tarball":"https://registry.npmjs.org/@djs-commands/adapter-mongoose/-/adapter-mongoose-3.1.0.tgz","fileCount":5,"unpackedSize":11281,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@djs-commands%2fadapter-mongoose@3.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCgQ1E0JvBQqY0a/sgjKSIZTSk2gHeAyuiM/wvjipzgSgIhAJ+rq+oYdLtZcxum9/oUqOgZPzxFJWRL0OjHXWHd0nfZ"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:938be1be-58c7-495a-a916-2be22e22cb53"}},"directories":{},"maintainers":[{"name":"d3oxy","email":"ishansachu1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adapter-mongoose_3.1.0_1781515404772_0.646233926025154"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-05T07:49:00.164Z","modified":"2026-06-15T09:23:25.325Z","2.0.0":"2026-05-05T07:49:00.426Z","2.0.1":"2026-05-05T15:19:09.301Z","3.0.0":"2026-06-14T20:50:24.391Z","3.1.0":"2026-06-15T09:23:24.922Z"},"bugs":{"url":"https://github.com/D3OXY/djs-commands/issues"},"author":{"name":"D3OXY","email":"hello@deoxy.dev"},"license":"MIT","homepage":"https://github.com/D3OXY/djs-commands#readme","keywords":["discord.js","discord","mongoose","mongodb","storage-adapter"],"repository":{"type":"git","url":"git+https://github.com/D3OXY/djs-commands.git","directory":"packages/adapter-mongoose"},"description":"Mongoose Storage adapter for djs-commands — MongoDB-backed persistent state","maintainers":[{"name":"d3oxy","email":"ishansachu1@gmail.com"}],"readme":"# @djs-commands/adapter-mongoose\n\nMongoose `Storage` adapter for framework-owned djs-commands state.\n\nUsers own schemas, indexes, model names, and connection lifecycle. This adapter only translates mapped framework models.\n\n## Usage\n\n```ts\nimport { mongooseStorage } from \"@djs-commands/adapter-mongoose\";\nimport { GuildPrefixModel } from \"@djs-commands/core\";\nimport mongoose from \"mongoose\";\n\nexport const GuildPrefix = mongoose.model(\n\t\"BotPrefix\",\n\tnew mongoose.Schema({\n\t\tguildId: { type: String, required: true, unique: true },\n\t\tvalue: { type: String, required: true },\n\t})\n);\n\nexport const storage = mongooseStorage({\n\tmodels: {\n\t\t[GuildPrefixModel]: {\n\t\t\tmodel: GuildPrefix as mongoose.Model<Record<string, unknown>>,\n\t\t\tfields: { guild_id: \"guildId\", prefix: \"value\" },\n\t\t},\n\t},\n});\n```\n\nMap only models for features you enable. Required logical fields:\n\n- `GuildPrefixModel`: `guild_id`, `prefix`\n- `DisabledCommandsModel`: `guild_id`, `command_name`\n- `ChannelLocksModel`: `guild_id`, `command_name`, `channel_id`\n\nRecommended unique indexes use your physical schema fields for these logical keys:\n\n- guild prefixes: mapped `guild_id`\n- disabled commands: mapped `guild_id`, mapped `command_name`\n- channel locks: mapped `guild_id`, mapped `command_name`, mapped `channel_id`\n\nUnknown or unmapped framework models throw loudly. The constructor validates mapping shape only; collection/index/field mistakes surface from Mongoose/MongoDB at operation time.\n\n## License\n\n[MIT](https://github.com/D3OXY/djs-commands/blob/main/LICENSE)\n","readmeFilename":"README.md"}