import type { Plugin } from 'rollup'; import type { WorkspacePackageInfo } from '../../bundler/workspaceDependencies.js'; import type { BundlerOptions, DependencyMetadata } from '../types.js'; import type { BundlerPlatform } from '../utils.js'; export type WorkspaceDepsWatcherOptions = { depsToOptimize: Map; /** * Optimized dependency → relative cache file path (from analyzeBundle.dependencies). * Used to detect missing cache files that must be regenerated. */ optimizedDependencyFiles: Map; workspaceMap: Map; workspaceRoot: string; outputDir: string; platform: BundlerPlatform; bundlerOptions?: Pick | null; }; /** * During `mastra dev`, workspace packages are pre-transpiled into * `/node_modules/.cache/*.mjs` and marked external in the main Rollup * watch graph. This plugin: * 1. Watches the original workspace package sources so edits trigger rebuilds. * 2. Regenerates the optimized `.cache` outputs when those sources change (or * when cache files are missing) before the rebuild finishes — so a later * server restart loads fresh package code. */ export declare function workspaceDepsWatcher(options: WorkspaceDepsWatcherOptions): Plugin; /** * On-disk cache entry path for a workspace dependency after optimization. * Naming matches createVirtualDependencies: dep.replaceAll('/', '__'). */ export declare function getWorkspaceDepCacheEntryPath(rootPath: string, dep: string): string; //# sourceMappingURL=workspace-deps-watcher.d.ts.map