prpm 1.0.2 → 1.0.3

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
@@ -9520,12 +9520,12 @@ async function handleTrending(options) {
9520
9520
  }
9521
9521
  function createTrendingCommand() {
9522
9522
  const command = new import_commander5.Command("trending");
9523
- command.description("Show trending packages").option("--format <format>", "Filter by format (cursor, claude, continue, windsurf, copilot, kiro, agents.md, generic)").option("--subtype <subtype>", "Filter by subtype (rule, agent, skill, slash-command, prompt, workflow, tool, template, collection)").option("--limit <number>", "Number of packages to show", "10").action(async (options) => {
9523
+ command.description("Show trending packages").option("--format <format>", "Filter by format (cursor, claude, continue, windsurf, copilot, kiro, agents.md, generic)").option("--subtype <subtype>", "Filter by subtype (rule, agent, skill, slash-command, prompt, workflow, tool, template, collection, chatmode, hook)").option("--limit <number>", "Number of packages to show", "10").action(async (options) => {
9524
9524
  const format = options.format;
9525
9525
  const subtype = options.subtype;
9526
9526
  const limit = options.limit ? parseInt(options.limit, 10) : 10;
9527
9527
  const validFormats = ["cursor", "claude", "continue", "windsurf", "copilot", "kiro", "agents.md", "generic", "mcp"];
9528
- const validSubtypes = ["rule", "agent", "skill", "slash-command", "prompt", "workflow", "tool", "template", "collection"];
9528
+ const validSubtypes = ["rule", "agent", "skill", "slash-command", "prompt", "workflow", "tool", "template", "collection", "chatmode", "hook"];
9529
9529
  if (options.format && !validFormats.includes(format)) {
9530
9530
  console.error(`\u274C Format must be one of: ${validFormats.join(", ")}`);
9531
9531
  throw new CLIError(`\u274C Format must be one of: ${validFormats.join(", ")}`, 1);
@@ -9548,7 +9548,7 @@ async function handlePopular(options) {
9548
9548
  });
9549
9549
  }
9550
9550
  function createPopularCommand() {
9551
- return new import_commander6.Command("popular").description("Show popular packages (all time)").option("--format <format>", "Filter by format (cursor, claude, continue, windsurf, copilot, kiro, agents.md, generic)").option("--subtype <subtype>", "Filter by subtype (rule, agent, skill, slash-command, prompt, workflow, tool, template, collection)").action(async (options) => {
9551
+ return new import_commander6.Command("popular").description("Show popular packages (all time)").option("--format <format>", "Filter by format (cursor, claude, continue, windsurf, copilot, kiro, agents.md, generic)").option("--subtype <subtype>", "Filter by subtype (rule, agent, skill, slash-command, prompt, workflow, tool, template, collection, chatmode, hook)").action(async (options) => {
9552
9552
  await handlePopular(options);
9553
9553
  });
9554
9554
  }
@@ -9871,7 +9871,7 @@ function createSearchCommand() {
9871
9871
  const limit = options.limit ? parseInt(options.limit, 10) : 20;
9872
9872
  const page = options.page ? parseInt(options.page, 10) : 1;
9873
9873
  const validFormats = ["cursor", "claude", "continue", "windsurf", "copilot", "kiro", "agents.md", "generic", "mcp"];
9874
- const validSubtypes = ["rule", "agent", "skill", "slash-command", "prompt", "collection", "chatmode", "tool", "hook"];
9874
+ const validSubtypes = ["rule", "agent", "skill", "slash-command", "prompt", "workflow", "tool", "template", "collection", "chatmode", "hook"];
9875
9875
  if (options.format && !validFormats.includes(format)) {
9876
9876
  console.error(`\u274C Format must be one of: ${validFormats.join(", ")}`);
9877
9877
  throw new CLIError(`\u274C Format must be one of: ${validFormats.join(", ")}`, 1);
@@ -10573,14 +10573,15 @@ async function findAndLoadManifests() {
10573
10573
  engines: pkg.engines,
10574
10574
  main: pkg.main
10575
10575
  };
10576
- return validateManifest(packageWithDefaults);
10576
+ const label = pkg.name || `package #${idx + 1}`;
10577
+ return validateManifest(packageWithDefaults, label);
10577
10578
  });
10578
10579
  return { manifests: validatedManifests, collections, source: "prpm.json (multi-package)" };
10579
10580
  }
10580
10581
  if (collections.length > 0) {
10581
10582
  return { manifests: [], collections, source: "prpm.json (collections-only)" };
10582
10583
  }
10583
- const validated = validateManifest(manifest);
10584
+ const validated = validateManifest(manifest, manifest.name);
10584
10585
  return { manifests: [validated], collections, source: "prpm.json" };
10585
10586
  } catch (error) {
10586
10587
  prpmJsonError = error;
@@ -10598,7 +10599,7 @@ async function findAndLoadManifests() {
10598
10599
  const manifests = [];
10599
10600
  for (let i = 0; i < marketplaceData.plugins.length; i++) {
10600
10601
  const manifest = marketplaceToManifest(marketplaceData, i);
10601
- const validated = validateManifest(manifest);
10602
+ const validated = validateManifest(manifest, manifest.name);
10602
10603
  manifests.push(validated);
10603
10604
  }
10604
10605
  return { manifests, collections: [], source: ".claude/marketplace.json" };
@@ -10614,7 +10615,7 @@ async function findAndLoadManifests() {
10614
10615
  const manifests = [];
10615
10616
  for (let i = 0; i < marketplaceData.plugins.length; i++) {
10616
10617
  const manifest = marketplaceToManifest(marketplaceData, i);
10617
- const validated = validateManifest(manifest);
10618
+ const validated = validateManifest(manifest, manifest.name);
10618
10619
  manifests.push(validated);
10619
10620
  }
10620
10621
  return { manifests, collections: [], source: ".claude-plugin/marketplace.json" };
@@ -10624,15 +10625,17 @@ async function findAndLoadManifests() {
10624
10625
  "No manifest file found. Expected either:\n - prpm.json in the current directory, or\n - .claude/marketplace.json (Claude format), or\n - .claude-plugin/marketplace.json (Claude format)"
10625
10626
  );
10626
10627
  }
10627
- function validateManifest(manifest) {
10628
+ function validateManifest(manifest, contextLabel) {
10628
10629
  var _a;
10630
+ const context = contextLabel || manifest.name || "manifest";
10631
+ const prefix = `[${context}] `;
10629
10632
  if (!manifest.subtype) {
10630
10633
  manifest.subtype = "rule";
10631
10634
  }
10632
10635
  const schemaValidation = validateManifestSchema(manifest);
10633
10636
  if (!schemaValidation.valid) {
10634
10637
  const errorMessages = ((_a = schemaValidation.errors) == null ? void 0 : _a.join("\n - ")) || "Unknown validation error";
10635
- throw new Error(`Manifest validation failed:
10638
+ throw new Error(`${prefix}Manifest validation failed:
10636
10639
  - ${errorMessages}`);
10637
10640
  }
10638
10641
  const hasEnhancedFormat = manifest.files.some((f) => typeof f === "object");
@@ -10641,7 +10644,7 @@ function validateManifest(manifest) {
10641
10644
  manifest.files.filter((f) => typeof f === "object").map((f) => f.format)
10642
10645
  );
10643
10646
  if (fileFormats.size > 1 && manifest.subtype !== "collection") {
10644
- console.warn('\u26A0\uFE0F Package contains multiple file formats. Consider setting subtype to "collection" for clarity.');
10647
+ console.warn(`${prefix}\u26A0\uFE0F Package contains multiple file formats. Consider setting subtype to "collection" for clarity.`);
10645
10648
  }
10646
10649
  }
10647
10650
  if (manifest.format === "claude" && manifest.subtype === "skill") {
@@ -10649,39 +10652,42 @@ function validateManifest(manifest) {
10649
10652
  const hasSkillMd = filePaths.some((path7) => path7.endsWith("/SKILL.md") || path7 === "SKILL.md");
10650
10653
  if (!hasSkillMd) {
10651
10654
  throw new Error(
10652
- "Claude skills must contain a SKILL.md file.\nAccording to Claude documentation at https://docs.claude.com/en/docs/claude-code/skills,\nskills must have a file named SKILL.md in their directory.\nPlease rename your skill file to SKILL.md (all caps) and update your prpm.json files array."
10655
+ `${prefix}Claude skills must contain a SKILL.md file.
10656
+ According to Claude documentation at https://docs.claude.com/en/docs/claude-code/skills,
10657
+ skills must have a file named SKILL.md in their directory.
10658
+ Please rename your skill file to SKILL.md (all caps) and update your prpm.json files array.`
10653
10659
  );
10654
10660
  }
10655
10661
  if (manifest.name.length > 64) {
10656
10662
  throw new Error(
10657
- `Claude skill name "${manifest.name}" exceeds 64 character limit (${manifest.name.length} characters).
10663
+ `${prefix}Claude skill name "${manifest.name}" exceeds 64 character limit (${manifest.name.length} characters).
10658
10664
  According to Claude documentation, skill names must be max 64 characters.
10659
10665
  Please shorten your package name.`
10660
10666
  );
10661
10667
  }
10662
10668
  if (!/^[a-z0-9-]+$/.test(manifest.name)) {
10663
10669
  throw new Error(
10664
- `Claude skill name "${manifest.name}" contains invalid characters.
10670
+ `${prefix}Claude skill name "${manifest.name}" contains invalid characters.
10665
10671
  According to Claude documentation, skill names must use lowercase letters, numbers, and hyphens only.
10666
10672
  Please update your package name.`
10667
10673
  );
10668
10674
  }
10669
10675
  if (manifest.description.length > 1024) {
10670
10676
  throw new Error(
10671
- `Claude skill description exceeds 1024 character limit (${manifest.description.length} characters).
10677
+ `${prefix}Claude skill description exceeds 1024 character limit (${manifest.description.length} characters).
10672
10678
  According to Claude documentation, skill descriptions must be max 1024 characters.
10673
10679
  Please shorten your description.`
10674
10680
  );
10675
10681
  }
10676
10682
  if (manifest.description.length > 819) {
10677
10683
  console.warn(
10678
- `\u26A0\uFE0F Warning: Skill description is ${manifest.description.length}/1024 characters (${Math.round(manifest.description.length / 1024 * 100)}% of limit).
10684
+ `${prefix}\u26A0\uFE0F Warning: Skill description is ${manifest.description.length}/1024 characters (${Math.round(manifest.description.length / 1024 * 100)}% of limit).
10679
10685
  Consider keeping it concise for better discoverability.`
10680
10686
  );
10681
10687
  }
10682
10688
  if (manifest.description.length < 100) {
10683
10689
  console.warn(
10684
- `\u26A0\uFE0F Warning: Skill description is only ${manifest.description.length} characters.
10690
+ `${prefix}\u26A0\uFE0F Warning: Skill description is only ${manifest.description.length} characters.
10685
10691
  Claude uses descriptions for skill discovery - consider adding more detail about:
10686
10692
  - What the skill does
10687
10693
  - When Claude should use it
@@ -66,7 +66,9 @@
66
66
  "workflow",
67
67
  "tool",
68
68
  "template",
69
- "collection"
69
+ "collection",
70
+ "chatmode",
71
+ "hook"
70
72
  ]
71
73
  },
72
74
  "author": {
@@ -287,7 +289,9 @@
287
289
  "workflow",
288
290
  "tool",
289
291
  "template",
290
- "collection"
292
+ "collection",
293
+ "chatmode",
294
+ "hook"
291
295
  ]
292
296
  },
293
297
  "name": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Prompt Package Manager CLI - Install and manage prompt-based files",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -45,9 +45,9 @@
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
47
  "@octokit/rest": "^22.0.0",
48
- "@pr-pm/converters": "^1.0.2",
49
- "@pr-pm/registry-client": "^2.0.2",
50
- "@pr-pm/types": "^1.0.2",
48
+ "@pr-pm/converters": "^1.0.3",
49
+ "@pr-pm/registry-client": "^2.0.3",
50
+ "@pr-pm/types": "^1.0.3",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",
@@ -66,7 +66,9 @@
66
66
  "workflow",
67
67
  "tool",
68
68
  "template",
69
- "collection"
69
+ "collection",
70
+ "chatmode",
71
+ "hook"
70
72
  ]
71
73
  },
72
74
  "author": {
@@ -287,7 +289,9 @@
287
289
  "workflow",
288
290
  "tool",
289
291
  "template",
290
- "collection"
292
+ "collection",
293
+ "chatmode",
294
+ "hook"
291
295
  ]
292
296
  },
293
297
  "name": {