@nxworker/workspace
Version:
Nx plugin providing generators for managing workspace files, including the move-file generator for safely moving files between projects while updating all imports
42 lines (41 loc) • 1.61 kB
TypeScript
/**
* File extension constants used throughout the move-file generator.
* These constants define which file types are processed during moves.
*/
/**
* File extensions that can be used for project entry points.
* Frozen array to prevent modifications.
*/
export declare const entrypointExtensions: readonly ["ts", "mts", "cts", "mjs", "cjs", "js", "tsx", "jsx"];
/**
* Base names for primary entry point files.
* These are commonly used names for the main export file in a project.
*/
export declare const primaryEntryBaseNames: readonly ["public-api", "index"];
/**
* File extensions for TypeScript and JavaScript source files.
* Used for identifying files to process during import updates.
*/
export declare const sourceFileExtensions: readonly [".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs", ".cts", ".cjs"];
/**
* File extensions that should be stripped from imports.
* ESM-specific extensions (.mjs, .mts, .cjs, .cts) are excluded as they are
* required by the ESM specification.
*/
export declare const strippableExtensions: readonly [".ts", ".tsx", ".js", ".jsx"];
/**
* Type representing valid source file extensions.
*/
export type SourceFileExtension = (typeof sourceFileExtensions)[number];
/**
* Type representing valid strippable extensions.
*/
export type StrippableExtension = (typeof strippableExtensions)[number];
/**
* Type representing valid entry point extensions.
*/
export type EntrypointExtension = (typeof entrypointExtensions)[number];
/**
* Type representing valid entry point base names.
*/
export type PrimaryEntryBaseName = (typeof primaryEntryBaseNames)[number];