@codyswann/lisa 2.133.3 → 2.134.0
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/doctor.d.ts +35 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +204 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +45 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/update-cmd.d.ts +39 -0
- package/dist/cli/update-cmd.d.ts.map +1 -0
- package/dist/cli/update-cmd.js +105 -0
- package/dist/cli/update-cmd.js.map +1 -0
- package/dist/cli/version-cmd.d.ts +29 -0
- package/dist/cli/version-cmd.d.ts.map +1 -0
- package/dist/cli/version-cmd.js +74 -0
- package/dist/cli/version-cmd.js.map +1 -0
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { runUpdateCheck } from "./update-check.js";
|
|
2
|
+
/** Status values emitted by Lisa doctor checks. */
|
|
3
|
+
type DoctorStatus = "ok" | "warn" | "fail";
|
|
4
|
+
/** One Lisa doctor check result. */
|
|
5
|
+
export interface DoctorCheck {
|
|
6
|
+
name: string;
|
|
7
|
+
status: DoctorStatus;
|
|
8
|
+
detail: string;
|
|
9
|
+
}
|
|
10
|
+
/** Machine-readable doctor result. */
|
|
11
|
+
export interface DoctorResult {
|
|
12
|
+
checks: DoctorCheck[];
|
|
13
|
+
}
|
|
14
|
+
/** Options parsed for `lisa doctor`. */
|
|
15
|
+
export interface DoctorOptions {
|
|
16
|
+
json?: boolean;
|
|
17
|
+
offline?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Runtime collaborators for doctor. */
|
|
20
|
+
export interface DoctorDependencies {
|
|
21
|
+
fetchImpl: typeof fetch;
|
|
22
|
+
runUpdateCheck: typeof runUpdateCheck;
|
|
23
|
+
setExitCode: (code: number) => void;
|
|
24
|
+
write: (message: string) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Run Lisa doctor checks.
|
|
28
|
+
* @param targetPath - Optional project path
|
|
29
|
+
* @param options - Parsed command options
|
|
30
|
+
* @param dependencies - Optional collaborators for tests
|
|
31
|
+
* @returns Doctor result
|
|
32
|
+
*/
|
|
33
|
+
export declare function runDoctor(targetPath: string | undefined, options: DoctorOptions, dependencies?: Partial<DoctorDependencies>): Promise<DoctorResult>;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,mDAAmD;AACnD,KAAK,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAM3C,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sCAAsC;AACtC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED,wCAAwC;AACxC,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,KAAK,CAAC;IACxB,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAmMD;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,aAAa,EACtB,YAAY,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC7C,OAAO,CAAC,YAAY,CAAC,CA8BvB"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import { createDetectorRegistry } from "../detection/index.js";
|
|
5
|
+
import { STARTERS } from "./starters.js";
|
|
6
|
+
import { runUpdateCheck } from "./update-check.js";
|
|
7
|
+
const VERSION_CHECK_NAME = "Lisa version current?";
|
|
8
|
+
const STARTER_HEALTH_NAME = "Starter health";
|
|
9
|
+
const PROJECT_CONFIG_CHECK_NAME = "Project Lisa config present?";
|
|
10
|
+
const DEFAULT_DEPENDENCIES = {
|
|
11
|
+
fetchImpl: fetch,
|
|
12
|
+
runUpdateCheck,
|
|
13
|
+
setExitCode: code => {
|
|
14
|
+
process.exitCode = code;
|
|
15
|
+
},
|
|
16
|
+
write: message => console.log(message),
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Check Lisa's installed version against npm.
|
|
20
|
+
* @param deps - Runtime dependencies
|
|
21
|
+
* @param offline - Skip network check
|
|
22
|
+
* @returns Doctor check result
|
|
23
|
+
*/
|
|
24
|
+
async function checkVersion(deps, offline) {
|
|
25
|
+
if (offline) {
|
|
26
|
+
return {
|
|
27
|
+
name: VERSION_CHECK_NAME,
|
|
28
|
+
status: "ok",
|
|
29
|
+
detail: "Skipped network check in offline mode",
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const result = await deps.runUpdateCheck();
|
|
33
|
+
if (result.isOutdated && result.latest) {
|
|
34
|
+
return {
|
|
35
|
+
name: VERSION_CHECK_NAME,
|
|
36
|
+
status: "warn",
|
|
37
|
+
detail: `Installed ${result.current}; latest is ${result.latest}`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
name: VERSION_CHECK_NAME,
|
|
42
|
+
status: result.latest ? "ok" : "warn",
|
|
43
|
+
detail: result.latest
|
|
44
|
+
? `Installed ${result.current}; latest is ${result.latest}`
|
|
45
|
+
: `Latest version unavailable${result.reason ? ` (${result.reason})` : ""}`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Validate Lisa project configuration files.
|
|
50
|
+
* @param targetPath - Project path to inspect
|
|
51
|
+
* @returns Doctor check result
|
|
52
|
+
*/
|
|
53
|
+
async function checkProjectConfig(targetPath) {
|
|
54
|
+
const configPaths = [".lisa.config.json", ".lisa.config.local.json"]
|
|
55
|
+
.map(fileName => path.join(targetPath, fileName))
|
|
56
|
+
.filter(configPath => existsSync(configPath));
|
|
57
|
+
if (configPaths.length === 0) {
|
|
58
|
+
return {
|
|
59
|
+
name: PROJECT_CONFIG_CHECK_NAME,
|
|
60
|
+
status: "warn",
|
|
61
|
+
detail: "No .lisa.config.json or .lisa.config.local.json found",
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
for (const configPath of configPaths) {
|
|
65
|
+
try {
|
|
66
|
+
JSON.parse(await readFile(configPath, "utf8"));
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
return {
|
|
70
|
+
name: PROJECT_CONFIG_CHECK_NAME,
|
|
71
|
+
status: "fail",
|
|
72
|
+
detail: `${path.basename(configPath)} is not parseable JSON: ${error instanceof Error ? error.message : String(error)}`,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
name: PROJECT_CONFIG_CHECK_NAME,
|
|
78
|
+
status: "ok",
|
|
79
|
+
detail: configPaths.map(configPath => path.basename(configPath)).join(", "),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Detect the target project type.
|
|
84
|
+
* @param targetPath - Project path to inspect
|
|
85
|
+
* @returns Doctor check result
|
|
86
|
+
*/
|
|
87
|
+
async function checkProjectType(targetPath) {
|
|
88
|
+
const detectorRegistry = createDetectorRegistry();
|
|
89
|
+
const detectedTypes = detectorRegistry.expandAndOrderTypes(await detectorRegistry.detectAll(targetPath));
|
|
90
|
+
if (detectedTypes.length === 0) {
|
|
91
|
+
return {
|
|
92
|
+
name: "Project type detection",
|
|
93
|
+
status: "warn",
|
|
94
|
+
detail: "No Lisa project type detected",
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
name: "Project type detection",
|
|
99
|
+
status: "ok",
|
|
100
|
+
detail: detectedTypes.join(", "),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Confirm starter repositories are reachable and marked as templates.
|
|
105
|
+
* @param deps - Runtime dependencies
|
|
106
|
+
* @param offline - Skip network checks
|
|
107
|
+
* @returns Doctor check result
|
|
108
|
+
*/
|
|
109
|
+
async function checkStarterHealth(deps, offline) {
|
|
110
|
+
if (offline) {
|
|
111
|
+
return {
|
|
112
|
+
name: STARTER_HEALTH_NAME,
|
|
113
|
+
status: "ok",
|
|
114
|
+
detail: "Skipped GitHub starter checks in offline mode",
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const checks = await Promise.all(Object.values(STARTERS).map(async (starter) => {
|
|
118
|
+
const failurePrefix = `${starter.repo}:`;
|
|
119
|
+
try {
|
|
120
|
+
const response = await deps.fetchImpl(`https://api.github.com/repos/${starter.owner}/${starter.repo}`);
|
|
121
|
+
if (!response.ok) {
|
|
122
|
+
return `${failurePrefix} http-${response.status}`;
|
|
123
|
+
}
|
|
124
|
+
const body = (await response.json());
|
|
125
|
+
if (body.is_template !== true) {
|
|
126
|
+
return `${failurePrefix} not-template`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return `${failurePrefix} unreachable`;
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}));
|
|
134
|
+
const failures = checks.filter((check) => check !== null);
|
|
135
|
+
return {
|
|
136
|
+
name: STARTER_HEALTH_NAME,
|
|
137
|
+
status: failures.length === 0 ? "ok" : "warn",
|
|
138
|
+
detail: failures.length === 0
|
|
139
|
+
? "Starter repositories are reachable templates"
|
|
140
|
+
: failures.join(", "),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Check basic wiki contract files when a wiki exists.
|
|
145
|
+
* @param targetPath - Project path to inspect
|
|
146
|
+
* @returns Doctor check result
|
|
147
|
+
*/
|
|
148
|
+
function checkWiki(targetPath) {
|
|
149
|
+
const wikiPath = path.join(targetPath, "wiki");
|
|
150
|
+
if (!existsSync(wikiPath)) {
|
|
151
|
+
return {
|
|
152
|
+
name: "Wiki health",
|
|
153
|
+
status: "ok",
|
|
154
|
+
detail: "No wiki directory present",
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
const required = [
|
|
158
|
+
"lisa-wiki.config.json",
|
|
159
|
+
"schema/llm-wiki-contract.md",
|
|
160
|
+
"index.md",
|
|
161
|
+
];
|
|
162
|
+
const missing = required.filter(fileName => {
|
|
163
|
+
return !existsSync(path.join(wikiPath, fileName));
|
|
164
|
+
});
|
|
165
|
+
return {
|
|
166
|
+
name: "Wiki health",
|
|
167
|
+
status: missing.length === 0 ? "ok" : "fail",
|
|
168
|
+
detail: missing.length === 0
|
|
169
|
+
? "Required wiki files are present"
|
|
170
|
+
: `Missing ${missing.join(", ")}`,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Run Lisa doctor checks.
|
|
175
|
+
* @param targetPath - Optional project path
|
|
176
|
+
* @param options - Parsed command options
|
|
177
|
+
* @param dependencies - Optional collaborators for tests
|
|
178
|
+
* @returns Doctor result
|
|
179
|
+
*/
|
|
180
|
+
export async function runDoctor(targetPath, options, dependencies = {}) {
|
|
181
|
+
const deps = { ...DEFAULT_DEPENDENCIES, ...dependencies };
|
|
182
|
+
const resolvedTarget = path.resolve(targetPath ?? process.cwd());
|
|
183
|
+
const checks = [
|
|
184
|
+
await checkVersion(deps, options.offline === true),
|
|
185
|
+
await checkProjectConfig(resolvedTarget),
|
|
186
|
+
await checkProjectType(resolvedTarget),
|
|
187
|
+
await checkStarterHealth(deps, options.offline === true),
|
|
188
|
+
checkWiki(resolvedTarget),
|
|
189
|
+
];
|
|
190
|
+
const result = { checks };
|
|
191
|
+
if (options.json) {
|
|
192
|
+
deps.write(JSON.stringify(result, null, 2));
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
deps.write(checks
|
|
196
|
+
.map(check => `${check.status.toUpperCase()} ${check.name}: ${check.detail}`)
|
|
197
|
+
.join("\n"));
|
|
198
|
+
}
|
|
199
|
+
if (checks.some(check => check.status === "fail")) {
|
|
200
|
+
deps.setExitCode(1);
|
|
201
|
+
}
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=doctor.js.map
|
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CAAC,IAAI,EAAE,CAAC;QACjB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,KAAK,CACR,MAAM;aACH,GAAG,CACF,KAAK,CAAC,EAAE,CACN,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,EAAE,CACjE;aACA,IAAI,CAAC,IAAI,CAAC,CACd,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { runApply } from "./apply.js";
|
|
3
|
+
import { runDoctor } from "./doctor.js";
|
|
3
4
|
import { printUpdateWarning } from "./print-update-warning.js";
|
|
4
5
|
import { runSetupProject } from "./setup-project.js";
|
|
6
|
+
import { runUpdate } from "./update-cmd.js";
|
|
5
7
|
import { runUpdateCheck } from "./update-check.js";
|
|
8
|
+
import { runVersion } from "./version-cmd.js";
|
|
6
9
|
/**
|
|
7
10
|
* Injectable collaborators for {@link createProgram}. Defaults wire the real
|
|
8
11
|
* apply action and npm update-check; tests override them to observe the program
|
|
@@ -13,6 +16,12 @@ export interface ProgramDependencies {
|
|
|
13
16
|
runApply: typeof runApply;
|
|
14
17
|
/** Creates a starter-backed project and applies Lisa overlays. */
|
|
15
18
|
runSetupProject: typeof runSetupProject;
|
|
19
|
+
/** Prints Lisa CLI version metadata. */
|
|
20
|
+
runVersion: typeof runVersion;
|
|
21
|
+
/** Prints or runs the package-manager update command. */
|
|
22
|
+
runUpdate: typeof runUpdate;
|
|
23
|
+
/** Diagnoses Lisa project health. */
|
|
24
|
+
runDoctor: typeof runDoctor;
|
|
16
25
|
/** Runs the non-fatal npm update check (defaults to {@link runUpdateCheck}). */
|
|
17
26
|
runUpdateCheck: typeof runUpdateCheck;
|
|
18
27
|
/** Prints the update warning (defaults to {@link printUpdateWarning}). */
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1B,kEAAkE;IAClE,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,wCAAwC;IACxC,UAAU,EAAE,OAAO,UAAU,CAAC;IAC9B,yDAAyD;IACzD,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,qCAAqC;IACrC,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,gFAAgF;IAChF,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,0EAA0E;IAC1E,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;CAC/C;AAuDD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,YAAY,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAC9C,OAAO,CA+DT;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -1,17 +1,57 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { runApply } from "./apply.js";
|
|
3
|
+
import { runDoctor } from "./doctor.js";
|
|
3
4
|
import { printUpdateWarning } from "./print-update-warning.js";
|
|
4
5
|
import { runSetupProject } from "./setup-project.js";
|
|
5
6
|
import { addSharedOptions } from "./shared-options.js";
|
|
6
7
|
import { SETUP_TYPES } from "./starters.js";
|
|
8
|
+
import { runUpdate } from "./update-cmd.js";
|
|
7
9
|
import { runUpdateCheck } from "./update-check.js";
|
|
10
|
+
import { runVersion } from "./version-cmd.js";
|
|
8
11
|
import { getPackageVersion } from "./version.js";
|
|
9
12
|
const DEFAULT_DEPENDENCIES = {
|
|
10
13
|
runApply,
|
|
11
14
|
runSetupProject,
|
|
15
|
+
runVersion,
|
|
16
|
+
runUpdate,
|
|
17
|
+
runDoctor,
|
|
12
18
|
runUpdateCheck,
|
|
13
19
|
printUpdateWarning,
|
|
14
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Register CLI maintenance commands that do not run the root update warning.
|
|
23
|
+
* @param program - Commander program to mutate
|
|
24
|
+
* @param deps - Program dependencies
|
|
25
|
+
* @returns The same Commander program
|
|
26
|
+
*/
|
|
27
|
+
function addMaintenanceCommands(program, deps) {
|
|
28
|
+
program
|
|
29
|
+
.command("version")
|
|
30
|
+
.description("Print Lisa CLI version info")
|
|
31
|
+
.action(async () => {
|
|
32
|
+
await deps.runVersion();
|
|
33
|
+
});
|
|
34
|
+
program
|
|
35
|
+
.command("update")
|
|
36
|
+
.description("Print (or run with --yes) the recommended package-manager update command")
|
|
37
|
+
.option("--yes", "Execute the update command after printing it")
|
|
38
|
+
.action(async (options) => {
|
|
39
|
+
const code = await deps.runUpdate(options);
|
|
40
|
+
if (code !== 0) {
|
|
41
|
+
process.exitCode = code;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
program
|
|
45
|
+
.command("doctor")
|
|
46
|
+
.description("Diagnose Lisa, project, starter, and wiki health")
|
|
47
|
+
.argument("[path]", "Project path to inspect")
|
|
48
|
+
.option("--json", "Emit JSON")
|
|
49
|
+
.option("--offline", "Skip network checks")
|
|
50
|
+
.action(async (targetPath, options) => {
|
|
51
|
+
await deps.runDoctor(targetPath, options);
|
|
52
|
+
});
|
|
53
|
+
return program;
|
|
54
|
+
}
|
|
15
55
|
/**
|
|
16
56
|
* Create and configure the CLI program.
|
|
17
57
|
*
|
|
@@ -36,7 +76,10 @@ export function createProgram(dependencies = {}) {
|
|
|
36
76
|
.option("--no-update-check", "Skip the npm latest-version check");
|
|
37
77
|
// Run the npm update-check once per invocation, before the matched action.
|
|
38
78
|
// It is non-fatal: a failed check never blocks the action from running.
|
|
39
|
-
program.hook("preAction", async () => {
|
|
79
|
+
program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
80
|
+
if (["doctor", "update", "version"].includes(actionCommand.name())) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
40
83
|
if (program.opts().updateCheck === false) {
|
|
41
84
|
return;
|
|
42
85
|
}
|
|
@@ -61,6 +104,7 @@ export function createProgram(dependencies = {}) {
|
|
|
61
104
|
.argument("[destination]", "Project name or path (default: ./<type>-app)")).action(async (destination, options) => {
|
|
62
105
|
await deps.runSetupProject(destination, options);
|
|
63
106
|
});
|
|
107
|
+
addMaintenanceCommands(program, deps);
|
|
64
108
|
return program;
|
|
65
109
|
}
|
|
66
110
|
export { createPrompter } from "./prompts.js";
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,E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IAEH,gBAAgB,CACd,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,uDAAuD,CAAC;SACpE,cAAc,CACb,eAAe,EACf,iBAAiB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAC3C;SACA,QAAQ,CAAC,eAAe,EAAE,8CAA8C,CAAC,CAC7E,CAAC,MAAM,CACN,KAAK,EACH,WAA+B,EAC/B,OAAuC,EACvC,EAAE;QACF,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC,CACF,CAAC;IAEF,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAEtC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
/** Options parsed for `lisa update`. */
|
|
3
|
+
export interface UpdateCommandOptions {
|
|
4
|
+
yes?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Runtime collaborators for the update command. */
|
|
7
|
+
export interface UpdateCommandDependencies {
|
|
8
|
+
/** Current working directory. */
|
|
9
|
+
cwd: string;
|
|
10
|
+
/** Environment map used for package-manager detection. */
|
|
11
|
+
env: NodeJS.ProcessEnv;
|
|
12
|
+
/** Spawn implementation used when --yes is passed. */
|
|
13
|
+
spawn: typeof spawn;
|
|
14
|
+
/** Write user-facing output. */
|
|
15
|
+
write: (message: string) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Detect the preferred package manager from the user agent or lockfiles.
|
|
19
|
+
* @param deps - Runtime dependencies
|
|
20
|
+
* @returns Package manager command
|
|
21
|
+
*/
|
|
22
|
+
export declare function detectPackageManager(deps: Pick<UpdateCommandDependencies, "cwd" | "env">): "npm" | "pnpm" | "yarn" | "bun";
|
|
23
|
+
/**
|
|
24
|
+
* Compose the global Lisa update command for a package manager.
|
|
25
|
+
* @param packageManager - Detected package manager
|
|
26
|
+
* @returns Command and arguments ready for spawn
|
|
27
|
+
*/
|
|
28
|
+
export declare function getUpdateCommand(packageManager: string): {
|
|
29
|
+
command: string;
|
|
30
|
+
args: string[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Run `lisa update`.
|
|
34
|
+
* @param options - Parsed command options
|
|
35
|
+
* @param dependencies - Optional collaborators for tests
|
|
36
|
+
* @returns Child exit code when --yes runs, otherwise 0
|
|
37
|
+
*/
|
|
38
|
+
export declare function runUpdate(options: UpdateCommandOptions, dependencies?: Partial<UpdateCommandDependencies>): Promise<number>;
|
|
39
|
+
//# sourceMappingURL=update-cmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-cmd.d.ts","sourceRoot":"","sources":["../../src/cli/update-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAM3C,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,oDAAoD;AACpD,MAAM,WAAW,yBAAyB;IACxC,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,sDAAsD;IACtD,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,gCAAgC;IAChC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAmBD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,CAAC,yBAAyB,EAAE,KAAK,GAAG,KAAK,CAAC,GACnD,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CA0BjC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAoBA;AAqBD;;;;;GAKG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,oBAAoB,EAC7B,YAAY,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACpD,OAAO,CAAC,MAAM,CAAC,CAUjB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
const LISA_LATEST_PACKAGE = "@codyswann/lisa@latest";
|
|
5
|
+
const DEFAULT_DEPENDENCIES = {
|
|
6
|
+
cwd: process.cwd(),
|
|
7
|
+
env: getProcessEnv(),
|
|
8
|
+
spawn,
|
|
9
|
+
write: message => console.log(message),
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Read process.env through one explicit, reviewable exception to the app-template
|
|
13
|
+
* env rule. The CLI needs externally supplied package-manager metadata.
|
|
14
|
+
* @returns Current process environment
|
|
15
|
+
*/
|
|
16
|
+
function getProcessEnv() {
|
|
17
|
+
// eslint-disable-next-line no-restricted-syntax -- CLI package-manager detection must read externally supplied process env once
|
|
18
|
+
return process.env;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Detect the preferred package manager from the user agent or lockfiles.
|
|
22
|
+
* @param deps - Runtime dependencies
|
|
23
|
+
* @returns Package manager command
|
|
24
|
+
*/
|
|
25
|
+
export function detectPackageManager(deps) {
|
|
26
|
+
const userAgent = deps.env.npm_config_user_agent ?? "";
|
|
27
|
+
if (userAgent.startsWith("pnpm")) {
|
|
28
|
+
return "pnpm";
|
|
29
|
+
}
|
|
30
|
+
if (userAgent.startsWith("yarn")) {
|
|
31
|
+
return "yarn";
|
|
32
|
+
}
|
|
33
|
+
if (userAgent.startsWith("bun")) {
|
|
34
|
+
return "bun";
|
|
35
|
+
}
|
|
36
|
+
if (userAgent.startsWith("npm")) {
|
|
37
|
+
return "npm";
|
|
38
|
+
}
|
|
39
|
+
if (existsSync(path.join(deps.cwd, "bun.lockb"))) {
|
|
40
|
+
return "bun";
|
|
41
|
+
}
|
|
42
|
+
if (existsSync(path.join(deps.cwd, "pnpm-lock.yaml"))) {
|
|
43
|
+
return "pnpm";
|
|
44
|
+
}
|
|
45
|
+
if (existsSync(path.join(deps.cwd, "yarn.lock"))) {
|
|
46
|
+
return "yarn";
|
|
47
|
+
}
|
|
48
|
+
return "npm";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Compose the global Lisa update command for a package manager.
|
|
52
|
+
* @param packageManager - Detected package manager
|
|
53
|
+
* @returns Command and arguments ready for spawn
|
|
54
|
+
*/
|
|
55
|
+
export function getUpdateCommand(packageManager) {
|
|
56
|
+
switch (packageManager) {
|
|
57
|
+
case "bun":
|
|
58
|
+
return { command: "bun", args: ["add", "-g", LISA_LATEST_PACKAGE] };
|
|
59
|
+
case "pnpm":
|
|
60
|
+
return {
|
|
61
|
+
command: "pnpm",
|
|
62
|
+
args: ["add", "-g", LISA_LATEST_PACKAGE],
|
|
63
|
+
};
|
|
64
|
+
case "yarn":
|
|
65
|
+
return {
|
|
66
|
+
command: "yarn",
|
|
67
|
+
args: ["global", "add", LISA_LATEST_PACKAGE],
|
|
68
|
+
};
|
|
69
|
+
default:
|
|
70
|
+
return {
|
|
71
|
+
command: "npm",
|
|
72
|
+
args: ["install", "-g", LISA_LATEST_PACKAGE],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Execute a child command and resolve to its exit code.
|
|
78
|
+
* @param deps - Runtime dependencies
|
|
79
|
+
* @param command - Executable name
|
|
80
|
+
* @param args - Command arguments
|
|
81
|
+
* @returns Child process exit code
|
|
82
|
+
*/
|
|
83
|
+
async function runSpawn(deps, command, args) {
|
|
84
|
+
return await new Promise((resolve, reject) => {
|
|
85
|
+
const child = deps.spawn(command, args, { stdio: "inherit" });
|
|
86
|
+
child.once("error", reject);
|
|
87
|
+
child.once("exit", code => resolve(code ?? 1));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Run `lisa update`.
|
|
92
|
+
* @param options - Parsed command options
|
|
93
|
+
* @param dependencies - Optional collaborators for tests
|
|
94
|
+
* @returns Child exit code when --yes runs, otherwise 0
|
|
95
|
+
*/
|
|
96
|
+
export async function runUpdate(options, dependencies = {}) {
|
|
97
|
+
const deps = { ...DEFAULT_DEPENDENCIES, ...dependencies };
|
|
98
|
+
const updateCommand = getUpdateCommand(detectPackageManager(deps));
|
|
99
|
+
deps.write([updateCommand.command, ...updateCommand.args].join(" "));
|
|
100
|
+
if (!options.yes) {
|
|
101
|
+
return 0;
|
|
102
|
+
}
|
|
103
|
+
return await runSpawn(deps, updateCommand.command, updateCommand.args);
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=update-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-cmd.js","sourceRoot":"","sources":["../../src/cli/update-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AAmBrD,MAAM,oBAAoB,GAA8B;IACtD,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;IAClB,GAAG,EAAE,aAAa,EAAE;IACpB,KAAK;IACL,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;CACvC,CAAC;AAEF;;;;GAIG;AACH,SAAS,aAAa;IACpB,gIAAgI;IAChI,OAAO,OAAO,CAAC,GAAG,CAAC;AACrB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAoD;IAEpD,MAAM,SAAS,GAAG,IAAI,C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OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { runUpdateCheck } from "./update-check.js";
|
|
2
|
+
import { getPackageVersion } from "./version.js";
|
|
3
|
+
/** Runtime collaborators for the version command. */
|
|
4
|
+
export interface VersionCommandDependencies {
|
|
5
|
+
/** Resolve the installed Lisa package version. */
|
|
6
|
+
getPackageVersion: typeof getPackageVersion;
|
|
7
|
+
/** Run Lisa's non-fatal latest-version check. */
|
|
8
|
+
runUpdateCheck: typeof runUpdateCheck;
|
|
9
|
+
/** Write user-facing output. */
|
|
10
|
+
write: (message: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the installed package path for the running CLI.
|
|
14
|
+
* @returns Absolute package root when discoverable
|
|
15
|
+
*/
|
|
16
|
+
export declare function getCliInstallPath(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Resolve the configured default harness for the current project.
|
|
19
|
+
* @param cwd - Project directory to inspect
|
|
20
|
+
* @returns Harness string used by Lisa when no flag overrides it
|
|
21
|
+
*/
|
|
22
|
+
export declare function readDefaultHarness(cwd?: string): Promise<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Run `lisa version`.
|
|
25
|
+
* @param dependencies - Optional collaborators for tests
|
|
26
|
+
* @returns Promise that resolves after output is written
|
|
27
|
+
*/
|
|
28
|
+
export declare function runVersion(dependencies?: Partial<VersionCommandDependencies>): Promise<void>;
|
|
29
|
+
//# sourceMappingURL=version-cmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-cmd.d.ts","sourceRoot":"","sources":["../../src/cli/version-cmd.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,qDAAqD;AACrD,MAAM,WAAW,0BAA0B;IACzC,kDAAkD;IAClD,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,iDAAiD;IACjD,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,gCAAgC;IAChC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAuBD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAI1C;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,SAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgB7E;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,YAAY,GAAE,OAAO,CAAC,0BAA0B,CAAM,GACrD,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { runUpdateCheck } from "./update-check.js";
|
|
6
|
+
import { getPackageVersion } from "./version.js";
|
|
7
|
+
const DEFAULT_DEPENDENCIES = {
|
|
8
|
+
getPackageVersion,
|
|
9
|
+
runUpdateCheck,
|
|
10
|
+
write: message => console.log(message),
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Find the nearest package.json above the current module path.
|
|
14
|
+
* @param startDir - Directory to start from
|
|
15
|
+
* @returns Absolute package.json path or null
|
|
16
|
+
*/
|
|
17
|
+
function findPackageJson(startDir) {
|
|
18
|
+
const candidate = path.join(startDir, "package.json");
|
|
19
|
+
if (existsSync(candidate)) {
|
|
20
|
+
return candidate;
|
|
21
|
+
}
|
|
22
|
+
const parent = path.dirname(startDir);
|
|
23
|
+
return parent === startDir ? null : findPackageJson(parent);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Resolve the installed package path for the running CLI.
|
|
27
|
+
* @returns Absolute package root when discoverable
|
|
28
|
+
*/
|
|
29
|
+
export function getCliInstallPath() {
|
|
30
|
+
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
31
|
+
const packageJson = findPackageJson(moduleDir);
|
|
32
|
+
return packageJson ? path.dirname(packageJson) : moduleDir;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the configured default harness for the current project.
|
|
36
|
+
* @param cwd - Project directory to inspect
|
|
37
|
+
* @returns Harness string used by Lisa when no flag overrides it
|
|
38
|
+
*/
|
|
39
|
+
export async function readDefaultHarness(cwd = process.cwd()) {
|
|
40
|
+
for (const fileName of [".lisa.config.local.json", ".lisa.config.json"]) {
|
|
41
|
+
const configPath = path.join(cwd, fileName);
|
|
42
|
+
try {
|
|
43
|
+
const parsed = JSON.parse(await readFile(configPath, "utf8"));
|
|
44
|
+
if (typeof parsed.harness === "string" && parsed.harness !== "") {
|
|
45
|
+
return parsed.harness;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// Missing or malformed project config falls back to the CLI default.
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return "claude";
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Run `lisa version`.
|
|
56
|
+
* @param dependencies - Optional collaborators for tests
|
|
57
|
+
* @returns Promise that resolves after output is written
|
|
58
|
+
*/
|
|
59
|
+
export async function runVersion(dependencies = {}) {
|
|
60
|
+
const deps = { ...DEFAULT_DEPENDENCIES, ...dependencies };
|
|
61
|
+
const localVersion = deps.getPackageVersion();
|
|
62
|
+
const updateResult = await deps.runUpdateCheck({
|
|
63
|
+
currentVersion: localVersion,
|
|
64
|
+
});
|
|
65
|
+
const latestVersion = updateResult.latest ?? "unavailable";
|
|
66
|
+
const harness = await readDefaultHarness();
|
|
67
|
+
deps.write([
|
|
68
|
+
`local: ${localVersion}`,
|
|
69
|
+
`latest: ${latestVersion}`,
|
|
70
|
+
`installPath: ${getCliInstallPath()}`,
|
|
71
|
+
`defaultHarness: ${harness}`,
|
|
72
|
+
].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AAE;QACrC,mBAAmB,OAAO,EAAE;KAC7B,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;AACJ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { CommanderError } from "commander";
|
|
2
3
|
import { createProgram } from "./cli/index.js";
|
|
3
4
|
/**
|
|
4
5
|
* Run the Lisa CLI entrypoint.
|
|
@@ -10,7 +11,17 @@ import { createProgram } from "./cli/index.js";
|
|
|
10
11
|
*/
|
|
11
12
|
async function main() {
|
|
12
13
|
const program = createProgram();
|
|
13
|
-
|
|
14
|
+
program.exitOverride();
|
|
15
|
+
try {
|
|
16
|
+
await program.parseAsync();
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
if (error instanceof CommanderError) {
|
|
20
|
+
process.exitCode = error.exitCode;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
14
25
|
}
|
|
15
26
|
main().catch(error => {
|
|
16
27
|
console.error("Error:", error instanceof Error ? error.message : String(error));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;GAOG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;GAOG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,OAAO,CAAC,YAAY,EAAE,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,cAAc,EAAE,CAAC;YACpC,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;YAClC,OAAO;QACT,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACnB,OAAO,CAAC,KAAK,CACX,QAAQ,EACR,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"lodash": ">=4.18.1"
|
|
84
84
|
},
|
|
85
85
|
"name": "@codyswann/lisa",
|
|
86
|
-
"version": "2.
|
|
86
|
+
"version": "2.134.0",
|
|
87
87
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
88
88
|
"main": "dist/index.js",
|
|
89
89
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.134.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.134.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.134.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.134.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.134.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|