CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-expo--config-plugins

A library for generating native app code from JavaScript config through Expo config plugins

47%

Overall

Evaluation47%

1.04x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-3/

Config Plugin Pipeline

A helper that applies a list of config plugins (module strings or inline definitions) with run-once protection and a record of which plugins ran.

Capabilities

Applies mixed plugin entries

  • With base config { name: "MyApp" } and plugins [module plugin at "./plugins/append.js" that appends "-native" to the name, inline plugin named "inline" that appends "-inline"], the pipeline resolves the module relative to projectRoot, runs the module then the inline plugin, and returns appliedPlugins as ["./plugins/append.js", "inline"] plus final name MyApp-native-inline. @test

Enforces single execution per key

  • When the plugin list includes a default plugin guarded by onceKey, running the pipeline twice with the same onceKey triggers that default plugin only on the first call while still applying other plugins on every call. @test

Fails loudly on missing plugin modules

  • If a string plugin entry does not resolve from projectRoot, the pipeline rejects with an error that names the missing plugin entry. @test

Implementation

@generates

API

export type PluginEntry =
  | string
  | {
      name: string;
      apply(
        config: Record<string, any>
      ): Record<string, any> | Promise<Record<string, any>>;
    };

export interface PipelineOptions {
  projectRoot: string;
  onceKey: string;
}

export interface PipelineResult {
  config: Record<string, any>;
  appliedPlugins: string[];
}

export async function applyPluginPipeline(
  baseConfig: Record<string, any>,
  plugins: PluginEntry[],
  options: PipelineOptions
): Promise<PipelineResult>;

Dependencies { .dependencies }

@expo/config-plugins { .dependency }

Utilities for orchestrating config plugins, resolving plugin modules, and preventing duplicate execution. @satisfied-by

tessl i tessl/npm-expo--config-plugins@11.0.0

tile.json