prpm 0.0.15 → 0.0.16
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/commands/install.js +3 -1
- package/dist/commands/publish.js +12 -0
- package/package.json +3 -3
package/dist/commands/install.js
CHANGED
|
@@ -444,8 +444,10 @@ async function extractTarball(tarball, packageId) {
|
|
|
444
444
|
});
|
|
445
445
|
// Read all extracted files
|
|
446
446
|
const extractedFiles = await fs.promises.readdir(tmpDir, { withFileTypes: true, recursive: true });
|
|
447
|
+
// Files to exclude from package content (metadata files)
|
|
448
|
+
const excludeFiles = ['package.tar', 'prpm.json', 'README.md', 'LICENSE', 'LICENSE.txt', 'LICENSE.md'];
|
|
447
449
|
for (const entry of extractedFiles) {
|
|
448
|
-
if (entry.isFile() && entry.name
|
|
450
|
+
if (entry.isFile() && !excludeFiles.includes(entry.name)) {
|
|
449
451
|
const filePath = path.join(entry.path || tmpDir, entry.name);
|
|
450
452
|
const content = await fs.promises.readFile(filePath, 'utf-8');
|
|
451
453
|
const relativePath = path.relative(tmpDir, filePath);
|
package/dist/commands/publish.js
CHANGED
|
@@ -509,6 +509,10 @@ async function handlePublish(options) {
|
|
|
509
509
|
}
|
|
510
510
|
// Publish to registry
|
|
511
511
|
console.log('🚀 Publishing to registry...');
|
|
512
|
+
if (selectedOrgId) {
|
|
513
|
+
console.log(` Publishing as organization: ${userInfo.organizations.find((org) => org.id === selectedOrgId)?.name}`);
|
|
514
|
+
console.log(` Organization ID: ${selectedOrgId}`);
|
|
515
|
+
}
|
|
512
516
|
const result = await client.publish(manifest, tarball, selectedOrgId ? { orgId: selectedOrgId } : undefined);
|
|
513
517
|
// Determine the webapp URL based on registry URL
|
|
514
518
|
let webappUrl;
|
|
@@ -568,6 +572,14 @@ async function handlePublish(options) {
|
|
|
568
572
|
console.log(` - ${pkg.name}: ${pkg.error}`);
|
|
569
573
|
});
|
|
570
574
|
console.log('');
|
|
575
|
+
// Provide hints for common permission errors
|
|
576
|
+
if (failedPackages.some(pkg => pkg.error.includes('Forbidden'))) {
|
|
577
|
+
console.log('💡 Forbidden errors usually mean:');
|
|
578
|
+
console.log(' - The package already exists and you don\'t have permission to update it');
|
|
579
|
+
console.log(' - The package belongs to an organization and you\'re not a member with publish rights');
|
|
580
|
+
console.log(' - Try: prpm whoami (to check your organization memberships)');
|
|
581
|
+
console.log('');
|
|
582
|
+
}
|
|
571
583
|
}
|
|
572
584
|
}
|
|
573
585
|
success = publishedPackages.length > 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prpm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Prompt Package Manager CLI - Install and manage prompt-based files",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@octokit/rest": "^22.0.0",
|
|
48
|
-
"@pr-pm/registry-client": "^1.2.
|
|
49
|
-
"@pr-pm/types": "^0.1.
|
|
48
|
+
"@pr-pm/registry-client": "^1.2.10",
|
|
49
|
+
"@pr-pm/types": "^0.1.10",
|
|
50
50
|
"ajv": "^8.17.1",
|
|
51
51
|
"ajv-formats": "^3.0.1",
|
|
52
52
|
"commander": "^11.1.0",
|