opencode-gitlab-dap 1.15.3 → 1.15.4

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 CHANGED
@@ -4112,6 +4112,7 @@ async function upsertPage(instanceUrl, token, scope, id, slug, content) {
4112
4112
  await createWikiPage(instanceUrl, token, scope, id, slug, content);
4113
4113
  }
4114
4114
  }
4115
+ var EMPTY_FILE_SENTINEL = "__EMPTY_FILE__";
4115
4116
  function isMarkdownFile(path) {
4116
4117
  return path === "SKILL.md" || path.endsWith(".md") || path.endsWith(".markdown");
4117
4118
  }
@@ -4494,7 +4495,10 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
4494
4495
  args.project_id,
4495
4496
  `skill:${downloaded.name}`,
4496
4497
  `Scripts for skill "${downloaded.name}" (installed from skills.sh:${args.name})`,
4497
- scriptFiles.map((f) => ({ file_path: f.path, content: f.content || "\n" })),
4498
+ scriptFiles.map((f) => ({
4499
+ file_path: f.path,
4500
+ content: f.content.trim() ? f.content : EMPTY_FILE_SENTINEL
4501
+ })),
4498
4502
  "private"
4499
4503
  );
4500
4504
  snippetId = snippet.id;
@@ -4658,7 +4662,7 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
4658
4662
  entry.snippetId,
4659
4663
  file.path
4660
4664
  );
4661
- (0, import_fs2.writeFileSync)(filePath, content);
4665
+ (0, import_fs2.writeFileSync)(filePath, content.trim() === EMPTY_FILE_SENTINEL ? "" : content);
4662
4666
  if (file.path.endsWith(".sh")) {
4663
4667
  (0, import_fs2.chmodSync)(filePath, 493);
4664
4668
  }