- Raise use-swipe-gesture mutation score to 66.13% (target 65%+) - Maintain use-reduced-motion mutation score at 76.32% (target 50%+) - Fix use-reduced-motion.ts ESLint set-state-in-effect warning - Add UJ-10 deep searcher journey (category browse → article read → content discovery) - Add 40 new test files (analytics, detail, sections, ui, lib components) - Update test-strategy-plan.md to v2.0 (sync test count to 1591) - Sync README.md with final release metrics Quality gates: TS 0 errors, ESLint 0 errors, 121 suites / 1591 tests passed
32 lines
949 B
JavaScript
32 lines
949 B
JavaScript
// @ts-nocheck
|
|
import path from 'node:path';
|
|
import { resolveProjectRoot } from './context.mjs';
|
|
import { parseTargetPath } from './lib/target-args.mjs';
|
|
|
|
export function resolveLiveTarget(cwd = process.cwd(), args = []) {
|
|
const originalCwd = path.resolve(cwd);
|
|
let targetPath = null;
|
|
try {
|
|
targetPath = parseTargetPath(args, { strict: true });
|
|
} catch (err) {
|
|
if (err?.name === 'TargetArgError') {
|
|
process.stderr.write(`${err.message}\n`);
|
|
process.exit(1);
|
|
}
|
|
throw err;
|
|
}
|
|
const absoluteTargetPath = targetPath
|
|
? path.isAbsolute(targetPath) ? targetPath : path.resolve(originalCwd, targetPath)
|
|
: null;
|
|
const projectRoot = targetPath
|
|
? resolveProjectRoot(originalCwd, { targetPath: absoluteTargetPath })
|
|
: originalCwd;
|
|
return {
|
|
originalCwd,
|
|
projectRoot,
|
|
targetPath,
|
|
absoluteTargetPath,
|
|
targetOptions: absoluteTargetPath ? { targetPath: absoluteTargetPath } : {},
|
|
};
|
|
}
|