qfai 1.7.4 → 1.7.6

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/dist/index.cjs CHANGED
@@ -31,6 +31,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  ID_PREFIXES: () => ID_PREFIXES,
34
+ RUNTIME_HEAVY_CHECKS: () => RUNTIME_HEAVY_CHECKS,
35
+ STATIC_OBLIGATIONS: () => STATIC_OBLIGATIONS,
34
36
  autogenerateUiFidelity: () => autogenerateUiFidelity,
35
37
  buildUiFidelityScreens: () => buildUiFidelityScreens,
36
38
  checkDecisionGuardrails: () => checkDecisionGuardrails,
@@ -63,6 +65,8 @@ __export(src_exports, {
63
65
  loadConfig: () => loadConfig,
64
66
  loadDecisionGuardrails: () => loadDecisionGuardrails,
65
67
  normalizeDecisionGuardrails: () => normalizeDecisionGuardrails,
68
+ resolveObligations: () => resolveObligations,
69
+ resolveObligationsWithOptIn: () => resolveObligationsWithOptIn,
66
70
  resolvePath: () => resolvePath,
67
71
  resolveToolVersion: () => resolveToolVersion,
68
72
  runMockPaths: () => runMockPaths,
@@ -3647,6 +3651,35 @@ function formatError4(error) {
3647
3651
  return String(error);
3648
3652
  }
3649
3653
 
3654
+ // src/core/prototyping/modeResolver.ts
3655
+ var STATIC_OBLIGATIONS = ["source", "route", "state", "contract-level"];
3656
+ var RUNTIME_HEAVY_CHECKS = [
3657
+ "api-non-404",
3658
+ "db-existence",
3659
+ "ui-route-reachability"
3660
+ ];
3661
+ var FULL_HARNESS_OBLIGATIONS = [...STATIC_OBLIGATIONS, ...RUNTIME_HEAVY_CHECKS];
3662
+ function resolveObligations(mode) {
3663
+ switch (mode) {
3664
+ case "default":
3665
+ case "standard":
3666
+ return [...STATIC_OBLIGATIONS];
3667
+ case "low-cost":
3668
+ return [...STATIC_OBLIGATIONS];
3669
+ case "full-harness":
3670
+ return [...FULL_HARNESS_OBLIGATIONS];
3671
+ default: {
3672
+ const _exhaustive = mode;
3673
+ throw new Error(`Unknown prototyping mode: ${String(_exhaustive)}`);
3674
+ }
3675
+ }
3676
+ }
3677
+ function resolveObligationsWithOptIn(mode, optIn) {
3678
+ const base = resolveObligations(mode);
3679
+ const validOptIns = optIn.filter((o) => RUNTIME_HEAVY_CHECKS.includes(o));
3680
+ return [.../* @__PURE__ */ new Set([...base, ...validOptIns])];
3681
+ }
3682
+
3650
3683
  // src/core/report.ts
3651
3684
  var import_promises52 = require("fs/promises");
3652
3685
  var import_node_path54 = __toESM(require("path"), 1);
@@ -4407,8 +4440,8 @@ var import_promises14 = require("fs/promises");
4407
4440
  var import_node_path14 = __toESM(require("path"), 1);
4408
4441
  var import_node_url = require("url");
4409
4442
  async function resolveToolVersion() {
4410
- if ("1.7.4".length > 0) {
4411
- return "1.7.4";
4443
+ if ("1.7.6".length > 0) {
4444
+ return "1.7.6";
4412
4445
  }
4413
4446
  try {
4414
4447
  const packagePath = resolvePackageJsonPath();
@@ -17405,6 +17438,8 @@ async function collectTddCoverage(entries) {
17405
17438
  // Annotate the CommonJS export names for ESM import in node:
17406
17439
  0 && (module.exports = {
17407
17440
  ID_PREFIXES,
17441
+ RUNTIME_HEAVY_CHECKS,
17442
+ STATIC_OBLIGATIONS,
17408
17443
  autogenerateUiFidelity,
17409
17444
  buildUiFidelityScreens,
17410
17445
  checkDecisionGuardrails,
@@ -17437,6 +17472,8 @@ async function collectTddCoverage(entries) {
17437
17472
  loadConfig,
17438
17473
  loadDecisionGuardrails,
17439
17474
  normalizeDecisionGuardrails,
17475
+ resolveObligations,
17476
+ resolveObligationsWithOptIn,
17440
17477
  resolvePath,
17441
17478
  resolveToolVersion,
17442
17479
  runMockPaths,