/** * Formats the package-install command a reader can actually paste. * * First-party extensions are published to npm only: `@veryfront/ext-*` exists * on registry.npmjs.org, while jsr.io hosts no `@veryfront` scope. A hint that * hard-codes `deno add ` therefore fails twice -- Deno resolves * an unprefixed specifier against JSR and exits with "is missing a prefix", and * a Deno command is a non-sequitur in the npm project `veryfront init` * scaffolds. * * The command follows the manifest that owns the project's dependencies, not * the runtime executing Veryfront: the compiled Deno binary builds npm * projects, and telling one of those to run `deno add` writes a deno.json the * project's own `npm ci` then ignores. The runtime decides only when no * manifest is readable. * * Which npm-family client owns the project is decided by the lockfile, not by * `package.json`, and the table of lockfiles is shared with the CLI's own * detector (`cli/utils/package-manager.ts`) so the client Veryfront *prints* * cannot disagree with the client `veryfront init` *ran*. Printing * `npm install` into a pnpm or Yarn project writes a second, conflicting * `package-lock.json` and leaves the real lockfile stale, which a * frozen-lockfile CI rejects. * * @module extensions/install-command */ import { type RuntimeKind } from "../platform/compat/runtime.js"; import { type PackageClient } from "../utils/package-client.js"; /** Package client that owns a project's dependencies. */ export type InstallTarget = PackageClient; /** * Return the client the project at `projectDirectory` installs with, or * `undefined` when no manifest is readable (a hosted render, a directory * without read permission, a runtime with no synchronous filesystem). * * A lockfile in the directory decides on its own. Failing that, `deno.json` * decides, because Deno resolves dependencies from the manifest itself. A lone * `package.json` is npm-family but does not say which client, so the ancestors * are searched for the workspace lockfile that does; npm is the answer only * when no lockfile exists anywhere above it. */ export declare function detectProjectInstallTarget(projectDirectory?: string): InstallTarget | undefined; /** Return the client that ships with `runtime`. */ export declare function runtimeInstallTarget(runtime?: RuntimeKind): InstallTarget; /** * Return the command that installs `packageName` with `target`. * * `packageName` may carry an `npm:` prefix (recommendations record some * entries that way); the prefix is re-applied per target rather than passed * through, so no caller can emit `npm install npm:@veryfront/ext-redis`. */ export declare function formatInstallCommand(packageName: string, target?: InstallTarget): string; //# sourceMappingURL=install-command.d.ts.map