CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-angular-devkit--build-ng-packagr

Angular Build Architect builder for ng-packagr library packaging (deprecated)

89

1.00x
Overview
Eval results
Files

task.mdevals/scenario-1/

Build Cache Manager

A TypeScript utility that manages environment-aware build caching for development tools.

Capabilities

Environment Detection

  • Detects CI environment by checking if process.env.CI is set to any truthy value @test
  • Identifies local development environment when process.env.CI is not set @test

Cache Strategy Configuration

  • When cache environment is set to 'local', caching is enabled in local environment and disabled in CI @test
  • When cache environment is set to 'ci', caching is disabled in local environment and enabled in CI @test
  • When cache environment is set to 'all', caching is always enabled regardless of environment @test
  • When caching is explicitly disabled, it remains disabled in all environments @test

Implementation

@generates

API

/**
 * Configuration for cache behavior
 */
export interface CacheConfig {
  /** Whether caching is enabled at all. If false, cache is always disabled. */
  enabled: boolean;

  /** Environment strategy: 'local' (cache only locally), 'ci' (cache only in CI), 'all' (always cache) */
  environment: 'local' | 'ci' | 'all';

  /** Base directory path for cache storage */
  cacheDirectory: string;

  /** Version identifier for cache isolation */
  version: string;
}

/**
 * Result of cache configuration evaluation
 */
export interface CacheResult {
  /** Whether caching should be active based on configuration and environment */
  cacheEnabled: boolean;

  /** Full path to the version-isolated cache directory */
  cacheDirectory: string;
}

/**
 * Determines if caching should be enabled based on configuration and current environment.
 * Implements environment-aware cache strategies.
 *
 * @param config - Cache configuration settings
 * @returns Cache result with enabled status and directory path
 */
export function evaluateCacheStrategy(config: CacheConfig): CacheResult;

Dependencies { .dependencies }

@angular-devkit/build-ng-packagr { .dependency }

Provides Angular Build Architect builder for ng-packagr library packaging.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-angular-devkit--build-ng-packagr

tile.json