prpm 2.1.12 → 2.1.14

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 +305 -61
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -8883,8 +8883,14 @@ function parseMarkdownWithFrontmatter(markdown) {
8883
8883
  return { frontmatter, content };
8884
8884
  }
8885
8885
  function validateMarkdown(format, markdown, subtype) {
8886
+ var _a;
8886
8887
  const { frontmatter, content } = parseMarkdownWithFrontmatter(markdown);
8887
- if (format === "windsurf" || format === "agents.md" || format === "ruler") {
8888
+ const noFrontmatterFormats = ["windsurf", "agents.md", "ruler"];
8889
+ const noFrontmatterSubtypes = {
8890
+ cursor: ["slash-command"]
8891
+ };
8892
+ const isNoFrontmatter = noFrontmatterFormats.includes(format) || subtype && ((_a = noFrontmatterSubtypes[format]) == null ? void 0 : _a.includes(subtype));
8893
+ if (isNoFrontmatter) {
8888
8894
  return validateFormat(format, { content: markdown }, subtype);
8889
8895
  }
8890
8896
  return validateConversion(format, frontmatter, content, subtype);
@@ -19340,7 +19346,7 @@ Include examples if helpful.
19340
19346
 
19341
19347
  // src/index.ts
19342
19348
  init_cjs_shims();
19343
- var import_commander30 = require("commander");
19349
+ var import_commander31 = require("commander");
19344
19350
  var import_fs21 = require("fs");
19345
19351
  var import_path25 = require("path");
19346
19352
 
@@ -21074,7 +21080,7 @@ async function validatePackageFiles(manifest) {
21074
21080
  return false;
21075
21081
  }
21076
21082
  if (formatType === "cursor") {
21077
- return filePath.includes(".cursorrules") || filePath.endsWith(".mdc");
21083
+ return filePath.includes(".cursorrules") || filePath.endsWith(".mdc") || filePath.endsWith(".md");
21078
21084
  } else if (formatType === "claude") {
21079
21085
  if (manifest.subtype === "skill") {
21080
21086
  return filePath.endsWith("SKILL.md");
@@ -21085,16 +21091,13 @@ async function validatePackageFiles(manifest) {
21085
21091
  if (filePath.endsWith(".json")) {
21086
21092
  return false;
21087
21093
  }
21088
- if (manifest.subtype === "agent") {
21089
- return filePath.includes(".claude/agents/") && filePath.endsWith(".md");
21090
- } else if (manifest.subtype === "slash-command") {
21091
- return filePath.includes(".claude/commands/") && filePath.endsWith(".md");
21092
- }
21093
- return filePath.endsWith(".md") && !filePath.endsWith(".json");
21094
+ return filePath.endsWith(".md");
21094
21095
  } else if (formatType === "continue") {
21095
- return filePath.includes(".continue/") && filePath.endsWith(".json");
21096
+ return filePath.endsWith(".md") || filePath.endsWith(".json");
21096
21097
  } else if (formatType === "windsurf") {
21097
- return filePath.includes(".windsurf/rules");
21098
+ return filePath.endsWith(".md");
21099
+ } else if (formatType === "copilot") {
21100
+ return filePath.endsWith(".md");
21098
21101
  } else if (formatType === "agents.md") {
21099
21102
  return filePath === "agents.md";
21100
21103
  } else if (formatType === "kiro") {
@@ -21136,8 +21139,20 @@ async function validatePackageFiles(manifest) {
21136
21139
  }
21137
21140
  if (manifest.format === "claude" && manifest.subtype === "skill") {
21138
21141
  const hasSkillMd = filePaths.some((path10) => path10.endsWith("/SKILL.md") || path10 === "SKILL.md");
21139
- if (!hasSkillMd) {
21140
- errors.push("Claude skills must contain a SKILL.md file");
21142
+ const mdFiles = filePaths.filter((path10) => {
21143
+ var _a;
21144
+ if (!path10.endsWith(".md")) return false;
21145
+ const filename = ((_a = path10.split(/[\\/]/).pop()) == null ? void 0 : _a.toLowerCase()) || "";
21146
+ if (filename === "readme.md") return false;
21147
+ if (path10.includes("examples/") || path10.includes("example/") || path10.includes("tests/") || path10.includes("__tests__/") || path10.includes("docs/") || path10.includes("doc/")) return false;
21148
+ return true;
21149
+ });
21150
+ if (!hasSkillMd && mdFiles.length === 0) {
21151
+ errors.push("Claude skills must contain a markdown file (.md)");
21152
+ } else if (!hasSkillMd && mdFiles.length === 1) {
21153
+ warnings.push("Skill file will be auto-renamed to SKILL.md during publish");
21154
+ } else if (!hasSkillMd && mdFiles.length > 1) {
21155
+ errors.push(`Claude skills with multiple .md files must use SKILL.md for the main skill file (found ${mdFiles.length} .md files)`);
21141
21156
  }
21142
21157
  }
21143
21158
  if (manifest.format === "windsurf") {
@@ -21527,12 +21542,29 @@ function validateManifest(manifest, contextLabel) {
21527
21542
  const hasSkillMd = filePaths.some(
21528
21543
  (path10) => path10.endsWith("/SKILL.md") || path10 === "SKILL.md"
21529
21544
  );
21530
- if (!hasSkillMd) {
21545
+ const mdFiles = filePaths.filter((filePath) => {
21546
+ var _a2;
21547
+ if (!filePath.endsWith(".md")) return false;
21548
+ const filename = ((_a2 = filePath.split(/[\\/]/).pop()) == null ? void 0 : _a2.toLowerCase()) || "";
21549
+ return filename !== "readme.md";
21550
+ });
21551
+ if (!hasSkillMd && mdFiles.length === 0) {
21552
+ throw new Error(
21553
+ `${prefix}Claude skills must contain a markdown file.
21554
+ No .md file found in the files array.
21555
+ Please add your skill file to the prpm.json files array.`
21556
+ );
21557
+ }
21558
+ if (!hasSkillMd && mdFiles.length === 1) {
21559
+ console.log(
21560
+ `${prefix}\u26A0\uFE0F Skill file will be auto-renamed to SKILL.md during publish`
21561
+ );
21562
+ }
21563
+ if (!hasSkillMd && mdFiles.length > 1) {
21531
21564
  throw new Error(
21532
- `${prefix}Claude skills must contain a SKILL.md file.
21533
- According to Claude documentation at https://docs.claude.com/en/docs/claude-code/skills,
21534
- skills must have a file named SKILL.md in their directory.
21535
- Please rename your skill file to SKILL.md (all caps) and update your prpm.json files array.`
21565
+ `${prefix}Claude skills with multiple .md files must use SKILL.md for the main skill file.
21566
+ Found ${mdFiles.length} .md files but no SKILL.md.
21567
+ Please rename your main skill file to SKILL.md so we know which file is the skill.`
21536
21568
  );
21537
21569
  }
21538
21570
  if (manifest.name.length > 64) {
@@ -21622,11 +21654,98 @@ var import_path18 = require("path");
21622
21654
  var tar2 = __toESM(require("tar"));
21623
21655
  var import_os5 = require("os");
21624
21656
  var import_crypto2 = require("crypto");
21657
+ var RELOCATION_CONFIG = {
21658
+ claude: {
21659
+ "slash-command": {
21660
+ directory: ".claude/commands",
21661
+ checkPath: ".claude/commands/"
21662
+ },
21663
+ agent: {
21664
+ directory: ".claude/agents",
21665
+ checkPath: ".claude/agents/"
21666
+ }
21667
+ },
21668
+ cursor: {
21669
+ rule: {
21670
+ directory: ".cursor/rules",
21671
+ extension: ".mdc",
21672
+ checkPath: ".cursor/rules/"
21673
+ },
21674
+ agent: {
21675
+ directory: ".cursor/agents",
21676
+ checkPath: ".cursor/agents/"
21677
+ },
21678
+ "slash-command": {
21679
+ directory: ".cursor/commands",
21680
+ checkPath: ".cursor/commands/"
21681
+ }
21682
+ },
21683
+ continue: {
21684
+ rule: {
21685
+ directory: ".continue/rules",
21686
+ checkPath: ".continue/rules/"
21687
+ },
21688
+ prompt: {
21689
+ directory: ".continue/prompts",
21690
+ checkPath: ".continue/prompts/"
21691
+ }
21692
+ },
21693
+ windsurf: {
21694
+ rule: {
21695
+ directory: ".windsurf/rules",
21696
+ checkPath: ".windsurf/rules/"
21697
+ }
21698
+ },
21699
+ copilot: {
21700
+ rule: {
21701
+ directory: ".github/instructions",
21702
+ extension: ".instructions.md",
21703
+ checkPath: ".github/instructions/"
21704
+ },
21705
+ chatmode: {
21706
+ directory: ".github/chatmodes",
21707
+ extension: ".chatmode.md",
21708
+ checkPath: ".github/chatmodes/"
21709
+ }
21710
+ },
21711
+ kiro: {
21712
+ rule: {
21713
+ directory: ".kiro/steering",
21714
+ checkPath: ".kiro/steering/"
21715
+ },
21716
+ agent: {
21717
+ directory: ".kiro/agents",
21718
+ checkPath: ".kiro/agents/"
21719
+ }
21720
+ },
21721
+ opencode: {
21722
+ agent: {
21723
+ directory: ".opencode/agent",
21724
+ checkPath: ".opencode/agent/"
21725
+ },
21726
+ "slash-command": {
21727
+ directory: ".opencode/command",
21728
+ checkPath: ".opencode/command/"
21729
+ },
21730
+ tool: {
21731
+ directory: ".opencode/tool",
21732
+ checkPath: ".opencode/tool/"
21733
+ }
21734
+ },
21735
+ factory: {
21736
+ "slash-command": {
21737
+ directory: ".factory/commands",
21738
+ checkPath: ".factory/commands/"
21739
+ }
21740
+ }
21741
+ };
21625
21742
  async function createTarball(manifest) {
21626
21743
  const tmpDir = (0, import_path18.join)((0, import_os5.tmpdir)(), `prpm-${(0, import_crypto2.randomBytes)(8).toString("hex")}`);
21627
21744
  const tarballPath = (0, import_path18.join)(tmpDir, "package.tar.gz");
21745
+ const stagingDir = (0, import_path18.join)(tmpDir, "staging");
21628
21746
  try {
21629
21747
  await (0, import_promises7.mkdir)(tmpDir, { recursive: true });
21748
+ await (0, import_promises7.mkdir)(stagingDir, { recursive: true });
21630
21749
  const filePaths = normalizeFilePaths2(manifest.files);
21631
21750
  const standardFiles = ["prpm.json", "README.md", "LICENSE"];
21632
21751
  for (const file of standardFiles) {
@@ -21635,10 +21754,60 @@ async function createTarball(manifest) {
21635
21754
  }
21636
21755
  }
21637
21756
  const existingFiles = [];
21757
+ const fileRenames = /* @__PURE__ */ new Map();
21758
+ if (manifest.format === "claude" && manifest.subtype === "skill") {
21759
+ const hasSkillMd = filePaths.some(
21760
+ (path10) => path10.endsWith("/SKILL.md") || path10 === "SKILL.md"
21761
+ );
21762
+ if (!hasSkillMd) {
21763
+ const mdFiles = filePaths.filter(
21764
+ (path10) => path10.endsWith(".md") && !path10.toLowerCase().includes("readme")
21765
+ );
21766
+ if (mdFiles.length === 1) {
21767
+ const file = mdFiles[0];
21768
+ try {
21769
+ await (0, import_promises7.stat)(file);
21770
+ const dir = (0, import_path18.dirname)(file);
21771
+ const newPath = dir === "." ? "SKILL.md" : (0, import_path18.join)(dir, "SKILL.md");
21772
+ fileRenames.set(file, newPath);
21773
+ console.log(` \u{1F4DD} Renaming ${file} \u2192 ${newPath}`);
21774
+ } catch {
21775
+ }
21776
+ }
21777
+ }
21778
+ }
21779
+ const formatConfig = RELOCATION_CONFIG[manifest.format];
21780
+ const subtypeConfig = formatConfig == null ? void 0 : formatConfig[manifest.subtype || "rule"];
21781
+ if (subtypeConfig) {
21782
+ const contentFiles = filePaths.filter(
21783
+ (path10) => !path10.toLowerCase().includes("readme") && !path10.toLowerCase().includes("license") && path10 !== "prpm.json" && (path10.endsWith(".md") || path10.endsWith(".mdc") || path10.endsWith(".json"))
21784
+ );
21785
+ for (const file of contentFiles) {
21786
+ if (file.includes(subtypeConfig.checkPath)) {
21787
+ continue;
21788
+ }
21789
+ try {
21790
+ await (0, import_promises7.stat)(file);
21791
+ let fileName = (0, import_path18.basename)(file);
21792
+ if (subtypeConfig.extension) {
21793
+ const nameWithoutExt = fileName.replace(/\.[^.]+$/, "");
21794
+ fileName = nameWithoutExt + subtypeConfig.extension;
21795
+ }
21796
+ const newPath = (0, import_path18.join)(subtypeConfig.directory, fileName);
21797
+ fileRenames.set(file, newPath);
21798
+ console.log(` \u{1F4DD} Relocating ${file} \u2192 ${newPath}`);
21799
+ } catch {
21800
+ }
21801
+ }
21802
+ }
21638
21803
  for (const file of filePaths) {
21639
21804
  try {
21640
21805
  await (0, import_promises7.stat)(file);
21641
- existingFiles.push(file);
21806
+ const targetPath = fileRenames.get(file) || file;
21807
+ const stagingPath = (0, import_path18.join)(stagingDir, targetPath);
21808
+ await (0, import_promises7.mkdir)((0, import_path18.dirname)(stagingPath), { recursive: true });
21809
+ await (0, import_promises7.copyFile)(file, stagingPath);
21810
+ existingFiles.push(targetPath);
21642
21811
  } catch {
21643
21812
  }
21644
21813
  }
@@ -21649,7 +21818,7 @@ async function createTarball(manifest) {
21649
21818
  {
21650
21819
  gzip: true,
21651
21820
  file: tarballPath,
21652
- cwd: process.cwd()
21821
+ cwd: stagingDir
21653
21822
  },
21654
21823
  existingFiles
21655
21824
  );
@@ -22462,9 +22631,83 @@ function createDeprecateCommand() {
22462
22631
  return command;
22463
22632
  }
22464
22633
 
22465
- // src/commands/login.ts
22634
+ // src/commands/visibility.ts
22466
22635
  init_cjs_shims();
22467
22636
  var import_commander15 = require("commander");
22637
+ var import_registry_client8 = require("@pr-pm/registry-client");
22638
+ init_user_config();
22639
+ init_telemetry();
22640
+ init_errors();
22641
+ async function handleVisibility(packageName, options) {
22642
+ const startTime = Date.now();
22643
+ let success = false;
22644
+ let error;
22645
+ let visibility;
22646
+ try {
22647
+ const config = await getConfig();
22648
+ if (!config.token) {
22649
+ throw new CLIError("\u274C Authentication required. Run `prpm login` first.", 1);
22650
+ }
22651
+ if (options.public && options.private) {
22652
+ throw new CLIError("\u274C Cannot specify both --public and --private", 1);
22653
+ }
22654
+ if (!options.public && !options.private) {
22655
+ throw new CLIError("\u274C Must specify either --public or --private", 1);
22656
+ }
22657
+ visibility = options.public ? "public" : "private";
22658
+ const client = (0, import_registry_client8.getRegistryClient)(config);
22659
+ console.log(`\u{1F504} Setting package visibility: ${packageName} -> ${visibility}...
22660
+ `);
22661
+ const result = await client.setPackageVisibility(packageName, visibility);
22662
+ if (result.success) {
22663
+ const icon = visibility === "public" ? "\u{1F30D}" : "\u{1F512}";
22664
+ console.log(`\u2705 ${result.message}`);
22665
+ console.log("");
22666
+ console.log(` ${icon} Package is now ${visibility}`);
22667
+ if (visibility === "public") {
22668
+ console.log(" \u{1F4E6} Package will appear in search results");
22669
+ } else {
22670
+ console.log(" \u{1F510} Package is only accessible to organization members");
22671
+ }
22672
+ } else {
22673
+ throw new Error("Failed to update visibility");
22674
+ }
22675
+ success = true;
22676
+ } catch (err) {
22677
+ if (err instanceof CLIError) {
22678
+ error = err.message;
22679
+ throw err;
22680
+ }
22681
+ error = err instanceof Error ? err.message : String(err);
22682
+ throw new CLIError(`\u274C Failed to update visibility: ${error}`, 1);
22683
+ } finally {
22684
+ try {
22685
+ await telemetry.track({
22686
+ command: "visibility",
22687
+ success,
22688
+ error,
22689
+ duration: Date.now() - startTime,
22690
+ data: {
22691
+ packageName,
22692
+ visibility
22693
+ }
22694
+ });
22695
+ await telemetry.shutdown();
22696
+ } catch {
22697
+ }
22698
+ }
22699
+ }
22700
+ function createVisibilityCommand() {
22701
+ const command = new import_commander15.Command("visibility");
22702
+ command.description("Change package visibility (owner only)").argument("<package>", "Package name to update").option("--public", "Make the package public (visible in search)").option("--private", "Make the package private (org members only)").action(async (packageName, options) => {
22703
+ await handleVisibility(packageName, options);
22704
+ });
22705
+ return command;
22706
+ }
22707
+
22708
+ // src/commands/login.ts
22709
+ init_cjs_shims();
22710
+ var import_commander16 = require("commander");
22468
22711
  var jwt = __toESM(require("jsonwebtoken"));
22469
22712
  init_telemetry();
22470
22713
  init_user_config();
@@ -22631,16 +22874,16 @@ async function handleLogin(options) {
22631
22874
  }
22632
22875
  }
22633
22876
  function createLoginCommand() {
22634
- return new import_commander15.Command("login").description("Login to the PRMP registry").option("--token <token>", "Login with a personal access token").action(async (options) => {
22877
+ return new import_commander16.Command("login").description("Login to the PRMP registry").option("--token <token>", "Login with a personal access token").action(async (options) => {
22635
22878
  await handleLogin(options);
22636
22879
  });
22637
22880
  }
22638
22881
 
22639
22882
  // src/commands/whoami.ts
22640
22883
  init_cjs_shims();
22641
- var import_commander16 = require("commander");
22884
+ var import_commander17 = require("commander");
22642
22885
  init_user_config();
22643
- var import_registry_client8 = require("@pr-pm/registry-client");
22886
+ var import_registry_client9 = require("@pr-pm/registry-client");
22644
22887
  init_telemetry();
22645
22888
  init_errors();
22646
22889
  async function handleWhoami() {
@@ -22656,7 +22899,7 @@ async function handleWhoami() {
22656
22899
  return;
22657
22900
  }
22658
22901
  try {
22659
- const client = (0, import_registry_client8.getRegistryClient)(config);
22902
+ const client = (0, import_registry_client9.getRegistryClient)(config);
22660
22903
  const userProfile = await client.getUserProfile(config.username);
22661
22904
  console.log(`
22662
22905
  \u{1F464} ${userProfile.username}${userProfile.verified_author ? " \u2713" : ""}`);
@@ -22696,7 +22939,7 @@ async function handleWhoami() {
22696
22939
  }
22697
22940
  }
22698
22941
  function createWhoamiCommand() {
22699
- return new import_commander16.Command("whoami").description("Show current logged-in user").action(async () => {
22942
+ return new import_commander17.Command("whoami").description("Show current logged-in user").action(async () => {
22700
22943
  await handleWhoami();
22701
22944
  });
22702
22945
  }
@@ -22706,8 +22949,8 @@ init_collections();
22706
22949
 
22707
22950
  // src/commands/outdated.ts
22708
22951
  init_cjs_shims();
22709
- var import_commander17 = require("commander");
22710
- var import_registry_client9 = require("@pr-pm/registry-client");
22952
+ var import_commander18 = require("commander");
22953
+ var import_registry_client10 = require("@pr-pm/registry-client");
22711
22954
  init_user_config();
22712
22955
  init_lockfile();
22713
22956
  init_telemetry();
@@ -22719,7 +22962,7 @@ async function handleOutdated() {
22719
22962
  try {
22720
22963
  console.log("\u{1F50D} Checking for package updates...\n");
22721
22964
  const config = await getConfig();
22722
- const client = (0, import_registry_client9.getRegistryClient)(config);
22965
+ const client = (0, import_registry_client10.getRegistryClient)(config);
22723
22966
  const installedPackages = await listPackages();
22724
22967
  if (installedPackages.length === 0) {
22725
22968
  console.log("No packages installed.");
@@ -22809,15 +23052,15 @@ function getUpdateType(current, latest) {
22809
23052
  return "patch";
22810
23053
  }
22811
23054
  function createOutdatedCommand() {
22812
- return new import_commander17.Command("outdated").description("Check for package updates").action(async () => {
23055
+ return new import_commander18.Command("outdated").description("Check for package updates").action(async () => {
22813
23056
  await handleOutdated();
22814
23057
  });
22815
23058
  }
22816
23059
 
22817
23060
  // src/commands/update.ts
22818
23061
  init_cjs_shims();
22819
- var import_commander18 = require("commander");
22820
- var import_registry_client10 = require("@pr-pm/registry-client");
23062
+ var import_commander19 = require("commander");
23063
+ var import_registry_client11 = require("@pr-pm/registry-client");
22821
23064
  init_user_config();
22822
23065
  init_lockfile();
22823
23066
  init_install();
@@ -22830,7 +23073,7 @@ async function handleUpdate(packageName, options = {}) {
22830
23073
  let updatedCount = 0;
22831
23074
  try {
22832
23075
  const config = await getConfig();
22833
- const client = (0, import_registry_client10.getRegistryClient)(config);
23076
+ const client = (0, import_registry_client11.getRegistryClient)(config);
22834
23077
  const installedPackages = await listPackages();
22835
23078
  if (installedPackages.length === 0) {
22836
23079
  console.log("No packages installed.");
@@ -22922,7 +23165,7 @@ function getUpdateType2(current, latest) {
22922
23165
  return "patch";
22923
23166
  }
22924
23167
  function createUpdateCommand() {
22925
- return new import_commander18.Command("update").description(
23168
+ return new import_commander19.Command("update").description(
22926
23169
  "Update packages to latest compatible versions (minor/patch only)"
22927
23170
  ).argument("[package]", "Specific package to update (optional)").option("--all", "Update all packages").action(async (packageName, options) => {
22928
23171
  await handleUpdate(packageName, options);
@@ -22931,8 +23174,8 @@ function createUpdateCommand() {
22931
23174
 
22932
23175
  // src/commands/upgrade.ts
22933
23176
  init_cjs_shims();
22934
- var import_commander19 = require("commander");
22935
- var import_registry_client11 = require("@pr-pm/registry-client");
23177
+ var import_commander20 = require("commander");
23178
+ var import_registry_client12 = require("@pr-pm/registry-client");
22936
23179
  init_user_config();
22937
23180
  init_lockfile();
22938
23181
  init_install();
@@ -22946,7 +23189,7 @@ async function handleUpgrade(packageName, options = {}) {
22946
23189
  let upgradedCount = 0;
22947
23190
  try {
22948
23191
  const config = await getConfig();
22949
- const client = (0, import_registry_client11.getRegistryClient)(config);
23192
+ const client = (0, import_registry_client12.getRegistryClient)(config);
22950
23193
  const installedPackages = await listPackages();
22951
23194
  if (installedPackages.length === 0) {
22952
23195
  console.log("No packages installed.");
@@ -23113,7 +23356,7 @@ function getUpdateType3(current, latest) {
23113
23356
  return "patch";
23114
23357
  }
23115
23358
  function createUpgradeCommand() {
23116
- return new import_commander19.Command("upgrade").description(
23359
+ return new import_commander20.Command("upgrade").description(
23117
23360
  "Upgrade packages to latest versions (including major updates)"
23118
23361
  ).argument("[package]", "Specific package to upgrade (optional)").option("--all", "Upgrade all packages").option("--force", "Skip warning for major version upgrades").action(
23119
23362
  async (packageName, options) => {
@@ -23124,7 +23367,7 @@ function createUpgradeCommand() {
23124
23367
 
23125
23368
  // src/commands/schema.ts
23126
23369
  init_cjs_shims();
23127
- var import_commander20 = require("commander");
23370
+ var import_commander21 = require("commander");
23128
23371
  init_errors();
23129
23372
  async function handleSchema() {
23130
23373
  try {
@@ -23141,7 +23384,7 @@ async function handleSchema() {
23141
23384
  }
23142
23385
  }
23143
23386
  function createSchemaCommand() {
23144
- const command = new import_commander20.Command("schema");
23387
+ const command = new import_commander21.Command("schema");
23145
23388
  command.description("Display the PRPM manifest JSON schema").action(async () => {
23146
23389
  await handleSchema();
23147
23390
  });
@@ -23153,7 +23396,7 @@ init_init();
23153
23396
 
23154
23397
  // src/commands/config.ts
23155
23398
  init_cjs_shims();
23156
- var import_commander21 = require("commander");
23399
+ var import_commander22 = require("commander");
23157
23400
  init_user_config();
23158
23401
  init_errors();
23159
23402
  async function handleConfigGet(key) {
@@ -23244,7 +23487,7 @@ async function handleConfigDelete(key) {
23244
23487
  }
23245
23488
  }
23246
23489
  function createConfigCommand() {
23247
- const command = new import_commander21.Command("config").description("Manage CLI configuration");
23490
+ const command = new import_commander22.Command("config").description("Manage CLI configuration");
23248
23491
  command.command("list").alias("ls").description("List all configuration values").action(async () => {
23249
23492
  await handleConfigList();
23250
23493
  });
@@ -23265,9 +23508,9 @@ function createConfigCommand() {
23265
23508
 
23266
23509
  // src/commands/catalog.ts
23267
23510
  init_cjs_shims();
23268
- var import_commander22 = require("commander");
23511
+ var import_commander23 = require("commander");
23269
23512
  function createCatalogCommand() {
23270
- return new import_commander22.Command("catalog").description(
23513
+ return new import_commander23.Command("catalog").description(
23271
23514
  "[DEPRECATED] Use 'prpm init --scan' instead. Discover and catalog packages."
23272
23515
  ).argument("[directories...]", "Directories to scan for packages").option("-o, --output <path>", "Output path for prpm.json").option("-a, --append", "Append to existing prpm.json").option("--dry-run", "Show what would be cataloged without making changes").action(
23273
23516
  async (directories, options) => {
@@ -23306,7 +23549,7 @@ function createCatalogCommand() {
23306
23549
 
23307
23550
  // src/commands/playground.ts
23308
23551
  init_cjs_shims();
23309
- var import_commander23 = require("commander");
23552
+ var import_commander24 = require("commander");
23310
23553
  init_user_config();
23311
23554
  init_telemetry();
23312
23555
  var readline5 = __toESM(require("readline"));
@@ -23746,7 +23989,7 @@ async function handlePlayground(options) {
23746
23989
  }
23747
23990
  }
23748
23991
  function createPlaygroundCommand() {
23749
- const command = new import_commander23.Command("playground");
23992
+ const command = new import_commander24.Command("playground");
23750
23993
  command.description("Test a package or custom prompt with AI models in the playground").option("-p, --package <name>", "Package name to test").option("--input <text>", "Input text to send to the model (omit for interactive mode)").option(
23751
23994
  "-m, --model <model>",
23752
23995
  "AI model to use (sonnet, opus, gpt-4o, gpt-4o-mini, gpt-4-turbo)",
@@ -23815,7 +24058,7 @@ Note: Playground usage requires credits. Run 'prpm credits' to check balance.
23815
24058
 
23816
24059
  // src/commands/credits.ts
23817
24060
  init_cjs_shims();
23818
- var import_commander24 = require("commander");
24061
+ var import_commander25 = require("commander");
23819
24062
  init_user_config();
23820
24063
  init_telemetry();
23821
24064
  init_errors();
@@ -23942,7 +24185,7 @@ async function handleCredits(options) {
23942
24185
  }
23943
24186
  }
23944
24187
  function createCreditsCommand() {
23945
- const command = new import_commander24.Command("credits");
24188
+ const command = new import_commander25.Command("credits");
23946
24189
  command.description("Check playground credits balance and transaction history").option("-h, --history", "Show transaction history instead of balance", false).option("-l, --limit <number>", "Number of transactions to show in history", "10").addHelpText(
23947
24190
  "after",
23948
24191
  `
@@ -23977,7 +24220,7 @@ Get more credits:
23977
24220
 
23978
24221
  // src/commands/subscribe.ts
23979
24222
  init_cjs_shims();
23980
- var import_commander25 = require("commander");
24223
+ var import_commander26 = require("commander");
23981
24224
  init_user_config();
23982
24225
  init_telemetry();
23983
24226
  var import_child_process2 = require("child_process");
@@ -24136,7 +24379,7 @@ async function handleSubscribe() {
24136
24379
  }
24137
24380
  }
24138
24381
  function createSubscribeCommand() {
24139
- const command = new import_commander25.Command("subscribe");
24382
+ const command = new import_commander26.Command("subscribe");
24140
24383
  command.description("Subscribe to PRPM+ for monthly playground credits and benefits").addHelpText(
24141
24384
  "after",
24142
24385
  `
@@ -24177,7 +24420,7 @@ Note: You can cancel anytime from https://prpm.dev/settings/billing
24177
24420
 
24178
24421
  // src/commands/buy-credits.ts
24179
24422
  init_cjs_shims();
24180
- var import_commander26 = require("commander");
24423
+ var import_commander27 = require("commander");
24181
24424
  init_user_config();
24182
24425
  init_telemetry();
24183
24426
  var import_child_process3 = require("child_process");
@@ -24318,7 +24561,7 @@ async function handleBuyCredits(options) {
24318
24561
  }
24319
24562
  }
24320
24563
  function createBuyCreditsCommand() {
24321
- const command = new import_commander26.Command("buy-credits");
24564
+ const command = new import_commander27.Command("buy-credits");
24322
24565
  command.description("Purchase one-time playground credits (never expire)").option(
24323
24566
  "-p, --package <package>",
24324
24567
  "Credit package to purchase (small, medium, large)"
@@ -24371,8 +24614,8 @@ Note: Purchased credits are one-time and never expire, unlike monthly credits.
24371
24614
 
24372
24615
  // src/commands/starred.ts
24373
24616
  init_cjs_shims();
24374
- var import_commander27 = require("commander");
24375
- var import_registry_client12 = require("@pr-pm/registry-client");
24617
+ var import_commander28 = require("commander");
24618
+ var import_registry_client13 = require("@pr-pm/registry-client");
24376
24619
  init_user_config();
24377
24620
  init_telemetry();
24378
24621
  init_errors();
@@ -24385,7 +24628,7 @@ async function handleStarred(options) {
24385
24628
  throw new CLIError("You must be logged in to view starred items. Run `prpm login` first.");
24386
24629
  }
24387
24630
  const registryUrl = config.registryUrl || process.env.PRPM_REGISTRY_URL || "https://registry.prpm.dev";
24388
- const client = (0, import_registry_client12.getRegistryClient)({ registryUrl, token });
24631
+ const client = (0, import_registry_client13.getRegistryClient)({ registryUrl, token });
24389
24632
  const showPackages = options.packages || !options.packages && !options.collections;
24390
24633
  const showCollections = options.collections || !options.packages && !options.collections;
24391
24634
  const limit = options.limit || 100;
@@ -24487,14 +24730,14 @@ Total: ${packages.length + collections.length} starred items`);
24487
24730
  }
24488
24731
  }
24489
24732
  function createStarredCommand() {
24490
- const command = new import_commander27.Command("starred");
24733
+ const command = new import_commander28.Command("starred");
24491
24734
  command.description("List your starred packages and collections").option("--packages", "Show only starred packages").option("--collections", "Show only starred collections").option("--format <format>", "Filter packages by format (cursor, claude, continue, windsurf, etc.)").option("--limit <number>", "Maximum number of items to fetch (default: 100)", (val) => parseInt(val, 10)).action(handleStarred);
24492
24735
  return command;
24493
24736
  }
24494
24737
 
24495
24738
  // src/commands/convert.ts
24496
24739
  init_cjs_shims();
24497
- var import_commander28 = require("commander");
24740
+ var import_commander29 = require("commander");
24498
24741
  var import_promises10 = require("fs/promises");
24499
24742
  var import_path23 = require("path");
24500
24743
  var import_fs19 = require("fs");
@@ -24859,7 +25102,7 @@ async function handleConvert(sourcePath, options) {
24859
25102
  }
24860
25103
  }
24861
25104
  function createConvertCommand() {
24862
- const command = new import_commander28.Command("convert").description("Convert AI prompt files between formats").argument("<source>", "Source file path to convert").option("-t, --to <format>", `Target format (${CLI_SUPPORTED_FORMATS.join(", ")})`).option("-s, --subtype <subtype>", "Target subtype (agent, skill, slash-command, rule, hook, prompt, etc.)").option("-o, --output <path>", "Output path (defaults to format-specific location)").option("-n, --name <name>", 'Custom output filename (without extension, e.g., "my-rule")').option("--hook-mapping <strategy>", "Hook mapping strategy: auto (default), strict, skip", "auto").option("-y, --yes", "Skip confirmation prompts").action(async (source, options) => {
25105
+ const command = new import_commander29.Command("convert").description("Convert AI prompt files between formats").argument("<source>", "Source file path to convert").option("-t, --to <format>", `Target format (${CLI_SUPPORTED_FORMATS.join(", ")})`).option("-s, --subtype <subtype>", "Target subtype (agent, skill, slash-command, rule, hook, prompt, etc.)").option("-o, --output <path>", "Output path (defaults to format-specific location)").option("-n, --name <name>", 'Custom output filename (without extension, e.g., "my-rule")').option("--hook-mapping <strategy>", "Hook mapping strategy: auto (default), strict, skip", "auto").option("-y, --yes", "Skip confirmation prompts").action(async (source, options) => {
24863
25106
  try {
24864
25107
  if (!options.to) {
24865
25108
  throw new CLIError("Target format is required. Use --to <format>");
@@ -24908,7 +25151,7 @@ Valid subtypes: ${validSubtypes.join(", ")}`
24908
25151
 
24909
25152
  // src/commands/export.ts
24910
25153
  init_cjs_shims();
24911
- var import_commander29 = require("commander");
25154
+ var import_commander30 = require("commander");
24912
25155
  var import_fs20 = require("fs");
24913
25156
  var import_path24 = require("path");
24914
25157
  var import_chalk3 = __toESM(require_source());
@@ -25057,7 +25300,7 @@ async function handleExport(options) {
25057
25300
  }
25058
25301
  }
25059
25302
  function createExportCommand() {
25060
- const command = new import_commander29.Command("export");
25303
+ const command = new import_commander30.Command("export");
25061
25304
  command.description("Export installed packages to external tools").option("--to <tool>", "Export target (currently supports: ruler)", "ruler").option("-o, --output <dir>", "Custom output directory").option("-y, --yes", "Skip confirmation prompts").action(async (options) => {
25062
25305
  try {
25063
25306
  if (!options.to) {
@@ -25098,7 +25341,7 @@ function getVersion() {
25098
25341
  return "0.0.0";
25099
25342
  }
25100
25343
  }
25101
- var program = new import_commander30.Command();
25344
+ var program = new import_commander31.Command();
25102
25345
  program.name("prpm").description("Prompt Package Manager - Install and manage prompt-based files").version(getVersion());
25103
25346
  program.addCommand(createInitCommand());
25104
25347
  program.addCommand(createCatalogCommand());
@@ -25110,6 +25353,7 @@ program.addCommand(createTrendingCommand());
25110
25353
  program.addCommand(createPopularCommand());
25111
25354
  program.addCommand(createPublishCommand());
25112
25355
  program.addCommand(createDeprecateCommand());
25356
+ program.addCommand(createVisibilityCommand());
25113
25357
  program.addCommand(createLoginCommand());
25114
25358
  program.addCommand(createWhoamiCommand());
25115
25359
  program.addCommand(createCollectionsCommand());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "2.1.12",
3
+ "version": "2.1.14",
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": "^2.1.13",
49
- "@pr-pm/registry-client": "^2.3.12",
50
- "@pr-pm/types": "^2.1.13",
48
+ "@pr-pm/converters": "^2.1.15",
49
+ "@pr-pm/registry-client": "^2.3.14",
50
+ "@pr-pm/types": "^2.1.15",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",