prpm 2.1.11 → 2.1.12

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 +116 -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_commander29 = require("commander");
19343
+ var import_commander30 = require("commander");
19344
19344
  var import_fs21 = require("fs");
19345
19345
  var import_path25 = require("path");
19346
19346
 
@@ -22389,9 +22389,82 @@ function createPublishCommand() {
22389
22389
  });
22390
22390
  }
22391
22391
 
22392
- // src/commands/login.ts
22392
+ // src/commands/deprecate.ts
22393
22393
  init_cjs_shims();
22394
22394
  var import_commander14 = require("commander");
22395
+ var import_registry_client7 = require("@pr-pm/registry-client");
22396
+ init_user_config();
22397
+ init_telemetry();
22398
+ init_errors();
22399
+ async function handleDeprecate(packageName, options) {
22400
+ const startTime = Date.now();
22401
+ let success = false;
22402
+ let error;
22403
+ let deprecated;
22404
+ let reason;
22405
+ try {
22406
+ const config = await getConfig();
22407
+ if (!config.token) {
22408
+ throw new CLIError("\u274C Authentication required. Run `prpm login` first.", 1);
22409
+ }
22410
+ const client = (0, import_registry_client7.getRegistryClient)(config);
22411
+ const action = options.undo ? "Undeprecating" : "Deprecating";
22412
+ console.log(`\u26A0\uFE0F ${action} package: ${packageName}...
22413
+ `);
22414
+ const result = await client.deprecatePackage(packageName, {
22415
+ deprecated: !options.undo,
22416
+ reason: options.reason
22417
+ });
22418
+ deprecated = result.deprecated;
22419
+ reason = result.reason;
22420
+ if (result.success) {
22421
+ console.log(`\u2705 ${result.message}`);
22422
+ console.log("");
22423
+ if (result.deprecated && result.reason) {
22424
+ console.log(` Reason: ${result.reason}`);
22425
+ console.log("");
22426
+ }
22427
+ if (result.deprecated) {
22428
+ console.log("\u{1F4A1} To undo: prpm deprecate --undo " + packageName);
22429
+ }
22430
+ } else {
22431
+ throw new Error("Failed to update deprecation status");
22432
+ }
22433
+ success = true;
22434
+ } catch (err) {
22435
+ if (err instanceof CLIError) {
22436
+ error = err.message;
22437
+ throw err;
22438
+ }
22439
+ error = err instanceof Error ? err.message : String(err);
22440
+ throw new CLIError(`\u274C Failed to update deprecation status: ${error}`, 1);
22441
+ } finally {
22442
+ await telemetry.track({
22443
+ command: "deprecate",
22444
+ success,
22445
+ error,
22446
+ duration: Date.now() - startTime,
22447
+ data: {
22448
+ packageName,
22449
+ deprecated,
22450
+ reason,
22451
+ undo: options.undo
22452
+ }
22453
+ });
22454
+ await telemetry.shutdown();
22455
+ }
22456
+ }
22457
+ function createDeprecateCommand() {
22458
+ const command = new import_commander14.Command("deprecate");
22459
+ command.description("Deprecate a package (owner only)").argument("<package>", "Package name to deprecate").option("--reason <reason>", "Reason for deprecation").option("--undo", "Remove deprecation status").action(async (packageName, options) => {
22460
+ await handleDeprecate(packageName, options);
22461
+ });
22462
+ return command;
22463
+ }
22464
+
22465
+ // src/commands/login.ts
22466
+ init_cjs_shims();
22467
+ var import_commander15 = require("commander");
22395
22468
  var jwt = __toESM(require("jsonwebtoken"));
22396
22469
  init_telemetry();
22397
22470
  init_user_config();
@@ -22558,16 +22631,16 @@ async function handleLogin(options) {
22558
22631
  }
22559
22632
  }
22560
22633
  function createLoginCommand() {
22561
- return new import_commander14.Command("login").description("Login to the PRMP registry").option("--token <token>", "Login with a personal access token").action(async (options) => {
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) => {
22562
22635
  await handleLogin(options);
22563
22636
  });
22564
22637
  }
22565
22638
 
22566
22639
  // src/commands/whoami.ts
22567
22640
  init_cjs_shims();
22568
- var import_commander15 = require("commander");
22641
+ var import_commander16 = require("commander");
22569
22642
  init_user_config();
22570
- var import_registry_client7 = require("@pr-pm/registry-client");
22643
+ var import_registry_client8 = require("@pr-pm/registry-client");
22571
22644
  init_telemetry();
22572
22645
  init_errors();
22573
22646
  async function handleWhoami() {
@@ -22583,7 +22656,7 @@ async function handleWhoami() {
22583
22656
  return;
22584
22657
  }
22585
22658
  try {
22586
- const client = (0, import_registry_client7.getRegistryClient)(config);
22659
+ const client = (0, import_registry_client8.getRegistryClient)(config);
22587
22660
  const userProfile = await client.getUserProfile(config.username);
22588
22661
  console.log(`
22589
22662
  \u{1F464} ${userProfile.username}${userProfile.verified_author ? " \u2713" : ""}`);
@@ -22623,7 +22696,7 @@ async function handleWhoami() {
22623
22696
  }
22624
22697
  }
22625
22698
  function createWhoamiCommand() {
22626
- return new import_commander15.Command("whoami").description("Show current logged-in user").action(async () => {
22699
+ return new import_commander16.Command("whoami").description("Show current logged-in user").action(async () => {
22627
22700
  await handleWhoami();
22628
22701
  });
22629
22702
  }
@@ -22633,8 +22706,8 @@ init_collections();
22633
22706
 
22634
22707
  // src/commands/outdated.ts
22635
22708
  init_cjs_shims();
22636
- var import_commander16 = require("commander");
22637
- var import_registry_client8 = require("@pr-pm/registry-client");
22709
+ var import_commander17 = require("commander");
22710
+ var import_registry_client9 = require("@pr-pm/registry-client");
22638
22711
  init_user_config();
22639
22712
  init_lockfile();
22640
22713
  init_telemetry();
@@ -22646,7 +22719,7 @@ async function handleOutdated() {
22646
22719
  try {
22647
22720
  console.log("\u{1F50D} Checking for package updates...\n");
22648
22721
  const config = await getConfig();
22649
- const client = (0, import_registry_client8.getRegistryClient)(config);
22722
+ const client = (0, import_registry_client9.getRegistryClient)(config);
22650
22723
  const installedPackages = await listPackages();
22651
22724
  if (installedPackages.length === 0) {
22652
22725
  console.log("No packages installed.");
@@ -22736,15 +22809,15 @@ function getUpdateType(current, latest) {
22736
22809
  return "patch";
22737
22810
  }
22738
22811
  function createOutdatedCommand() {
22739
- return new import_commander16.Command("outdated").description("Check for package updates").action(async () => {
22812
+ return new import_commander17.Command("outdated").description("Check for package updates").action(async () => {
22740
22813
  await handleOutdated();
22741
22814
  });
22742
22815
  }
22743
22816
 
22744
22817
  // src/commands/update.ts
22745
22818
  init_cjs_shims();
22746
- var import_commander17 = require("commander");
22747
- var import_registry_client9 = require("@pr-pm/registry-client");
22819
+ var import_commander18 = require("commander");
22820
+ var import_registry_client10 = require("@pr-pm/registry-client");
22748
22821
  init_user_config();
22749
22822
  init_lockfile();
22750
22823
  init_install();
@@ -22757,7 +22830,7 @@ async function handleUpdate(packageName, options = {}) {
22757
22830
  let updatedCount = 0;
22758
22831
  try {
22759
22832
  const config = await getConfig();
22760
- const client = (0, import_registry_client9.getRegistryClient)(config);
22833
+ const client = (0, import_registry_client10.getRegistryClient)(config);
22761
22834
  const installedPackages = await listPackages();
22762
22835
  if (installedPackages.length === 0) {
22763
22836
  console.log("No packages installed.");
@@ -22849,7 +22922,7 @@ function getUpdateType2(current, latest) {
22849
22922
  return "patch";
22850
22923
  }
22851
22924
  function createUpdateCommand() {
22852
- return new import_commander17.Command("update").description(
22925
+ return new import_commander18.Command("update").description(
22853
22926
  "Update packages to latest compatible versions (minor/patch only)"
22854
22927
  ).argument("[package]", "Specific package to update (optional)").option("--all", "Update all packages").action(async (packageName, options) => {
22855
22928
  await handleUpdate(packageName, options);
@@ -22858,8 +22931,8 @@ function createUpdateCommand() {
22858
22931
 
22859
22932
  // src/commands/upgrade.ts
22860
22933
  init_cjs_shims();
22861
- var import_commander18 = require("commander");
22862
- var import_registry_client10 = require("@pr-pm/registry-client");
22934
+ var import_commander19 = require("commander");
22935
+ var import_registry_client11 = require("@pr-pm/registry-client");
22863
22936
  init_user_config();
22864
22937
  init_lockfile();
22865
22938
  init_install();
@@ -22873,7 +22946,7 @@ async function handleUpgrade(packageName, options = {}) {
22873
22946
  let upgradedCount = 0;
22874
22947
  try {
22875
22948
  const config = await getConfig();
22876
- const client = (0, import_registry_client10.getRegistryClient)(config);
22949
+ const client = (0, import_registry_client11.getRegistryClient)(config);
22877
22950
  const installedPackages = await listPackages();
22878
22951
  if (installedPackages.length === 0) {
22879
22952
  console.log("No packages installed.");
@@ -23040,7 +23113,7 @@ function getUpdateType3(current, latest) {
23040
23113
  return "patch";
23041
23114
  }
23042
23115
  function createUpgradeCommand() {
23043
- return new import_commander18.Command("upgrade").description(
23116
+ return new import_commander19.Command("upgrade").description(
23044
23117
  "Upgrade packages to latest versions (including major updates)"
23045
23118
  ).argument("[package]", "Specific package to upgrade (optional)").option("--all", "Upgrade all packages").option("--force", "Skip warning for major version upgrades").action(
23046
23119
  async (packageName, options) => {
@@ -23051,7 +23124,7 @@ function createUpgradeCommand() {
23051
23124
 
23052
23125
  // src/commands/schema.ts
23053
23126
  init_cjs_shims();
23054
- var import_commander19 = require("commander");
23127
+ var import_commander20 = require("commander");
23055
23128
  init_errors();
23056
23129
  async function handleSchema() {
23057
23130
  try {
@@ -23068,7 +23141,7 @@ async function handleSchema() {
23068
23141
  }
23069
23142
  }
23070
23143
  function createSchemaCommand() {
23071
- const command = new import_commander19.Command("schema");
23144
+ const command = new import_commander20.Command("schema");
23072
23145
  command.description("Display the PRPM manifest JSON schema").action(async () => {
23073
23146
  await handleSchema();
23074
23147
  });
@@ -23080,7 +23153,7 @@ init_init();
23080
23153
 
23081
23154
  // src/commands/config.ts
23082
23155
  init_cjs_shims();
23083
- var import_commander20 = require("commander");
23156
+ var import_commander21 = require("commander");
23084
23157
  init_user_config();
23085
23158
  init_errors();
23086
23159
  async function handleConfigGet(key) {
@@ -23171,7 +23244,7 @@ async function handleConfigDelete(key) {
23171
23244
  }
23172
23245
  }
23173
23246
  function createConfigCommand() {
23174
- const command = new import_commander20.Command("config").description("Manage CLI configuration");
23247
+ const command = new import_commander21.Command("config").description("Manage CLI configuration");
23175
23248
  command.command("list").alias("ls").description("List all configuration values").action(async () => {
23176
23249
  await handleConfigList();
23177
23250
  });
@@ -23192,9 +23265,9 @@ function createConfigCommand() {
23192
23265
 
23193
23266
  // src/commands/catalog.ts
23194
23267
  init_cjs_shims();
23195
- var import_commander21 = require("commander");
23268
+ var import_commander22 = require("commander");
23196
23269
  function createCatalogCommand() {
23197
- return new import_commander21.Command("catalog").description(
23270
+ return new import_commander22.Command("catalog").description(
23198
23271
  "[DEPRECATED] Use 'prpm init --scan' instead. Discover and catalog packages."
23199
23272
  ).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(
23200
23273
  async (directories, options) => {
@@ -23233,7 +23306,7 @@ function createCatalogCommand() {
23233
23306
 
23234
23307
  // src/commands/playground.ts
23235
23308
  init_cjs_shims();
23236
- var import_commander22 = require("commander");
23309
+ var import_commander23 = require("commander");
23237
23310
  init_user_config();
23238
23311
  init_telemetry();
23239
23312
  var readline5 = __toESM(require("readline"));
@@ -23673,7 +23746,7 @@ async function handlePlayground(options) {
23673
23746
  }
23674
23747
  }
23675
23748
  function createPlaygroundCommand() {
23676
- const command = new import_commander22.Command("playground");
23749
+ const command = new import_commander23.Command("playground");
23677
23750
  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(
23678
23751
  "-m, --model <model>",
23679
23752
  "AI model to use (sonnet, opus, gpt-4o, gpt-4o-mini, gpt-4-turbo)",
@@ -23742,7 +23815,7 @@ Note: Playground usage requires credits. Run 'prpm credits' to check balance.
23742
23815
 
23743
23816
  // src/commands/credits.ts
23744
23817
  init_cjs_shims();
23745
- var import_commander23 = require("commander");
23818
+ var import_commander24 = require("commander");
23746
23819
  init_user_config();
23747
23820
  init_telemetry();
23748
23821
  init_errors();
@@ -23869,7 +23942,7 @@ async function handleCredits(options) {
23869
23942
  }
23870
23943
  }
23871
23944
  function createCreditsCommand() {
23872
- const command = new import_commander23.Command("credits");
23945
+ const command = new import_commander24.Command("credits");
23873
23946
  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(
23874
23947
  "after",
23875
23948
  `
@@ -23904,7 +23977,7 @@ Get more credits:
23904
23977
 
23905
23978
  // src/commands/subscribe.ts
23906
23979
  init_cjs_shims();
23907
- var import_commander24 = require("commander");
23980
+ var import_commander25 = require("commander");
23908
23981
  init_user_config();
23909
23982
  init_telemetry();
23910
23983
  var import_child_process2 = require("child_process");
@@ -24063,7 +24136,7 @@ async function handleSubscribe() {
24063
24136
  }
24064
24137
  }
24065
24138
  function createSubscribeCommand() {
24066
- const command = new import_commander24.Command("subscribe");
24139
+ const command = new import_commander25.Command("subscribe");
24067
24140
  command.description("Subscribe to PRPM+ for monthly playground credits and benefits").addHelpText(
24068
24141
  "after",
24069
24142
  `
@@ -24104,7 +24177,7 @@ Note: You can cancel anytime from https://prpm.dev/settings/billing
24104
24177
 
24105
24178
  // src/commands/buy-credits.ts
24106
24179
  init_cjs_shims();
24107
- var import_commander25 = require("commander");
24180
+ var import_commander26 = require("commander");
24108
24181
  init_user_config();
24109
24182
  init_telemetry();
24110
24183
  var import_child_process3 = require("child_process");
@@ -24245,7 +24318,7 @@ async function handleBuyCredits(options) {
24245
24318
  }
24246
24319
  }
24247
24320
  function createBuyCreditsCommand() {
24248
- const command = new import_commander25.Command("buy-credits");
24321
+ const command = new import_commander26.Command("buy-credits");
24249
24322
  command.description("Purchase one-time playground credits (never expire)").option(
24250
24323
  "-p, --package <package>",
24251
24324
  "Credit package to purchase (small, medium, large)"
@@ -24298,8 +24371,8 @@ Note: Purchased credits are one-time and never expire, unlike monthly credits.
24298
24371
 
24299
24372
  // src/commands/starred.ts
24300
24373
  init_cjs_shims();
24301
- var import_commander26 = require("commander");
24302
- var import_registry_client11 = require("@pr-pm/registry-client");
24374
+ var import_commander27 = require("commander");
24375
+ var import_registry_client12 = require("@pr-pm/registry-client");
24303
24376
  init_user_config();
24304
24377
  init_telemetry();
24305
24378
  init_errors();
@@ -24312,7 +24385,7 @@ async function handleStarred(options) {
24312
24385
  throw new CLIError("You must be logged in to view starred items. Run `prpm login` first.");
24313
24386
  }
24314
24387
  const registryUrl = config.registryUrl || process.env.PRPM_REGISTRY_URL || "https://registry.prpm.dev";
24315
- const client = (0, import_registry_client11.getRegistryClient)({ registryUrl, token });
24388
+ const client = (0, import_registry_client12.getRegistryClient)({ registryUrl, token });
24316
24389
  const showPackages = options.packages || !options.packages && !options.collections;
24317
24390
  const showCollections = options.collections || !options.packages && !options.collections;
24318
24391
  const limit = options.limit || 100;
@@ -24414,14 +24487,14 @@ Total: ${packages.length + collections.length} starred items`);
24414
24487
  }
24415
24488
  }
24416
24489
  function createStarredCommand() {
24417
- const command = new import_commander26.Command("starred");
24490
+ const command = new import_commander27.Command("starred");
24418
24491
  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);
24419
24492
  return command;
24420
24493
  }
24421
24494
 
24422
24495
  // src/commands/convert.ts
24423
24496
  init_cjs_shims();
24424
- var import_commander27 = require("commander");
24497
+ var import_commander28 = require("commander");
24425
24498
  var import_promises10 = require("fs/promises");
24426
24499
  var import_path23 = require("path");
24427
24500
  var import_fs19 = require("fs");
@@ -24786,7 +24859,7 @@ async function handleConvert(sourcePath, options) {
24786
24859
  }
24787
24860
  }
24788
24861
  function createConvertCommand() {
24789
- const command = new import_commander27.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) => {
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) => {
24790
24863
  try {
24791
24864
  if (!options.to) {
24792
24865
  throw new CLIError("Target format is required. Use --to <format>");
@@ -24835,7 +24908,7 @@ Valid subtypes: ${validSubtypes.join(", ")}`
24835
24908
 
24836
24909
  // src/commands/export.ts
24837
24910
  init_cjs_shims();
24838
- var import_commander28 = require("commander");
24911
+ var import_commander29 = require("commander");
24839
24912
  var import_fs20 = require("fs");
24840
24913
  var import_path24 = require("path");
24841
24914
  var import_chalk3 = __toESM(require_source());
@@ -24984,7 +25057,7 @@ async function handleExport(options) {
24984
25057
  }
24985
25058
  }
24986
25059
  function createExportCommand() {
24987
- const command = new import_commander28.Command("export");
25060
+ const command = new import_commander29.Command("export");
24988
25061
  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) => {
24989
25062
  try {
24990
25063
  if (!options.to) {
@@ -25025,7 +25098,7 @@ function getVersion() {
25025
25098
  return "0.0.0";
25026
25099
  }
25027
25100
  }
25028
- var program = new import_commander29.Command();
25101
+ var program = new import_commander30.Command();
25029
25102
  program.name("prpm").description("Prompt Package Manager - Install and manage prompt-based files").version(getVersion());
25030
25103
  program.addCommand(createInitCommand());
25031
25104
  program.addCommand(createCatalogCommand());
@@ -25036,6 +25109,7 @@ program.addCommand(createInfoCommand());
25036
25109
  program.addCommand(createTrendingCommand());
25037
25110
  program.addCommand(createPopularCommand());
25038
25111
  program.addCommand(createPublishCommand());
25112
+ program.addCommand(createDeprecateCommand());
25039
25113
  program.addCommand(createLoginCommand());
25040
25114
  program.addCommand(createWhoamiCommand());
25041
25115
  program.addCommand(createCollectionsCommand());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "2.1.11",
3
+ "version": "2.1.12",
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.12",
49
- "@pr-pm/registry-client": "^2.3.11",
50
- "@pr-pm/types": "^2.1.12",
48
+ "@pr-pm/converters": "^2.1.13",
49
+ "@pr-pm/registry-client": "^2.3.12",
50
+ "@pr-pm/types": "^2.1.13",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",