CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-nestjs--mongoose

NestJS module that provides seamless integration between NestJS and Mongoose ODM for MongoDB database operations

80

1.02x
Quality

Pending

Does it follow best practices?

Impact

80%

1.02x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-4/

{
  "context": "Evaluates whether the service wires MongoDB models and connections through @nestjs/mongoose injection helpers instead of constructing them manually. Checks correct token usage for default and named connections plus transaction handling via the injected connection/session.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Model injection",
      "description": "Order model is obtained via @nestjs/mongoose tokens (e.g., @InjectModel or getModelToken for the order schema) on the default connection instead of creating a model from the driver directly.",
      "max_score": 25
    },
    {
      "name": "Connection token",
      "description": "A connection instance is injected with @InjectConnection or getConnectionToken rather than calling mongoose.connect/createConnection, and it is the source of any sessions used.",
      "max_score": 20
    },
    {
      "name": "Named audit model",
      "description": "Audit model injection specifies the named connection (e.g., @InjectModel with connection name or getModelToken using that name) so audit queries run against the intended connection.",
      "max_score": 20
    },
    {
      "name": "Shared session use",
      "description": "Transactional paths start a session via the injected connection (startSession/withTransaction) and pass the same session to both order and audit model operations.",
      "max_score": 20
    },
    {
      "name": "No manual setup",
      "description": "Implementation avoids manual mongoose model/connection construction (no mongoose.model/connection.model or raw driver calls) and relies on MongooseModule.forFeature/forFeatureAsync-registered tokens.",
      "max_score": 15
    }
  ]
}

tile.json