qfai 0.4.4 → 0.4.7
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/assets/init/.qfai/contracts/README.md +6 -5
- package/assets/init/.qfai/promptpack/steering/traceability.md +15 -5
- package/assets/init/.qfai/prompts/makeOverview.md +1 -1
- package/assets/init/.qfai/specs/spec-0001/scenario.md +1 -1
- package/dist/cli/commands/report.js +31 -3
- package/dist/cli/commands/report.js.map +1 -1
- package/dist/cli/index.cjs +36 -12
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +36 -12
- package/dist/cli/index.mjs.map +1 -1
- package/dist/core/contractIndex.js +2 -2
- package/dist/core/contractIndex.js.map +1 -1
- package/dist/core/discovery.d.ts +2 -2
- package/dist/core/discovery.d.ts.map +1 -1
- package/dist/core/discovery.js +4 -4
- package/dist/core/discovery.js.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/validators/contracts.js +5 -5
- package/dist/core/validators/contracts.js.map +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.mjs +11 -11
- package/dist/index.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
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
|
|
542
|
-
return collectFiles(
|
|
541
|
+
async function collectDbContractFiles(dbRoot) {
|
|
542
|
+
return collectFiles(dbRoot, { extensions: [".sql"] });
|
|
543
543
|
}
|
|
544
|
-
async function collectContractFiles(uiRoot, apiRoot,
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
1106
|
-
return "0.4.
|
|
1105
|
+
if ("0.4.7".length > 0) {
|
|
1106
|
+
return "0.4.7";
|
|
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
|
|
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
|
|
1283
|
-
const files = await
|
|
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
|
-
|
|
1290
|
+
dbRoot,
|
|
1291
1291
|
"contracts.db.files"
|
|
1292
1292
|
)
|
|
1293
1293
|
];
|