@diagc/cli 0.3.0 → 0.4.1
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/compile.js
CHANGED
|
@@ -2,7 +2,7 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { createJiti } from 'jiti';
|
|
5
|
-
import { composeIncludes, DiagramValidationError, validate, } from '@diagc/core';
|
|
5
|
+
import { composeIncludes, DiagramValidationError, diagramWarnings, validate, } from '@diagc/core';
|
|
6
6
|
import { resolveInclude } from './includes.js';
|
|
7
7
|
import { snapshotSession } from './snapshots.js';
|
|
8
8
|
/**
|
|
@@ -97,6 +97,10 @@ export async function compileFile(file, outDir, opts) {
|
|
|
97
97
|
if (issues.length > 0)
|
|
98
98
|
throw new DiagramValidationError(issues);
|
|
99
99
|
}
|
|
100
|
+
// Sound but probably not what was meant (a fishbone cause on no bone): say so,
|
|
101
|
+
// and compile anyway — the studio saves the same model without complaint.
|
|
102
|
+
for (const w of diagramWarnings(model))
|
|
103
|
+
console.warn(`${file}: ${w.message}`);
|
|
100
104
|
const base = path.basename(file).replace(/\.diagram\.(ts|json)$/, '');
|
|
101
105
|
const artifactDir = path.join(outDir, relativeSubdir(file, opts?.rootDir));
|
|
102
106
|
await mkdir(artifactDir, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diagc/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Author software-architecture diagrams as code, compile them to a validated model, edit them in a local studio, and publish pages and images.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"author": "Bogdan Frankovskyi",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"fast-glob": "^3.3.0",
|
|
45
45
|
"jiti": "^2.0.0",
|
|
46
46
|
"playwright-core": "^1.62.0",
|
|
47
|
-
"@diagc/core": "0.
|
|
47
|
+
"@diagc/core": "0.4.1"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|