@llman-sdd/cli 0.12.0 → 0.12.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/package.json +2 -2
- package/src/commands/review.ts +5 -2
- package/src/main.ts +17 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llman-sdd/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Spec-driven development workflow CLI (the `llman-sdd` command)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@hono/node-server": "^1.19.6",
|
|
34
34
|
"@inquirer/prompts": "^8.8.1",
|
|
35
|
-
"@llman-sdd/core": "0.12.
|
|
35
|
+
"@llman-sdd/core": "0.12.1",
|
|
36
36
|
"@modelcontextprotocol/server": "^2.4.0",
|
|
37
37
|
"commander": "^15.1.0",
|
|
38
38
|
"hono": "^4.10.6",
|
package/src/commands/review.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { writeFileSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
2
|
+
import { join, resolve } from 'node:path';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
buildReview,
|
|
@@ -68,7 +68,10 @@ export function registerReview(program: Command, ctx: CliContext): void {
|
|
|
68
68
|
});
|
|
69
69
|
if (options.exportHtml !== undefined) {
|
|
70
70
|
const template = templateIo.readText(join(TEMPLATES_ROOT, 'shared', 'review.html'));
|
|
71
|
-
writeFileSync(
|
|
71
|
+
writeFileSync(
|
|
72
|
+
resolve(ctx.cwd, options.exportHtml),
|
|
73
|
+
renderReviewHtml(template, result, now),
|
|
74
|
+
);
|
|
72
75
|
console.log(`wrote ${options.exportHtml}`);
|
|
73
76
|
}
|
|
74
77
|
emitReport({ signals: result.signals, summary: result.summary }, options, () =>
|
package/src/main.ts
CHANGED
|
@@ -96,20 +96,24 @@ async function main(): Promise<void> {
|
|
|
96
96
|
/**
|
|
97
97
|
* r107 execution guard with the Node 24.0/24.1 fallback: `import.meta.main`
|
|
98
98
|
* is undefined there (introduced in v24.2.0), so a bare check would silently
|
|
99
|
-
* skip every invocation.
|
|
100
|
-
* `
|
|
101
|
-
*
|
|
99
|
+
* skip every invocation. Compiled single-binary builds (`build-binary.ts`)
|
|
100
|
+
* also define `LLMAN_SDD_DEV_BUILD_COMPILED=1` because Bun 1.4.5's
|
|
101
|
+
* `Bun.build({ compile })` sets `import.meta.main` to `false` for Windows
|
|
102
|
+
* targets. The fallback compares the realpath-normalized `process.argv[1]`
|
|
103
|
+
* against this module's path — argv may be missing and the realpath may fail,
|
|
104
|
+
* both fold to "not the entry".
|
|
102
105
|
*/
|
|
103
106
|
const isEntry =
|
|
104
|
-
|
|
105
|
-
(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
process.env.LLMAN_SDD_DEV_BUILD_COMPILED === '1' ||
|
|
108
|
+
(import.meta.main ??
|
|
109
|
+
(() => {
|
|
110
|
+
try {
|
|
111
|
+
const invoked = process.argv[1];
|
|
112
|
+
if (invoked === undefined) return false;
|
|
113
|
+
return realpathSync(invoked) === realpathSync(import.meta.filename);
|
|
114
|
+
} catch {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
})());
|
|
114
118
|
|
|
115
119
|
if (isEntry) await main();
|