arc42 and ArchiMate examples: nine models, three per framework; 1.2

The six models from extension 0.11.0 (arc42 by section, ArchiMate by
layer) next to the three C4 ones; model:scaffold --example offers them
and the tests validate each with 0 problems.
This commit is contained in:
root-at-skic committed 2026-11-08 22:57:00 +02:00
1 parent 21770c241d
commit d9777fb90e
74 files changed
+2768 -7

No files matched your search

@@ -16,6 +16,12 @@ export const EXAMPLES = {
'c4-standard-web-app': 'C4 - Standard Web App: single-page app, API, database, cache, file storage, identity provider',
'c4-e-shop': 'C4 - E-Shop: web shop, API, worker, queue, payment and email providers',
'c4-event-based-integration': 'C4 - Event-Based Integration: event bus, router, dead-letter queue, event store, consumers',
'arc42-cinema-tickets': 'arc42 - Cinema Tickets: context, building blocks, runtime and deployment; seat booking with payment',
'arc42-iot-telemetry': 'arc42 - IoT Telemetry: devices over MQTT, ingest, time-series store, alerting, dashboards',
'arc42-team-wiki': 'arc42 - Team Wiki: a small self-hosted wiki, the arc42 sections at their smallest',
'archimate-insurance-claims': 'ArchiMate - Insurance Claims: business, application and technology layers of claim handling',
'archimate-hr-onboarding': 'ArchiMate - HR Onboarding: onboarding a new employee across HR, identity and IT services',
'archimate-logistics-tracking': 'ArchiMate - Logistics Tracking: shipment tracking from pick-up to proof of delivery',
};
export const help = `model-scaffold — create main.archify (and with --c4 the C4 folders), or copy an example
+6 -4
View File
@@ -206,17 +206,19 @@ try {
assert(r.status === 0, `exit ${r.status}`);
});
// The shipped examples: the same three the extension offers under "Archify | New Model…".
// The shipped examples: the same nine the extension offers under "Archify | New Model…".
const examplesDir = path.join(skill, 'examples');
const exampleNames = fs.readdirSync(examplesDir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
check('examples/ holds exactly the three C4 examples', [], () => {
assert(exampleNames.join(',') === 'c4-e-shop,c4-event-based-integration,c4-standard-web-app', `unexpected examples: ${exampleNames.join(',')}`);
check('examples/ holds the nine examples: three C4, three arc42, three ArchiMate', [], () => {
const expected = 'arc42-cinema-tickets,arc42-iot-telemetry,arc42-team-wiki,archimate-hr-onboarding,archimate-insurance-claims,archimate-logistics-tracking,c4-e-shop,c4-event-based-integration,c4-standard-web-app';
assert(exampleNames.join(',') === expected, `unexpected examples: ${exampleNames.join(',')}`);
});
for (const name of exampleNames) {
check(`example ${name} validates with 0 problems`, ['--action', 'model-validate', '--dir', path.join(examplesDir, name)], (r) => {
assert(r.status === 0, `exit ${r.status}`);
assert(yamlValue(r.stdout, ' errors') === '0' && yamlValue(r.stdout, ' warnings') === '0', 'example has problems');
assert(yamlValue(r.stdout, ' diagrams') === '4', 'expected 4 diagrams');
const diagrams = Number(yamlValue(r.stdout, ' diagrams'));
assert(diagrams >= 4 && yamlValue(r.stdout, ' diagramsOk') === String(diagrams), `expected at least 4 diagrams, all ok (${diagrams})`);
});
}
const fromExample = path.join(tmp, 'from-example');