@specatlas/core 0.1.9 → 0.1.11
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.
|
@@ -6,6 +6,26 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/approvals.ts
|
|
8
8
|
import path from "path";
|
|
9
|
+
|
|
10
|
+
// src/time.ts
|
|
11
|
+
function pad(value, length = 2) {
|
|
12
|
+
return String(value).padStart(length, "0");
|
|
13
|
+
}
|
|
14
|
+
function localDate(date = /* @__PURE__ */ new Date()) {
|
|
15
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
16
|
+
}
|
|
17
|
+
function localMonth(date = /* @__PURE__ */ new Date()) {
|
|
18
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}`;
|
|
19
|
+
}
|
|
20
|
+
function localIso(date = /* @__PURE__ */ new Date()) {
|
|
21
|
+
const offset = -date.getTimezoneOffset();
|
|
22
|
+
const sign = offset >= 0 ? "+" : "-";
|
|
23
|
+
const absolute = Math.abs(offset);
|
|
24
|
+
const time = `${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}.${pad(date.getMilliseconds(), 3)}`;
|
|
25
|
+
return `${localDate(date)}T${time}${sign}${pad(Math.floor(absolute / 60))}:${pad(absolute % 60)}`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/approvals.ts
|
|
9
29
|
import { stringify as stringifyYaml } from "yaml";
|
|
10
30
|
|
|
11
31
|
// src/diagnostics.ts
|
|
@@ -199,7 +219,7 @@ async function signApproval(opts) {
|
|
|
199
219
|
artifact: rel,
|
|
200
220
|
artifactHash: artifactHash(content),
|
|
201
221
|
approvedBy: opts.by.trim(),
|
|
202
|
-
approvedAt: now
|
|
222
|
+
approvedAt: localIso(now),
|
|
203
223
|
channel: opts.channel ?? "cli"
|
|
204
224
|
};
|
|
205
225
|
if (opts.note) approval.note = opts.note;
|
|
@@ -233,6 +253,9 @@ export {
|
|
|
233
253
|
sha256,
|
|
234
254
|
artifactHash,
|
|
235
255
|
shortHash,
|
|
256
|
+
localDate,
|
|
257
|
+
localMonth,
|
|
258
|
+
localIso,
|
|
236
259
|
changeMetaSchema,
|
|
237
260
|
parseChangeMeta,
|
|
238
261
|
approvalsSchema,
|
package/dist/index.d.ts
CHANGED
|
@@ -588,6 +588,10 @@ declare function sha256(content: string | Uint8Array): string;
|
|
|
588
588
|
declare function artifactHash(markdown: string): string;
|
|
589
589
|
declare function shortHash(hash: string): string;
|
|
590
590
|
|
|
591
|
+
declare function localDate(date?: Date): string;
|
|
592
|
+
declare function localMonth(date?: Date): string;
|
|
593
|
+
declare function localIso(date?: Date): string;
|
|
594
|
+
|
|
591
595
|
declare const REQ_HEAD_RE: RegExp;
|
|
592
596
|
declare const SCENARIO_HEAD_RE: RegExp;
|
|
593
597
|
declare const RULE_RE: RegExp;
|
|
@@ -1694,4 +1698,4 @@ declare function livingRequirementsMap(specs: Array<{
|
|
|
1694
1698
|
}>): Map<string, Requirement>;
|
|
1695
1699
|
declare function runCiGate(opts: CiOptions): Promise<CiResult>;
|
|
1696
1700
|
|
|
1697
|
-
export { type AdoptDomain, type AdoptOptions, type AdoptResult, type AgingBucket, type AnalyzeOptions, type AnalyzePackSummary, type AnalyzeResult, type Approval, type ApprovalStatus, type ApprovalsFile, type ApprovalsIndex, type ApproveFromGithubOptions, type ApproveFromGithubResult, type ArchiveOptions, type ArchiveResult, type AtlasConfig, type AttentionItem, BLOCK_HEAD_RE, BUILTIN_PACKS, type BlockWavePlan, CONFIG_FILE, CORE_VERSION, type CaptureResult, type Change, type ChangeMeta, type ChangeMetrics, type ChangeState, type CiCheck, type CiExtraCheck, type CiOptions, type CiResult, type Delta, type DeltaOp, type DeriveInput, type DerivedState, type DetectionResult, type Diagnostic, type DoctorReport, type Domain, type Evidence, type EvidenceMethod, type EvidenceResult, type ExecOptions, type ExecResult, type FoldOutcome, type FrontmatterResult, type GhRunner, type GitHubRepo, type InitOptions, type InitResult, type IssueBodyInput, type Lane, type Language, type LinkedIssue, type LintOptions, type LoadedConfig, type MockupCheckResult, type MockupManifest, type MockupPlan, type MockupPlanScreen, type MockupScreen, type NewChangeOptions, type NewChangeResult, type NextAction, type Override, type Pack, type PackCheck, type PackCheckResult, type PackCheckType, type PackEvaluation, type PresentOptions, type PresentResult, type ProfileMatch, REQ_HEAD_RE, REQ_ID_RE, RULE_ID_RE, RULE_RE, RUN_EVENT_TYPES, type RecordEvidenceOptions, type RecordEvidenceResult, type Rename, type Requirement, type RiskLevel, type Rule, type RunEvent, type RunEventType, type RunRecord, type RunState, type RunStatus, SCENARIO_HEAD_RE, SCENARIO_ID_RE, SDD_DIR, SLUG_RE, type Scenario, type Severity, type SignApprovalOptions, type SignApprovalResult, type SpecFile, type SpecRef, type StackProfile, type SyncGithubOptions, type SyncGithubResult, TASK_ID_RE, TASK_LINE_RE, type Task, type TaskBlock, type TasksFile, type TemplateSet, type TraceEdge, type TraceFinding, type TraceGraph, type TraceInput, type TraceNode, type TraceResult, type VerifyFile, type WalkEntry, type WavePlan, type Workspace, type WorkspaceMetrics, adoptWorkspace, appendRunEvent, approvalsSchema, approveFromGithub, archiveChange, artifactHash, atlasConfigSchema, buildTraceGraph, canonicalizeMarkdown, captureMockups, changeMarker, changeMetaSchema, changeMetaYaml, checkMockups, checkTrace, collectMetrics, commentIssue, compareTaskIds, computeInputsHash, configToYaml, copyFile, countBySeverity, createChange, createIssue, createRun, defaultConfig, deriveState, detectProfiles, detectRepo, detectionToYaml, diag, editIssue, emitFrontmatter, ensureDir, ensureSddDirs, esc, evaluatePacks, evidenceSummary, exists, findLinkedIssue, findWorkspaceRoot, firstToken, foldDelta, generatePresentation, generateRunId, getNumber, getString, ghAuthStatus, ghAvailable, hasErrors, hasShellMetacharacters, indexMarkdown, initWorkspace, inline, isCommandAllowed, isDirectory, issueBody, issueLabels, laneOrDefault, lintDelta, lintMockupHtml, lintMockupManifest, lintRequirement, lintSpec, lintTasks, lintVerify, listChangeSlugs, listDir, listDirs, listRuns, livingRequirementsMap, loadActiveProfile, loadApprovals, loadChange, loadConfig, loadDetectedBest, loadProfileFile, loadProfilesFromDir, loadProjectPacks, loadSpecs, loadWorkspace, matchGlob, mockupManifestSchema, mockupsDir, mockupsReady, packFindings, parseApprovals, parseChangeMeta, parseConfig, parseDelta, parseFrontmatter, parseGitHubRemote, parseIssueUrl, parseRequirementBlocks, parseSpecFile, parseTasksFile, parseVerifyFile, patchChangeMeta, planBlock, planMockups, planWaves, profileSchema, readMockupManifest, readRun, readText, readTextIfExists, recordEvidence, regenerateIndex, renderMarkdown, renderRequirement, renderTemplate, requiresMockups, resolvePacks, runAnalyze, runCiGate, runDoctor, runProcess, setMockupRequirement, sha256, shortHash, signApproval, specHashOf, splitCommand, stateLabel, syncGithubIssue, templatesFor, toPosix, tokensFile, updateMockupScreenshots, updateRunStatus, verifyApproval, walkFiles, writeConfig, writeMockupManifest, writeMockupPlan, writeText };
|
|
1701
|
+
export { type AdoptDomain, type AdoptOptions, type AdoptResult, type AgingBucket, type AnalyzeOptions, type AnalyzePackSummary, type AnalyzeResult, type Approval, type ApprovalStatus, type ApprovalsFile, type ApprovalsIndex, type ApproveFromGithubOptions, type ApproveFromGithubResult, type ArchiveOptions, type ArchiveResult, type AtlasConfig, type AttentionItem, BLOCK_HEAD_RE, BUILTIN_PACKS, type BlockWavePlan, CONFIG_FILE, CORE_VERSION, type CaptureResult, type Change, type ChangeMeta, type ChangeMetrics, type ChangeState, type CiCheck, type CiExtraCheck, type CiOptions, type CiResult, type Delta, type DeltaOp, type DeriveInput, type DerivedState, type DetectionResult, type Diagnostic, type DoctorReport, type Domain, type Evidence, type EvidenceMethod, type EvidenceResult, type ExecOptions, type ExecResult, type FoldOutcome, type FrontmatterResult, type GhRunner, type GitHubRepo, type InitOptions, type InitResult, type IssueBodyInput, type Lane, type Language, type LinkedIssue, type LintOptions, type LoadedConfig, type MockupCheckResult, type MockupManifest, type MockupPlan, type MockupPlanScreen, type MockupScreen, type NewChangeOptions, type NewChangeResult, type NextAction, type Override, type Pack, type PackCheck, type PackCheckResult, type PackCheckType, type PackEvaluation, type PresentOptions, type PresentResult, type ProfileMatch, REQ_HEAD_RE, REQ_ID_RE, RULE_ID_RE, RULE_RE, RUN_EVENT_TYPES, type RecordEvidenceOptions, type RecordEvidenceResult, type Rename, type Requirement, type RiskLevel, type Rule, type RunEvent, type RunEventType, type RunRecord, type RunState, type RunStatus, SCENARIO_HEAD_RE, SCENARIO_ID_RE, SDD_DIR, SLUG_RE, type Scenario, type Severity, type SignApprovalOptions, type SignApprovalResult, type SpecFile, type SpecRef, type StackProfile, type SyncGithubOptions, type SyncGithubResult, TASK_ID_RE, TASK_LINE_RE, type Task, type TaskBlock, type TasksFile, type TemplateSet, type TraceEdge, type TraceFinding, type TraceGraph, type TraceInput, type TraceNode, type TraceResult, type VerifyFile, type WalkEntry, type WavePlan, type Workspace, type WorkspaceMetrics, adoptWorkspace, appendRunEvent, approvalsSchema, approveFromGithub, archiveChange, artifactHash, atlasConfigSchema, buildTraceGraph, canonicalizeMarkdown, captureMockups, changeMarker, changeMetaSchema, changeMetaYaml, checkMockups, checkTrace, collectMetrics, commentIssue, compareTaskIds, computeInputsHash, configToYaml, copyFile, countBySeverity, createChange, createIssue, createRun, defaultConfig, deriveState, detectProfiles, detectRepo, detectionToYaml, diag, editIssue, emitFrontmatter, ensureDir, ensureSddDirs, esc, evaluatePacks, evidenceSummary, exists, findLinkedIssue, findWorkspaceRoot, firstToken, foldDelta, generatePresentation, generateRunId, getNumber, getString, ghAuthStatus, ghAvailable, hasErrors, hasShellMetacharacters, indexMarkdown, initWorkspace, inline, isCommandAllowed, isDirectory, issueBody, issueLabels, laneOrDefault, lintDelta, lintMockupHtml, lintMockupManifest, lintRequirement, lintSpec, lintTasks, lintVerify, listChangeSlugs, listDir, listDirs, listRuns, livingRequirementsMap, loadActiveProfile, loadApprovals, loadChange, loadConfig, loadDetectedBest, loadProfileFile, loadProfilesFromDir, loadProjectPacks, loadSpecs, loadWorkspace, localDate, localIso, localMonth, matchGlob, mockupManifestSchema, mockupsDir, mockupsReady, packFindings, parseApprovals, parseChangeMeta, parseConfig, parseDelta, parseFrontmatter, parseGitHubRemote, parseIssueUrl, parseRequirementBlocks, parseSpecFile, parseTasksFile, parseVerifyFile, patchChangeMeta, planBlock, planMockups, planWaves, profileSchema, readMockupManifest, readRun, readText, readTextIfExists, recordEvidence, regenerateIndex, renderMarkdown, renderRequirement, renderTemplate, requiresMockups, resolvePacks, runAnalyze, runCiGate, runDoctor, runProcess, setMockupRequirement, sha256, shortHash, signApproval, specHashOf, splitCommand, stateLabel, syncGithubIssue, templatesFor, toPosix, tokensFile, updateMockupScreenshots, updateRunStatus, verifyApproval, walkFiles, writeConfig, writeMockupManifest, writeMockupPlan, writeText };
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,15 @@ import {
|
|
|
6
6
|
countBySeverity,
|
|
7
7
|
diag,
|
|
8
8
|
hasErrors,
|
|
9
|
+
localDate,
|
|
10
|
+
localIso,
|
|
11
|
+
localMonth,
|
|
9
12
|
parseApprovals,
|
|
10
13
|
parseChangeMeta,
|
|
11
14
|
sha256,
|
|
12
15
|
shortHash,
|
|
13
16
|
signApproval
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CTT5JQA5.js";
|
|
15
18
|
import {
|
|
16
19
|
copyFile,
|
|
17
20
|
ensureDir,
|
|
@@ -1969,7 +1972,7 @@ async function approveFromGithub(opts) {
|
|
|
1969
1972
|
if (!by) {
|
|
1970
1973
|
return { approved: false, label, issueNumber: number, diagnostics: [diag("ATLAS-GH-011", "error", "No se pudo determinar qui\xE9n aprueba (--by ni `gh api user`)")] };
|
|
1971
1974
|
}
|
|
1972
|
-
const { signApproval: signApproval2 } = await import("./approvals-
|
|
1975
|
+
const { signApproval: signApproval2 } = await import("./approvals-XPI466UK.js");
|
|
1973
1976
|
const signed = await signApproval2({
|
|
1974
1977
|
root: opts.root,
|
|
1975
1978
|
artifact: path5.posix.join("changes", opts.slug, "spec.md"),
|
|
@@ -2122,7 +2125,7 @@ ${exec.stderr}`);
|
|
|
2122
2125
|
scenario,
|
|
2123
2126
|
method,
|
|
2124
2127
|
result,
|
|
2125
|
-
date: (opts.now
|
|
2128
|
+
date: localIso(opts.now),
|
|
2126
2129
|
by: opts.by.trim(),
|
|
2127
2130
|
line: 0
|
|
2128
2131
|
};
|
|
@@ -2192,7 +2195,7 @@ var RUN_EVENT_TYPES = [
|
|
|
2192
2195
|
"run_completed"
|
|
2193
2196
|
];
|
|
2194
2197
|
function generateRunId(now = /* @__PURE__ */ new Date()) {
|
|
2195
|
-
const iso = now
|
|
2198
|
+
const iso = localIso(now).replace(/[-+:.Z]/g, "").slice(0, 15);
|
|
2196
2199
|
return `${iso.slice(0, 8)}-${iso.slice(8, 14)}-${randomBytes(3).toString("hex")}`;
|
|
2197
2200
|
}
|
|
2198
2201
|
function runsDir(root) {
|
|
@@ -2205,8 +2208,8 @@ async function createRun(root, slug, phase, inputs, now = /* @__PURE__ */ new Da
|
|
|
2205
2208
|
slug,
|
|
2206
2209
|
phase,
|
|
2207
2210
|
status: "active",
|
|
2208
|
-
startedAt: now
|
|
2209
|
-
updatedAt: now
|
|
2211
|
+
startedAt: localIso(now),
|
|
2212
|
+
updatedAt: localIso(now)
|
|
2210
2213
|
};
|
|
2211
2214
|
if (inputs) state.inputs = inputs;
|
|
2212
2215
|
const dir = path7.join(runsDir(root), runId);
|
|
@@ -2218,7 +2221,7 @@ async function createRun(root, slug, phase, inputs, now = /* @__PURE__ */ new Da
|
|
|
2218
2221
|
return state;
|
|
2219
2222
|
}
|
|
2220
2223
|
async function appendRunEvent(root, runId, type, data, now = /* @__PURE__ */ new Date()) {
|
|
2221
|
-
const event = { eventId: randomBytes(4).toString("hex"), at: now
|
|
2224
|
+
const event = { eventId: randomBytes(4).toString("hex"), at: localIso(now), type };
|
|
2222
2225
|
if (data) event.data = data;
|
|
2223
2226
|
const file = path7.join(runsDir(root), runId, "events.jsonl");
|
|
2224
2227
|
const previous = await readTextIfExists(file) ?? "";
|
|
@@ -2232,7 +2235,7 @@ async function updateRunStatus(root, runId, status, now = /* @__PURE__ */ new Da
|
|
|
2232
2235
|
if (raw === void 0) return;
|
|
2233
2236
|
const state = JSON.parse(raw);
|
|
2234
2237
|
state.status = status;
|
|
2235
|
-
state.updatedAt = now
|
|
2238
|
+
state.updatedAt = localIso(now);
|
|
2236
2239
|
await writeText(file, `${JSON.stringify(state, null, 2)}
|
|
2237
2240
|
`);
|
|
2238
2241
|
}
|
|
@@ -2465,7 +2468,7 @@ async function writeMockupPlan(root, slug, plan, now = /* @__PURE__ */ new Date(
|
|
|
2465
2468
|
if (await exists(file)) return file;
|
|
2466
2469
|
const doc = {
|
|
2467
2470
|
schema_version: 1,
|
|
2468
|
-
generated_at: now
|
|
2471
|
+
generated_at: localIso(now),
|
|
2469
2472
|
platform: plan.platform,
|
|
2470
2473
|
screens: plan.screens.map((s) => ({ id: s.id, title: s.title, file: s.file, illustrates: s.illustrates, states: s.states, breakpoints: s.breakpoints }))
|
|
2471
2474
|
};
|
|
@@ -2481,7 +2484,7 @@ async function writeMockupManifest(root, slug, plan, inputsHash, now = /* @__PUR
|
|
|
2481
2484
|
level: "hifi",
|
|
2482
2485
|
platform: plan.platform,
|
|
2483
2486
|
inputs_hash: inputsHash,
|
|
2484
|
-
generated_at: now
|
|
2487
|
+
generated_at: localIso(now),
|
|
2485
2488
|
screens: plan.screens.map((s) => ({ id: s.id, title: s.title, file: s.file, illustrates: s.illustrates, states: s.states, breakpoints: s.breakpoints })),
|
|
2486
2489
|
screenshots: []
|
|
2487
2490
|
};
|
|
@@ -2930,7 +2933,7 @@ async function runAnalyze(opts) {
|
|
|
2930
2933
|
if (packs) result.packs = packs;
|
|
2931
2934
|
if (opts.write !== false) {
|
|
2932
2935
|
const file = path10.join(change.dir, "analyze.md");
|
|
2933
|
-
await writeText(file, renderAnalyze(change, result, (opts.now
|
|
2936
|
+
await writeText(file, renderAnalyze(change, result, localIso(opts.now)));
|
|
2934
2937
|
result.path = file;
|
|
2935
2938
|
}
|
|
2936
2939
|
return result;
|
|
@@ -3072,7 +3075,7 @@ async function collectMetrics(root, now = /* @__PURE__ */ new Date()) {
|
|
|
3072
3075
|
archived: archivedEntries.length
|
|
3073
3076
|
};
|
|
3074
3077
|
return {
|
|
3075
|
-
generatedAt: now
|
|
3078
|
+
generatedAt: localIso(now),
|
|
3076
3079
|
project: config.project.name,
|
|
3077
3080
|
root: resolved,
|
|
3078
3081
|
changes,
|
|
@@ -3132,7 +3135,7 @@ async function generatePresentation(opts) {
|
|
|
3132
3135
|
project: config.project.name,
|
|
3133
3136
|
version: change.delta.sectionsFound.length,
|
|
3134
3137
|
hash,
|
|
3135
|
-
generatedAt: now
|
|
3138
|
+
generatedAt: localIso(now),
|
|
3136
3139
|
proposalHtml: proposalBody ? renderMarkdown(proposalBody) : `<p><em>${labels.noProposal}</em></p>`,
|
|
3137
3140
|
requirements: change.delta ? [...change.delta.added.map((r) => ({ req: r, kind: "added" })), ...change.delta.modified.map((r) => ({ req: r, kind: "modified" }))] : [],
|
|
3138
3141
|
evidence: new Map((change.verify?.evidence ?? []).map((e) => [e.scenario, e.result])),
|
|
@@ -3514,7 +3517,7 @@ function baselineSpec(domain, files) {
|
|
|
3514
3517
|
lines.push(`domain: ${domain}`);
|
|
3515
3518
|
lines.push(`title: ${title}`);
|
|
3516
3519
|
lines.push("version: 1");
|
|
3517
|
-
lines.push(`updated: ${(
|
|
3520
|
+
lines.push(`updated: ${localDate()}`);
|
|
3518
3521
|
lines.push("---");
|
|
3519
3522
|
lines.push("");
|
|
3520
3523
|
lines.push(`# ${title}`);
|
|
@@ -3535,7 +3538,7 @@ function adoptReport(input) {
|
|
|
3535
3538
|
lines.push(es ? "# Adopci\xF3n (brownfield)" : "# Adoption (brownfield)");
|
|
3536
3539
|
lines.push("");
|
|
3537
3540
|
lines.push(es ? `- Proyecto: ${input.config.project.name}` : `- Project: ${input.config.project.name}`);
|
|
3538
|
-
lines.push(es ? `- Generado: ${input.now
|
|
3541
|
+
lines.push(es ? `- Generado: ${localIso(input.now)}` : `- Generated: ${localIso(input.now)}`);
|
|
3539
3542
|
lines.push(es ? `- Archivos de c\xF3digo inventariados: ${input.files} (de ${input.inventoried} archivos totales)` : `- Inventoried source files: ${input.files} (of ${input.inventoried} total files)`);
|
|
3540
3543
|
if (input.detection) lines.push(es ? `- Stack detectado: ${input.detection.name} (${input.detection.score} puntos)` : `- Detected stack: ${input.detection.name} (${input.detection.score})`);
|
|
3541
3544
|
lines.push("");
|
|
@@ -3590,7 +3593,7 @@ async function initWorkspace(opts) {
|
|
|
3590
3593
|
created.push(path14.join(sddDir, "glossary.md"));
|
|
3591
3594
|
const detected = await detectIfPossible(root, opts.profilesDir);
|
|
3592
3595
|
if (detected) {
|
|
3593
|
-
const yaml = detectionToYaml(detected, (opts.now
|
|
3596
|
+
const yaml = detectionToYaml(detected, localIso(opts.now));
|
|
3594
3597
|
await writeText(path14.join(sddDir, "profiles", "detected.yaml"), yaml);
|
|
3595
3598
|
created.push(path14.join(sddDir, "profiles", "detected.yaml"));
|
|
3596
3599
|
if (detected.best) {
|
|
@@ -3669,7 +3672,7 @@ async function createChange(opts) {
|
|
|
3669
3672
|
title,
|
|
3670
3673
|
domain,
|
|
3671
3674
|
lane,
|
|
3672
|
-
created: (opts.now
|
|
3675
|
+
created: localDate(opts.now)
|
|
3673
3676
|
};
|
|
3674
3677
|
await ensureDir(dir);
|
|
3675
3678
|
const templates = templatesFor(language);
|
|
@@ -3780,7 +3783,7 @@ async function archiveChange(opts) {
|
|
|
3780
3783
|
return { slug: opts.slug, fold: emptyFold, diagnostics, dryRun: opts.dryRun ?? false };
|
|
3781
3784
|
}
|
|
3782
3785
|
const nowFix = opts.now ?? /* @__PURE__ */ new Date();
|
|
3783
|
-
const targetFix = path16.join(root, ".sdd", "changes", "archive", `${nowFix
|
|
3786
|
+
const targetFix = path16.join(root, ".sdd", "changes", "archive", `${localMonth(nowFix)}-${opts.slug}`);
|
|
3784
3787
|
if (await exists(targetFix)) {
|
|
3785
3788
|
diagnostics.push(diag("ATLAS-ARCH-002", "error", `Ya existe un cambio archivado en ${targetFix}`, { path: targetFix }));
|
|
3786
3789
|
return { slug: opts.slug, fold: emptyFold, diagnostics, dryRun: opts.dryRun ?? false };
|
|
@@ -3821,7 +3824,7 @@ version: 0
|
|
|
3821
3824
|
title: fm.data["title"] ?? change.meta.title ?? domain,
|
|
3822
3825
|
owner: fm.data["owner"],
|
|
3823
3826
|
version: version + 1,
|
|
3824
|
-
updated: now
|
|
3827
|
+
updated: localDate(now)
|
|
3825
3828
|
};
|
|
3826
3829
|
for (const key of Object.keys(nextFm)) if (nextFm[key] === void 0) delete nextFm[key];
|
|
3827
3830
|
const body = fold.content.replace(/^[\r\n]+/, "").trimEnd() + "\n";
|
|
@@ -3830,7 +3833,7 @@ ${Object.entries(nextFm).map(([k, v]) => `${k}: ${String(v)}`).join("\n")}
|
|
|
3830
3833
|
---
|
|
3831
3834
|
|
|
3832
3835
|
${body}`;
|
|
3833
|
-
const month = now
|
|
3836
|
+
const month = localMonth(now);
|
|
3834
3837
|
const archiveDir = path16.join(root, ".sdd", "changes", "archive");
|
|
3835
3838
|
const target = path16.join(archiveDir, `${month}-${opts.slug}`);
|
|
3836
3839
|
if (await exists(target)) {
|
|
@@ -4079,6 +4082,9 @@ export {
|
|
|
4079
4082
|
loadProjectPacks,
|
|
4080
4083
|
loadSpecs,
|
|
4081
4084
|
loadWorkspace,
|
|
4085
|
+
localDate,
|
|
4086
|
+
localIso,
|
|
4087
|
+
localMonth,
|
|
4082
4088
|
matchGlob,
|
|
4083
4089
|
mockupManifestSchema,
|
|
4084
4090
|
mockupsDir,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@specatlas/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Kernel determinista de SpecAtlas: parsing, validación, trazabilidad, olas y ciclo de vida",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@specatlas/render": "0.1.
|
|
37
|
+
"@specatlas/render": "0.1.2",
|
|
38
38
|
"yaml": "^2.6.1",
|
|
39
39
|
"zod": "^3.24.1"
|
|
40
40
|
},
|