ShtukbaseStandard
包文件→ .shtukbase/packages/lenses/actions/check.mjs

actions/check.mjs

12 行, 482 B.

文件按包中的原样显示:代码及其注释不做翻译。

  1. // Action `check`: exit 1 when the built lenses (lib/) are stale or missing; the kit's verdict, line by line,
  2. // then the data of the service lenses (lib/base/packages.data.js).
  3. import { lenses } from "./kit.mjs";
  4. import { stalePackages } from "./packages.mjs";
  5. let code = lenses("check");
  6. const stale = code === 2 ? null : stalePackages(process.cwd());
  7. if (stale) {
  8. console.log(`Package lenses: ${stale}. Run: shtuk run lenses build`);
  9. code = code || 1;
  10. }
  11. process.exit(code);