import type { ImportDeclaration } from 'babel-types'; import { NodePath } from '@babel/core'; export type FileType = 'esm' | 'cjs' | 'cmp-cjs' | 'non-esm' | 'json'; export type FileInfo = { file: string; relFile: string; fileIdentifier: string; cacheDest: string; finalDest: string; webLocation: string; type: FileType; packageInfo: PackageInfo; }; export type PackageType = 'esm' | 'cjs' | 'non-esm'; export type PackageInfo = { packageDir: string; packageJson: { [key: string]: string; }; packageName: string; version: string; type: PackageType; packageIdentifier: string; cacheLocation: string; finalLocation: string; }; export type PackageList = { [key: string]: PackageInfo; }; export type PackageLogItem = PackageInfo & { files: string[]; }; export type PackageLogList = { [key: string]: PackageLogItem; }; export type DependencyGraphNode = { type: FileType; originalLocation: string; cacheLocation: string; finalLocation: string; dependencies?: Dependencies; }; export type DependencyGraphNodeWithIdentifier = DependencyGraphNode & { fileIdentifier: string; }; export type DependencyGraph = { [key: string]: DependencyGraphNode; }; export type Dependencies = string[]; type Opts = { projectDir: string; codeDir: string; oldDependencyGraph: DependencyGraph; dependencyGraph: DependencyGraph; importAliases: { [key: string]: string; }; promises: Promise[]; }; export type GetPackageDirForFile = (file: string) => string; export type GetPackageInfoForFile = (file: string) => PackageInfo; export type GetExternalImportFinalImportLocation = (location: string, sourceFile: string, sourcePackageDir: string, fileType: FileType) => string; export type GetCjsRelativeImportSourceLocation = (location: string, source: string) => string; export type GetCjsRelativeImportFinalImportLocation = (location: string, source: string) => string; export type GetFileFinalLocation = (file: string, packageInfo: PackageInfo) => string; export type MakeCjsEntryFile = (sourceFile: string, newLocationSiteRel: string) => string; export declare function MakeBabelTransformPackageImports(opts: Opts): () => { pre(state: unknown): void; visitor: { ImportDeclaration: (path: NodePath) => void; }; post(): void; }; export {}; //# sourceMappingURL=BabelTransformPackageImports.d.ts.map