prpm 2.1.9 → 2.1.10
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 +34 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -21842,6 +21842,7 @@ ${"=".repeat(60)}`);
|
|
|
21842
21842
|
let lastError = null;
|
|
21843
21843
|
let retryCount = 0;
|
|
21844
21844
|
let publishSuccess = false;
|
|
21845
|
+
let sawGatewayLikeError = false;
|
|
21845
21846
|
while (retryCount <= MAX_RETRIES && !publishSuccess) {
|
|
21846
21847
|
try {
|
|
21847
21848
|
if (retryCount > 0 && RETRY_DELAY_MS > 0) {
|
|
@@ -22038,7 +22039,40 @@ ${"=".repeat(60)}`);
|
|
|
22038
22039
|
userInfo,
|
|
22039
22040
|
packageName
|
|
22040
22041
|
);
|
|
22042
|
+
if (sawGatewayLikeError && pkgError.toLowerCase().includes("version already exists")) {
|
|
22043
|
+
const assumedName = predictScopedPackageName(
|
|
22044
|
+
manifest.name,
|
|
22045
|
+
(userInfo == null ? void 0 : userInfo.username) || config.username || "unknown",
|
|
22046
|
+
manifest.organization
|
|
22047
|
+
);
|
|
22048
|
+
let webappUrl;
|
|
22049
|
+
const registryUrl = config.registryUrl || "https://registry.prpm.dev";
|
|
22050
|
+
if (registryUrl.includes("localhost") || registryUrl.includes("127.0.0.1")) {
|
|
22051
|
+
webappUrl = "http://localhost:5173";
|
|
22052
|
+
} else if (registryUrl.includes("registry.prpm.dev")) {
|
|
22053
|
+
webappUrl = "https://prpm.dev";
|
|
22054
|
+
} else {
|
|
22055
|
+
webappUrl = registryUrl;
|
|
22056
|
+
}
|
|
22057
|
+
const packageSlug = assumedName.startsWith("@") ? assumedName.slice(1) : assumedName;
|
|
22058
|
+
const packagePath = packageSlug.split("/").map((segment) => encodeURIComponent(segment)).join("/");
|
|
22059
|
+
const packageUrl = `${webappUrl}/packages/${packagePath}`;
|
|
22060
|
+
console.log(
|
|
22061
|
+
`
|
|
22062
|
+
\u2705 ${displayName}@${manifest.version} now exists on the registry after a transient gateway error; assuming publish succeeded.`
|
|
22063
|
+
);
|
|
22064
|
+
publishedPackages.push({
|
|
22065
|
+
name: assumedName,
|
|
22066
|
+
version: manifest.version,
|
|
22067
|
+
url: packageUrl
|
|
22068
|
+
});
|
|
22069
|
+
publishSuccess = true;
|
|
22070
|
+
break;
|
|
22071
|
+
}
|
|
22041
22072
|
if (isRetriableError(pkgError) && retryCount < MAX_RETRIES) {
|
|
22073
|
+
if (pkgError.includes("Bad Gateway") || pkgError.includes("Service Unavailable") || pkgError.includes("502") || pkgError.includes("503") || pkgError.includes("504")) {
|
|
22074
|
+
sawGatewayLikeError = true;
|
|
22075
|
+
}
|
|
22042
22076
|
console.error(
|
|
22043
22077
|
`
|
|
22044
22078
|
\u26A0\uFE0F Temporary error publishing ${displayName}: ${pkgError}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prpm",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
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.11",
|
|
49
|
+
"@pr-pm/registry-client": "^2.3.10",
|
|
50
|
+
"@pr-pm/types": "^2.1.11",
|
|
51
51
|
"ajv": "^8.17.1",
|
|
52
52
|
"ajv-formats": "^3.0.1",
|
|
53
53
|
"commander": "^11.1.0",
|