@catchdrift/cli 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/check.mjs +10 -0
package/package.json
CHANGED
package/src/commands/check.mjs
CHANGED
|
@@ -24,6 +24,16 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
24
24
|
const CHECKER = resolve(__dirname, '../../scripts/drift-check.mjs')
|
|
25
25
|
|
|
26
26
|
export async function check(argv) {
|
|
27
|
+
// Warn if running via npx (ephemeral cache) — Playwright browser reinstalls on every npx clear
|
|
28
|
+
const isNpx = process.env.npm_execpath?.includes('_npx') || process.argv[1]?.includes('_npx')
|
|
29
|
+
if (isNpx) {
|
|
30
|
+
console.log(pc.dim(
|
|
31
|
+
'Tip: install locally for faster runs and persistent Playwright cache:\n' +
|
|
32
|
+
' npm install -D catchdrift\n' +
|
|
33
|
+
' npx catchdrift check (uses local install)\n'
|
|
34
|
+
))
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
// Read threshold from drift.config.ts if not passed as flag
|
|
28
38
|
const hasThreshold = argv.includes('--threshold')
|
|
29
39
|
if (!hasThreshold) {
|