@tarcisiopgs/lisa 1.18.0 → 1.18.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/README.md +5 -0
- package/dist/index.js +22 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,6 +193,11 @@ overseer:
|
|
|
193
193
|
check_interval: 30 # seconds between git status checks
|
|
194
194
|
stuck_threshold: 300 # seconds without changes before killing
|
|
195
195
|
|
|
196
|
+
# Optional — Docker infrastructure management (disabled by default)
|
|
197
|
+
lifecycle:
|
|
198
|
+
mode: auto # "auto" = start/stop services, "skip" = disabled (default), "validate-only" = fail if not running
|
|
199
|
+
timeout: 30 # seconds per service to wait on startup
|
|
200
|
+
|
|
196
201
|
# Optional — skip issues without acceptance criteria
|
|
197
202
|
validation:
|
|
198
203
|
require_acceptance_criteria: true
|
package/dist/index.js
CHANGED
|
@@ -1872,7 +1872,7 @@ async function verifyPlatformCredential(platform2) {
|
|
|
1872
1872
|
return;
|
|
1873
1873
|
}
|
|
1874
1874
|
}
|
|
1875
|
-
async function detectGitRepos() {
|
|
1875
|
+
async function detectGitRepos(existingRepos = []) {
|
|
1876
1876
|
const cwd = process.cwd();
|
|
1877
1877
|
if (existsSync3(join10(cwd, ".git"))) {
|
|
1878
1878
|
clack.log.info("Found a git repository in the current directory.");
|
|
@@ -1880,19 +1880,32 @@ async function detectGitRepos() {
|
|
|
1880
1880
|
}
|
|
1881
1881
|
const entries = readdirSync(cwd, { withFileTypes: true });
|
|
1882
1882
|
const gitDirs = entries.filter((e) => e.isDirectory() && existsSync3(join10(cwd, e.name, ".git"))).map((e) => e.name);
|
|
1883
|
-
|
|
1883
|
+
const existingDirs = existingRepos.map((r) => r.path.replace(/^\.\//, ""));
|
|
1884
|
+
const missingDirs = existingDirs.filter((d) => !gitDirs.includes(d));
|
|
1885
|
+
if (gitDirs.length === 0 && missingDirs.length === 0) {
|
|
1884
1886
|
return [];
|
|
1885
1887
|
}
|
|
1888
|
+
const options = [
|
|
1889
|
+
...gitDirs.map((dir) => ({ value: dir, label: dir, disabled: false })),
|
|
1890
|
+
...missingDirs.map((dir) => ({
|
|
1891
|
+
value: dir,
|
|
1892
|
+
label: dir,
|
|
1893
|
+
hint: "(not found on disk)",
|
|
1894
|
+
disabled: true
|
|
1895
|
+
}))
|
|
1896
|
+
];
|
|
1897
|
+
const initialValues = existingDirs.filter((d) => gitDirs.includes(d));
|
|
1886
1898
|
const selected = await clack.multiselect({
|
|
1887
1899
|
message: "Multiple git repositories found \u2014 which ones should Lisa work on?",
|
|
1888
|
-
options
|
|
1900
|
+
options,
|
|
1901
|
+
initialValues
|
|
1889
1902
|
});
|
|
1890
1903
|
if (clack.isCancel(selected)) return process.exit(0);
|
|
1891
1904
|
return selected.map((dir) => ({
|
|
1892
1905
|
name: getGitRepoName(join10(cwd, dir)) ?? dir,
|
|
1893
1906
|
path: `./${dir}`,
|
|
1894
|
-
match: "",
|
|
1895
|
-
base_branch: ""
|
|
1907
|
+
match: existingRepos.find((r) => r.path === `./${dir}`)?.match ?? "",
|
|
1908
|
+
base_branch: existingRepos.find((r) => r.path === `./${dir}`)?.base_branch ?? ""
|
|
1896
1909
|
}));
|
|
1897
1910
|
}
|
|
1898
1911
|
function detectDefaultBranch(repoPath) {
|
|
@@ -2304,7 +2317,7 @@ This will cause Lisa to re-pick the issue on recovery. Consider using a differen
|
|
|
2304
2317
|
});
|
|
2305
2318
|
if (clack2.isCancel(workflowAnswer)) return process.exit(0);
|
|
2306
2319
|
const workflow = workflowAnswer;
|
|
2307
|
-
const repos = await detectGitRepos();
|
|
2320
|
+
const repos = await detectGitRepos(initial?.repos ?? []);
|
|
2308
2321
|
let baseBranch = "main";
|
|
2309
2322
|
const cwd = process.cwd();
|
|
2310
2323
|
if (repos.length === 0) {
|
|
@@ -5558,20 +5571,11 @@ function discoverDockerCompose(cwd) {
|
|
|
5558
5571
|
resources.push({
|
|
5559
5572
|
name: serviceName,
|
|
5560
5573
|
check_port: hostPort,
|
|
5561
|
-
up:
|
|
5562
|
-
down:
|
|
5574
|
+
up: `docker compose up -d ${serviceName}`,
|
|
5575
|
+
down: `docker compose stop ${serviceName}`,
|
|
5563
5576
|
startup_timeout: 30
|
|
5564
5577
|
});
|
|
5565
5578
|
}
|
|
5566
|
-
if (resources.length > 1) {
|
|
5567
|
-
for (let i = 1; i < resources.length; i++) {
|
|
5568
|
-
const r = resources[i];
|
|
5569
|
-
if (r) {
|
|
5570
|
-
r.up = "true";
|
|
5571
|
-
r.down = "true";
|
|
5572
|
-
}
|
|
5573
|
-
}
|
|
5574
|
-
}
|
|
5575
5579
|
return resources;
|
|
5576
5580
|
}
|
|
5577
5581
|
function discoverSetupCommands(cwd) {
|
|
@@ -5755,7 +5759,7 @@ async function startResources(infra, baseCwd) {
|
|
|
5755
5759
|
return { success: true, env: allocatedEnv };
|
|
5756
5760
|
}
|
|
5757
5761
|
async function runLifecycle(infra, lifecycle, baseCwd) {
|
|
5758
|
-
const mode = lifecycle?.mode ?? "
|
|
5762
|
+
const mode = lifecycle?.mode ?? "skip";
|
|
5759
5763
|
if (mode === "skip") {
|
|
5760
5764
|
return { success: true, env: {} };
|
|
5761
5765
|
}
|