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.js CHANGED
@@ -3953,6 +3953,7 @@ async function upsertPage(instanceUrl, token, scope, id, slug, content) {
3953
3953
  await createWikiPage(instanceUrl, token, scope, id, slug, content);
3954
3954
  }
3955
3955
  }
3956
+ var EMPTY_FILE_SENTINEL = "__EMPTY_FILE__";
3956
3957
  function isMarkdownFile(path) {
3957
3958
  return path === "SKILL.md" || path.endsWith(".md") || path.endsWith(".markdown");
3958
3959
  }
@@ -4335,7 +4336,10 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
4335
4336
  args.project_id,
4336
4337
  `skill:${downloaded.name}`,
4337
4338
  `Scripts for skill "${downloaded.name}" (installed from skills.sh:${args.name})`,
4338
- scriptFiles.map((f) => ({ file_path: f.path, content: f.content || "\n" })),
4339
+ scriptFiles.map((f) => ({
4340
+ file_path: f.path,
4341
+ content: f.content.trim() ? f.content : EMPTY_FILE_SENTINEL
4342
+ })),
4339
4343
  "private"
4340
4344
  );
4341
4345
  snippetId = snippet.id;
@@ -4499,7 +4503,7 @@ Install: \`gitlab_skill_install(name="${r.identifier}", source="skills.sh")\``
4499
4503
  entry.snippetId,
4500
4504
  file.path
4501
4505
  );
4502
- writeFileSync(filePath, content);
4506
+ writeFileSync(filePath, content.trim() === EMPTY_FILE_SENTINEL ? "" : content);
4503
4507
  if (file.path.endsWith(".sh")) {
4504
4508
  chmodSync(filePath, 493);
4505
4509
  }