loadouts 0.1.11 → 0.1.13
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/commands/activate.d.ts.map +1 -1
- package/dist/cli/commands/activate.js +1 -0
- package/dist/cli/commands/activate.js.map +1 -1
- package/dist/cli/commands/check.d.ts.map +1 -1
- package/dist/cli/commands/check.js +1 -0
- package/dist/cli/commands/check.js.map +1 -1
- package/dist/cli/commands/deactivate.d.ts.map +1 -1
- package/dist/cli/commands/deactivate.js +1 -0
- package/dist/cli/commands/deactivate.js.map +1 -1
- package/dist/cli/commands/diff.d.ts.map +1 -1
- package/dist/cli/commands/diff.js +1 -0
- package/dist/cli/commands/diff.js.map +1 -1
- package/dist/cli/commands/edit.d.ts.map +1 -1
- package/dist/cli/commands/edit.js +1 -0
- package/dist/cli/commands/edit.js.map +1 -1
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +1 -0
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +5 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +3 -0
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +1 -0
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/rule.d.ts.map +1 -1
- package/dist/cli/commands/rule.js +11 -0
- package/dist/cli/commands/rule.js.map +1 -1
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +11 -0
- package/dist/cli/commands/skill.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +1 -0
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +32 -0
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +45 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/core/fallback.d.ts +2 -2
- package/dist/core/fallback.d.ts.map +1 -1
- package/dist/core/fallback.js +16 -6
- package/dist/core/fallback.js.map +1 -1
- package/dist/core/render.d.ts +0 -1
- package/dist/core/render.d.ts.map +1 -1
- package/dist/core/render.js +8 -14
- package/dist/core/render.js.map +1 -1
- package/dist/lib/artifact-paths.d.ts.map +1 -1
- package/dist/lib/artifact-paths.js +7 -2
- package/dist/lib/artifact-paths.js.map +1 -1
- package/dist/lib/artifact-table.d.ts +1 -1
- package/dist/lib/artifact-table.d.ts.map +1 -1
- package/dist/lib/artifact-table.js +33 -13
- package/dist/lib/artifact-table.js.map +1 -1
- package/dist/lib/gitignore.d.ts +57 -12
- package/dist/lib/gitignore.d.ts.map +1 -1
- package/dist/lib/gitignore.js +207 -37
- package/dist/lib/gitignore.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/gitignore.js
CHANGED
|
@@ -1,44 +1,54 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Gitignore management —
|
|
2
|
+
* Gitignore management — per-target .gitignore files.
|
|
3
|
+
*
|
|
4
|
+
* Each tool's output directory (e.g., .claude/, .cursor/) gets its own
|
|
5
|
+
* .gitignore with paths relative to that directory. This ensures:
|
|
6
|
+
*
|
|
7
|
+
* - All artifacts are ignored regardless of activation state
|
|
8
|
+
* - Global scope is supported (same mechanism, absolute target dirs)
|
|
9
|
+
* - The project root .gitignore is not cluttered with tool-specific paths
|
|
10
|
+
*
|
|
11
|
+
* Gitignore is part of the artifact lifecycle (add/delete/import), not the
|
|
12
|
+
* render pipeline. Updates happen when artifacts are created or removed,
|
|
13
|
+
* not when loadouts are activated or synced.
|
|
3
14
|
*
|
|
4
15
|
* Uses markers to identify the managed section:
|
|
5
|
-
* # <
|
|
16
|
+
* # <loadouts>
|
|
6
17
|
* ...managed paths...
|
|
7
|
-
* # </
|
|
18
|
+
* # </loadouts>
|
|
8
19
|
*/
|
|
9
20
|
import * as path from "node:path";
|
|
10
|
-
import
|
|
21
|
+
import * as os from "node:os";
|
|
22
|
+
import { fileExists, readFile, writeFile, listFiles, listFilesWithExtension, isDirectory, } from "./fs.js";
|
|
23
|
+
import { registry } from "../core/registry.js";
|
|
24
|
+
import { expandTemplate } from "../core/template.js";
|
|
11
25
|
const START_MARKER = "# <loadouts>";
|
|
12
26
|
const END_MARKER = "# </loadouts>";
|
|
13
27
|
const HEADER_COMMENT = "# Auto-generated by loadouts. Do not edit this section.";
|
|
28
|
+
// Legacy markers from old naming convention
|
|
29
|
+
const LEGACY_START_MARKER = "# <loadout>";
|
|
30
|
+
const LEGACY_END_MARKER = "# </loadout>";
|
|
31
|
+
// Paths always ignored within .loadouts/
|
|
32
|
+
const LOADOUTS_STATE_PATHS = [".fallback-applied", ".state.json"];
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
// Core write function
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
14
36
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* - Creates .gitignore if it doesn't exist
|
|
18
|
-
* - Adds or updates the managed section between markers
|
|
19
|
-
* - Preserves all user content outside the markers
|
|
20
|
-
* - Removes the section entirely if managedPaths is empty
|
|
37
|
+
* Low-level: write the managed section to a specific .gitignore file path.
|
|
21
38
|
*/
|
|
22
|
-
|
|
23
|
-
const gitignorePath = path.join(projectRoot, ".gitignore");
|
|
24
|
-
// Always include the state file
|
|
25
|
-
const allPaths = [".loadouts/.state.json", ...managedPaths];
|
|
39
|
+
function updateGitignoreFile(gitignorePath, managedPaths) {
|
|
26
40
|
// Sort and deduplicate
|
|
27
|
-
const uniquePaths = [...new Set(
|
|
28
|
-
// Build the managed section content
|
|
41
|
+
const uniquePaths = [...new Set(managedPaths)].sort();
|
|
29
42
|
const managedSection = uniquePaths.length > 0
|
|
30
43
|
? `${START_MARKER}\n${HEADER_COMMENT}\n${uniquePaths.join("\n")}\n${END_MARKER}`
|
|
31
44
|
: "";
|
|
32
45
|
if (!fileExists(gitignorePath)) {
|
|
33
|
-
// Create new .gitignore with just the managed section
|
|
34
46
|
if (managedSection) {
|
|
35
47
|
writeFile(gitignorePath, managedSection + "\n");
|
|
36
48
|
}
|
|
37
49
|
return;
|
|
38
50
|
}
|
|
39
|
-
// Read existing content
|
|
40
51
|
const content = readFile(gitignorePath);
|
|
41
|
-
// Find existing managed section
|
|
42
52
|
const startIdx = content.indexOf(START_MARKER);
|
|
43
53
|
const endIdx = content.indexOf(END_MARKER);
|
|
44
54
|
if (startIdx !== -1 && endIdx !== -1 && endIdx > startIdx) {
|
|
@@ -46,21 +56,17 @@ export function updateGitignore(projectRoot, managedPaths) {
|
|
|
46
56
|
const before = content.slice(0, startIdx).trimEnd();
|
|
47
57
|
const after = content.slice(endIdx + END_MARKER.length).trimStart();
|
|
48
58
|
const parts = [before];
|
|
49
|
-
if (managedSection)
|
|
59
|
+
if (managedSection)
|
|
50
60
|
parts.push(managedSection);
|
|
51
|
-
|
|
52
|
-
if (after) {
|
|
61
|
+
if (after)
|
|
53
62
|
parts.push(after);
|
|
54
|
-
}
|
|
55
|
-
// Join with appropriate newlines
|
|
56
63
|
let newContent = parts.filter(Boolean).join("\n\n");
|
|
57
|
-
if (!newContent.endsWith("\n"))
|
|
64
|
+
if (!newContent.endsWith("\n"))
|
|
58
65
|
newContent += "\n";
|
|
59
|
-
}
|
|
60
66
|
writeFile(gitignorePath, newContent);
|
|
61
67
|
}
|
|
62
68
|
else {
|
|
63
|
-
// No existing section — append
|
|
69
|
+
// No existing section — append
|
|
64
70
|
if (!managedSection)
|
|
65
71
|
return;
|
|
66
72
|
let newContent = content.trimEnd();
|
|
@@ -68,30 +74,194 @@ export function updateGitignore(projectRoot, managedPaths) {
|
|
|
68
74
|
writeFile(gitignorePath, newContent);
|
|
69
75
|
}
|
|
70
76
|
}
|
|
77
|
+
// ---------------------------------------------------------------------------
|
|
78
|
+
// Public write functions
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
71
80
|
/**
|
|
72
|
-
*
|
|
81
|
+
* Update .gitignore within a specific target directory.
|
|
82
|
+
*
|
|
83
|
+
* @param targetDir - Absolute path to the target directory (e.g., /project/.claude or ~/.claude)
|
|
84
|
+
* @param relativePaths - Paths relative to targetDir (e.g., ["rules/foo.md", "skills/bar/"])
|
|
73
85
|
*/
|
|
74
|
-
export function
|
|
75
|
-
|
|
86
|
+
export function updateTargetGitignore(targetDir, relativePaths) {
|
|
87
|
+
updateGitignoreFile(path.join(targetDir, ".gitignore"), relativePaths);
|
|
76
88
|
}
|
|
77
89
|
/**
|
|
78
|
-
*
|
|
90
|
+
* Update .loadouts/.gitignore with state file entries.
|
|
91
|
+
* Always includes .state.json and .fallback-applied.
|
|
79
92
|
*/
|
|
80
|
-
export function
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
93
|
+
export function updateLoadoutsGitignore(loadoutsDir) {
|
|
94
|
+
updateGitignoreFile(path.join(loadoutsDir, ".gitignore"), LOADOUTS_STATE_PATHS);
|
|
95
|
+
}
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
// Path computation
|
|
98
|
+
// ---------------------------------------------------------------------------
|
|
99
|
+
/**
|
|
100
|
+
* Compute gitignore paths for an artifact, grouped by target directory.
|
|
101
|
+
*
|
|
102
|
+
* Returns a Map of targetBase (as stored in tool.basePath[scope]) →
|
|
103
|
+
* relative paths within that directory.
|
|
104
|
+
*
|
|
105
|
+
* Instruction artifacts (CLAUDE.md, AGENTS.md) that resolve outside the
|
|
106
|
+
* tool's base directory are automatically excluded.
|
|
107
|
+
*/
|
|
108
|
+
export function computeArtifactGitignorePaths(kindId, artifactName, scope = "project") {
|
|
109
|
+
const kind = registry.getKind(kindId);
|
|
110
|
+
if (!kind)
|
|
111
|
+
return new Map();
|
|
112
|
+
const byTarget = new Map();
|
|
113
|
+
for (const tool of registry.allTools()) {
|
|
114
|
+
if (!tool.supports.includes(kindId))
|
|
115
|
+
continue;
|
|
116
|
+
const mapping = registry.resolveMapping(tool.name, kindId);
|
|
117
|
+
if (!mapping)
|
|
118
|
+
continue;
|
|
119
|
+
const targetBase = tool.basePath[scope];
|
|
120
|
+
const ext = mapping.ext ?? (kind.layout === "file" ? ".md" : "");
|
|
121
|
+
const vars = {
|
|
122
|
+
base: targetBase,
|
|
123
|
+
home: os.homedir(),
|
|
124
|
+
stem: artifactName,
|
|
125
|
+
ext,
|
|
126
|
+
name: artifactName,
|
|
127
|
+
relative: `${kindId}s/${artifactName}${ext}`,
|
|
128
|
+
kind: kindId,
|
|
129
|
+
};
|
|
130
|
+
const pathTemplate = typeof mapping.path === "string" ? mapping.path : mapping.path[scope];
|
|
131
|
+
try {
|
|
132
|
+
const expandedPath = expandTemplate(pathTemplate, scope, vars);
|
|
133
|
+
// Compute the relative path within the target directory
|
|
134
|
+
const relPath = path.relative(targetBase, expandedPath);
|
|
135
|
+
// Skip if the path escapes the target directory (e.g., instruction
|
|
136
|
+
// artifacts that expand to CLAUDE.md or AGENTS.md at the project root)
|
|
137
|
+
if (relPath.startsWith(".."))
|
|
138
|
+
continue;
|
|
139
|
+
const existing = byTarget.get(targetBase) ?? [];
|
|
140
|
+
if (kind.layout === "dir") {
|
|
141
|
+
// Dir-layout: use trailing slash so all files within are covered
|
|
142
|
+
existing.push(relPath.endsWith("/") ? relPath : relPath + "/");
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
existing.push(relPath);
|
|
146
|
+
}
|
|
147
|
+
byTarget.set(targetBase, existing);
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
// Skip if template expansion fails
|
|
151
|
+
}
|
|
84
152
|
}
|
|
153
|
+
return byTarget;
|
|
154
|
+
}
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
// Rebuild
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
/**
|
|
159
|
+
* Rebuild gitignore entries for all artifacts in the loadouts directory.
|
|
160
|
+
*
|
|
161
|
+
* Scans all rules and skills and writes per-target .gitignore files so that
|
|
162
|
+
* every artifact is ignored regardless of whether it is currently activated.
|
|
163
|
+
* Called after artifact add/delete/import.
|
|
164
|
+
*
|
|
165
|
+
* @param loadoutsDir - Absolute path to .loadouts/ or ~/.config/loadouts/
|
|
166
|
+
* @param projectRoot - Project root for resolving relative target paths
|
|
167
|
+
* (unused for global scope since all paths are absolute)
|
|
168
|
+
* @param scope - "project" or "global"
|
|
169
|
+
*/
|
|
170
|
+
export function rebuildAllGitignores(loadoutsDir, projectRoot, scope) {
|
|
171
|
+
const rulesDir = path.join(loadoutsDir, "rules");
|
|
172
|
+
const skillsDir = path.join(loadoutsDir, "skills");
|
|
173
|
+
// Collect all paths grouped by target base
|
|
174
|
+
const allByTarget = new Map();
|
|
175
|
+
// Rules
|
|
176
|
+
for (const file of listFilesWithExtension(rulesDir, ".md")) {
|
|
177
|
+
const name = file.replace(/\.md$/, "");
|
|
178
|
+
mergeIntoMap(allByTarget, computeArtifactGitignorePaths("rule", name, scope));
|
|
179
|
+
}
|
|
180
|
+
// Skills
|
|
181
|
+
for (const name of listFiles(skillsDir).filter((d) => isDirectory(path.join(skillsDir, d)))) {
|
|
182
|
+
mergeIntoMap(allByTarget, computeArtifactGitignorePaths("skill", name, scope));
|
|
183
|
+
}
|
|
184
|
+
// Write per-target .gitignore files
|
|
185
|
+
for (const [targetBase, paths] of allByTarget) {
|
|
186
|
+
const absTargetDir = path.isAbsolute(targetBase)
|
|
187
|
+
? targetBase
|
|
188
|
+
: path.join(projectRoot, targetBase);
|
|
189
|
+
updateTargetGitignore(absTargetDir, paths);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
// Read helpers
|
|
194
|
+
// ---------------------------------------------------------------------------
|
|
195
|
+
/**
|
|
196
|
+
* Get the current managed paths from a target directory's .gitignore.
|
|
197
|
+
*/
|
|
198
|
+
export function getManagedPathsFromTarget(targetDir) {
|
|
199
|
+
return getManagedPathsFromFile(path.join(targetDir, ".gitignore"));
|
|
200
|
+
}
|
|
201
|
+
function getManagedPathsFromFile(gitignorePath) {
|
|
202
|
+
if (!fileExists(gitignorePath))
|
|
203
|
+
return [];
|
|
85
204
|
const content = readFile(gitignorePath);
|
|
86
205
|
const startIdx = content.indexOf(START_MARKER);
|
|
87
206
|
const endIdx = content.indexOf(END_MARKER);
|
|
88
|
-
if (startIdx === -1 || endIdx === -1 || endIdx <= startIdx)
|
|
207
|
+
if (startIdx === -1 || endIdx === -1 || endIdx <= startIdx)
|
|
89
208
|
return [];
|
|
90
|
-
}
|
|
91
209
|
const section = content.slice(startIdx + START_MARKER.length, endIdx);
|
|
92
210
|
return section
|
|
93
211
|
.split("\n")
|
|
94
212
|
.map((line) => line.trim())
|
|
95
213
|
.filter((line) => line && !line.startsWith("#"));
|
|
96
214
|
}
|
|
215
|
+
// ---------------------------------------------------------------------------
|
|
216
|
+
// Migration helper
|
|
217
|
+
// ---------------------------------------------------------------------------
|
|
218
|
+
/**
|
|
219
|
+
* Remove the legacy loadouts-managed section from the project root .gitignore.
|
|
220
|
+
* Handles both old (# <loadout>) and current (# <loadouts>) markers.
|
|
221
|
+
* Used by the `update` command to migrate from the old single-file approach.
|
|
222
|
+
*/
|
|
223
|
+
export function removeLegacyRootGitignoreSection(projectRoot) {
|
|
224
|
+
const gitignorePath = path.join(projectRoot, ".gitignore");
|
|
225
|
+
if (!fileExists(gitignorePath))
|
|
226
|
+
return;
|
|
227
|
+
let content = readFile(gitignorePath);
|
|
228
|
+
// Remove both new and old marker sections
|
|
229
|
+
content = removeMarkerSection(content, START_MARKER, END_MARKER);
|
|
230
|
+
content = removeMarkerSection(content, LEGACY_START_MARKER, LEGACY_END_MARKER);
|
|
231
|
+
// Clean up excess blank lines
|
|
232
|
+
content = content.replace(/\n{3,}/g, "\n\n").trimEnd();
|
|
233
|
+
if (content)
|
|
234
|
+
content += "\n";
|
|
235
|
+
writeFile(gitignorePath, content || "");
|
|
236
|
+
}
|
|
237
|
+
// ---------------------------------------------------------------------------
|
|
238
|
+
// Internal utilities
|
|
239
|
+
// ---------------------------------------------------------------------------
|
|
240
|
+
function removeMarkerSection(content, startMarker, endMarker) {
|
|
241
|
+
const startIdx = content.indexOf(startMarker);
|
|
242
|
+
const endIdx = content.indexOf(endMarker);
|
|
243
|
+
if (startIdx === -1 || endIdx === -1 || endIdx <= startIdx)
|
|
244
|
+
return content;
|
|
245
|
+
const before = content.slice(0, startIdx).trimEnd();
|
|
246
|
+
const after = content.slice(endIdx + endMarker.length).trimStart();
|
|
247
|
+
if (before && after)
|
|
248
|
+
return before + "\n\n" + after;
|
|
249
|
+
return before || after;
|
|
250
|
+
}
|
|
251
|
+
function mergeIntoMap(target, source) {
|
|
252
|
+
for (const [key, values] of source) {
|
|
253
|
+
const existing = target.get(key) ?? [];
|
|
254
|
+
target.set(key, [...existing, ...values]);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
// ---------------------------------------------------------------------------
|
|
258
|
+
// Deprecated — kept for migration use in update.ts
|
|
259
|
+
// ---------------------------------------------------------------------------
|
|
260
|
+
/**
|
|
261
|
+
* @deprecated Use getManagedPathsFromTarget instead.
|
|
262
|
+
* Still used by the update command to detect whether migration is needed.
|
|
263
|
+
*/
|
|
264
|
+
export function getManagedPaths(projectRoot) {
|
|
265
|
+
return getManagedPathsFromFile(path.join(projectRoot, ".gitignore"));
|
|
266
|
+
}
|
|
97
267
|
//# sourceMappingURL=gitignore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../../src/lib/gitignore.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../../src/lib/gitignore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MA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