skillstogether 0.1.7 → 0.1.8

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -398,16 +398,19 @@ function generateSkillContent(skill, organizationSlug, filesChecksum) {
398
398
  const frontmatter = [
399
399
  "---",
400
400
  `name: ${escapeYaml(skill.name)}`,
401
+ skill.description ? `description: ${escapeYaml(skill.description)}` : null,
401
402
  `slug: ${escapeYaml(skill.slug)}`,
402
403
  `organization: ${escapeYaml(organizationSlug)}`,
403
- skill.description ? `description: ${escapeYaml(skill.description)}` : null,
404
- `createdBy: ${escapeYaml(skill.createdBy.name)}`,
404
+ skill.createdBy.name ? `createdBy: ${escapeYaml(skill.createdBy.name)}` : null,
405
405
  `installedAt: ${(/* @__PURE__ */ new Date()).toISOString()}`,
406
406
  filesChecksum ? `filesChecksum: ${filesChecksum}` : null,
407
- "---",
408
- ""
409
- ].filter(Boolean).join("\n");
410
- return frontmatter + (skill.content || "");
407
+ "---"
408
+ ].filter((line) => line !== null && line !== void 0).join("\n");
409
+ const body = skill.content || "";
410
+ const separator = body ? body.startsWith("\n") || body.startsWith("\r\n") ? "\n" : "\n\n" : "\n";
411
+ const content = frontmatter + separator + body;
412
+ return content.endsWith("\n") ? content : `${content}
413
+ `;
411
414
  }
412
415
  async function downloadFile(url) {
413
416
  return fetchWithSizeLimit(url, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillstogether",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "CLI tool to install skills",
5
5
  "keywords": [
6
6
  "cli",