freestyle 0.1.50 → 0.1.51
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/index.cjs +6 -0
- package/index.d.cts +5 -0
- package/index.d.mts +5 -0
- package/index.mjs +6 -0
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -6997,6 +6997,9 @@ async function waitForBackgroundRequest(apiClient, requestId, logger) {
|
|
|
6997
6997
|
return parseJsonResponse(response);
|
|
6998
6998
|
}
|
|
6999
6999
|
}
|
|
7000
|
+
function isFreestyleApiError(error) {
|
|
7001
|
+
return typeof error === "object" && error !== null && typeof error.body?.code === "string";
|
|
7002
|
+
}
|
|
7000
7003
|
async function postWithBackgroundLogger(apiClient, path, options, logger) {
|
|
7001
7004
|
const postOptions = {
|
|
7002
7005
|
...options,
|
|
@@ -7011,6 +7014,9 @@ async function postWithBackgroundLogger(apiClient, path, options, logger) {
|
|
|
7011
7014
|
response = await apiClient.postRaw(path, postOptions);
|
|
7012
7015
|
break;
|
|
7013
7016
|
} catch (error) {
|
|
7017
|
+
if (isFreestyleApiError(error)) {
|
|
7018
|
+
throw error;
|
|
7019
|
+
}
|
|
7014
7020
|
console.warn(
|
|
7015
7021
|
`[freestyle] POST ${path} threw, retrying:`,
|
|
7016
7022
|
error
|
package/index.d.cts
CHANGED
|
@@ -2259,6 +2259,11 @@ interface ResponseGetV1CronSchedulesIdMetricsTimeline200 {
|
|
|
2259
2259
|
succeededOnRetryCount: number;
|
|
2260
2260
|
failedCount: number;
|
|
2261
2261
|
averageLatencyMs?: number | null;
|
|
2262
|
+
averageSuccessLatencyMs?: number | null;
|
|
2263
|
+
averageFailureLatencyMs?: number | null;
|
|
2264
|
+
p50SuccessLatencyMs?: number | null;
|
|
2265
|
+
p90SuccessLatencyMs?: number | null;
|
|
2266
|
+
p99SuccessLatencyMs?: number | null;
|
|
2262
2267
|
}[];
|
|
2263
2268
|
start: string;
|
|
2264
2269
|
end: string;
|
package/index.d.mts
CHANGED
|
@@ -2259,6 +2259,11 @@ interface ResponseGetV1CronSchedulesIdMetricsTimeline200 {
|
|
|
2259
2259
|
succeededOnRetryCount: number;
|
|
2260
2260
|
failedCount: number;
|
|
2261
2261
|
averageLatencyMs?: number | null;
|
|
2262
|
+
averageSuccessLatencyMs?: number | null;
|
|
2263
|
+
averageFailureLatencyMs?: number | null;
|
|
2264
|
+
p50SuccessLatencyMs?: number | null;
|
|
2265
|
+
p90SuccessLatencyMs?: number | null;
|
|
2266
|
+
p99SuccessLatencyMs?: number | null;
|
|
2262
2267
|
}[];
|
|
2263
2268
|
start: string;
|
|
2264
2269
|
end: string;
|
package/index.mjs
CHANGED
|
@@ -6995,6 +6995,9 @@ async function waitForBackgroundRequest(apiClient, requestId, logger) {
|
|
|
6995
6995
|
return parseJsonResponse(response);
|
|
6996
6996
|
}
|
|
6997
6997
|
}
|
|
6998
|
+
function isFreestyleApiError(error) {
|
|
6999
|
+
return typeof error === "object" && error !== null && typeof error.body?.code === "string";
|
|
7000
|
+
}
|
|
6998
7001
|
async function postWithBackgroundLogger(apiClient, path, options, logger) {
|
|
6999
7002
|
const postOptions = {
|
|
7000
7003
|
...options,
|
|
@@ -7009,6 +7012,9 @@ async function postWithBackgroundLogger(apiClient, path, options, logger) {
|
|
|
7009
7012
|
response = await apiClient.postRaw(path, postOptions);
|
|
7010
7013
|
break;
|
|
7011
7014
|
} catch (error) {
|
|
7015
|
+
if (isFreestyleApiError(error)) {
|
|
7016
|
+
throw error;
|
|
7017
|
+
}
|
|
7012
7018
|
console.warn(
|
|
7013
7019
|
`[freestyle] POST ${path} threw, retrying:`,
|
|
7014
7020
|
error
|