File size: 1,572 Bytes
d197cf3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | // Hook install runtime helpers resolve archive install behavior behind runtime imports.
import { resolveArchiveKind } from "../infra/archive.js";
import { pathExists } from "../infra/fs-safe.js";
import { resolveExistingInstallPath, withExtractedArchiveRoot } from "../infra/install-flow.js";
import { installFromValidatedNpmSpecArchive } from "../infra/install-from-npm-spec.js";
import {
resolveInstallModeOptions,
resolveTimedInstallModeOptions,
} from "../infra/install-mode-options.js";
import { installPackageDir } from "../infra/install-package-dir.js";
import {
type NpmIntegrityDrift,
type NpmSpecResolution,
resolveArchiveSourcePath,
} from "../infra/install-source-utils.js";
import {
ensureInstallTargetAvailable,
resolveCanonicalInstallTarget,
} from "../infra/install-target.js";
import { readJson } from "../infra/json-files.js";
import { isPathInside, isPathInsideWithRealpath } from "../security/scan-paths.js";
/** Runtime-only install dependencies for hook install/update paths. */
export type { NpmIntegrityDrift, NpmSpecResolution };
/** Lazy facade kept separate so hook metadata paths do not eagerly load install tooling. */
export {
ensureInstallTargetAvailable,
pathExists as fileExists,
installFromValidatedNpmSpecArchive,
installPackageDir,
isPathInside,
isPathInsideWithRealpath,
readJson as readJsonFile,
resolveArchiveKind,
resolveArchiveSourcePath,
resolveCanonicalInstallTarget,
resolveExistingInstallPath,
resolveInstallModeOptions,
resolveTimedInstallModeOptions,
withExtractedArchiveRoot,
};
|