ht-skills 0.2.13 → 0.2.15

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/lib/cli.js +16 -5
  2. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -421,12 +421,12 @@ function formatInstallError(error, { slug, version = null, registry, stage = "re
421
421
 
422
422
  async function walkFiles(baseDir) {
423
423
  const results = [];
424
- const ignored = new Set([".git", "node_modules", ".DS_Store"]);
424
+ const ignored = new Set([".git", "node_modules", ".ds_store"]);
425
425
 
426
426
  async function walk(currentDir) {
427
427
  const entries = await fs.readdir(currentDir, { withFileTypes: true });
428
428
  for (const entry of entries) {
429
- if (ignored.has(entry.name)) {
429
+ if (ignored.has(String(entry.name || "").toLowerCase())) {
430
430
  continue;
431
431
  }
432
432
 
@@ -451,6 +451,15 @@ function parseSpec(spec) {
451
451
  return { slug, version: version || null };
452
452
  }
453
453
 
454
+ function encodeSkillPathForUrl(pathValue) {
455
+ return String(pathValue || "")
456
+ .split("/")
457
+ .map((segment) => segment.trim())
458
+ .filter(Boolean)
459
+ .map((segment) => encodeURIComponent(segment))
460
+ .join("/");
461
+ }
462
+
454
463
  function normalizeSkillSpecs(rawSpecs, { source = "install" } = {}) {
455
464
  const values = Array.isArray(rawSpecs) ? rawSpecs : [rawSpecs];
456
465
  const result = [];
@@ -1843,13 +1852,15 @@ async function cmdPublish(flags, deps = {}) {
1843
1852
  preview_token: preview.preview_token,
1844
1853
  archive_name: archiveName,
1845
1854
  };
1846
- const skillSlug = String(
1847
- result.publication?.slug
1855
+ const skillPath = String(
1856
+ result.publication?.pathSlug
1857
+ || result.publication?.slug
1848
1858
  || result.publication?.manifest?.slug
1849
1859
  || preview.manifest?.slug
1850
1860
  || "",
1851
1861
  ).trim();
1852
- const skillUrl = skillSlug ? `${registry}/skills/${encodeURIComponent(skillSlug)}` : null;
1862
+ const encodedSkillPath = encodeSkillPathForUrl(skillPath);
1863
+ const skillUrl = encodedSkillPath ? `${registry}/skills/${encodedSkillPath}` : null;
1853
1864
  summaryPayload.skill_url = skillUrl;
1854
1865
 
1855
1866
  if (ui) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ht-skills",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "CLI for installing and submitting skills from HT Skills Marketplace.",
5
5
  "type": "commonjs",
6
6
  "bin": {