prpm 2.1.12 → 2.1.13

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 +117 -42
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -19340,7 +19340,7 @@ Include examples if helpful.
19340
19340
 
19341
19341
  // src/index.ts
19342
19342
  init_cjs_shims();
19343
- var import_commander30 = require("commander");
19343
+ var import_commander31 = require("commander");
19344
19344
  var import_fs21 = require("fs");
19345
19345
  var import_path25 = require("path");
19346
19346
 
@@ -22462,9 +22462,83 @@ function createDeprecateCommand() {
22462
22462
  return command;
22463
22463
  }
22464
22464
 
22465
- // src/commands/login.ts
22465
+ // src/commands/visibility.ts
22466
22466
  init_cjs_shims();
22467
22467
  var import_commander15 = require("commander");
22468
+ var import_registry_client8 = require("@pr-pm/registry-client");
22469
+ init_user_config();
22470
+ init_telemetry();
22471
+ init_errors();
22472
+ async function handleVisibility(packageName, options) {
22473
+ const startTime = Date.now();
22474
+ let success = false;
22475
+ let error;
22476
+ let visibility;
22477
+ try {
22478
+ const config = await getConfig();
22479
+ if (!config.token) {
22480
+ throw new CLIError("\u274C Authentication required. Run `prpm login` first.", 1);
22481
+ }
22482
+ if (options.public && options.private) {
22483
+ throw new CLIError("\u274C Cannot specify both --public and --private", 1);
22484
+ }
22485
+ if (!options.public && !options.private) {
22486
+ throw new CLIError("\u274C Must specify either --public or --private", 1);
22487
+ }
22488
+ visibility = options.public ? "public" : "private";
22489
+ const client = (0, import_registry_client8.getRegistryClient)(config);
22490
+ console.log(`\u{1F504} Setting package visibility: ${packageName} -> ${visibility}...
22491
+ `);
22492
+ const result = await client.setPackageVisibility(packageName, visibility);
22493
+ if (result.success) {
22494
+ const icon = visibility === "public" ? "\u{1F30D}" : "\u{1F512}";
22495
+ console.log(`\u2705 ${result.message}`);
22496
+ console.log("");
22497
+ console.log(` ${icon} Package is now ${visibility}`);
22498
+ if (visibility === "public") {
22499
+ console.log(" \u{1F4E6} Package will appear in search results");
22500
+ } else {
22501
+ console.log(" \u{1F510} Package is only accessible to organization members");
22502
+ }
22503
+ } else {
22504
+ throw new Error("Failed to update visibility");
22505
+ }
22506
+ success = true;
22507
+ } catch (err) {
22508
+ if (err instanceof CLIError) {
22509
+ error = err.message;
22510
+ throw err;
22511
+ }
22512
+ error = err instanceof Error ? err.message : String(err);
22513
+ throw new CLIError(`\u274C Failed to update visibility: ${error}`, 1);
22514
+ } finally {
22515
+ try {
22516
+ await telemetry.track({
22517
+ command: "visibility",
22518
+ success,
22519
+ error,
22520
+ duration: Date.now() - startTime,
22521
+ data: {
22522
+ packageName,
22523
+ visibility
22524
+ }
22525
+ });
22526
+ await telemetry.shutdown();
22527
+ } catch {
22528
+ }
22529
+ }
22530
+ }
22531
+ function createVisibilityCommand() {
22532
+ const command = new import_commander15.Command("visibility");
22533
+ 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) => {
22534
+ await handleVisibility(packageName, options);
22535
+ });
22536
+ return command;
22537
+ }
22538
+
22539
+ // src/commands/login.ts
22540
+ init_cjs_shims();
22541
+ var import_commander16 = require("commander");
22468
22542
  var jwt = __toESM(require("jsonwebtoken"));
22469
22543
  init_telemetry();
22470
22544
  init_user_config();
@@ -22631,16 +22705,16 @@ async function handleLogin(options) {
22631
22705
  }
22632
22706
  }
22633
22707
  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) => {
22708
+ 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
22709
  await handleLogin(options);
22636
22710
  });
22637
22711
  }
22638
22712
 
22639
22713
  // src/commands/whoami.ts
22640
22714
  init_cjs_shims();
22641
- var import_commander16 = require("commander");
22715
+ var import_commander17 = require("commander");
22642
22716
  init_user_config();
22643
- var import_registry_client8 = require("@pr-pm/registry-client");
22717
+ var import_registry_client9 = require("@pr-pm/registry-client");
22644
22718
  init_telemetry();
22645
22719
  init_errors();
22646
22720
  async function handleWhoami() {
@@ -22656,7 +22730,7 @@ async function handleWhoami() {
22656
22730
  return;
22657
22731
  }
22658
22732
  try {
22659
- const client = (0, import_registry_client8.getRegistryClient)(config);
22733
+ const client = (0, import_registry_client9.getRegistryClient)(config);
22660
22734
  const userProfile = await client.getUserProfile(config.username);
22661
22735
  console.log(`
22662
22736
  \u{1F464} ${userProfile.username}${userProfile.verified_author ? " \u2713" : ""}`);
@@ -22696,7 +22770,7 @@ async function handleWhoami() {
22696
22770
  }
22697
22771
  }
22698
22772
  function createWhoamiCommand() {
22699
- return new import_commander16.Command("whoami").description("Show current logged-in user").action(async () => {
22773
+ return new import_commander17.Command("whoami").description("Show current logged-in user").action(async () => {
22700
22774
  await handleWhoami();
22701
22775
  });
22702
22776
  }
@@ -22706,8 +22780,8 @@ init_collections();
22706
22780
 
22707
22781
  // src/commands/outdated.ts
22708
22782
  init_cjs_shims();
22709
- var import_commander17 = require("commander");
22710
- var import_registry_client9 = require("@pr-pm/registry-client");
22783
+ var import_commander18 = require("commander");
22784
+ var import_registry_client10 = require("@pr-pm/registry-client");
22711
22785
  init_user_config();
22712
22786
  init_lockfile();
22713
22787
  init_telemetry();
@@ -22719,7 +22793,7 @@ async function handleOutdated() {
22719
22793
  try {
22720
22794
  console.log("\u{1F50D} Checking for package updates...\n");
22721
22795
  const config = await getConfig();
22722
- const client = (0, import_registry_client9.getRegistryClient)(config);
22796
+ const client = (0, import_registry_client10.getRegistryClient)(config);
22723
22797
  const installedPackages = await listPackages();
22724
22798
  if (installedPackages.length === 0) {
22725
22799
  console.log("No packages installed.");
@@ -22809,15 +22883,15 @@ function getUpdateType(current, latest) {
22809
22883
  return "patch";
22810
22884
  }
22811
22885
  function createOutdatedCommand() {
22812
- return new import_commander17.Command("outdated").description("Check for package updates").action(async () => {
22886
+ return new import_commander18.Command("outdated").description("Check for package updates").action(async () => {
22813
22887
  await handleOutdated();
22814
22888
  });
22815
22889
  }
22816
22890
 
22817
22891
  // src/commands/update.ts
22818
22892
  init_cjs_shims();
22819
- var import_commander18 = require("commander");
22820
- var import_registry_client10 = require("@pr-pm/registry-client");
22893
+ var import_commander19 = require("commander");
22894
+ var import_registry_client11 = require("@pr-pm/registry-client");
22821
22895
  init_user_config();
22822
22896
  init_lockfile();
22823
22897
  init_install();
@@ -22830,7 +22904,7 @@ async function handleUpdate(packageName, options = {}) {
22830
22904
  let updatedCount = 0;
22831
22905
  try {
22832
22906
  const config = await getConfig();
22833
- const client = (0, import_registry_client10.getRegistryClient)(config);
22907
+ const client = (0, import_registry_client11.getRegistryClient)(config);
22834
22908
  const installedPackages = await listPackages();
22835
22909
  if (installedPackages.length === 0) {
22836
22910
  console.log("No packages installed.");
@@ -22922,7 +22996,7 @@ function getUpdateType2(current, latest) {
22922
22996
  return "patch";
22923
22997
  }
22924
22998
  function createUpdateCommand() {
22925
- return new import_commander18.Command("update").description(
22999
+ return new import_commander19.Command("update").description(
22926
23000
  "Update packages to latest compatible versions (minor/patch only)"
22927
23001
  ).argument("[package]", "Specific package to update (optional)").option("--all", "Update all packages").action(async (packageName, options) => {
22928
23002
  await handleUpdate(packageName, options);
@@ -22931,8 +23005,8 @@ function createUpdateCommand() {
22931
23005
 
22932
23006
  // src/commands/upgrade.ts
22933
23007
  init_cjs_shims();
22934
- var import_commander19 = require("commander");
22935
- var import_registry_client11 = require("@pr-pm/registry-client");
23008
+ var import_commander20 = require("commander");
23009
+ var import_registry_client12 = require("@pr-pm/registry-client");
22936
23010
  init_user_config();
22937
23011
  init_lockfile();
22938
23012
  init_install();
@@ -22946,7 +23020,7 @@ async function handleUpgrade(packageName, options = {}) {
22946
23020
  let upgradedCount = 0;
22947
23021
  try {
22948
23022
  const config = await getConfig();
22949
- const client = (0, import_registry_client11.getRegistryClient)(config);
23023
+ const client = (0, import_registry_client12.getRegistryClient)(config);
22950
23024
  const installedPackages = await listPackages();
22951
23025
  if (installedPackages.length === 0) {
22952
23026
  console.log("No packages installed.");
@@ -23113,7 +23187,7 @@ function getUpdateType3(current, latest) {
23113
23187
  return "patch";
23114
23188
  }
23115
23189
  function createUpgradeCommand() {
23116
- return new import_commander19.Command("upgrade").description(
23190
+ return new import_commander20.Command("upgrade").description(
23117
23191
  "Upgrade packages to latest versions (including major updates)"
23118
23192
  ).argument("[package]", "Specific package to upgrade (optional)").option("--all", "Upgrade all packages").option("--force", "Skip warning for major version upgrades").action(
23119
23193
  async (packageName, options) => {
@@ -23124,7 +23198,7 @@ function createUpgradeCommand() {
23124
23198
 
23125
23199
  // src/commands/schema.ts
23126
23200
  init_cjs_shims();
23127
- var import_commander20 = require("commander");
23201
+ var import_commander21 = require("commander");
23128
23202
  init_errors();
23129
23203
  async function handleSchema() {
23130
23204
  try {
@@ -23141,7 +23215,7 @@ async function handleSchema() {
23141
23215
  }
23142
23216
  }
23143
23217
  function createSchemaCommand() {
23144
- const command = new import_commander20.Command("schema");
23218
+ const command = new import_commander21.Command("schema");
23145
23219
  command.description("Display the PRPM manifest JSON schema").action(async () => {
23146
23220
  await handleSchema();
23147
23221
  });
@@ -23153,7 +23227,7 @@ init_init();
23153
23227
 
23154
23228
  // src/commands/config.ts
23155
23229
  init_cjs_shims();
23156
- var import_commander21 = require("commander");
23230
+ var import_commander22 = require("commander");
23157
23231
  init_user_config();
23158
23232
  init_errors();
23159
23233
  async function handleConfigGet(key) {
@@ -23244,7 +23318,7 @@ async function handleConfigDelete(key) {
23244
23318
  }
23245
23319
  }
23246
23320
  function createConfigCommand() {
23247
- const command = new import_commander21.Command("config").description("Manage CLI configuration");
23321
+ const command = new import_commander22.Command("config").description("Manage CLI configuration");
23248
23322
  command.command("list").alias("ls").description("List all configuration values").action(async () => {
23249
23323
  await handleConfigList();
23250
23324
  });
@@ -23265,9 +23339,9 @@ function createConfigCommand() {
23265
23339
 
23266
23340
  // src/commands/catalog.ts
23267
23341
  init_cjs_shims();
23268
- var import_commander22 = require("commander");
23342
+ var import_commander23 = require("commander");
23269
23343
  function createCatalogCommand() {
23270
- return new import_commander22.Command("catalog").description(
23344
+ return new import_commander23.Command("catalog").description(
23271
23345
  "[DEPRECATED] Use 'prpm init --scan' instead. Discover and catalog packages."
23272
23346
  ).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
23347
  async (directories, options) => {
@@ -23306,7 +23380,7 @@ function createCatalogCommand() {
23306
23380
 
23307
23381
  // src/commands/playground.ts
23308
23382
  init_cjs_shims();
23309
- var import_commander23 = require("commander");
23383
+ var import_commander24 = require("commander");
23310
23384
  init_user_config();
23311
23385
  init_telemetry();
23312
23386
  var readline5 = __toESM(require("readline"));
@@ -23746,7 +23820,7 @@ async function handlePlayground(options) {
23746
23820
  }
23747
23821
  }
23748
23822
  function createPlaygroundCommand() {
23749
- const command = new import_commander23.Command("playground");
23823
+ const command = new import_commander24.Command("playground");
23750
23824
  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
23825
  "-m, --model <model>",
23752
23826
  "AI model to use (sonnet, opus, gpt-4o, gpt-4o-mini, gpt-4-turbo)",
@@ -23815,7 +23889,7 @@ Note: Playground usage requires credits. Run 'prpm credits' to check balance.
23815
23889
 
23816
23890
  // src/commands/credits.ts
23817
23891
  init_cjs_shims();
23818
- var import_commander24 = require("commander");
23892
+ var import_commander25 = require("commander");
23819
23893
  init_user_config();
23820
23894
  init_telemetry();
23821
23895
  init_errors();
@@ -23942,7 +24016,7 @@ async function handleCredits(options) {
23942
24016
  }
23943
24017
  }
23944
24018
  function createCreditsCommand() {
23945
- const command = new import_commander24.Command("credits");
24019
+ const command = new import_commander25.Command("credits");
23946
24020
  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
24021
  "after",
23948
24022
  `
@@ -23977,7 +24051,7 @@ Get more credits:
23977
24051
 
23978
24052
  // src/commands/subscribe.ts
23979
24053
  init_cjs_shims();
23980
- var import_commander25 = require("commander");
24054
+ var import_commander26 = require("commander");
23981
24055
  init_user_config();
23982
24056
  init_telemetry();
23983
24057
  var import_child_process2 = require("child_process");
@@ -24136,7 +24210,7 @@ async function handleSubscribe() {
24136
24210
  }
24137
24211
  }
24138
24212
  function createSubscribeCommand() {
24139
- const command = new import_commander25.Command("subscribe");
24213
+ const command = new import_commander26.Command("subscribe");
24140
24214
  command.description("Subscribe to PRPM+ for monthly playground credits and benefits").addHelpText(
24141
24215
  "after",
24142
24216
  `
@@ -24177,7 +24251,7 @@ Note: You can cancel anytime from https://prpm.dev/settings/billing
24177
24251
 
24178
24252
  // src/commands/buy-credits.ts
24179
24253
  init_cjs_shims();
24180
- var import_commander26 = require("commander");
24254
+ var import_commander27 = require("commander");
24181
24255
  init_user_config();
24182
24256
  init_telemetry();
24183
24257
  var import_child_process3 = require("child_process");
@@ -24318,7 +24392,7 @@ async function handleBuyCredits(options) {
24318
24392
  }
24319
24393
  }
24320
24394
  function createBuyCreditsCommand() {
24321
- const command = new import_commander26.Command("buy-credits");
24395
+ const command = new import_commander27.Command("buy-credits");
24322
24396
  command.description("Purchase one-time playground credits (never expire)").option(
24323
24397
  "-p, --package <package>",
24324
24398
  "Credit package to purchase (small, medium, large)"
@@ -24371,8 +24445,8 @@ Note: Purchased credits are one-time and never expire, unlike monthly credits.
24371
24445
 
24372
24446
  // src/commands/starred.ts
24373
24447
  init_cjs_shims();
24374
- var import_commander27 = require("commander");
24375
- var import_registry_client12 = require("@pr-pm/registry-client");
24448
+ var import_commander28 = require("commander");
24449
+ var import_registry_client13 = require("@pr-pm/registry-client");
24376
24450
  init_user_config();
24377
24451
  init_telemetry();
24378
24452
  init_errors();
@@ -24385,7 +24459,7 @@ async function handleStarred(options) {
24385
24459
  throw new CLIError("You must be logged in to view starred items. Run `prpm login` first.");
24386
24460
  }
24387
24461
  const registryUrl = config.registryUrl || process.env.PRPM_REGISTRY_URL || "https://registry.prpm.dev";
24388
- const client = (0, import_registry_client12.getRegistryClient)({ registryUrl, token });
24462
+ const client = (0, import_registry_client13.getRegistryClient)({ registryUrl, token });
24389
24463
  const showPackages = options.packages || !options.packages && !options.collections;
24390
24464
  const showCollections = options.collections || !options.packages && !options.collections;
24391
24465
  const limit = options.limit || 100;
@@ -24487,14 +24561,14 @@ Total: ${packages.length + collections.length} starred items`);
24487
24561
  }
24488
24562
  }
24489
24563
  function createStarredCommand() {
24490
- const command = new import_commander27.Command("starred");
24564
+ const command = new import_commander28.Command("starred");
24491
24565
  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
24566
  return command;
24493
24567
  }
24494
24568
 
24495
24569
  // src/commands/convert.ts
24496
24570
  init_cjs_shims();
24497
- var import_commander28 = require("commander");
24571
+ var import_commander29 = require("commander");
24498
24572
  var import_promises10 = require("fs/promises");
24499
24573
  var import_path23 = require("path");
24500
24574
  var import_fs19 = require("fs");
@@ -24859,7 +24933,7 @@ async function handleConvert(sourcePath, options) {
24859
24933
  }
24860
24934
  }
24861
24935
  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) => {
24936
+ 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
24937
  try {
24864
24938
  if (!options.to) {
24865
24939
  throw new CLIError("Target format is required. Use --to <format>");
@@ -24908,7 +24982,7 @@ Valid subtypes: ${validSubtypes.join(", ")}`
24908
24982
 
24909
24983
  // src/commands/export.ts
24910
24984
  init_cjs_shims();
24911
- var import_commander29 = require("commander");
24985
+ var import_commander30 = require("commander");
24912
24986
  var import_fs20 = require("fs");
24913
24987
  var import_path24 = require("path");
24914
24988
  var import_chalk3 = __toESM(require_source());
@@ -25057,7 +25131,7 @@ async function handleExport(options) {
25057
25131
  }
25058
25132
  }
25059
25133
  function createExportCommand() {
25060
- const command = new import_commander29.Command("export");
25134
+ const command = new import_commander30.Command("export");
25061
25135
  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
25136
  try {
25063
25137
  if (!options.to) {
@@ -25098,7 +25172,7 @@ function getVersion() {
25098
25172
  return "0.0.0";
25099
25173
  }
25100
25174
  }
25101
- var program = new import_commander30.Command();
25175
+ var program = new import_commander31.Command();
25102
25176
  program.name("prpm").description("Prompt Package Manager - Install and manage prompt-based files").version(getVersion());
25103
25177
  program.addCommand(createInitCommand());
25104
25178
  program.addCommand(createCatalogCommand());
@@ -25110,6 +25184,7 @@ program.addCommand(createTrendingCommand());
25110
25184
  program.addCommand(createPopularCommand());
25111
25185
  program.addCommand(createPublishCommand());
25112
25186
  program.addCommand(createDeprecateCommand());
25187
+ program.addCommand(createVisibilityCommand());
25113
25188
  program.addCommand(createLoginCommand());
25114
25189
  program.addCommand(createWhoamiCommand());
25115
25190
  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.13",
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.14",
49
+ "@pr-pm/registry-client": "^2.3.13",
50
+ "@pr-pm/types": "^2.1.14",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",