UNPKG

@nlabs/lex

Version:
93 lines (92 loc) 2.89 kB
import type { Linter } from 'eslint'; export interface EsbuildConfig { [key: string]: unknown; entryPoints?: string[]; outdir?: string; platform?: 'node' | 'browser'; target?: string; format?: 'cjs' | 'esm'; minify?: boolean; treeShaking?: boolean; drop?: string[]; pure?: string[]; external?: string[]; splitting?: boolean; metafile?: boolean; sourcemap?: boolean | 'inline' | 'external'; legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'separate'; banner?: Record<string, string>; footer?: Record<string, string>; define?: Record<string, string>; } export interface JestConfig { [key: string]: unknown; roots?: string[]; testEnvironment?: string; transform?: Record<string, [string, Record<string, unknown>]>; transformIgnorePatterns?: string[]; moduleNameMapper?: Record<string, string>; extensionsToTreatAsEsm?: string[]; preset?: string; } export interface WebpackConfig { [key: string]: unknown; entry?: string | string[]; output?: Record<string, unknown>; module?: Record<string, unknown>; plugins?: unknown[]; publicPath?: string; } export interface AIConfig { provider?: 'cursor' | 'copilot' | 'openai' | 'anthropic' | 'none'; apiKey?: string; model?: string; maxTokens?: number; temperature?: number; } export interface ESLintConfig { [key: string]: unknown; extends?: string[]; rules?: Linter.RulesRecord; } export interface LexConfigType { ai?: AIConfig; configFiles?: string[]; copyFiles?: string[]; entryHTML?: string; entryJs?: string; env?: object; esbuild?: EsbuildConfig; eslint?: ESLintConfig; gitUrl?: string; jest?: JestConfig; libraryName?: string; libraryTarget?: string; outputFile?: string; outputFullPath?: string; outputHash?: boolean; outputPath?: string; packageManager?: 'npm' | 'yarn'; preset?: 'web' | 'node' | 'lambda' | 'mobile'; sourceFullPath?: string; sourcePath?: string; targetEnvironment?: 'node' | 'web'; useGraphQl?: boolean; useTypescript?: boolean; webpack?: WebpackConfig; } export type Config = LexConfigType; export declare const defaultConfigValues: LexConfigType; export declare const getTypeScriptConfigPath: (configName: string) => string; export declare class LexConfig { static config: LexConfigType; static set useTypescript(value: boolean); static getLexDir(): string; static updateConfig(updatedConfig: LexConfigType): LexConfigType; static addConfigParams(cmd: any, params: LexConfigType): void; static parseConfig(cmd: any, isRoot?: boolean): Promise<void>; static checkTypescriptConfig(): void; static checkCompileTypescriptConfig(): void; static checkLintTypescriptConfig(): void; static checkTestTypescriptConfig(): void; }