@pmate/cli 0.50.1 → 0.50.2
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 +10 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20239,6 +20239,13 @@ var import_dotenv = require("dotenv");
|
|
|
20239
20239
|
|
|
20240
20240
|
// src/services/ServiceRegistryClient.ts
|
|
20241
20241
|
init_sessionStore();
|
|
20242
|
+
var ServiceRegistryHttpError = class extends Error {
|
|
20243
|
+
constructor(status, message) {
|
|
20244
|
+
super(message);
|
|
20245
|
+
this.status = status;
|
|
20246
|
+
this.name = "ServiceRegistryHttpError";
|
|
20247
|
+
}
|
|
20248
|
+
};
|
|
20242
20249
|
var ServiceRegistryNotFoundError = class extends Error {
|
|
20243
20250
|
constructor(namespace, name) {
|
|
20244
20251
|
super(`Service not found: ${namespace}/${name}`);
|
|
@@ -20456,7 +20463,7 @@ var ServiceRegistryClient = class {
|
|
|
20456
20463
|
);
|
|
20457
20464
|
}
|
|
20458
20465
|
if (!response.ok || !payload?.success || payload.data === void 0) {
|
|
20459
|
-
throw new
|
|
20466
|
+
throw new ServiceRegistryHttpError(response.status, payload?.message || `Request failed with status ${response.status}`);
|
|
20460
20467
|
}
|
|
20461
20468
|
return payload.data;
|
|
20462
20469
|
}
|
|
@@ -20484,7 +20491,7 @@ var ServiceRegistryClient = class {
|
|
|
20484
20491
|
);
|
|
20485
20492
|
}
|
|
20486
20493
|
if (!response.ok || !payload?.success || payload.data === void 0) {
|
|
20487
|
-
throw new
|
|
20494
|
+
throw new ServiceRegistryHttpError(response.status, payload?.message || `Request failed with status ${response.status}`);
|
|
20488
20495
|
}
|
|
20489
20496
|
return payload.data;
|
|
20490
20497
|
}
|
|
@@ -23210,6 +23217,7 @@ function splitPrimaryDomain(host) {
|
|
|
23210
23217
|
};
|
|
23211
23218
|
}
|
|
23212
23219
|
function shouldRetryDeployHistoryAppend(error) {
|
|
23220
|
+
if (error instanceof ServiceRegistryHttpError) return [502, 503, 504].includes(error.status);
|
|
23213
23221
|
const message = error instanceof Error ? error.message : String(error);
|
|
23214
23222
|
return message.includes("status 502") || message.includes("status 503") || message.includes("status 504") || message.includes("fetch failed") || message.includes("ECONNRESET") || message.includes("ETIMEDOUT");
|
|
23215
23223
|
}
|