CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-tmp-promise

The tmp package with promises support and disposers.

93

1.78x
Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer uses tmp-promise's withDir disposer pattern to manage temporary directory lifecycle with automatic cleanup, ensuring safe resource management even during exceptions.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses withDir method",
      "description": "Implementation uses tmp-promise's withDir() method (not dir() with manual cleanup) to create the temporary directory and ensure automatic cleanup",
      "max_score": 30
    },
    {
      "name": "Accesses directory path",
      "description": "Correctly accesses the temporary directory path from the object passed to withDir's callback function (e.g., { path })",
      "max_score": 15
    },
    {
      "name": "File operations in callback",
      "description": "Performs all file write and read operations within the withDir callback function, ensuring they happen before cleanup",
      "max_score": 20
    },
    {
      "name": "Returns processed results",
      "description": "Returns the array of ProcessingResult objects from the withDir callback, allowing the return value to propagate through withDir",
      "max_score": 15
    },
    {
      "name": "Error handling preservation",
      "description": "Implements try-catch within the withDir callback to handle processing errors without preventing automatic cleanup, ensuring individual task failures are captured while maintaining cleanup guarantee",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-tmp-promise

tile.json