CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-sveltejs--adapter-auto

SvelteKit adapter that automatically detects deployment environment and installs appropriate platform-specific adapter

Overall
score

96%

Overview
Eval results
Files

task.mdevals/scenario-6/

Environment-Aware Deployment Adapter

A deployment configuration system that automatically detects the hosting environment and delegates to the appropriate deployment adapter. When no supported environment is detected, the system should handle this gracefully by providing helpful feedback to the user.

Capabilities

Environment Detection

  • Detects Vercel environment when VERCEL environment variable is set @test
  • Detects Cloudflare Pages environment when CF_PAGES environment variable is set @test
  • Detects Netlify environment when NETLIFY environment variable is set @test

Graceful Fallback Handling

  • Logs a warning message when no supported environment is detected @test
  • Provides a documentation link when no supported environment is detected @test
  • Does not throw an error or fail the build when no environment is detected @test
  • Returns an appropriate response that allows the build process to continue @test

Implementation

@generates

API

/**
 * Creates a deployment adapter that automatically detects the environment
 * and configures the appropriate deployment strategy.
 *
 * @returns {object} An adapter object with name and adapt methods
 */
function createDeploymentAdapter() {
  // IMPLEMENTATION HERE
}

module.exports = { createDeploymentAdapter };

Dependencies { .dependencies }

@sveltejs/adapter-auto { .dependency }

Provides automatic environment detection and adapter delegation capabilities.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-sveltejs--adapter-auto

tile.json