@wairon/cli 5.1.1-dev.52 → 5.1.1-dev.54
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/cli/index.js +22 -39
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +288 -268
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var init_defaults = __esm({
|
|
|
65
65
|
copilot: ".github/prompts",
|
|
66
66
|
codex: ".codex/agents"
|
|
67
67
|
};
|
|
68
|
-
WAIRON_VERSION = "5.1.1-dev.
|
|
68
|
+
WAIRON_VERSION = "5.1.1-dev.54";
|
|
69
69
|
GITHUB_REPO = "SYW-Apps/Waffle-AIron";
|
|
70
70
|
SUPPORTED_ALIASES = ["wai"];
|
|
71
71
|
SCAN_EXCLUDE_DIRS = /* @__PURE__ */ new Set([
|
|
@@ -23587,7 +23587,7 @@ var init_validation = __esm({
|
|
|
23587
23587
|
init_specs2();
|
|
23588
23588
|
init_fs();
|
|
23589
23589
|
path23 = __toESM(require("path"));
|
|
23590
|
-
|
|
23590
|
+
init_core();
|
|
23591
23591
|
RESOLUTION_FAILURE_CODES = /* @__PURE__ */ new Set([
|
|
23592
23592
|
"UNDEFINED_TYPE_REFERENCE",
|
|
23593
23593
|
"INVALID_DEPENDENCY_REFERENCE",
|
|
@@ -28277,7 +28277,7 @@ var init_status = __esm({
|
|
|
28277
28277
|
init_loader();
|
|
28278
28278
|
init_fs();
|
|
28279
28279
|
init_specs2();
|
|
28280
|
-
|
|
28280
|
+
init_core();
|
|
28281
28281
|
init_lockfile();
|
|
28282
28282
|
init_specs();
|
|
28283
28283
|
}
|
|
@@ -30743,6 +30743,7 @@ init_errors();
|
|
|
30743
30743
|
init_fs();
|
|
30744
30744
|
init_core();
|
|
30745
30745
|
init_core();
|
|
30746
|
+
init_core();
|
|
30746
30747
|
function composeAgentBrief2(agentId) {
|
|
30747
30748
|
return composeAgentBrief(agentId);
|
|
30748
30749
|
}
|
|
@@ -30791,6 +30792,9 @@ function defaultPackSelections2() {
|
|
|
30791
30792
|
function readLockState2(current2) {
|
|
30792
30793
|
return readLockState(current2);
|
|
30793
30794
|
}
|
|
30795
|
+
function renderDiagram2(format) {
|
|
30796
|
+
return renderDiagram(format);
|
|
30797
|
+
}
|
|
30794
30798
|
async function runSubsystemAdd(id, options = {}) {
|
|
30795
30799
|
logger.header("wairon subsystem add");
|
|
30796
30800
|
if (!projectConfigExists2()) {
|
|
@@ -31751,7 +31755,6 @@ function materializeAgentLayer(agents, projectConfig, options) {
|
|
|
31751
31755
|
// src/commands/lock.ts
|
|
31752
31756
|
var import_inquirer2 = __toESM(require("inquirer"));
|
|
31753
31757
|
init_logger();
|
|
31754
|
-
init_approval();
|
|
31755
31758
|
init_defaults();
|
|
31756
31759
|
var path36 = __toESM(require("path"));
|
|
31757
31760
|
init_core();
|
|
@@ -33241,10 +33244,6 @@ var path39 = __toESM(require("path"));
|
|
|
33241
33244
|
init_logger();
|
|
33242
33245
|
init_loader();
|
|
33243
33246
|
init_fs();
|
|
33244
|
-
init_diagram();
|
|
33245
|
-
init_canvas();
|
|
33246
|
-
init_diagram_export();
|
|
33247
|
-
init_validation();
|
|
33248
33247
|
init_errors();
|
|
33249
33248
|
var FORMATS = ["mermaid", "canvas", "drawio", "excalidraw"];
|
|
33250
33249
|
function applyFormat(options) {
|
|
@@ -33261,18 +33260,9 @@ function applyFormat(options) {
|
|
|
33261
33260
|
// mermaid is the default path — no flag needed
|
|
33262
33261
|
};
|
|
33263
33262
|
}
|
|
33264
|
-
function
|
|
33265
|
-
try {
|
|
33266
|
-
const config = loadProjectConfig4();
|
|
33267
|
-
if (config) return validateSddTree({ rules: config.rules, projectType: config.projectType }).issues;
|
|
33268
|
-
} catch {
|
|
33269
|
-
}
|
|
33270
|
-
return validateSddTree().issues;
|
|
33271
|
-
}
|
|
33272
|
-
function writeCanvas(dest) {
|
|
33273
|
-
const model = buildCanvasModel(collectIssues());
|
|
33263
|
+
function writeArtifact(dest, content) {
|
|
33274
33264
|
ensureDir(path39.dirname(path39.resolve(dest)));
|
|
33275
|
-
fs27.writeFileSync(dest,
|
|
33265
|
+
fs27.writeFileSync(dest, content, "utf-8");
|
|
33276
33266
|
}
|
|
33277
33267
|
function parseSequenceRef(ref) {
|
|
33278
33268
|
const sep9 = ref.includes(":") ? ref.lastIndexOf(":") : ref.lastIndexOf(".");
|
|
@@ -33288,23 +33278,21 @@ async function runDiagram(rawOptions = {}) {
|
|
|
33288
33278
|
const options = applyFormat(rawOptions);
|
|
33289
33279
|
if (options.canvas && !options.all) {
|
|
33290
33280
|
const dest2 = options.out ?? path39.join(AI_PATHS.docsDir(), "diagrams", "canvas.html");
|
|
33291
|
-
|
|
33281
|
+
writeArtifact(dest2, renderDiagram2("canvas"));
|
|
33292
33282
|
logger.success(`Interactive canvas written to ${dest2}`);
|
|
33293
33283
|
logger.info("Open it in a browser \u2014 fully self-contained (works offline).");
|
|
33294
33284
|
return;
|
|
33295
33285
|
}
|
|
33296
33286
|
if (options.drawio && !options.all) {
|
|
33297
33287
|
const dest2 = options.out ?? path39.join(AI_PATHS.docsDir(), "diagrams", "architecture.drawio");
|
|
33298
|
-
|
|
33299
|
-
fs27.writeFileSync(dest2, generateDrawioXml(buildCanvasModel()), "utf-8");
|
|
33288
|
+
writeArtifact(dest2, renderDiagram2("drawio"));
|
|
33300
33289
|
logger.success(`draw.io diagram written to ${dest2}`);
|
|
33301
33290
|
logger.info("Open with draw.io / diagrams.net (or import into tools that accept the format).");
|
|
33302
33291
|
return;
|
|
33303
33292
|
}
|
|
33304
33293
|
if (options.excalidraw && !options.all) {
|
|
33305
33294
|
const dest2 = options.out ?? path39.join(AI_PATHS.docsDir(), "diagrams", "architecture.excalidraw");
|
|
33306
|
-
|
|
33307
|
-
fs27.writeFileSync(dest2, generateExcalidrawScene(buildCanvasModel()), "utf-8");
|
|
33295
|
+
writeArtifact(dest2, renderDiagram2("excalidraw"));
|
|
33308
33296
|
logger.success(`Excalidraw scene written to ${dest2}`);
|
|
33309
33297
|
logger.info("Open with excalidraw.com or the VS Code extension.");
|
|
33310
33298
|
return;
|
|
@@ -33312,7 +33300,7 @@ async function runDiagram(rawOptions = {}) {
|
|
|
33312
33300
|
const wantsMermaid = options.format?.toLowerCase().startsWith("mermaid") || !!options.subsystem || !!options.sequence;
|
|
33313
33301
|
if (!options.all && !options.sequence && !wantsMermaid) {
|
|
33314
33302
|
const dest2 = options.out ?? path39.join(AI_PATHS.docsDir(), "diagrams", "canvas.html");
|
|
33315
|
-
|
|
33303
|
+
writeArtifact(dest2, renderDiagram2("canvas"));
|
|
33316
33304
|
logger.success(`Interactive canvas written to ${dest2}`);
|
|
33317
33305
|
logger.info("Open it in a browser \u2014 fully self-contained (works offline). Other formats: --format mermaid|drawio|excalidraw.");
|
|
33318
33306
|
return;
|
|
@@ -33325,17 +33313,14 @@ async function runDiagram(rawOptions = {}) {
|
|
|
33325
33313
|
return;
|
|
33326
33314
|
}
|
|
33327
33315
|
for (const file of files) {
|
|
33328
|
-
|
|
33329
|
-
|
|
33330
|
-
|
|
33331
|
-
|
|
33332
|
-
|
|
33333
|
-
const exportModel = buildCanvasModel();
|
|
33334
|
-
fs27.writeFileSync(path39.join(outDir, "architecture.drawio"), generateDrawioXml(exportModel), "utf-8");
|
|
33335
|
-
fs27.writeFileSync(path39.join(outDir, "architecture.excalidraw"), generateExcalidrawScene(exportModel), "utf-8");
|
|
33316
|
+
writeArtifact(path39.join(outDir, file.relPath), toMarkdown(file));
|
|
33317
|
+
}
|
|
33318
|
+
writeArtifact(path39.join(outDir, "canvas.html"), renderDiagram2("canvas"));
|
|
33319
|
+
writeArtifact(path39.join(outDir, "architecture.drawio"), renderDiagram2("drawio"));
|
|
33320
|
+
writeArtifact(path39.join(outDir, "architecture.excalidraw"), renderDiagram2("excalidraw"));
|
|
33336
33321
|
const graph = loadSpecGraph();
|
|
33337
33322
|
const indexPath = path39.join(outDir, "README.md");
|
|
33338
|
-
|
|
33323
|
+
writeArtifact(indexPath, diagramSetIndex(files, graph.systemName));
|
|
33339
33324
|
logger.success(`Generated ${files.length} diagram(s) + interactive canvas.html + index into ${outDir}`);
|
|
33340
33325
|
for (const file of files.slice(0, 12)) {
|
|
33341
33326
|
logger.info(` ${file.relPath}`);
|
|
@@ -33357,15 +33342,14 @@ async function runDiagram(rawOptions = {}) {
|
|
|
33357
33342
|
title = `${options.subsystem} \u2014 components`;
|
|
33358
33343
|
defaultDest = path39.join(diagramsDir, "subsystems", `${options.subsystem.replace(/::/g, "--")}.md`);
|
|
33359
33344
|
} else {
|
|
33360
|
-
mermaid =
|
|
33345
|
+
mermaid = renderDiagram2("mermaid");
|
|
33361
33346
|
title = "Component architecture";
|
|
33362
33347
|
defaultDest = path39.join(diagramsDir, "system.md");
|
|
33363
33348
|
}
|
|
33364
33349
|
const dest = options.out ?? defaultDest;
|
|
33365
|
-
ensureDir(path39.dirname(path39.resolve(dest)));
|
|
33366
33350
|
const content = dest.endsWith(".mmd") ? `${mermaid}
|
|
33367
33351
|
` : toMarkdown({ relPath: dest, title, mermaid });
|
|
33368
|
-
|
|
33352
|
+
writeArtifact(dest, content);
|
|
33369
33353
|
logger.success(`Mermaid diagram written to ${dest}`);
|
|
33370
33354
|
logger.info("Renders on GitHub/IDE previews; use a .mmd --out path for raw Mermaid.");
|
|
33371
33355
|
}
|
|
@@ -46598,7 +46582,6 @@ function startHostServer(cfg) {
|
|
|
46598
46582
|
|
|
46599
46583
|
// src/commands/host.ts
|
|
46600
46584
|
init_fs();
|
|
46601
|
-
init_canvas();
|
|
46602
46585
|
|
|
46603
46586
|
// src/core/demo-seed.ts
|
|
46604
46587
|
init_specs2();
|
|
@@ -47293,7 +47276,7 @@ async function runHostDemo(options = {}) {
|
|
|
47293
47276
|
const rec = createProject(cfg, cred, id, unitId);
|
|
47294
47277
|
const summary = runWithProjectRoot(rec.rootPath, () => {
|
|
47295
47278
|
seedDemoTree();
|
|
47296
|
-
const model =
|
|
47279
|
+
const model = buildCanvasDataModel();
|
|
47297
47280
|
return {
|
|
47298
47281
|
subsystems: model.subsystems.length,
|
|
47299
47282
|
components: model.components.length,
|