qfai 0.4.4 → 0.4.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.d.cts CHANGED
@@ -38,7 +38,7 @@ type ValidationResult = {
38
38
  toolVersion: string;
39
39
  issues: Issue[];
40
40
  counts: ValidationCounts;
41
- traceability?: ValidationTraceability;
41
+ traceability: ValidationTraceability;
42
42
  };
43
43
 
44
44
  type FailOn = "never" | "warning" | "error";
package/dist/index.mjs CHANGED
@@ -538,14 +538,14 @@ async function collectUiContractFiles(uiRoot) {
538
538
  async function collectApiContractFiles(apiRoot) {
539
539
  return collectFiles(apiRoot, { extensions: [".yaml", ".yml", ".json"] });
540
540
  }
541
- async function collectDataContractFiles(dataRoot) {
542
- return collectFiles(dataRoot, { extensions: [".sql"] });
541
+ async function collectDbContractFiles(dbRoot) {
542
+ return collectFiles(dbRoot, { extensions: [".sql"] });
543
543
  }
544
- async function collectContractFiles(uiRoot, apiRoot, dataRoot) {
544
+ async function collectContractFiles(uiRoot, apiRoot, dbRoot) {
545
545
  const [ui, api, db] = await Promise.all([
546
546
  collectUiContractFiles(uiRoot),
547
547
  collectApiContractFiles(apiRoot),
548
- collectDataContractFiles(dataRoot)
548
+ collectDbContractFiles(dbRoot)
549
549
  ]);
550
550
  return { ui, api, db };
551
551
  }
@@ -593,7 +593,7 @@ async function buildContractIndex(root, config) {
593
593
  const [uiFiles, apiFiles, dbFiles] = await Promise.all([
594
594
  collectUiContractFiles(uiRoot),
595
595
  collectApiContractFiles(apiRoot),
596
- collectDataContractFiles(dbRoot)
596
+ collectDbContractFiles(dbRoot)
597
597
  ]);
598
598
  const index = {
599
599
  ids: /* @__PURE__ */ new Set(),
@@ -1102,8 +1102,8 @@ import { readFile as readFile4 } from "fs/promises";
1102
1102
  import path6 from "path";
1103
1103
  import { fileURLToPath } from "url";
1104
1104
  async function resolveToolVersion() {
1105
- if ("0.4.4".length > 0) {
1106
- return "0.4.4";
1105
+ if ("0.4.6".length > 0) {
1106
+ return "0.4.6";
1107
1107
  }
1108
1108
  try {
1109
1109
  const packagePath = resolvePackageJsonPath();
@@ -1151,7 +1151,7 @@ async function validateContracts(root, config) {
1151
1151
  const contractsRoot = resolvePath(root, config, "contractsDir");
1152
1152
  issues.push(...await validateUiContracts(path8.join(contractsRoot, "ui")));
1153
1153
  issues.push(...await validateApiContracts(path8.join(contractsRoot, "api")));
1154
- issues.push(...await validateDataContracts(path8.join(contractsRoot, "db")));
1154
+ issues.push(...await validateDbContracts(path8.join(contractsRoot, "db")));
1155
1155
  const contractIndex = await buildContractIndex(root, config);
1156
1156
  issues.push(...validateDuplicateContractIds(contractIndex));
1157
1157
  return issues;
@@ -1279,15 +1279,15 @@ async function validateApiContracts(apiRoot) {
1279
1279
  }
1280
1280
  return issues;
1281
1281
  }
1282
- async function validateDataContracts(dataRoot) {
1283
- const files = await collectDataContractFiles(dataRoot);
1282
+ async function validateDbContracts(dbRoot) {
1283
+ const files = await collectDbContractFiles(dbRoot);
1284
1284
  if (files.length === 0) {
1285
1285
  return [
1286
1286
  issue(
1287
1287
  "QFAI-DB-000",
1288
1288
  "DB \u5951\u7D04\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002",
1289
1289
  "info",
1290
- dataRoot,
1290
+ dbRoot,
1291
1291
  "contracts.db.files"
1292
1292
  )
1293
1293
  ];