@donartcha/openlag 0.1.1 → 0.1.2
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/openlag.js +3 -1
- package/package.json +1 -1
- package/scripts/cli/openlag.ts +3 -1
package/dist/cli/openlag.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// scripts/cli/openlag.ts
|
|
4
4
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
5
|
+
import { readFileSync } from "fs";
|
|
5
6
|
import path8 from "path";
|
|
6
7
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
7
8
|
import chalk6 from "chalk";
|
|
@@ -1741,6 +1742,7 @@ function lintDocs(profile, jsonOutput = false, strictWarnings = false) {
|
|
|
1741
1742
|
// scripts/cli/openlag.ts
|
|
1742
1743
|
var program = new Command();
|
|
1743
1744
|
var packageRoot = path8.resolve(path8.dirname(fileURLToPath3(import.meta.url)), "../..");
|
|
1745
|
+
var pkg = JSON.parse(readFileSync(path8.join(packageRoot, "package.json"), "utf8"));
|
|
1744
1746
|
function runVitePreview() {
|
|
1745
1747
|
const viteBin = resolveViteBin(import.meta.url);
|
|
1746
1748
|
execFileSync2(process.execPath, [viteBin, "preview", "--outDir", path8.join(process.cwd(), "dist")], {
|
|
@@ -1752,7 +1754,7 @@ function runVitePreview() {
|
|
|
1752
1754
|
stdio: "inherit"
|
|
1753
1755
|
});
|
|
1754
1756
|
}
|
|
1755
|
-
program.name("openlag").description("Architecture as Code traceability graph generator").version(
|
|
1757
|
+
program.name("openlag").description("Architecture as Code traceability graph generator").version(pkg.version);
|
|
1756
1758
|
program.command("init").description("Initialize a new OpenLAG project").option("-n, --name <name>", "Project name").option("-d, --desc <description>", "Project description").option("--all", "Include optional synthetic relations").action((options) => {
|
|
1757
1759
|
initProject(options.name, options.desc, options.all);
|
|
1758
1760
|
});
|
package/package.json
CHANGED
package/scripts/cli/openlag.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { execFileSync } from 'child_process';
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
3
4
|
import path from 'path';
|
|
4
5
|
import { fileURLToPath } from 'url';
|
|
5
6
|
|
|
@@ -15,6 +16,7 @@ import { resolveViteBin } from './vite-bin.js';
|
|
|
15
16
|
|
|
16
17
|
const program = new Command();
|
|
17
18
|
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
|
|
19
|
+
const pkg = JSON.parse(readFileSync(path.join(packageRoot, 'package.json'), 'utf8')) as { version: string };
|
|
18
20
|
|
|
19
21
|
function runVitePreview() {
|
|
20
22
|
const viteBin = resolveViteBin(import.meta.url);
|
|
@@ -28,7 +30,7 @@ function runVitePreview() {
|
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
program.name('openlag').description('Architecture as Code traceability graph generator').version(
|
|
33
|
+
program.name('openlag').description('Architecture as Code traceability graph generator').version(pkg.version);
|
|
32
34
|
|
|
33
35
|
program
|
|
34
36
|
.command('init')
|