UNPKG

isolate-package

Version:

Isolate monorepo packages to form a self-contained deployable unit

49 lines 1.83 kB
//#region src/lib/logger.d.ts type LogLevel = "info" | "debug" | "warn" | "error"; /** * The Logger defines an interface that can be used to pass in a different * logger object in order to intercept all the logging output. */ type Logger = { debug(message: unknown, ...args: unknown[]): void; info(message: unknown, ...args: unknown[]): void; warn(message: unknown, ...args: unknown[]): void; error(message: unknown, ...args: unknown[]): void; }; //#endregion //#region src/lib/config.d.ts type IsolateConfigResolved = { buildDirName?: string; includeDevDependencies: boolean; isolateDirName: string; logLevel: LogLevel; targetPackagePath?: string; tsconfigPath: string; workspacePackages?: string[]; workspaceRoot: string; forceNpm: boolean; pickFromScripts?: string[]; omitFromScripts?: string[]; omitPackageManager?: boolean; }; type IsolateConfig = Partial<IsolateConfigResolved>; /** Helper for type-safe configuration in isolate.config.ts files. */ declare function defineConfig(config: IsolateConfig): IsolateConfig; //#endregion //#region src/isolate.d.ts /** Keep the original function for backward compatibility */ declare function isolate(config?: IsolateConfig): Promise<string>; //#endregion //#region src/get-internal-package-names.d.ts /** * Get the names of all internal workspace packages that the target package * depends on. This is useful for tools like tsup that need a list of internal * packages to include in `noExternal`. * * If no config is passed, it reads from `isolate.config.{ts,js,json}` in the * current working directory. */ declare function getInternalPackageNames(config?: IsolateConfig): Promise<string[]>; //#endregion export { type IsolateConfig, type Logger, defineConfig, getInternalPackageNames, isolate }; //# sourceMappingURL=index.d.mts.map