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-3/

{
  "context": "Evaluates how the solution configures MongoDB connections in NestJS using @nestjs/mongoose, including synchronous and asynchronous setup, option handling, and connection scoping. Emphasizes use of the library's primitives (forRoot/forRootAsync, connection tokens) instead of custom wiring.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "forRoot setup",
      "description": "Uses MongooseModule.forRoot with the provided URI (and dbName when supplied) to create the default connection, passing through options such as retryAttempts, retryDelay, or lazyConnection as defined in the spec options.",
      "max_score": 25
    },
    {
      "name": "Async factory",
      "description": "Configures MongooseModule.forRootAsync with a factory/class/existing provider so that async options are awaited, dependencies are injected via inject/useClass/useExisting, and the resolved object maps to the expected connection options (uri, dbName, retryAttempts, retryDelay).",
      "max_score": 25
    },
    {
      "name": "Connection names",
      "description": "Applies the connectionName option to create and expose a named connection via @nestjs/mongoose (e.g., getConnectionToken(name) or InjectConnection(name)) while leaving the default connection untouched when both are present.",
      "max_score": 20
    },
    {
      "name": "Retry handling",
      "description": "Relies on @nestjs/mongoose retry/backoff features (retryAttempts/retryDelay or handleRetry) rather than custom loops to manage transient connection failures as specified by options.",
      "max_score": 15
    },
    {
      "name": "Exports for DI",
      "description": "Exports or re-exports the configured MongooseModule so downstream providers can inject the connection tokens produced by @nestjs/mongoose without redefining them manually.",
      "max_score": 15
    }
  ]
}

tile.json