@wairon/cli 5.1.1-dev.53 → 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 +20 -36
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +1 -1
- 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([
|
|
@@ -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()) {
|
|
@@ -33240,10 +33244,6 @@ var path39 = __toESM(require("path"));
|
|
|
33240
33244
|
init_logger();
|
|
33241
33245
|
init_loader();
|
|
33242
33246
|
init_fs();
|
|
33243
|
-
init_diagram();
|
|
33244
|
-
init_canvas();
|
|
33245
|
-
init_diagram_export();
|
|
33246
|
-
init_validation();
|
|
33247
33247
|
init_errors();
|
|
33248
33248
|
var FORMATS = ["mermaid", "canvas", "drawio", "excalidraw"];
|
|
33249
33249
|
function applyFormat(options) {
|
|
@@ -33260,18 +33260,9 @@ function applyFormat(options) {
|
|
|
33260
33260
|
// mermaid is the default path — no flag needed
|
|
33261
33261
|
};
|
|
33262
33262
|
}
|
|
33263
|
-
function
|
|
33264
|
-
try {
|
|
33265
|
-
const config = loadProjectConfig4();
|
|
33266
|
-
if (config) return validateSddTree({ rules: config.rules, projectType: config.projectType }).issues;
|
|
33267
|
-
} catch {
|
|
33268
|
-
}
|
|
33269
|
-
return validateSddTree().issues;
|
|
33270
|
-
}
|
|
33271
|
-
function writeCanvas(dest) {
|
|
33272
|
-
const model = buildCanvasModel(collectIssues());
|
|
33263
|
+
function writeArtifact(dest, content) {
|
|
33273
33264
|
ensureDir(path39.dirname(path39.resolve(dest)));
|
|
33274
|
-
fs27.writeFileSync(dest,
|
|
33265
|
+
fs27.writeFileSync(dest, content, "utf-8");
|
|
33275
33266
|
}
|
|
33276
33267
|
function parseSequenceRef(ref) {
|
|
33277
33268
|
const sep9 = ref.includes(":") ? ref.lastIndexOf(":") : ref.lastIndexOf(".");
|
|
@@ -33287,23 +33278,21 @@ async function runDiagram(rawOptions = {}) {
|
|
|
33287
33278
|
const options = applyFormat(rawOptions);
|
|
33288
33279
|
if (options.canvas && !options.all) {
|
|
33289
33280
|
const dest2 = options.out ?? path39.join(AI_PATHS.docsDir(), "diagrams", "canvas.html");
|
|
33290
|
-
|
|
33281
|
+
writeArtifact(dest2, renderDiagram2("canvas"));
|
|
33291
33282
|
logger.success(`Interactive canvas written to ${dest2}`);
|
|
33292
33283
|
logger.info("Open it in a browser \u2014 fully self-contained (works offline).");
|
|
33293
33284
|
return;
|
|
33294
33285
|
}
|
|
33295
33286
|
if (options.drawio && !options.all) {
|
|
33296
33287
|
const dest2 = options.out ?? path39.join(AI_PATHS.docsDir(), "diagrams", "architecture.drawio");
|
|
33297
|
-
|
|
33298
|
-
fs27.writeFileSync(dest2, generateDrawioXml(buildCanvasModel()), "utf-8");
|
|
33288
|
+
writeArtifact(dest2, renderDiagram2("drawio"));
|
|
33299
33289
|
logger.success(`draw.io diagram written to ${dest2}`);
|
|
33300
33290
|
logger.info("Open with draw.io / diagrams.net (or import into tools that accept the format).");
|
|
33301
33291
|
return;
|
|
33302
33292
|
}
|
|
33303
33293
|
if (options.excalidraw && !options.all) {
|
|
33304
33294
|
const dest2 = options.out ?? path39.join(AI_PATHS.docsDir(), "diagrams", "architecture.excalidraw");
|
|
33305
|
-
|
|
33306
|
-
fs27.writeFileSync(dest2, generateExcalidrawScene(buildCanvasModel()), "utf-8");
|
|
33295
|
+
writeArtifact(dest2, renderDiagram2("excalidraw"));
|
|
33307
33296
|
logger.success(`Excalidraw scene written to ${dest2}`);
|
|
33308
33297
|
logger.info("Open with excalidraw.com or the VS Code extension.");
|
|
33309
33298
|
return;
|
|
@@ -33311,7 +33300,7 @@ async function runDiagram(rawOptions = {}) {
|
|
|
33311
33300
|
const wantsMermaid = options.format?.toLowerCase().startsWith("mermaid") || !!options.subsystem || !!options.sequence;
|
|
33312
33301
|
if (!options.all && !options.sequence && !wantsMermaid) {
|
|
33313
33302
|
const dest2 = options.out ?? path39.join(AI_PATHS.docsDir(), "diagrams", "canvas.html");
|
|
33314
|
-
|
|
33303
|
+
writeArtifact(dest2, renderDiagram2("canvas"));
|
|
33315
33304
|
logger.success(`Interactive canvas written to ${dest2}`);
|
|
33316
33305
|
logger.info("Open it in a browser \u2014 fully self-contained (works offline). Other formats: --format mermaid|drawio|excalidraw.");
|
|
33317
33306
|
return;
|
|
@@ -33324,17 +33313,14 @@ async function runDiagram(rawOptions = {}) {
|
|
|
33324
33313
|
return;
|
|
33325
33314
|
}
|
|
33326
33315
|
for (const file of files) {
|
|
33327
|
-
|
|
33328
|
-
|
|
33329
|
-
|
|
33330
|
-
|
|
33331
|
-
|
|
33332
|
-
const exportModel = buildCanvasModel();
|
|
33333
|
-
fs27.writeFileSync(path39.join(outDir, "architecture.drawio"), generateDrawioXml(exportModel), "utf-8");
|
|
33334
|
-
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"));
|
|
33335
33321
|
const graph = loadSpecGraph();
|
|
33336
33322
|
const indexPath = path39.join(outDir, "README.md");
|
|
33337
|
-
|
|
33323
|
+
writeArtifact(indexPath, diagramSetIndex(files, graph.systemName));
|
|
33338
33324
|
logger.success(`Generated ${files.length} diagram(s) + interactive canvas.html + index into ${outDir}`);
|
|
33339
33325
|
for (const file of files.slice(0, 12)) {
|
|
33340
33326
|
logger.info(` ${file.relPath}`);
|
|
@@ -33356,15 +33342,14 @@ async function runDiagram(rawOptions = {}) {
|
|
|
33356
33342
|
title = `${options.subsystem} \u2014 components`;
|
|
33357
33343
|
defaultDest = path39.join(diagramsDir, "subsystems", `${options.subsystem.replace(/::/g, "--")}.md`);
|
|
33358
33344
|
} else {
|
|
33359
|
-
mermaid =
|
|
33345
|
+
mermaid = renderDiagram2("mermaid");
|
|
33360
33346
|
title = "Component architecture";
|
|
33361
33347
|
defaultDest = path39.join(diagramsDir, "system.md");
|
|
33362
33348
|
}
|
|
33363
33349
|
const dest = options.out ?? defaultDest;
|
|
33364
|
-
ensureDir(path39.dirname(path39.resolve(dest)));
|
|
33365
33350
|
const content = dest.endsWith(".mmd") ? `${mermaid}
|
|
33366
33351
|
` : toMarkdown({ relPath: dest, title, mermaid });
|
|
33367
|
-
|
|
33352
|
+
writeArtifact(dest, content);
|
|
33368
33353
|
logger.success(`Mermaid diagram written to ${dest}`);
|
|
33369
33354
|
logger.info("Renders on GitHub/IDE previews; use a .mmd --out path for raw Mermaid.");
|
|
33370
33355
|
}
|
|
@@ -46597,7 +46582,6 @@ function startHostServer(cfg) {
|
|
|
46597
46582
|
|
|
46598
46583
|
// src/commands/host.ts
|
|
46599
46584
|
init_fs();
|
|
46600
|
-
init_canvas();
|
|
46601
46585
|
|
|
46602
46586
|
// src/core/demo-seed.ts
|
|
46603
46587
|
init_specs2();
|
|
@@ -47292,7 +47276,7 @@ async function runHostDemo(options = {}) {
|
|
|
47292
47276
|
const rec = createProject(cfg, cred, id, unitId);
|
|
47293
47277
|
const summary = runWithProjectRoot(rec.rootPath, () => {
|
|
47294
47278
|
seedDemoTree();
|
|
47295
|
-
const model =
|
|
47279
|
+
const model = buildCanvasDataModel();
|
|
47296
47280
|
return {
|
|
47297
47281
|
subsystems: model.subsystems.length,
|
|
47298
47282
|
components: model.components.length,
|