jettypod 4.2.4 → 4.2.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/jettypod.js +22 -11
- package/package.json +1 -1
package/jettypod.js
CHANGED
|
@@ -17,24 +17,35 @@ try {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Ensure
|
|
20
|
+
* Ensure jettypod-specific paths are gitignored and untracked
|
|
21
21
|
* Called during init and update to fix existing projects
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function ensureJettypodGitignores() {
|
|
24
24
|
const gitignorePath = path.join(process.cwd(), '.gitignore');
|
|
25
|
-
const
|
|
25
|
+
const entriesToIgnore = [
|
|
26
|
+
'.claude/session.md',
|
|
27
|
+
'.jettypod-work/'
|
|
28
|
+
];
|
|
26
29
|
|
|
27
|
-
// Add to .gitignore if not present
|
|
30
|
+
// Add entries to .gitignore if not present
|
|
28
31
|
let gitignoreContent = '';
|
|
29
32
|
if (fs.existsSync(gitignorePath)) {
|
|
30
33
|
gitignoreContent = fs.readFileSync(gitignorePath, 'utf-8');
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
let modified = false;
|
|
37
|
+
for (const entry of entriesToIgnore) {
|
|
38
|
+
if (!gitignoreContent.includes(entry)) {
|
|
39
|
+
const newEntry = gitignoreContent.endsWith('\n') || gitignoreContent === ''
|
|
40
|
+
? `${entry}\n`
|
|
41
|
+
: `\n${entry}\n`;
|
|
42
|
+
gitignoreContent += newEntry;
|
|
43
|
+
modified = true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (modified) {
|
|
48
|
+
fs.writeFileSync(gitignorePath, gitignoreContent);
|
|
38
49
|
}
|
|
39
50
|
|
|
40
51
|
// Untrack session.md if it's currently tracked
|
|
@@ -656,7 +667,7 @@ async function initializeProject() {
|
|
|
656
667
|
}
|
|
657
668
|
|
|
658
669
|
// Ensure .claude/session.md is gitignored and untracked
|
|
659
|
-
|
|
670
|
+
ensureJettypodGitignores();
|
|
660
671
|
|
|
661
672
|
const claudeSettingsPath = path.join('.claude', 'settings.json');
|
|
662
673
|
if (!fs.existsSync(claudeSettingsPath)) {
|
|
@@ -1032,7 +1043,7 @@ switch (command) {
|
|
|
1032
1043
|
}
|
|
1033
1044
|
|
|
1034
1045
|
// Ensure session.md is gitignored (fixes existing projects)
|
|
1035
|
-
|
|
1046
|
+
ensureJettypodGitignores();
|
|
1036
1047
|
}
|
|
1037
1048
|
|
|
1038
1049
|
process.exit(success ? 0 : 1);
|