prpm 1.1.5 → 1.1.6

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 +17 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -14414,11 +14414,27 @@ ${"=".repeat(60)}`);
14414
14414
  break;
14415
14415
  }
14416
14416
  console.log("\u{1F680} Publishing to registry...");
14417
+ let publishAsAuthor;
14418
+ if ((userInfo == null ? void 0 : userInfo.is_admin) && manifest.author) {
14419
+ publishAsAuthor = typeof manifest.author === "string" ? manifest.author : manifest.author.name;
14420
+ console.log(` \u{1F510} Admin override: Publishing as author "${publishAsAuthor}"`);
14421
+ }
14417
14422
  if (selectedOrgId) {
14418
14423
  console.log(` Publishing as organization: ${(_b = userInfo.organizations.find((org) => org.id === selectedOrgId)) == null ? void 0 : _b.name}`);
14419
14424
  console.log(` Organization ID: ${selectedOrgId}`);
14420
14425
  }
14421
- const result = await client.publish(manifest, tarball, selectedOrgId ? { orgId: selectedOrgId } : void 0);
14426
+ const publishOptions = {};
14427
+ if (selectedOrgId) {
14428
+ publishOptions.orgId = selectedOrgId;
14429
+ }
14430
+ if (publishAsAuthor) {
14431
+ publishOptions.publishAsAuthor = publishAsAuthor;
14432
+ }
14433
+ const result = await client.publish(
14434
+ manifest,
14435
+ tarball,
14436
+ Object.keys(publishOptions).length > 0 ? publishOptions : void 0
14437
+ );
14422
14438
  let webappUrl;
14423
14439
  const registryUrl = config.registryUrl || "https://registry.prpm.dev";
14424
14440
  if (registryUrl.includes("localhost") || registryUrl.includes("127.0.0.1")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
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.5",
49
- "@pr-pm/registry-client": "^2.1.5",
50
- "@pr-pm/types": "^1.1.5",
48
+ "@pr-pm/converters": "^1.1.6",
49
+ "@pr-pm/registry-client": "^2.1.6",
50
+ "@pr-pm/types": "^1.1.6",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",