convene-cli 1.0.4 → 1.0.5
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/commands/init.js +6 -5
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -34,13 +34,15 @@ function upsertMarkerBlock(content, block) {
|
|
|
34
34
|
const sep = content.length === 0 ? '' : content.endsWith('\n') ? '\n' : '\n\n';
|
|
35
35
|
return content + sep + block + '\n';
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
// Every file this writes lives inside the git repo, so git history IS the backup —
|
|
38
|
+
// dropping a sibling `.bak` just litters the working tree (and shows up as untracked
|
|
39
|
+
// noise / risks being committed). The only `.bak` we keep is for the user's GLOBAL
|
|
40
|
+
// ~/.claude/settings.json, which is outside any repo (see registerHook).
|
|
41
|
+
function writeIfChanged(file, content) {
|
|
38
42
|
const exists = node_fs_1.default.existsSync(file);
|
|
39
43
|
const old = exists ? node_fs_1.default.readFileSync(file, 'utf8') : null;
|
|
40
44
|
if (old === content)
|
|
41
45
|
return 'unchanged';
|
|
42
|
-
if (exists && backup)
|
|
43
|
-
node_fs_1.default.writeFileSync(file + '.bak', old);
|
|
44
46
|
node_fs_1.default.writeFileSync(file, content);
|
|
45
47
|
return exists ? 'updated' : 'created';
|
|
46
48
|
}
|
|
@@ -81,8 +83,7 @@ function ensureGitignoreGuard(top) {
|
|
|
81
83
|
next = next + sep + guard;
|
|
82
84
|
}
|
|
83
85
|
if (next !== old) {
|
|
84
|
-
|
|
85
|
-
node_fs_1.default.writeFileSync(file + '.bak', old);
|
|
86
|
+
// .gitignore is git-tracked — no .bak (git history is the backup).
|
|
86
87
|
node_fs_1.default.writeFileSync(file, next);
|
|
87
88
|
}
|
|
88
89
|
// Belt-and-suspenders: confirm the join-token-bearing file is actually trackable.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "convene-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Convene CLI — AI development coordination bus client + UserPromptSubmit hook. Install: npm i -g convene-cli; then `convene setup`.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://dev.convene.live",
|