prpm 2.1.11 → 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.
- package/dist/index.js +191 -42
- 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
|
|
19343
|
+
var import_commander31 = require("commander");
|
|
19344
19344
|
var import_fs21 = require("fs");
|
|
19345
19345
|
var import_path25 = require("path");
|
|
19346
19346
|
|
|
@@ -22389,9 +22389,156 @@ function createPublishCommand() {
|
|
|
22389
22389
|
});
|
|
22390
22390
|
}
|
|
22391
22391
|
|
|
22392
|
-
// src/commands/
|
|
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/visibility.ts
|
|
22466
|
+
init_cjs_shims();
|
|
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");
|
|
22395
22542
|
var jwt = __toESM(require("jsonwebtoken"));
|
|
22396
22543
|
init_telemetry();
|
|
22397
22544
|
init_user_config();
|
|
@@ -22558,16 +22705,16 @@ async function handleLogin(options) {
|
|
|
22558
22705
|
}
|
|
22559
22706
|
}
|
|
22560
22707
|
function createLoginCommand() {
|
|
22561
|
-
return new
|
|
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) => {
|
|
22562
22709
|
await handleLogin(options);
|
|
22563
22710
|
});
|
|
22564
22711
|
}
|
|
22565
22712
|
|
|
22566
22713
|
// src/commands/whoami.ts
|
|
22567
22714
|
init_cjs_shims();
|
|
22568
|
-
var
|
|
22715
|
+
var import_commander17 = require("commander");
|
|
22569
22716
|
init_user_config();
|
|
22570
|
-
var
|
|
22717
|
+
var import_registry_client9 = require("@pr-pm/registry-client");
|
|
22571
22718
|
init_telemetry();
|
|
22572
22719
|
init_errors();
|
|
22573
22720
|
async function handleWhoami() {
|
|
@@ -22583,7 +22730,7 @@ async function handleWhoami() {
|
|
|
22583
22730
|
return;
|
|
22584
22731
|
}
|
|
22585
22732
|
try {
|
|
22586
|
-
const client = (0,
|
|
22733
|
+
const client = (0, import_registry_client9.getRegistryClient)(config);
|
|
22587
22734
|
const userProfile = await client.getUserProfile(config.username);
|
|
22588
22735
|
console.log(`
|
|
22589
22736
|
\u{1F464} ${userProfile.username}${userProfile.verified_author ? " \u2713" : ""}`);
|
|
@@ -22623,7 +22770,7 @@ async function handleWhoami() {
|
|
|
22623
22770
|
}
|
|
22624
22771
|
}
|
|
22625
22772
|
function createWhoamiCommand() {
|
|
22626
|
-
return new
|
|
22773
|
+
return new import_commander17.Command("whoami").description("Show current logged-in user").action(async () => {
|
|
22627
22774
|
await handleWhoami();
|
|
22628
22775
|
});
|
|
22629
22776
|
}
|
|
@@ -22633,8 +22780,8 @@ init_collections();
|
|
|
22633
22780
|
|
|
22634
22781
|
// src/commands/outdated.ts
|
|
22635
22782
|
init_cjs_shims();
|
|
22636
|
-
var
|
|
22637
|
-
var
|
|
22783
|
+
var import_commander18 = require("commander");
|
|
22784
|
+
var import_registry_client10 = require("@pr-pm/registry-client");
|
|
22638
22785
|
init_user_config();
|
|
22639
22786
|
init_lockfile();
|
|
22640
22787
|
init_telemetry();
|
|
@@ -22646,7 +22793,7 @@ async function handleOutdated() {
|
|
|
22646
22793
|
try {
|
|
22647
22794
|
console.log("\u{1F50D} Checking for package updates...\n");
|
|
22648
22795
|
const config = await getConfig();
|
|
22649
|
-
const client = (0,
|
|
22796
|
+
const client = (0, import_registry_client10.getRegistryClient)(config);
|
|
22650
22797
|
const installedPackages = await listPackages();
|
|
22651
22798
|
if (installedPackages.length === 0) {
|
|
22652
22799
|
console.log("No packages installed.");
|
|
@@ -22736,15 +22883,15 @@ function getUpdateType(current, latest) {
|
|
|
22736
22883
|
return "patch";
|
|
22737
22884
|
}
|
|
22738
22885
|
function createOutdatedCommand() {
|
|
22739
|
-
return new
|
|
22886
|
+
return new import_commander18.Command("outdated").description("Check for package updates").action(async () => {
|
|
22740
22887
|
await handleOutdated();
|
|
22741
22888
|
});
|
|
22742
22889
|
}
|
|
22743
22890
|
|
|
22744
22891
|
// src/commands/update.ts
|
|
22745
22892
|
init_cjs_shims();
|
|
22746
|
-
var
|
|
22747
|
-
var
|
|
22893
|
+
var import_commander19 = require("commander");
|
|
22894
|
+
var import_registry_client11 = require("@pr-pm/registry-client");
|
|
22748
22895
|
init_user_config();
|
|
22749
22896
|
init_lockfile();
|
|
22750
22897
|
init_install();
|
|
@@ -22757,7 +22904,7 @@ async function handleUpdate(packageName, options = {}) {
|
|
|
22757
22904
|
let updatedCount = 0;
|
|
22758
22905
|
try {
|
|
22759
22906
|
const config = await getConfig();
|
|
22760
|
-
const client = (0,
|
|
22907
|
+
const client = (0, import_registry_client11.getRegistryClient)(config);
|
|
22761
22908
|
const installedPackages = await listPackages();
|
|
22762
22909
|
if (installedPackages.length === 0) {
|
|
22763
22910
|
console.log("No packages installed.");
|
|
@@ -22849,7 +22996,7 @@ function getUpdateType2(current, latest) {
|
|
|
22849
22996
|
return "patch";
|
|
22850
22997
|
}
|
|
22851
22998
|
function createUpdateCommand() {
|
|
22852
|
-
return new
|
|
22999
|
+
return new import_commander19.Command("update").description(
|
|
22853
23000
|
"Update packages to latest compatible versions (minor/patch only)"
|
|
22854
23001
|
).argument("[package]", "Specific package to update (optional)").option("--all", "Update all packages").action(async (packageName, options) => {
|
|
22855
23002
|
await handleUpdate(packageName, options);
|
|
@@ -22858,8 +23005,8 @@ function createUpdateCommand() {
|
|
|
22858
23005
|
|
|
22859
23006
|
// src/commands/upgrade.ts
|
|
22860
23007
|
init_cjs_shims();
|
|
22861
|
-
var
|
|
22862
|
-
var
|
|
23008
|
+
var import_commander20 = require("commander");
|
|
23009
|
+
var import_registry_client12 = require("@pr-pm/registry-client");
|
|
22863
23010
|
init_user_config();
|
|
22864
23011
|
init_lockfile();
|
|
22865
23012
|
init_install();
|
|
@@ -22873,7 +23020,7 @@ async function handleUpgrade(packageName, options = {}) {
|
|
|
22873
23020
|
let upgradedCount = 0;
|
|
22874
23021
|
try {
|
|
22875
23022
|
const config = await getConfig();
|
|
22876
|
-
const client = (0,
|
|
23023
|
+
const client = (0, import_registry_client12.getRegistryClient)(config);
|
|
22877
23024
|
const installedPackages = await listPackages();
|
|
22878
23025
|
if (installedPackages.length === 0) {
|
|
22879
23026
|
console.log("No packages installed.");
|
|
@@ -23040,7 +23187,7 @@ function getUpdateType3(current, latest) {
|
|
|
23040
23187
|
return "patch";
|
|
23041
23188
|
}
|
|
23042
23189
|
function createUpgradeCommand() {
|
|
23043
|
-
return new
|
|
23190
|
+
return new import_commander20.Command("upgrade").description(
|
|
23044
23191
|
"Upgrade packages to latest versions (including major updates)"
|
|
23045
23192
|
).argument("[package]", "Specific package to upgrade (optional)").option("--all", "Upgrade all packages").option("--force", "Skip warning for major version upgrades").action(
|
|
23046
23193
|
async (packageName, options) => {
|
|
@@ -23051,7 +23198,7 @@ function createUpgradeCommand() {
|
|
|
23051
23198
|
|
|
23052
23199
|
// src/commands/schema.ts
|
|
23053
23200
|
init_cjs_shims();
|
|
23054
|
-
var
|
|
23201
|
+
var import_commander21 = require("commander");
|
|
23055
23202
|
init_errors();
|
|
23056
23203
|
async function handleSchema() {
|
|
23057
23204
|
try {
|
|
@@ -23068,7 +23215,7 @@ async function handleSchema() {
|
|
|
23068
23215
|
}
|
|
23069
23216
|
}
|
|
23070
23217
|
function createSchemaCommand() {
|
|
23071
|
-
const command = new
|
|
23218
|
+
const command = new import_commander21.Command("schema");
|
|
23072
23219
|
command.description("Display the PRPM manifest JSON schema").action(async () => {
|
|
23073
23220
|
await handleSchema();
|
|
23074
23221
|
});
|
|
@@ -23080,7 +23227,7 @@ init_init();
|
|
|
23080
23227
|
|
|
23081
23228
|
// src/commands/config.ts
|
|
23082
23229
|
init_cjs_shims();
|
|
23083
|
-
var
|
|
23230
|
+
var import_commander22 = require("commander");
|
|
23084
23231
|
init_user_config();
|
|
23085
23232
|
init_errors();
|
|
23086
23233
|
async function handleConfigGet(key) {
|
|
@@ -23171,7 +23318,7 @@ async function handleConfigDelete(key) {
|
|
|
23171
23318
|
}
|
|
23172
23319
|
}
|
|
23173
23320
|
function createConfigCommand() {
|
|
23174
|
-
const command = new
|
|
23321
|
+
const command = new import_commander22.Command("config").description("Manage CLI configuration");
|
|
23175
23322
|
command.command("list").alias("ls").description("List all configuration values").action(async () => {
|
|
23176
23323
|
await handleConfigList();
|
|
23177
23324
|
});
|
|
@@ -23192,9 +23339,9 @@ function createConfigCommand() {
|
|
|
23192
23339
|
|
|
23193
23340
|
// src/commands/catalog.ts
|
|
23194
23341
|
init_cjs_shims();
|
|
23195
|
-
var
|
|
23342
|
+
var import_commander23 = require("commander");
|
|
23196
23343
|
function createCatalogCommand() {
|
|
23197
|
-
return new
|
|
23344
|
+
return new import_commander23.Command("catalog").description(
|
|
23198
23345
|
"[DEPRECATED] Use 'prpm init --scan' instead. Discover and catalog packages."
|
|
23199
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(
|
|
23200
23347
|
async (directories, options) => {
|
|
@@ -23233,7 +23380,7 @@ function createCatalogCommand() {
|
|
|
23233
23380
|
|
|
23234
23381
|
// src/commands/playground.ts
|
|
23235
23382
|
init_cjs_shims();
|
|
23236
|
-
var
|
|
23383
|
+
var import_commander24 = require("commander");
|
|
23237
23384
|
init_user_config();
|
|
23238
23385
|
init_telemetry();
|
|
23239
23386
|
var readline5 = __toESM(require("readline"));
|
|
@@ -23673,7 +23820,7 @@ async function handlePlayground(options) {
|
|
|
23673
23820
|
}
|
|
23674
23821
|
}
|
|
23675
23822
|
function createPlaygroundCommand() {
|
|
23676
|
-
const command = new
|
|
23823
|
+
const command = new import_commander24.Command("playground");
|
|
23677
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(
|
|
23678
23825
|
"-m, --model <model>",
|
|
23679
23826
|
"AI model to use (sonnet, opus, gpt-4o, gpt-4o-mini, gpt-4-turbo)",
|
|
@@ -23742,7 +23889,7 @@ Note: Playground usage requires credits. Run 'prpm credits' to check balance.
|
|
|
23742
23889
|
|
|
23743
23890
|
// src/commands/credits.ts
|
|
23744
23891
|
init_cjs_shims();
|
|
23745
|
-
var
|
|
23892
|
+
var import_commander25 = require("commander");
|
|
23746
23893
|
init_user_config();
|
|
23747
23894
|
init_telemetry();
|
|
23748
23895
|
init_errors();
|
|
@@ -23869,7 +24016,7 @@ async function handleCredits(options) {
|
|
|
23869
24016
|
}
|
|
23870
24017
|
}
|
|
23871
24018
|
function createCreditsCommand() {
|
|
23872
|
-
const command = new
|
|
24019
|
+
const command = new import_commander25.Command("credits");
|
|
23873
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(
|
|
23874
24021
|
"after",
|
|
23875
24022
|
`
|
|
@@ -23904,7 +24051,7 @@ Get more credits:
|
|
|
23904
24051
|
|
|
23905
24052
|
// src/commands/subscribe.ts
|
|
23906
24053
|
init_cjs_shims();
|
|
23907
|
-
var
|
|
24054
|
+
var import_commander26 = require("commander");
|
|
23908
24055
|
init_user_config();
|
|
23909
24056
|
init_telemetry();
|
|
23910
24057
|
var import_child_process2 = require("child_process");
|
|
@@ -24063,7 +24210,7 @@ async function handleSubscribe() {
|
|
|
24063
24210
|
}
|
|
24064
24211
|
}
|
|
24065
24212
|
function createSubscribeCommand() {
|
|
24066
|
-
const command = new
|
|
24213
|
+
const command = new import_commander26.Command("subscribe");
|
|
24067
24214
|
command.description("Subscribe to PRPM+ for monthly playground credits and benefits").addHelpText(
|
|
24068
24215
|
"after",
|
|
24069
24216
|
`
|
|
@@ -24104,7 +24251,7 @@ Note: You can cancel anytime from https://prpm.dev/settings/billing
|
|
|
24104
24251
|
|
|
24105
24252
|
// src/commands/buy-credits.ts
|
|
24106
24253
|
init_cjs_shims();
|
|
24107
|
-
var
|
|
24254
|
+
var import_commander27 = require("commander");
|
|
24108
24255
|
init_user_config();
|
|
24109
24256
|
init_telemetry();
|
|
24110
24257
|
var import_child_process3 = require("child_process");
|
|
@@ -24245,7 +24392,7 @@ async function handleBuyCredits(options) {
|
|
|
24245
24392
|
}
|
|
24246
24393
|
}
|
|
24247
24394
|
function createBuyCreditsCommand() {
|
|
24248
|
-
const command = new
|
|
24395
|
+
const command = new import_commander27.Command("buy-credits");
|
|
24249
24396
|
command.description("Purchase one-time playground credits (never expire)").option(
|
|
24250
24397
|
"-p, --package <package>",
|
|
24251
24398
|
"Credit package to purchase (small, medium, large)"
|
|
@@ -24298,8 +24445,8 @@ Note: Purchased credits are one-time and never expire, unlike monthly credits.
|
|
|
24298
24445
|
|
|
24299
24446
|
// src/commands/starred.ts
|
|
24300
24447
|
init_cjs_shims();
|
|
24301
|
-
var
|
|
24302
|
-
var
|
|
24448
|
+
var import_commander28 = require("commander");
|
|
24449
|
+
var import_registry_client13 = require("@pr-pm/registry-client");
|
|
24303
24450
|
init_user_config();
|
|
24304
24451
|
init_telemetry();
|
|
24305
24452
|
init_errors();
|
|
@@ -24312,7 +24459,7 @@ async function handleStarred(options) {
|
|
|
24312
24459
|
throw new CLIError("You must be logged in to view starred items. Run `prpm login` first.");
|
|
24313
24460
|
}
|
|
24314
24461
|
const registryUrl = config.registryUrl || process.env.PRPM_REGISTRY_URL || "https://registry.prpm.dev";
|
|
24315
|
-
const client = (0,
|
|
24462
|
+
const client = (0, import_registry_client13.getRegistryClient)({ registryUrl, token });
|
|
24316
24463
|
const showPackages = options.packages || !options.packages && !options.collections;
|
|
24317
24464
|
const showCollections = options.collections || !options.packages && !options.collections;
|
|
24318
24465
|
const limit = options.limit || 100;
|
|
@@ -24414,14 +24561,14 @@ Total: ${packages.length + collections.length} starred items`);
|
|
|
24414
24561
|
}
|
|
24415
24562
|
}
|
|
24416
24563
|
function createStarredCommand() {
|
|
24417
|
-
const command = new
|
|
24564
|
+
const command = new import_commander28.Command("starred");
|
|
24418
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);
|
|
24419
24566
|
return command;
|
|
24420
24567
|
}
|
|
24421
24568
|
|
|
24422
24569
|
// src/commands/convert.ts
|
|
24423
24570
|
init_cjs_shims();
|
|
24424
|
-
var
|
|
24571
|
+
var import_commander29 = require("commander");
|
|
24425
24572
|
var import_promises10 = require("fs/promises");
|
|
24426
24573
|
var import_path23 = require("path");
|
|
24427
24574
|
var import_fs19 = require("fs");
|
|
@@ -24786,7 +24933,7 @@ async function handleConvert(sourcePath, options) {
|
|
|
24786
24933
|
}
|
|
24787
24934
|
}
|
|
24788
24935
|
function createConvertCommand() {
|
|
24789
|
-
const command = new
|
|
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) => {
|
|
24790
24937
|
try {
|
|
24791
24938
|
if (!options.to) {
|
|
24792
24939
|
throw new CLIError("Target format is required. Use --to <format>");
|
|
@@ -24835,7 +24982,7 @@ Valid subtypes: ${validSubtypes.join(", ")}`
|
|
|
24835
24982
|
|
|
24836
24983
|
// src/commands/export.ts
|
|
24837
24984
|
init_cjs_shims();
|
|
24838
|
-
var
|
|
24985
|
+
var import_commander30 = require("commander");
|
|
24839
24986
|
var import_fs20 = require("fs");
|
|
24840
24987
|
var import_path24 = require("path");
|
|
24841
24988
|
var import_chalk3 = __toESM(require_source());
|
|
@@ -24984,7 +25131,7 @@ async function handleExport(options) {
|
|
|
24984
25131
|
}
|
|
24985
25132
|
}
|
|
24986
25133
|
function createExportCommand() {
|
|
24987
|
-
const command = new
|
|
25134
|
+
const command = new import_commander30.Command("export");
|
|
24988
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) => {
|
|
24989
25136
|
try {
|
|
24990
25137
|
if (!options.to) {
|
|
@@ -25025,7 +25172,7 @@ function getVersion() {
|
|
|
25025
25172
|
return "0.0.0";
|
|
25026
25173
|
}
|
|
25027
25174
|
}
|
|
25028
|
-
var program = new
|
|
25175
|
+
var program = new import_commander31.Command();
|
|
25029
25176
|
program.name("prpm").description("Prompt Package Manager - Install and manage prompt-based files").version(getVersion());
|
|
25030
25177
|
program.addCommand(createInitCommand());
|
|
25031
25178
|
program.addCommand(createCatalogCommand());
|
|
@@ -25036,6 +25183,8 @@ program.addCommand(createInfoCommand());
|
|
|
25036
25183
|
program.addCommand(createTrendingCommand());
|
|
25037
25184
|
program.addCommand(createPopularCommand());
|
|
25038
25185
|
program.addCommand(createPublishCommand());
|
|
25186
|
+
program.addCommand(createDeprecateCommand());
|
|
25187
|
+
program.addCommand(createVisibilityCommand());
|
|
25039
25188
|
program.addCommand(createLoginCommand());
|
|
25040
25189
|
program.addCommand(createWhoamiCommand());
|
|
25041
25190
|
program.addCommand(createCollectionsCommand());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prpm",
|
|
3
|
-
"version": "2.1.
|
|
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.
|
|
49
|
-
"@pr-pm/registry-client": "^2.3.
|
|
50
|
-
"@pr-pm/types": "^2.1.
|
|
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",
|