import AdminForth from '../index.js'; import { ICodeInjector } from '../types/Back.js'; declare class CodeInjector implements ICodeInjector { allWatchers: any[]; adminforth: AdminForth; allComponentNames: { [key: string]: string; }; srcFoldersToSync: { [key: string]: string; }; publicFoldersToSync: { [key: string]: string; }; devServerPort: number; spaTmpPath(): string; /** * spa_tmp is named after the brand slug only, so every run of the same project shares one folder. * We record who owns it next to it (not inside, so it stays out of the sources hash) purely to make * a second process visible: two of them copy over each other's files, which surfaces later as a * random fs error in an unrelated place. Investigation notes are in AdminForth/1519. */ private claimSpaTmp; checkIconNames(icons: string[]): Promise; registerCustomComponent(filePath: string): void; collectTailwindSafelist(): string[]; cleanup(): void; constructor(adminforth: any); doesUserHasPnpmLockFile(dir: string): Promise; runPackageManagerShell({ command, cwd, envOverrides }: { command: string; cwd: string; envOverrides?: { [key: string]: string; }; }): Promise; rmTmpDir(): Promise; getServeDir(): string; parsePackageLockPackages(dir: string, packageContent: { dependencies: any; devDependencies: any; }): Promise<[string, string[]]>; packagesFromPnpm(dir: string): Promise<[string, string[]]>; allowBuildsFromWorkspaceFile(dir: string, sourceName: string): Promise<{ [packageName: string]: boolean; }>; syncAllowBuildsToSpaTmp(): Promise<{ [packageName: string]: boolean; }>; getSpaDir(): string; registerPluginPublicFoldersToSync(): void; updatePartials({ filesUpdated }: { filesUpdated: string[]; }): Promise; migrateLegacyCustomLayout(oldMeta: any): Promise; prepareSources(): Promise; watchForReprepare({}: {}): Promise; private fileChangeChains; /** * Runs `task` for a changed watched file, serialized per path and fully guarded. * * Both guards matter. A watcher event only says that something happened, not that the file is still * there - a rename, a git checkout or an editor writing through a temp file is enough for it to be * gone by the time we act on it. And any throw here would land in a listener whose promise nobody * awaits, i.e. an unhandled rejection, which node kills the process for. */ private onWatchedFileChange; private onWatchedFileRemove; private queuePerPath; watchCustomComponentsForCopy({ customComponentsDir, destination, targetRoot }: { customComponentsDir: string; destination: string; targetRoot?: string; }): Promise; tryReadFile(filePath: string): Promise; computeSourcesHash(folderPath?: string, allFiles?: string[]): any; computeSourcesHashMap(folderPath?: string, rootFolder?: string, map?: { [key: string]: string; }): Promise<{ [key: string]: string; }>; saveSourcesHashesToFile(outputFileName?: string, hashMap?: { [key: string]: string; }): Promise; bundleNow({ hotReload, buildTime }: { hotReload: boolean; buildTime?: boolean; }): Promise; } export default CodeInjector; //# sourceMappingURL=codeInjector.d.ts.map