/** * Formats the whole remedy for a missing explicit-activation extension. * * A first-party `@veryfront/ext-*` package is inert until a project composes * it, so a hint that stops at the install command reads as actionable and * changes nothing. The composition step is a `veryfront.config.ts` `extensions` * entry -- and naming that file is only useful to a reader who has one. * `veryfront init --template minimal` writes `package.json`, `app/`, `public/`, * and `tsconfig.json`; no config file at all. Verified against published * 0.1.1232. So the hint must know whether the file exists, and say "create" or * "add to" accordingly. * * Naming the file is still not enough to act on, because the first line of the * file it asks for is exactly the line a reader cannot guess. The obvious * guess, `import { defineConfig } from "veryfront/config"`, is not an exported * subpath: `defineConfig` lives on the package root. Node rejects the guess * with ERR_PACKAGE_PATH_NOT_EXPORTED, which the config loader reports as a * bare "Failed to load veryfront.config.ts". So the hint carries the import * lines verbatim, and in the create case the complete file, on one line, ready * to paste. * * The local binding is this module's to choose: every first-party extension * exports its factory as the module default. It is derived from the package * name so the reader can see which import belongs to which entry. * * @module extensions/setup-hint */ import { type VeryfrontConfigFileName } from "../config/config-files.js"; import { type InstallTarget } from "./install-command.js"; export interface ExtensionSetupHintOptions { /** Project root to inspect; defaults to the working directory. */ readonly projectDirectory?: string; /** Package client to format the install command for; detected by default. */ readonly installTarget?: InstallTarget; } /** * Return a legal JavaScript identifier for `packageName`'s default export. * * `@veryfront/ext-css-lightning` becomes `extCssLightning`. The scope is * dropped because it repeats on every first-party package, and every remaining * separator starts a new word. */ export declare function defaultImportBinding(packageName: string): string; /** * Return the config file the project keeps, or `undefined` when it has none. * * The loader accepts `.js`, `.ts`, and `.mjs` in that precedence, so a hint * that hard-codes `.ts` would send a reader who has `veryfront.config.js` to a * second file the loader never reaches. */ export declare function findExistingConfigFile(projectDirectory?: string): VeryfrontConfigFileName | undefined; /** * Return the install-and-compose instruction for `packageName`. * * Phrased as the tail of a sentence that has already stated the effect, so a * caller supplies its own "X is not active." lead. */ export declare function formatExtensionSetupHint(packageName: string, options?: ExtensionSetupHintOptions): string; //# sourceMappingURL=setup-hint.d.ts.map