opencode-gitlab-dap 1.15.0 → 1.15.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/dist/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4192,14 +4192,28 @@ async function upsertPage(instanceUrl, token, scope, id, slug, content) {
|
|
|
4192
4192
|
function isMarkdownFile(path) {
|
|
4193
4193
|
return path === "SKILL.md" || path.endsWith(".md") || path.endsWith(".markdown");
|
|
4194
4194
|
}
|
|
4195
|
+
function isAgentsGitignored(dir) {
|
|
4196
|
+
try {
|
|
4197
|
+
(0, import_child_process.execSync)("git check-ignore -q .agents", { cwd: dir, stdio: "pipe" });
|
|
4198
|
+
return true;
|
|
4199
|
+
} catch {
|
|
4200
|
+
return false;
|
|
4201
|
+
}
|
|
4202
|
+
}
|
|
4195
4203
|
function ensureGitignore(dir) {
|
|
4204
|
+
if (isAgentsGitignored(dir)) return;
|
|
4196
4205
|
const gitignorePath = (0, import_path2.join)(dir, ".gitignore");
|
|
4197
4206
|
if ((0, import_fs2.existsSync)(gitignorePath)) {
|
|
4198
4207
|
const content = (0, import_fs2.readFileSync)(gitignorePath, "utf-8");
|
|
4199
|
-
|
|
4200
|
-
|
|
4208
|
+
(0, import_fs2.writeFileSync)(
|
|
4209
|
+
gitignorePath,
|
|
4210
|
+
content.trimEnd() + "\n\n# Agent skills cache (managed by opencode-gitlab-dap)\n.agents/\n"
|
|
4211
|
+
);
|
|
4201
4212
|
} else {
|
|
4202
|
-
(0, import_fs2.writeFileSync)(
|
|
4213
|
+
(0, import_fs2.writeFileSync)(
|
|
4214
|
+
gitignorePath,
|
|
4215
|
+
"# Agent skills cache (managed by opencode-gitlab-dap)\n.agents/\n"
|
|
4216
|
+
);
|
|
4203
4217
|
}
|
|
4204
4218
|
}
|
|
4205
4219
|
function searchSkillsSh(query) {
|