prpm 1.1.16 → 1.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -19221,8 +19221,9 @@ async function handleOutdated() {
19221
19221
  }
19222
19222
  const outdated = [];
19223
19223
  for (const pkg of installedPackages) {
19224
+ const { packageId } = parseLockfileKey(pkg.id);
19224
19225
  try {
19225
- const registryPkg = await client.getPackage(pkg.id);
19226
+ const registryPkg = await client.getPackage(packageId);
19226
19227
  if (!registryPkg.latest_version || !pkg.version) {
19227
19228
  continue;
19228
19229
  }
@@ -19231,7 +19232,7 @@ async function handleOutdated() {
19231
19232
  if (currentVersion !== latestVersion) {
19232
19233
  const updateType = getUpdateType(currentVersion, latestVersion);
19233
19234
  outdated.push({
19234
- id: pkg.id,
19235
+ id: packageId,
19235
19236
  current: currentVersion,
19236
19237
  latest: latestVersion,
19237
19238
  type: updateType
@@ -19272,7 +19273,9 @@ async function handleOutdated() {
19272
19273
  });
19273
19274
  console.log("");
19274
19275
  }
19275
- console.log('\u{1F4A1} Run "prpm update" to update to latest minor/patch versions');
19276
+ console.log(
19277
+ '\u{1F4A1} Run "prpm update" to update to latest minor/patch versions'
19278
+ );
19276
19279
  console.log('\u{1F4A1} Run "prpm upgrade" to upgrade to latest major versions\n');
19277
19280
  success = true;
19278
19281
  } catch (err) {
@@ -19329,15 +19332,19 @@ async function handleUpdate(packageName, options = {}) {
19329
19332
  }
19330
19333
  let packagesToUpdate = installedPackages;
19331
19334
  if (packageName) {
19332
- packagesToUpdate = installedPackages.filter((p) => p.id === packageName);
19335
+ packagesToUpdate = installedPackages.filter((p) => {
19336
+ const { packageId } = parseLockfileKey(p.id);
19337
+ return p.id === packageName || packageId === packageName;
19338
+ });
19333
19339
  if (packagesToUpdate.length === 0) {
19334
19340
  throw new Error(`Package ${packageName} is not installed`);
19335
19341
  }
19336
19342
  }
19337
19343
  console.log("\u{1F504} Checking for updates...\n");
19338
19344
  for (const pkg of packagesToUpdate) {
19345
+ const { packageId, format: installedFormat } = parseLockfileKey(pkg.id);
19339
19346
  try {
19340
- const registryPkg = await client.getPackage(pkg.id);
19347
+ const registryPkg = await client.getPackage(packageId);
19341
19348
  if (!registryPkg.latest_version || !pkg.version) {
19342
19349
  continue;
19343
19350
  }
@@ -19345,19 +19352,31 @@ async function handleUpdate(packageName, options = {}) {
19345
19352
  const latestVersion = registryPkg.latest_version.version;
19346
19353
  const updateType = getUpdateType2(currentVersion, latestVersion);
19347
19354
  if (updateType === "major") {
19348
- console.log(`\u23ED\uFE0F Skipping ${pkg.id} (major update ${currentVersion} \u2192 ${latestVersion}, use upgrade)`);
19355
+ console.log(
19356
+ `\u23ED\uFE0F Skipping ${packageId} (major update ${currentVersion} \u2192 ${latestVersion}, use upgrade)`
19357
+ );
19349
19358
  continue;
19350
19359
  }
19351
19360
  if (currentVersion === latestVersion) {
19352
- console.log(`\u2705 ${pkg.id} is already up to date (${currentVersion})`);
19361
+ console.log(
19362
+ `\u2705 ${packageId} is already up to date (${currentVersion})`
19363
+ );
19353
19364
  continue;
19354
19365
  }
19355
- console.log(`
19356
- \u{1F4E6} Updating ${pkg.id}: ${currentVersion} \u2192 ${latestVersion}`);
19357
- await handleInstall(`${pkg.id}@${latestVersion}`, {});
19366
+ console.log(
19367
+ `
19368
+ \u{1F4E6} Updating ${packageId}: ${currentVersion} \u2192 ${latestVersion}`
19369
+ );
19370
+ const installOptions = {};
19371
+ if (installedFormat && installedFormat !== pkg.sourceFormat) {
19372
+ installOptions.as = installedFormat;
19373
+ }
19374
+ await handleInstall(`${packageId}@${latestVersion}`, installOptions);
19358
19375
  updatedCount++;
19359
19376
  } catch (err) {
19360
- console.error(` \u274C Failed to update ${pkg.id}: ${err instanceof Error ? err.message : String(err)}`);
19377
+ console.error(
19378
+ ` \u274C Failed to update ${packageId}: ${err instanceof Error ? err.message : String(err)}`
19379
+ );
19361
19380
  }
19362
19381
  }
19363
19382
  if (updatedCount === 0) {
@@ -19396,7 +19415,9 @@ function getUpdateType2(current, latest) {
19396
19415
  return "patch";
19397
19416
  }
19398
19417
  function createUpdateCommand() {
19399
- return new import_commander17.Command("update").description("Update packages to latest compatible versions (minor/patch only)").argument("[package]", "Specific package to update (optional)").option("--all", "Update all packages").action(async (packageName, options) => {
19418
+ return new import_commander17.Command("update").description(
19419
+ "Update packages to latest compatible versions (minor/patch only)"
19420
+ ).argument("[package]", "Specific package to update (optional)").option("--all", "Update all packages").action(async (packageName, options) => {
19400
19421
  await handleUpdate(packageName, options);
19401
19422
  });
19402
19423
  }
@@ -19426,35 +19447,51 @@ async function handleUpgrade(packageName, options = {}) {
19426
19447
  }
19427
19448
  let packagesToUpgrade = installedPackages;
19428
19449
  if (packageName) {
19429
- packagesToUpgrade = installedPackages.filter((p) => p.id === packageName);
19450
+ packagesToUpgrade = installedPackages.filter((p) => {
19451
+ const { packageId } = parseLockfileKey(p.id);
19452
+ return p.id === packageName || packageId === packageName;
19453
+ });
19430
19454
  if (packagesToUpgrade.length === 0) {
19431
19455
  throw new Error(`Package ${packageName} is not installed`);
19432
19456
  }
19433
19457
  }
19434
19458
  console.log("\u{1F680} Checking for upgrades...\n");
19435
19459
  for (const pkg of packagesToUpgrade) {
19460
+ const { packageId, format: installedFormat } = parseLockfileKey(pkg.id);
19436
19461
  try {
19437
- const registryPkg = await client.getPackage(pkg.id);
19462
+ const registryPkg = await client.getPackage(packageId);
19438
19463
  if (!registryPkg.latest_version || !pkg.version) {
19439
19464
  continue;
19440
19465
  }
19441
19466
  const currentVersion = pkg.version;
19442
19467
  const latestVersion = registryPkg.latest_version.version;
19443
19468
  if (currentVersion === latestVersion) {
19444
- console.log(`\u2705 ${pkg.id} is already at latest version (${currentVersion})`);
19469
+ console.log(
19470
+ `\u2705 ${packageId} is already at latest version (${currentVersion})`
19471
+ );
19445
19472
  continue;
19446
19473
  }
19447
19474
  const updateType = getUpdateType3(currentVersion, latestVersion);
19448
19475
  const emoji = updateType === "major" ? "\u{1F534}" : updateType === "minor" ? "\u{1F7E1}" : "\u{1F7E2}";
19449
- console.log(`
19450
- ${emoji} Upgrading ${pkg.id}: ${currentVersion} \u2192 ${latestVersion} (${updateType})`);
19476
+ console.log(
19477
+ `
19478
+ ${emoji} Upgrading ${packageId}: ${currentVersion} \u2192 ${latestVersion} (${updateType})`
19479
+ );
19451
19480
  if (updateType === "major" && !options.force) {
19452
- console.log(` \u26A0\uFE0F This is a major version upgrade and may contain breaking changes`);
19481
+ console.log(
19482
+ ` \u26A0\uFE0F This is a major version upgrade and may contain breaking changes`
19483
+ );
19484
+ }
19485
+ const installOptions = {};
19486
+ if (installedFormat && installedFormat !== pkg.sourceFormat) {
19487
+ installOptions.as = installedFormat;
19453
19488
  }
19454
- await handleInstall(`${pkg.id}@${latestVersion}`, {});
19489
+ await handleInstall(`${packageId}@${latestVersion}`, installOptions);
19455
19490
  upgradedCount++;
19456
19491
  } catch (err) {
19457
- console.error(` \u274C Failed to upgrade ${pkg.id}: ${err instanceof Error ? err.message : String(err)}`);
19492
+ console.error(
19493
+ ` \u274C Failed to upgrade ${packageId}: ${err instanceof Error ? err.message : String(err)}`
19494
+ );
19458
19495
  }
19459
19496
  }
19460
19497
  if (upgradedCount === 0) {
@@ -19493,9 +19530,13 @@ function getUpdateType3(current, latest) {
19493
19530
  return "patch";
19494
19531
  }
19495
19532
  function createUpgradeCommand() {
19496
- return new import_commander18.Command("upgrade").description("Upgrade packages to latest versions (including major updates)").argument("[package]", "Specific package to upgrade (optional)").option("--all", "Upgrade all packages").option("--force", "Skip warning for major version upgrades").action(async (packageName, options) => {
19497
- await handleUpgrade(packageName, options);
19498
- });
19533
+ return new import_commander18.Command("upgrade").description(
19534
+ "Upgrade packages to latest versions (including major updates)"
19535
+ ).argument("[package]", "Specific package to upgrade (optional)").option("--all", "Upgrade all packages").option("--force", "Skip warning for major version upgrades").action(
19536
+ async (packageName, options) => {
19537
+ await handleUpgrade(packageName, options);
19538
+ }
19539
+ );
19499
19540
  }
19500
19541
 
19501
19542
  // src/commands/schema.ts
@@ -26,6 +26,10 @@
26
26
  "type": "string",
27
27
  "maxLength": 128,
28
28
  "description": "Optional license identifier for the skill (e.g., MIT, Apache-2.0)"
29
+ },
30
+ "allowed-tools": {
31
+ "type": "string",
32
+ "description": "Comma-separated list of tools the skill is allowed to use (e.g., 'Read, Edit, Bash')"
29
33
  }
30
34
  },
31
35
  "additionalProperties": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "Prompt Package Manager CLI - Install and manage prompt-based files",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -45,9 +45,9 @@
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
47
  "@octokit/rest": "^22.0.0",
48
- "@pr-pm/converters": "^1.1.16",
49
- "@pr-pm/registry-client": "^2.1.16",
50
- "@pr-pm/types": "^1.1.16",
48
+ "@pr-pm/converters": "^1.1.18",
49
+ "@pr-pm/registry-client": "^2.1.18",
50
+ "@pr-pm/types": "^1.1.18",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",