@levr-one/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.
|
@@ -2076,6 +2076,12 @@ function* installSteps(harness, mcpUrl, opts) {
|
|
|
2076
2076
|
if (err instanceof UnsupportedConfigShapeError) return unsupportedShape(path$1, dryRun, scope, err.detail);
|
|
2077
2077
|
throw err;
|
|
2078
2078
|
}
|
|
2079
|
+
const shared = {};
|
|
2080
|
+
if (def.projectPath) {
|
|
2081
|
+
const root = resolveProjectRoot(env);
|
|
2082
|
+
const ignored = root.isRepo ? isGitIgnored(env, root.root, path$1) : void 0;
|
|
2083
|
+
if (ignored !== void 0) shared.gitIgnored = ignored;
|
|
2084
|
+
}
|
|
2079
2085
|
if (alreadyConfigured) return {
|
|
2080
2086
|
ok: true,
|
|
2081
2087
|
wrote: false,
|
|
@@ -2083,7 +2089,8 @@ function* installSteps(harness, mcpUrl, opts) {
|
|
|
2083
2089
|
alreadyConfigured: true,
|
|
2084
2090
|
dryRun,
|
|
2085
2091
|
scope,
|
|
2086
|
-
preview: nextText
|
|
2092
|
+
preview: nextText,
|
|
2093
|
+
...shared
|
|
2087
2094
|
};
|
|
2088
2095
|
const backupPath = backupPathFor(path$1, adapter.backupSuffix);
|
|
2089
2096
|
if (dryRun) return {
|
|
@@ -2095,7 +2102,8 @@ function* installSteps(harness, mcpUrl, opts) {
|
|
|
2095
2102
|
scope,
|
|
2096
2103
|
preview: nextText,
|
|
2097
2104
|
...replaced,
|
|
2098
|
-
...backupPath ? { backupPath } : {}
|
|
2105
|
+
...backupPath ? { backupPath } : {},
|
|
2106
|
+
...shared
|
|
2099
2107
|
};
|
|
2100
2108
|
const finalText = nextText.endsWith("\n") ? nextText : `${nextText}\n`;
|
|
2101
2109
|
try {
|
|
@@ -2114,7 +2122,8 @@ function* installSteps(harness, mcpUrl, opts) {
|
|
|
2114
2122
|
scope,
|
|
2115
2123
|
preview: finalText,
|
|
2116
2124
|
...replaced,
|
|
2117
|
-
...backupPath ? { backupPath } : {}
|
|
2125
|
+
...backupPath ? { backupPath } : {},
|
|
2126
|
+
...shared
|
|
2118
2127
|
};
|
|
2119
2128
|
}
|
|
2120
2129
|
/**
|
|
@@ -2704,6 +2713,7 @@ function outcomeLine(o, dryRun, switchCommand, entryName) {
|
|
|
2704
2713
|
const harness = getHarness(o.id);
|
|
2705
2714
|
const scopeNote = harness ? scopeDef(harness, r.scope)?.note : void 0;
|
|
2706
2715
|
const caveat = scopeNote ? ` [${scopeNote}]` : "";
|
|
2716
|
+
const unshared = r.gitIgnored === true && r.scope === "project" ? " [path is git-ignored — not shared via git]" : "";
|
|
2707
2717
|
const note = (o.entryName ? ` [as ${o.entryName}]` : "") + (o.fallbackFrom ? ` [${o.fallbackFrom} scope unsupported — used ${r.scope}]` : "");
|
|
2708
2718
|
const where = r.path ? ` → ${r.path}` : "";
|
|
2709
2719
|
const backup = r.backupPath ? dryRun ? ` [original would be backed up to ${r.backupPath}]` : ` [original backed up to ${r.backupPath}]` : "";
|
|
@@ -2712,14 +2722,14 @@ function outcomeLine(o, dryRun, switchCommand, entryName) {
|
|
|
2712
2722
|
if (o.entryName) return `${o.label}: failed [as ${o.entryName}] — ${failureText(o, void 0, o.entryName)}`;
|
|
2713
2723
|
return `${o.label}: failed — ${failureText(o, switchCommand, entryName)}`;
|
|
2714
2724
|
}
|
|
2715
|
-
if (r.alreadyConfigured) return `${o.label}: already set up (${r.scope})${where}${note}${caveat}`;
|
|
2725
|
+
if (r.alreadyConfigured) return `${o.label}: already set up (${r.scope})${where}${note}${unshared}${caveat}`;
|
|
2716
2726
|
if (r.command) {
|
|
2717
2727
|
if (r.executed) return `${o.label}: installed (${r.scope}) via \`${r.command}\`${replaced}${note}${caveat}`;
|
|
2718
2728
|
return `${o.label} (${r.scope}): run \`${r.command}\`${replaced}${note}${caveat}`;
|
|
2719
2729
|
}
|
|
2720
|
-
if (dryRun) return `${o.label}: would update (${r.scope})${where} (dry run — no changes)${backup}${replaced}${note}${caveat}`;
|
|
2721
|
-
if (r.wrote) return `${o.label}: installed (${r.scope})${where}${backup}${replaced}${note}${caveat}`;
|
|
2722
|
-
return `${o.label}: no change (${r.scope})${where}${note}${caveat}`;
|
|
2730
|
+
if (dryRun) return `${o.label}: would update (${r.scope})${where} (dry run — no changes)${backup}${replaced}${note}${unshared}${caveat}`;
|
|
2731
|
+
if (r.wrote) return `${o.label}: installed (${r.scope})${where}${backup}${replaced}${note}${unshared}${caveat}`;
|
|
2732
|
+
return `${o.label}: no change (${r.scope})${where}${note}${unshared}${caveat}`;
|
|
2723
2733
|
}
|
|
2724
2734
|
/** Render a report as a plain multi-line summary (used by the CLI + tests). */
|
|
2725
2735
|
function formatReport(report) {
|
|
@@ -2743,7 +2753,9 @@ function nextStepsText(report) {
|
|
|
2743
2753
|
if (report.dryRun) return "Dry run — re-run without --dry-run to apply these changes.";
|
|
2744
2754
|
if (!report.outcomes.some((o) => o.result.ok && !o.result.alreadyConfigured && (o.result.wrote || o.result.executed || o.result.command))) return report.outcomes.some((o) => !o.result.ok) ? "Nothing was installed." : "Nothing to do.";
|
|
2745
2755
|
const lines = ["Next: restart the client(s) above — each will prompt you to authorize", "Levr once in the browser. Then ask it: \"What issues are assigned to me?\""];
|
|
2746
|
-
|
|
2756
|
+
const projectWrites = report.outcomes.filter((o) => o.result.scope === "project" && o.result.wrote);
|
|
2757
|
+
if (projectWrites.some((o) => o.result.gitIgnored !== true)) lines.push("", "Project-scoped config was written into this repository — commit it to", "share the Levr MCP with everyone who checks it out.");
|
|
2758
|
+
if (projectWrites.some((o) => o.result.gitIgnored === true)) lines.push("", "A project-scoped file above is git-ignored, so it stays on this machine.", "To share it, un-ignore that path (a `!` rule in .gitignore) or use --scope user.");
|
|
2747
2759
|
return lines.join("\n");
|
|
2748
2760
|
}
|
|
2749
2761
|
|
package/dist/cli.js
CHANGED
|
@@ -224,7 +224,7 @@ Examples:
|
|
|
224
224
|
aliases: { y: "yes" }
|
|
225
225
|
},
|
|
226
226
|
loader: async () => {
|
|
227
|
-
const { mcpAddHandler } = await import("./addHandler-
|
|
227
|
+
const { mcpAddHandler } = await import("./addHandler-QVX0ltyN.js");
|
|
228
228
|
return mcpAddHandler;
|
|
229
229
|
}
|
|
230
230
|
});
|
|
@@ -914,7 +914,7 @@ Examples:
|
|
|
914
914
|
|
|
915
915
|
//#endregion
|
|
916
916
|
//#region package.json
|
|
917
|
-
var version = "0.12.
|
|
917
|
+
var version = "0.12.1";
|
|
918
918
|
|
|
919
919
|
//#endregion
|
|
920
920
|
//#region src/app.ts
|