* fix(verifiers): launch npm through Node on Windows * test(verifiers): cover Windows npm fallback
104 lines
3.8 KiB
JavaScript
104 lines
3.8 KiB
JavaScript
import { execFile } from "node:child_process";
|
|
import { lstat } from "node:fs/promises";
|
|
import { dirname, join } from "node:path";
|
|
import { promisify } from "node:util";
|
|
import { Ajv2020 } from "ajv/dist/2020.js";
|
|
|
|
/**
|
|
* `mcp-verifier-results.mjs` reaches into `dist/` at module load, so eager
|
|
* importing it propagates that build dependency to every consumer in this
|
|
* file. `verifyCompleteToolCatalog` is the only consumer, so we lazy-load
|
|
* the module there and keep the other helpers (`exec`, `run`, `json`,
|
|
* `pathExists`) usable from `test:fast` callers that only need `dist/`-free
|
|
* utilities — see docs/testing.md § test scripts, which promises `test:fast`
|
|