refactor: dedupe cli config cron and install flows

This commit is contained in:
Peter Steinberger
2026-03-02 19:48:38 +00:00
parent 9d30159fcd
commit b1c30f0ba9
80 changed files with 1379 additions and 2027 deletions

10
src/cli/install-spec.ts Normal file
View File

@@ -0,0 +1,10 @@
import path from "node:path";
export function looksLikeLocalInstallSpec(spec: string, knownSuffixes: readonly string[]): boolean {
return (
spec.startsWith(".") ||
spec.startsWith("~") ||
path.isAbsolute(spec) ||
knownSuffixes.some((suffix) => spec.endsWith(suffix))
);
}