@specatlas/core 0.1.2 → 0.1.4
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.ts +3 -1
- package/dist/index.js +13 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -202,6 +202,7 @@ interface Change {
|
|
|
202
202
|
verify?: VerifyFile;
|
|
203
203
|
fix?: VerifyFile;
|
|
204
204
|
planPath?: string;
|
|
205
|
+
reviewPath?: string;
|
|
205
206
|
mockupManifestPath?: string;
|
|
206
207
|
diagnostics: Diagnostic[];
|
|
207
208
|
}
|
|
@@ -215,6 +216,7 @@ interface Workspace {
|
|
|
215
216
|
sddDir: string;
|
|
216
217
|
specs: SpecRef[];
|
|
217
218
|
changes: Change[];
|
|
219
|
+
archived?: Change[];
|
|
218
220
|
diagnostics: Diagnostic[];
|
|
219
221
|
}
|
|
220
222
|
|
|
@@ -1047,7 +1049,7 @@ interface ApprovalsIndex {
|
|
|
1047
1049
|
}
|
|
1048
1050
|
declare function loadApprovals(sddDir: string): Promise<ApprovalsIndex>;
|
|
1049
1051
|
declare function loadSpecs(sddDir: string): Promise<SpecRef[]>;
|
|
1050
|
-
declare function loadChange(root: string, slug: string): Promise<Change>;
|
|
1052
|
+
declare function loadChange(root: string, slug: string, relDir?: string): Promise<Change>;
|
|
1051
1053
|
declare function listChangeSlugs(root: string, opts?: {
|
|
1052
1054
|
includeArchived?: boolean;
|
|
1053
1055
|
}): Promise<string[]>;
|
package/dist/index.js
CHANGED
|
@@ -1059,7 +1059,7 @@ function deriveState(input) {
|
|
|
1059
1059
|
blockedBy.push(`evidencia ${scenariosEvidenced}/${deltaScenarios.length}`);
|
|
1060
1060
|
return { state: "built", blockedBy, nextAction: next(`satlas verify ${change.slug}`, "Registrar evidencia por escenario"), progress };
|
|
1061
1061
|
}
|
|
1062
|
-
if (lane === "full" && cfg.gates.review.mode === "blocking" && !change.
|
|
1062
|
+
if (lane === "full" && cfg.gates.review.mode === "blocking" && !change.reviewPath) {
|
|
1063
1063
|
blockedBy.push("review pendiente");
|
|
1064
1064
|
return { state: "verified", blockedBy, nextAction: next(`/satlas.review ${change.slug}`, "Revisi\xF3n de c\xF3digo", true), progress };
|
|
1065
1065
|
}
|
|
@@ -1255,8 +1255,8 @@ async function loadSpecs(sddDir) {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
return out;
|
|
1257
1257
|
}
|
|
1258
|
-
async function loadChange(root, slug) {
|
|
1259
|
-
const dir = path4.join(root, SDD_DIR, "changes", slug);
|
|
1258
|
+
async function loadChange(root, slug, relDir) {
|
|
1259
|
+
const dir = path4.join(root, SDD_DIR, "changes", relDir ?? slug);
|
|
1260
1260
|
const diagnostics = [];
|
|
1261
1261
|
const change = { slug, dir, diagnostics };
|
|
1262
1262
|
const metaFile = path4.join(dir, "meta.yaml");
|
|
@@ -1278,6 +1278,8 @@ async function loadChange(root, slug) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
const planFile = path4.join(dir, "plan.md");
|
|
1280
1280
|
if (await exists(planFile)) change.planPath = planFile;
|
|
1281
|
+
const reviewFile = path4.join(dir, "review.md");
|
|
1282
|
+
if (await exists(reviewFile)) change.reviewPath = reviewFile;
|
|
1281
1283
|
const tasksFile = path4.join(dir, "tasks.md");
|
|
1282
1284
|
const tasksRaw = await readTextIfExists(tasksFile);
|
|
1283
1285
|
if (tasksRaw !== void 0) {
|
|
@@ -1318,7 +1320,14 @@ async function loadWorkspace(root) {
|
|
|
1318
1320
|
changes.push(change);
|
|
1319
1321
|
diagnostics.push(...change.diagnostics);
|
|
1320
1322
|
}
|
|
1321
|
-
|
|
1323
|
+
const archived = [];
|
|
1324
|
+
const archivedDir = path4.join(sddDir, "changes", "archive");
|
|
1325
|
+
if (await isDirectory(archivedDir)) {
|
|
1326
|
+
for (const entry of await listDirs(archivedDir)) {
|
|
1327
|
+
archived.push(await loadChange(root, entry.replace(/^\d{4}-\d{2}-/, ""), path4.join("archive", entry)));
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
return { workspace: { root, sddDir, specs, changes, archived, diagnostics }, config };
|
|
1322
1331
|
}
|
|
1323
1332
|
async function ensureSddDirs(sddDir) {
|
|
1324
1333
|
const created = [];
|