import { NameVersion, VersionInfo } from "@pslb/rollup-plugin-dll"; import { Program } from "estree"; import { Node } from "estree-walker"; export declare const toNameAndScope: (pkgName: string) => { scope?: string | undefined; name: string; }; /** create a js friendly name from a npm package name */ export declare const toJsIdentifier: (pkgName: string, prefix: string) => string; export declare const toDllVar: (pkgName: string) => string; /** * generate the library ast. Will represent something like: * ```javascript * import * as _dll_foo from "foo"; * export {_dll_foo}; * ``` * @param imports * @param addEsModuleFlag set `__esModule` to true on object. * This is something we should try and remove, but for now the * consumer of the lib is calling `interopRequireDefault` (babel?webpack?), * which is looking for this flag. * If were able to get rollup to use the non babel jsx that should fix it. */ export declare const ast: (defaults: string[] | undefined, namespace: string[] | undefined) => Program; export declare type Mappings = { [i: string]: string; }; /** * create the mappings from the ast will look like: * ```javascript * { react: "_dll_react", ...} * ``` * @param ast */ export declare const mappings: (ast: Node) => Mappings; /** * hash is based of the name@version of all imported packages + any additional paths * imported from that package beyond the bare import. * @param yarn * @param names */ export declare const versionInfo: (yarn: any, names: string[], localPackages: NameVersion[], dir: string) => VersionInfo;