@burdenoff/fe-libs 2026.1008.1 → 2026.1008.3
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/shared/assistant/attachmentCommit.d.ts.map +1 -1
- package/dist/shared/assistant/attachmentCommit.js +149 -182
- package/dist/storage/filesPort.d.ts +11 -2
- package/dist/storage/filesPort.d.ts.map +1 -1
- package/dist/storage/filesPort.js +38 -31
- package/dist/storage/retryPolicy.d.ts +13 -0
- package/dist/storage/retryPolicy.d.ts.map +1 -1
- package/dist/storage/retryPolicy.js +16 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachmentCommit.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/attachmentCommit.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"attachmentCommit.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/attachmentCommit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AACH,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAIzD,wFAAwF;AACxF,eAAO,MAAM,kCAAkC,QAAkB,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;IACnC,8BAA8B;;IAE9B,+EAA+E;;;IAG/E,gEAAgE;;;IAGhE,gFAAgF;;;IAGhF,6DAA6D;;IAE7D,uFAAuF;;IAEvF,sCAAsC;;IAEtC;;;;OAIG;;;CAGK,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG;IACnC,CAAC,UAAU,CAAC,IAAI,MAAM,OAAO,wBAAwB,GAAG,MAAM;CAC/D,CAAC;AAEF,kGAAkG;AAClG,eAAO,MAAM,u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AAC,CAYhC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { classifyFilesError as e, extractErrorMessage as t } from "../../storage/retryPolicy.js";
|
|
2
|
-
import { FilesPortAbortError as
|
|
1
|
+
import { classifyFilesError as e, extractErrorMessage as t, isDefinitiveFilesRefusal as n } from "../../storage/retryPolicy.js";
|
|
2
|
+
import { FilesPortAbortError as r, FilesPortError as i } from "../../storage/filesPort.js";
|
|
3
3
|
//#region src/shared/assistant/attachmentCommit.ts
|
|
4
|
-
var
|
|
4
|
+
var a = 5 * 1024 * 1024, o = {
|
|
5
5
|
concurrency: 2,
|
|
6
6
|
gatewayAttempts: 2,
|
|
7
7
|
gatewayRetryDelayMs: 1500,
|
|
@@ -14,7 +14,7 @@ var i = 5 * 1024 * 1024, a = {
|
|
|
14
14
|
discardAttempts: 2,
|
|
15
15
|
finalDrainRounds: 3,
|
|
16
16
|
finalDrainDelayMs: 5e3
|
|
17
|
-
},
|
|
17
|
+
}, s = {
|
|
18
18
|
quotaNotProvisioned: "QUOTA_NOT_PROVISIONED",
|
|
19
19
|
quotaExceeded: "QUOTA_EXCEEDED",
|
|
20
20
|
tooLarge: "ATTACHMENT_TOO_LARGE_FOR_DIRECT_UPLOAD",
|
|
@@ -23,15 +23,15 @@ var i = 5 * 1024 * 1024, a = {
|
|
|
23
23
|
timeout: "ATTACHMENT_SAVE_TIMEOUT",
|
|
24
24
|
uploadFailed: "ATTACHMENT_UPLOAD_FAILED",
|
|
25
25
|
folderFailed: "ATTACHMENT_FOLDER_FAILED"
|
|
26
|
-
},
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
},
|
|
34
|
-
function
|
|
26
|
+
}, c = {
|
|
27
|
+
[s.quotaNotProvisioned]: "This workspace has no file storage, so the attachment could not be saved.",
|
|
28
|
+
[s.quotaExceeded]: "There is not enough file storage left for these attachments.",
|
|
29
|
+
[s.tooLarge]: "This file is over 5 MB and cannot be saved to Files.",
|
|
30
|
+
[s.noBytes]: "The file is empty or no longer available.",
|
|
31
|
+
[s.noDownloadUrl]: "The file was saved but could not be linked.",
|
|
32
|
+
[s.timeout]: "Saving took too long."
|
|
33
|
+
}, l = () => {};
|
|
34
|
+
function u(e, t) {
|
|
35
35
|
return new Promise((n) => {
|
|
36
36
|
if (t?.aborted) {
|
|
37
37
|
n();
|
|
@@ -45,43 +45,41 @@ function l(e, t) {
|
|
|
45
45
|
t?.addEventListener("abort", r, { once: !0 });
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function u(e) {
|
|
49
|
-
return e instanceof n || e instanceof Error && e.name === "AbortError";
|
|
50
|
-
}
|
|
51
48
|
function d(e) {
|
|
52
|
-
return e instanceof r
|
|
49
|
+
return e instanceof r || e instanceof Error && e.name === "AbortError";
|
|
53
50
|
}
|
|
54
|
-
function f(
|
|
55
|
-
return e
|
|
51
|
+
function f(e) {
|
|
52
|
+
return e instanceof i ? e.source : e;
|
|
56
53
|
}
|
|
57
|
-
function p(
|
|
58
|
-
|
|
54
|
+
function p(t) {
|
|
55
|
+
return e(f(t));
|
|
56
|
+
}
|
|
57
|
+
function m(e) {
|
|
58
|
+
let t = f(e);
|
|
59
59
|
if (!t || typeof t != "object") return [];
|
|
60
60
|
let n = t;
|
|
61
61
|
return (n.errors ?? n.graphQLErrors ?? []).map((e) => e.extensions?.code).filter((e) => typeof e == "string");
|
|
62
62
|
}
|
|
63
|
-
function m(e) {
|
|
64
|
-
return p(e)[0];
|
|
65
|
-
}
|
|
66
63
|
function h(e) {
|
|
67
|
-
|
|
68
|
-
let t = d(e), n = t && typeof t == "object" ? t.statusCode : void 0;
|
|
69
|
-
return typeof n == "number" && n >= 400 && n < 500 && n !== 408;
|
|
64
|
+
return m(e)[0];
|
|
70
65
|
}
|
|
71
66
|
function g(e) {
|
|
72
|
-
return
|
|
67
|
+
return n(f(e));
|
|
73
68
|
}
|
|
74
|
-
function _(e
|
|
75
|
-
return e
|
|
69
|
+
function _(e) {
|
|
70
|
+
return d(e) || p(e) !== null ? !0 : !g(e);
|
|
76
71
|
}
|
|
77
|
-
function v(e,
|
|
78
|
-
return
|
|
72
|
+
function v(e, n) {
|
|
73
|
+
return e instanceof i && e.message ? e.message : t(e) ?? n;
|
|
74
|
+
}
|
|
75
|
+
function y(e, t, n) {
|
|
76
|
+
return t.aborted ? (e.then((e) => n?.(e), l), Promise.reject(new r())) : new Promise((i, a) => {
|
|
79
77
|
let o = !1, s = () => {
|
|
80
|
-
o || (o = !0, a(new
|
|
78
|
+
o || (o = !0, a(new r()));
|
|
81
79
|
};
|
|
82
80
|
t.addEventListener("abort", s, { once: !0 }), e.then((e) => {
|
|
83
81
|
if (t.removeEventListener("abort", s), o) {
|
|
84
|
-
|
|
82
|
+
n?.(e);
|
|
85
83
|
return;
|
|
86
84
|
}
|
|
87
85
|
o = !0, i(e);
|
|
@@ -90,18 +88,6 @@ function v(e, t, r) {
|
|
|
90
88
|
});
|
|
91
89
|
});
|
|
92
90
|
}
|
|
93
|
-
function y() {
|
|
94
|
-
let e = c, t = {
|
|
95
|
-
promise: new Promise((t) => {
|
|
96
|
-
e = t;
|
|
97
|
-
}),
|
|
98
|
-
settled: !1,
|
|
99
|
-
resolve: (n) => {
|
|
100
|
-
t.settled || (t.settled = !0, e(n));
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
return t;
|
|
104
|
-
}
|
|
105
91
|
function b(e) {
|
|
106
92
|
return e.includes(".") ? e.substring(e.lastIndexOf(".") + 1) : "";
|
|
107
93
|
}
|
|
@@ -109,30 +95,30 @@ function x(e, t) {
|
|
|
109
95
|
e.reason === "none" && (e.reason = t), e.abort();
|
|
110
96
|
}
|
|
111
97
|
function S(e) {
|
|
112
|
-
if (e.signal.aborted) throw new
|
|
98
|
+
if (e.signal.aborted) throw new r();
|
|
113
99
|
}
|
|
114
100
|
async function C(e, t, n) {
|
|
115
101
|
for (let r = 1;; r += 1) {
|
|
116
102
|
S(e);
|
|
117
103
|
try {
|
|
118
|
-
return await
|
|
104
|
+
return await y(t(), e.signal, n);
|
|
119
105
|
} catch (t) {
|
|
120
|
-
if (
|
|
106
|
+
if (d(t) || e.signal.aborted || r >= e.policy.gatewayAttempts || p(t) === null) throw t;
|
|
121
107
|
await e.sleep(e.policy.gatewayRetryDelayMs, e.signal);
|
|
122
108
|
}
|
|
123
109
|
}
|
|
124
110
|
}
|
|
125
111
|
function w(e, t) {
|
|
126
|
-
return new Promise((
|
|
112
|
+
return new Promise((n, i) => {
|
|
127
113
|
let a = !1, o = new AbortController();
|
|
128
114
|
t.then((e) => {
|
|
129
|
-
a = !0, o.abort(),
|
|
115
|
+
a = !0, o.abort(), n(e);
|
|
130
116
|
}, (e) => {
|
|
131
117
|
a = !0, o.abort(), i(e);
|
|
132
118
|
});
|
|
133
119
|
let s = () => {
|
|
134
120
|
e.sleep(e.policy.settleGraceMs, o.signal).then(() => {
|
|
135
|
-
a || o.signal.aborted || (a = !0, i(new
|
|
121
|
+
a || o.signal.aborted || (a = !0, i(new r()));
|
|
136
122
|
});
|
|
137
123
|
};
|
|
138
124
|
e.signal.aborted ? s() : e.signal.addEventListener("abort", s, { once: !0 });
|
|
@@ -156,7 +142,7 @@ async function E(e, t) {
|
|
|
156
142
|
for (let n = 1; n <= e.policy.lookupAttempts; n += 1) try {
|
|
157
143
|
return T(await e.port.getSession(t));
|
|
158
144
|
} catch (t) {
|
|
159
|
-
if (
|
|
145
|
+
if (p(t) === null) break;
|
|
160
146
|
n < e.policy.lookupAttempts && await e.sleep(e.policy.lookupRetryDelayMs);
|
|
161
147
|
}
|
|
162
148
|
try {
|
|
@@ -170,33 +156,32 @@ function D(e, t, n) {
|
|
|
170
156
|
let r = Math.max(0, Math.min(100, Math.round(n)));
|
|
171
157
|
r !== t.lastProgress && (t.lastProgress = r, e.patch(t, { progress: r }));
|
|
172
158
|
}
|
|
173
|
-
async function O(e, t
|
|
174
|
-
let { attachment:
|
|
175
|
-
if (!
|
|
176
|
-
let
|
|
177
|
-
fileName:
|
|
178
|
-
fileSize:
|
|
179
|
-
mimeType:
|
|
180
|
-
extension: b(
|
|
181
|
-
folderId: n
|
|
159
|
+
async function O(e, t) {
|
|
160
|
+
let { attachment: n, blob: r } = t.draft;
|
|
161
|
+
if (!r) throw Error("no bytes");
|
|
162
|
+
let a = await C(e, () => e.port.initiate({
|
|
163
|
+
fileName: n.filename,
|
|
164
|
+
fileSize: r.size,
|
|
165
|
+
mimeType: n.mimeType,
|
|
166
|
+
extension: b(n.filename)
|
|
182
167
|
}), (t) => {
|
|
183
|
-
e.port.abort(t.sessionId).catch(
|
|
168
|
+
e.port.abort(t.sessionId).catch(l);
|
|
184
169
|
});
|
|
185
|
-
if (t.sessionId =
|
|
170
|
+
if (t.sessionId = a.sessionId, !a.uploadUrl) throw new k(s.tooLarge);
|
|
186
171
|
D(e, t, 5);
|
|
187
|
-
for (let
|
|
172
|
+
for (let o = 0;; o += 1) {
|
|
188
173
|
S(e);
|
|
189
174
|
try {
|
|
190
175
|
await e.port.put({
|
|
191
|
-
url:
|
|
192
|
-
blob:
|
|
193
|
-
mimeType:
|
|
176
|
+
url: a.uploadUrl,
|
|
177
|
+
blob: r,
|
|
178
|
+
mimeType: n.mimeType,
|
|
194
179
|
signal: e.signal,
|
|
195
180
|
onProgress: (n) => D(e, t, 5 + n * 85)
|
|
196
181
|
});
|
|
197
182
|
return;
|
|
198
183
|
} catch (t) {
|
|
199
|
-
if (
|
|
184
|
+
if (d(t) || e.signal.aborted || !(t instanceof i && (t.httpStatus === void 0 || t.httpStatus >= 500)) || o >= e.policy.putRetries) throw t;
|
|
200
185
|
await e.sleep(e.policy.putRetryDelayMs, e.signal);
|
|
201
186
|
}
|
|
202
187
|
}
|
|
@@ -204,7 +189,7 @@ async function O(e, t, n) {
|
|
|
204
189
|
var k = class extends Error {
|
|
205
190
|
code;
|
|
206
191
|
constructor(e, t) {
|
|
207
|
-
super(t ??
|
|
192
|
+
super(t ?? c[e] ?? e), this.code = e, this.name = "AttachmentCommitError";
|
|
208
193
|
}
|
|
209
194
|
};
|
|
210
195
|
async function A(e, t, n) {
|
|
@@ -216,19 +201,19 @@ async function A(e, t, n) {
|
|
|
216
201
|
folderId: n
|
|
217
202
|
};
|
|
218
203
|
t.completeIssued = !0;
|
|
219
|
-
let
|
|
204
|
+
let o, c;
|
|
220
205
|
try {
|
|
221
|
-
|
|
206
|
+
o = await w(e, e.port.complete(a));
|
|
222
207
|
} catch (e) {
|
|
223
208
|
c = e;
|
|
224
209
|
}
|
|
225
210
|
let l = 0;
|
|
226
|
-
for (; !
|
|
227
|
-
if (!
|
|
211
|
+
for (; !o;) {
|
|
212
|
+
if (!_(c)) throw t.completeRefused = l === 0, l > 0 && (t.unresolved = !0), c;
|
|
228
213
|
if (e.signal.aborted) throw t.unresolved = !0, c;
|
|
229
214
|
let r = await E(e, i);
|
|
230
215
|
if (r.state === "finalized") {
|
|
231
|
-
t.fileId = r.fileId,
|
|
216
|
+
t.fileId = r.fileId, o = {
|
|
232
217
|
fileId: r.fileId,
|
|
233
218
|
name: null,
|
|
234
219
|
folderId: n,
|
|
@@ -236,30 +221,30 @@ async function A(e, t, n) {
|
|
|
236
221
|
};
|
|
237
222
|
break;
|
|
238
223
|
}
|
|
239
|
-
if (r.state === "in-progress" && !e.signal.aborted &&
|
|
224
|
+
if (r.state === "in-progress" && !e.signal.aborted && p(c) !== null && l < e.policy.completeReissues) {
|
|
240
225
|
l += 1;
|
|
241
226
|
try {
|
|
242
|
-
|
|
227
|
+
o = await w(e, e.port.complete(a));
|
|
243
228
|
} catch (e) {
|
|
244
229
|
c = e;
|
|
245
230
|
}
|
|
246
231
|
continue;
|
|
247
232
|
}
|
|
248
|
-
throw (r.state === "unknown" || r.state === "in-progress" ||
|
|
233
|
+
throw (r.state === "unknown" || r.state === "in-progress" || d(c)) && (t.unresolved = !0), c;
|
|
249
234
|
}
|
|
250
|
-
t.fileId =
|
|
251
|
-
let
|
|
252
|
-
if (
|
|
235
|
+
t.fileId = o.fileId;
|
|
236
|
+
let u = o.downloadUrl ?? await C(e, () => e.port.getDownloadUrl(o.fileId)).catch((e) => {
|
|
237
|
+
if (d(e)) throw e;
|
|
253
238
|
return null;
|
|
254
239
|
});
|
|
255
|
-
if (!
|
|
256
|
-
t.downloadUrl =
|
|
240
|
+
if (!u) throw new k(s.noDownloadUrl);
|
|
241
|
+
t.downloadUrl = u, t.urlResolvedAt = e.now(), t.done = !0;
|
|
257
242
|
}
|
|
258
243
|
async function j(e, t) {
|
|
259
244
|
for (let n = 1;; n += 1) try {
|
|
260
245
|
return await t();
|
|
261
246
|
} catch (t) {
|
|
262
|
-
if (n >= e.policy.discardAttempts ||
|
|
247
|
+
if (n >= e.policy.discardAttempts || p(t) === null) throw t;
|
|
263
248
|
await e.sleep(e.policy.gatewayRetryDelayMs);
|
|
264
249
|
}
|
|
265
250
|
}
|
|
@@ -284,7 +269,7 @@ async function N(e, t) {
|
|
|
284
269
|
return;
|
|
285
270
|
}
|
|
286
271
|
if (t.sessionId) {
|
|
287
|
-
if (!t.completeIssued) {
|
|
272
|
+
if (!t.completeIssued || t.completeRefused) {
|
|
288
273
|
try {
|
|
289
274
|
await e.port.abort(t.sessionId);
|
|
290
275
|
} catch {}
|
|
@@ -313,10 +298,10 @@ async function F(e, t, n) {
|
|
|
313
298
|
let i = {
|
|
314
299
|
port: e,
|
|
315
300
|
policy: {
|
|
316
|
-
...
|
|
301
|
+
...o,
|
|
317
302
|
...n.policy
|
|
318
303
|
},
|
|
319
|
-
sleep: n.sleep ??
|
|
304
|
+
sleep: n.sleep ?? u,
|
|
320
305
|
store: t
|
|
321
306
|
};
|
|
322
307
|
for (let e of r) {
|
|
@@ -332,8 +317,8 @@ function I(e, t) {
|
|
|
332
317
|
let n = t instanceof k ? t : null;
|
|
333
318
|
return {
|
|
334
319
|
id: e.draft.attachment.id,
|
|
335
|
-
message: n ? n.message :
|
|
336
|
-
code: n ? n.code :
|
|
320
|
+
message: n ? n.message : v(t, "The attachment could not be saved."),
|
|
321
|
+
code: n ? n.code : h(t) ?? s.uploadFailed
|
|
337
322
|
};
|
|
338
323
|
}
|
|
339
324
|
function L(e) {
|
|
@@ -341,16 +326,16 @@ function L(e) {
|
|
|
341
326
|
}
|
|
342
327
|
async function R(e) {
|
|
343
328
|
let t = e.mode ?? "all-or-nothing", n = {
|
|
344
|
-
...
|
|
329
|
+
...o,
|
|
345
330
|
...e.policy
|
|
346
|
-
}, r = e.pendingDiscard ?? { entries: [] }, i = new AbortController(),
|
|
331
|
+
}, r = e.pendingDiscard ?? { entries: [] }, i = new AbortController(), a = {
|
|
347
332
|
port: e.port,
|
|
348
333
|
signal: i.signal,
|
|
349
334
|
abort: () => i.abort(),
|
|
350
335
|
reason: "none",
|
|
351
336
|
policy: n,
|
|
352
337
|
now: e.now ?? (() => Date.now()),
|
|
353
|
-
sleep: e.sleep ??
|
|
338
|
+
sleep: e.sleep ?? u,
|
|
354
339
|
patch: (t, n) => e.onChange?.(t.draft.attachment.id, n),
|
|
355
340
|
store: r
|
|
356
341
|
}, s = [];
|
|
@@ -358,124 +343,106 @@ async function R(e) {
|
|
|
358
343
|
index: s.length,
|
|
359
344
|
draft: t,
|
|
360
345
|
completeIssued: !1,
|
|
346
|
+
completeRefused: !1,
|
|
361
347
|
unresolved: !1,
|
|
348
|
+
staged: !1,
|
|
362
349
|
done: !1,
|
|
363
350
|
handedOver: !1,
|
|
364
351
|
stopped: !1,
|
|
365
352
|
lastProgress: -1
|
|
366
353
|
});
|
|
367
|
-
let c = new AbortController(),
|
|
368
|
-
e.signal?.aborted ?
|
|
354
|
+
let c = new AbortController(), l = () => x(a, "cancelled");
|
|
355
|
+
e.signal?.aborted ? l() : e.signal?.addEventListener("abort", l, { once: !0 });
|
|
369
356
|
try {
|
|
370
|
-
s.length > 0 && await z(
|
|
357
|
+
s.length > 0 && await z(a, s, e, t, c);
|
|
371
358
|
} catch (e) {
|
|
372
359
|
for (let t of s) t.failure ??= I(t, e);
|
|
373
|
-
x(
|
|
360
|
+
x(a, "failed");
|
|
374
361
|
} finally {
|
|
375
|
-
c.abort(), e.signal?.removeEventListener("abort",
|
|
362
|
+
c.abort(), e.signal?.removeEventListener("abort", l);
|
|
376
363
|
}
|
|
377
|
-
return H(
|
|
364
|
+
return H(a, s, e, t);
|
|
378
365
|
}
|
|
379
|
-
async function z(e, t,
|
|
380
|
-
let
|
|
366
|
+
async function z(e, t, n, r, a) {
|
|
367
|
+
let o = r === "all-or-nothing";
|
|
381
368
|
for (let e of t) {
|
|
382
369
|
let t = e.draft.blob;
|
|
383
|
-
!t || t.size === 0 ? e.failure = I(e, new k(
|
|
370
|
+
!t || t.size === 0 ? e.failure = I(e, new k(s.noBytes)) : t.size > 5242880 && (e.failure = I(e, new k(s.tooLarge)));
|
|
384
371
|
}
|
|
385
|
-
if (
|
|
372
|
+
if (o && t.some((e) => e.failure)) {
|
|
386
373
|
x(e, "failed");
|
|
387
374
|
return;
|
|
388
375
|
}
|
|
389
|
-
let
|
|
390
|
-
if (
|
|
391
|
-
for (let t of
|
|
376
|
+
let c = t.filter((e) => !e.failure);
|
|
377
|
+
if (c.length === 0) return;
|
|
378
|
+
for (let t of c) e.patch(t, {
|
|
392
379
|
status: "uploading",
|
|
393
380
|
progress: 0,
|
|
394
381
|
saveError: void 0,
|
|
395
382
|
progressNote: void 0
|
|
396
383
|
}), t.lastProgress = 0;
|
|
397
|
-
|
|
398
|
-
|
|
384
|
+
n.budgetMs !== void 0 && e.sleep(n.budgetMs, a.signal).then(() => {
|
|
385
|
+
a.signal.aborted || x(e, "budget");
|
|
399
386
|
});
|
|
400
387
|
try {
|
|
401
|
-
await
|
|
388
|
+
await y(P(e.port, e.store, {
|
|
402
389
|
sleep: e.sleep,
|
|
403
390
|
policy: e.policy
|
|
404
391
|
}), e.signal);
|
|
405
|
-
let t = await V(e,
|
|
392
|
+
let t = await V(e, c, o);
|
|
406
393
|
if (t) {
|
|
407
|
-
for (let e of
|
|
394
|
+
for (let e of c) e.failure = I(e, t);
|
|
408
395
|
x(e, "failed");
|
|
409
396
|
return;
|
|
410
397
|
}
|
|
411
|
-
if (
|
|
398
|
+
if (c = c.filter((e) => !e.failure), c.length === 0) {
|
|
412
399
|
x(e, "failed");
|
|
413
400
|
return;
|
|
414
401
|
}
|
|
415
402
|
} catch (e) {
|
|
416
|
-
if (!
|
|
403
|
+
if (!d(e)) throw e;
|
|
417
404
|
return;
|
|
418
405
|
}
|
|
419
|
-
let
|
|
406
|
+
let l = 0;
|
|
407
|
+
if (await Promise.all(Array.from({ length: Math.min(B(e), c.length) }, async () => {
|
|
408
|
+
for (;;) {
|
|
409
|
+
if (e.signal.aborted) return;
|
|
410
|
+
let t = c[l];
|
|
411
|
+
if (l += 1, !t) return;
|
|
412
|
+
try {
|
|
413
|
+
await O(e, t), t.staged = !0;
|
|
414
|
+
} catch (n) {
|
|
415
|
+
d(n) ? t.stopped = !0 : (t.failure = I(t, n), o && x(e, "failed"));
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
})), e.signal.aborted) return;
|
|
419
|
+
let u = c.filter((e) => e.staged && !e.failure);
|
|
420
|
+
if (u.length === 0) {
|
|
421
|
+
x(e, "failed");
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
let f;
|
|
420
425
|
try {
|
|
421
|
-
|
|
426
|
+
f = (await C(e, () => e.port.ensureFolder(n.folderPath))).id;
|
|
422
427
|
} catch (t) {
|
|
423
|
-
if (!
|
|
424
|
-
let n = t instanceof
|
|
425
|
-
for (let e of
|
|
428
|
+
if (!d(t)) {
|
|
429
|
+
let n = t instanceof i ? t : new k(s.folderFailed);
|
|
430
|
+
for (let e of u) e.failure = I(e, n);
|
|
426
431
|
x(e, "failed");
|
|
427
432
|
}
|
|
428
433
|
return;
|
|
429
434
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
p += 1;
|
|
435
|
-
let n = l[t];
|
|
436
|
-
if (!n) return;
|
|
437
|
-
try {
|
|
438
|
-
await O(e, n, d), f[t]?.resolve({ ok: !0 });
|
|
439
|
-
} catch (r) {
|
|
440
|
-
f[t]?.resolve({
|
|
441
|
-
ok: !1,
|
|
442
|
-
error: r
|
|
443
|
-
}), c && !u(r) && (n.failure = I(n, r), x(e, "failed"));
|
|
444
|
-
}
|
|
435
|
+
for (let t of u) {
|
|
436
|
+
if (e.signal.aborted) {
|
|
437
|
+
t.stopped = !0;
|
|
438
|
+
break;
|
|
445
439
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
await Promise.all([(async () => {
|
|
453
|
-
for (let t = 0; t < l.length; t += 1) {
|
|
454
|
-
let n = l[t], r = await f[t]?.promise;
|
|
455
|
-
if (!(!n || !r)) {
|
|
456
|
-
if (!r.ok) {
|
|
457
|
-
if (u(r.error)) {
|
|
458
|
-
if (n.stopped = !0, e.signal.aborted && c) break;
|
|
459
|
-
continue;
|
|
460
|
-
}
|
|
461
|
-
if (n.failure ??= I(n, r.error), c) {
|
|
462
|
-
x(e, "failed");
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
465
|
-
continue;
|
|
466
|
-
}
|
|
467
|
-
if (e.signal.aborted) {
|
|
468
|
-
n.stopped = !0;
|
|
469
|
-
break;
|
|
470
|
-
}
|
|
471
|
-
try {
|
|
472
|
-
await A(e, n, d), D(e, n, 100);
|
|
473
|
-
} catch (t) {
|
|
474
|
-
if (u(t) ? n.stopped = !0 : (n.failure = I(n, t), c && x(e, "failed")), c) break;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
440
|
+
try {
|
|
441
|
+
await A(e, t, f), D(e, t, 100);
|
|
442
|
+
} catch (n) {
|
|
443
|
+
if (d(n) ? t.stopped = !0 : (t.failure = I(t, n), o && x(e, "failed")), o) break;
|
|
477
444
|
}
|
|
478
|
-
}
|
|
445
|
+
}
|
|
479
446
|
}
|
|
480
447
|
function B(e) {
|
|
481
448
|
return Math.max(1, Math.floor(e.policy.concurrency));
|
|
@@ -484,16 +451,16 @@ async function V(e, t, n) {
|
|
|
484
451
|
if (!e.port.getStorageQuota) return null;
|
|
485
452
|
let r;
|
|
486
453
|
try {
|
|
487
|
-
r = await
|
|
454
|
+
r = await y(e.port.getStorageQuota(), e.signal);
|
|
488
455
|
} catch (e) {
|
|
489
|
-
if (
|
|
456
|
+
if (d(e)) throw e;
|
|
490
457
|
return null;
|
|
491
458
|
}
|
|
492
|
-
if (r.state === "not-provisioned") return new k(
|
|
459
|
+
if (r.state === "not-provisioned") return new k(s.quotaNotProvisioned);
|
|
493
460
|
if (r.state === "ok" && r.remainingBytes !== null) {
|
|
494
461
|
let e = (e) => e.draft.blob?.size ?? 0;
|
|
495
462
|
if (t.reduce((t, n) => t + e(n), 0) > r.remainingBytes) {
|
|
496
|
-
let i = new k(
|
|
463
|
+
let i = new k(s.quotaExceeded);
|
|
497
464
|
if (n) return i;
|
|
498
465
|
let a = r.remainingBytes;
|
|
499
466
|
for (let n of t) e(n) <= a ? a -= e(n) : n.failure = I(n, i);
|
|
@@ -503,8 +470,8 @@ async function V(e, t, n) {
|
|
|
503
470
|
}
|
|
504
471
|
async function H(e, t, n, r) {
|
|
505
472
|
let i = r === "all-or-nothing";
|
|
506
|
-
if (e.reason === "budget") for (let e of t) !e.done && !e.failure && (e.failure = I(e, new k(
|
|
507
|
-
let a = e.reason === "cancelled",
|
|
473
|
+
if (e.reason === "budget") for (let e of t) !e.done && !e.failure && (e.failure = I(e, new k(s.timeout)));
|
|
474
|
+
let a = e.reason === "cancelled", o = t.some((e) => e.failure), c = t.every((e) => e.done), l = !a && (i ? c && !o : !0), u = l ? t.filter((e) => !e.done) : t;
|
|
508
475
|
for (let t of u) await N(e, t);
|
|
509
476
|
for (let n of t) l && n.done ? e.patch(n, {
|
|
510
477
|
status: "ready",
|
|
@@ -559,26 +526,26 @@ async function H(e, t, n, r) {
|
|
|
559
526
|
};
|
|
560
527
|
}
|
|
561
528
|
function U(e) {
|
|
562
|
-
let t = { entries: [] }, n = null, r = null, i = /* @__PURE__ */ new Set(),
|
|
529
|
+
let t = { entries: [] }, n = null, r = null, i = /* @__PURE__ */ new Set(), a = (e) => {
|
|
563
530
|
let t = e.catch(() => void 0).then(() => {
|
|
564
531
|
i.delete(t);
|
|
565
532
|
});
|
|
566
533
|
return i.add(t), e;
|
|
567
534
|
};
|
|
568
535
|
return {
|
|
569
|
-
commit: (i,
|
|
536
|
+
commit: (i, o = {}) => {
|
|
570
537
|
if (n) return n;
|
|
571
538
|
let s = new AbortController();
|
|
572
539
|
r = s;
|
|
573
|
-
let c =
|
|
540
|
+
let c = o.signal;
|
|
574
541
|
c?.aborted ? s.abort() : c?.addEventListener("abort", () => s.abort(), { once: !0 });
|
|
575
542
|
let l = R({
|
|
576
543
|
port: e.port,
|
|
577
544
|
folderPath: e.folderPath,
|
|
578
545
|
drafts: i,
|
|
579
546
|
signal: s.signal,
|
|
580
|
-
mode:
|
|
581
|
-
budgetMs:
|
|
547
|
+
mode: o.mode,
|
|
548
|
+
budgetMs: o.budgetMs,
|
|
582
549
|
onChange: e.onChange,
|
|
583
550
|
pendingDiscard: t,
|
|
584
551
|
policy: e.policy,
|
|
@@ -586,7 +553,7 @@ function U(e) {
|
|
|
586
553
|
sleep: e.sleep
|
|
587
554
|
}).then((e) => e.ok ? {
|
|
588
555
|
...e,
|
|
589
|
-
rollback: () =>
|
|
556
|
+
rollback: () => a(e.rollback())
|
|
590
557
|
} : e).finally(() => {
|
|
591
558
|
n = null, r = null;
|
|
592
559
|
});
|
|
@@ -599,16 +566,16 @@ function U(e) {
|
|
|
599
566
|
discardPending: async () => {
|
|
600
567
|
let r = n;
|
|
601
568
|
for (r && await r.catch(() => void 0); i.size > 0;) await Promise.all([...i]);
|
|
602
|
-
let
|
|
569
|
+
let a = () => P(e.port, t, {
|
|
603
570
|
sleep: e.sleep,
|
|
604
571
|
policy: e.policy
|
|
605
572
|
});
|
|
606
|
-
await
|
|
573
|
+
await a();
|
|
607
574
|
let s = {
|
|
608
|
-
...
|
|
575
|
+
...o,
|
|
609
576
|
...e.policy
|
|
610
|
-
}, c = e.sleep ??
|
|
611
|
-
for (let e = 1; e <= s.finalDrainRounds && t.entries.length > 0; e += 1) await c(s.finalDrainDelayMs * e), await
|
|
577
|
+
}, c = e.sleep ?? u;
|
|
578
|
+
for (let e = 1; e <= s.finalDrainRounds && t.entries.length > 0; e += 1) await c(s.finalDrainDelayMs * e), await a();
|
|
612
579
|
},
|
|
613
580
|
get pendingDiscard() {
|
|
614
581
|
return t.entries;
|
|
@@ -635,4 +602,4 @@ async function K(e, t, n = Date.now()) {
|
|
|
635
602
|
}));
|
|
636
603
|
}
|
|
637
604
|
//#endregion
|
|
638
|
-
export {
|
|
605
|
+
export { s as ATTACHMENT_COMMIT_CODES, o as ATTACHMENT_COMMIT_POLICY, a as ATTACHMENT_DIRECT_UPLOAD_MAX_BYTES, W as ATTACHMENT_URL_MAX_AGE_MS, G as attachmentUrlIsStale, R as commitAttachments, U as createAttachmentCommitter, P as drainPendingDiscards, K as refreshStaleAttachmentUrls };
|
|
@@ -76,10 +76,19 @@ export type StorageQuotaState =
|
|
|
76
76
|
{
|
|
77
77
|
state: 'unknown';
|
|
78
78
|
}
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* `checkWorkspaceQuota` found no active assignment (and no test entitlement) for the storage
|
|
81
|
+
* quota: `completeUpload` is refused with QUOTA_NOT_PROVISIONED.
|
|
82
|
+
*/
|
|
80
83
|
| {
|
|
81
84
|
state: 'not-provisioned';
|
|
82
|
-
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Provisioned. `remainingBytes` is the capacity left BEFORE this commit (`limitLeft`), or null
|
|
88
|
+
* when unlimited. An exhausted quota is `ok` with 0 left: the commit's own size comparison
|
|
89
|
+
* then refuses with QUOTA_EXCEEDED.
|
|
90
|
+
*/
|
|
91
|
+
| {
|
|
83
92
|
state: 'ok';
|
|
84
93
|
remainingBytes: number | null;
|
|
85
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesPort.d.ts","sourceRoot":"","sources":["../../src/storage/filesPort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"filesPort.d.ts","sourceRoot":"","sources":["../../src/storage/filesPort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAiH7F,uDAAuD;AACvD,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AAIvE,mDAAmD;AACnD,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,UAAU,GACV,KAAK,GACL,UAAU,GACV,YAAY,GACZ,cAAc,GACd,OAAO,GACP,gBAAgB,GAChB,YAAY,GACZ,iBAAiB,CAAC;AAEtB;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,KAAK;IAErC,QAAQ,CAAC,SAAS,EAAE,kBAAkB;IAEtC,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,OAAO;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM;gBALnB,SAAS,EAAE,kBAAkB,EACtC,OAAO,EAAE,MAAM;IACf,2EAA2E;IAClE,MAAM,EAAE,OAAO;IACxB,0EAA0E;IACjE,UAAU,CAAC,EAAE,MAAM,YAAA;IAM9B,qEAAqE;IACrE,IAAI,SAAS,IAAI,cAAc,GAAG,IAAI,CAErC;CACF;AAED,2EAA2E;AAC3E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AAc,CAAC,EAAE,MAAM,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,cAAc,CAAC;CAC5B;AAgDD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,sBAA2B,GACnC,SAAS,CA+KX"}
|
|
@@ -71,11 +71,11 @@ var i = r`
|
|
|
71
71
|
getFileDownloadUrl(id: $id)
|
|
72
72
|
}
|
|
73
73
|
`, f = r`
|
|
74
|
-
query
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
query SaveToFiles_CheckWorkspaceQuota($workspaceId: ID!, $quotaName: String!, $amount: Float) {
|
|
75
|
+
checkWorkspaceQuota(workspaceId: $workspaceId, quotaName: $quotaName, amount: $amount) {
|
|
76
|
+
allowed
|
|
77
|
+
assignmentId
|
|
78
|
+
limitLeft
|
|
79
79
|
noLimit
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -105,7 +105,22 @@ function _(e) {
|
|
|
105
105
|
}
|
|
106
106
|
return null;
|
|
107
107
|
}
|
|
108
|
-
function v(e
|
|
108
|
+
function v(e) {
|
|
109
|
+
if (typeof e != "object" || !e) return { state: "unknown" };
|
|
110
|
+
let { allowed: t, assignmentId: n, limitLeft: r, noLimit: i } = e;
|
|
111
|
+
if (i === !0) return {
|
|
112
|
+
state: "ok",
|
|
113
|
+
remainingBytes: null
|
|
114
|
+
};
|
|
115
|
+
if (n === null) return { state: "not-provisioned" };
|
|
116
|
+
if (typeof n != "string" || typeof t != "boolean") return { state: "unknown" };
|
|
117
|
+
let a = _(r);
|
|
118
|
+
return a === null ? { state: "unknown" } : {
|
|
119
|
+
state: "ok",
|
|
120
|
+
remainingBytes: Math.max(0, a)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function y(e, t = {}) {
|
|
109
124
|
let r = {
|
|
110
125
|
async ensureFolder(t) {
|
|
111
126
|
let n = await e.mutate({
|
|
@@ -141,7 +156,7 @@ function v(e, t = {}) {
|
|
|
141
156
|
};
|
|
142
157
|
},
|
|
143
158
|
put(e) {
|
|
144
|
-
return
|
|
159
|
+
return b(e, t.xhr ?? (() => new XMLHttpRequest()));
|
|
145
160
|
},
|
|
146
161
|
async complete(t) {
|
|
147
162
|
let r = await e.mutate({
|
|
@@ -215,31 +230,23 @@ function v(e, t = {}) {
|
|
|
215
230
|
return h && (r.getStorageQuota = async () => {
|
|
216
231
|
let t = h();
|
|
217
232
|
if (!t) return { state: "unknown" };
|
|
218
|
-
|
|
219
|
-
query
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
let a = _(i.limit), o = _(i.currentValue);
|
|
233
|
-
return a === null || o === null ? {
|
|
234
|
-
state: "ok",
|
|
235
|
-
remainingBytes: null
|
|
236
|
-
} : {
|
|
237
|
-
state: "ok",
|
|
238
|
-
remainingBytes: Math.max(0, a - o)
|
|
239
|
-
};
|
|
233
|
+
try {
|
|
234
|
+
let n = await e.query({
|
|
235
|
+
query: f,
|
|
236
|
+
variables: {
|
|
237
|
+
workspaceId: t,
|
|
238
|
+
quotaName: p,
|
|
239
|
+
amount: 0
|
|
240
|
+
},
|
|
241
|
+
fetchPolicy: "no-cache"
|
|
242
|
+
});
|
|
243
|
+
return n.error ? { state: "unknown" } : v(n.data?.checkWorkspaceQuota);
|
|
244
|
+
} catch {
|
|
245
|
+
return { state: "unknown" };
|
|
246
|
+
}
|
|
240
247
|
}), r;
|
|
241
248
|
}
|
|
242
|
-
function
|
|
249
|
+
function b(e, t) {
|
|
243
250
|
let { url: n, blob: r, mimeType: i, onProgress: a, signal: o } = e;
|
|
244
251
|
return new Promise((e, s) => {
|
|
245
252
|
if (o?.aborted) {
|
|
@@ -259,4 +266,4 @@ function y(e, t) {
|
|
|
259
266
|
});
|
|
260
267
|
}
|
|
261
268
|
//#endregion
|
|
262
|
-
export { p as FILES_STORAGE_QUOTA_NAME, h as FilesPortAbortError, m as FilesPortError,
|
|
269
|
+
export { p as FILES_STORAGE_QUOTA_NAME, h as FilesPortAbortError, m as FilesPortError, y as createApolloFilesPort };
|
|
@@ -95,6 +95,19 @@ export declare function extractErrorMessage(err: unknown): string | undefined;
|
|
|
95
95
|
* directly rather than only through the upload path.
|
|
96
96
|
*/
|
|
97
97
|
export declare function classifyFilesError(err: unknown): FilesRetryKind | null;
|
|
98
|
+
/**
|
|
99
|
+
* Did the server DEFINITIVELY refuse this call, so that nothing it asked for can still land?
|
|
100
|
+
*
|
|
101
|
+
* An ALLOWLIST, not "the error carries some GraphQL code": the gateway masks its own timeouts and
|
|
102
|
+
* 5xx as HTTP 200 plus a coded error (`SUBREQUEST_HTTP_ERROR`, `BAD_GATEWAY`,
|
|
103
|
+
* `AUTH_SERVICE_UNAVAILABLE`, ...), and a mutation behind such an answer may well have been applied.
|
|
104
|
+
* Only a code from the "server considered it and said no" family (`NEVER_RETRY_CODES`, any
|
|
105
|
+
* `QUOTA_*`) or an HTTP 4xx other than 408 and 499 (so 429 counts) is a refusal. 408 (Request
|
|
106
|
+
* Timeout) and 499 (Client Closed Request: the caller's connection dropped before an answer arrived,
|
|
107
|
+
* while the upstream mutation may still have finalized) are NOT answers. Everything else (timeouts,
|
|
108
|
+
* network errors, 5xx, unknown gateway codes, no answer at all) stays ambiguous.
|
|
109
|
+
*/
|
|
110
|
+
export declare function isDefinitiveFilesRefusal(err: unknown): boolean;
|
|
98
111
|
export interface FilesRetryContext {
|
|
99
112
|
/** 1-based index of the attempt that just failed. */
|
|
100
113
|
attempt: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retryPolicy.d.ts","sourceRoot":"","sources":["../../src/storage/retryPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G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CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,eAAe,GAAG,kBAAkB,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;CAClG;AAID;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,OAAO,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAClE,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CA2C/B"}
|
|
@@ -72,29 +72,33 @@ function p(e) {
|
|
|
72
72
|
let t = l(e), n = u(e);
|
|
73
73
|
return t.some((e) => a.has(e)) || n.some((e) => e >= 400 && e < 500 && e !== 408) ? null : t.some((e) => i.has(e)) || n.some((e) => o.has(e)) || d(e).some((e) => s.test(e)) ? "cold-start" : c(e)?.networkError || t.includes("INTERNAL_SERVER_ERROR") ? "transient-blip" : null;
|
|
74
74
|
}
|
|
75
|
-
var m =
|
|
75
|
+
var m = new Set([408, 499]);
|
|
76
|
+
function h(e) {
|
|
77
|
+
return !e || typeof e != "object" ? !1 : l(e).some((e) => a.has(e) || e.startsWith("QUOTA_")) ? !0 : u(e).some((e) => e >= 400 && e < 500 && !m.has(e));
|
|
78
|
+
}
|
|
79
|
+
var g = {
|
|
76
80
|
"cold-start": 3,
|
|
77
81
|
"transient-blip": 3
|
|
78
|
-
},
|
|
82
|
+
}, _ = {
|
|
79
83
|
"cold-start": t,
|
|
80
84
|
"transient-blip": r
|
|
81
|
-
},
|
|
82
|
-
function
|
|
85
|
+
}, v = ["cold-start"];
|
|
86
|
+
function y(e, t) {
|
|
83
87
|
let n = p(e);
|
|
84
88
|
if (!n) return {
|
|
85
89
|
retry: !1,
|
|
86
90
|
reason: "not-retryable"
|
|
87
91
|
};
|
|
88
|
-
if (!(t.allow ??
|
|
92
|
+
if (!(t.allow ?? v).includes(n)) return {
|
|
89
93
|
retry: !1,
|
|
90
94
|
reason: "kind-not-allowed"
|
|
91
95
|
};
|
|
92
|
-
let r =
|
|
96
|
+
let r = g[n];
|
|
93
97
|
if (t.attempt >= r) return {
|
|
94
98
|
retry: !1,
|
|
95
99
|
reason: "attempts-exhausted"
|
|
96
100
|
};
|
|
97
|
-
let i =
|
|
101
|
+
let i = _[n], a = i[Math.min(t.attempt - 1, i.length - 1)] ?? 0;
|
|
98
102
|
return n === "cold-start" && t.elapsedMs + a >= 75e3 ? {
|
|
99
103
|
retry: !1,
|
|
100
104
|
reason: "budget-exhausted"
|
|
@@ -106,9 +110,9 @@ function _(e, t) {
|
|
|
106
110
|
maxAttempts: r
|
|
107
111
|
};
|
|
108
112
|
}
|
|
109
|
-
var
|
|
110
|
-
async function
|
|
111
|
-
let n = t.now ?? (() => Date.now()), r = t.sleep ??
|
|
113
|
+
var b = (e) => new Promise((t) => setTimeout(t, e));
|
|
114
|
+
async function x(e, t = {}) {
|
|
115
|
+
let n = t.now ?? (() => Date.now()), r = t.sleep ?? b, i = n(), a = 0;
|
|
112
116
|
for (;;) {
|
|
113
117
|
a += 1;
|
|
114
118
|
let o, s, c = !1;
|
|
@@ -124,7 +128,7 @@ async function y(e, t = {}) {
|
|
|
124
128
|
value: o.value,
|
|
125
129
|
attempts: a
|
|
126
130
|
};
|
|
127
|
-
let l =
|
|
131
|
+
let l = y(o.error, {
|
|
128
132
|
attempt: a,
|
|
129
133
|
elapsedMs: n() - i,
|
|
130
134
|
...t.allow ? { allow: t.allow } : {}
|
|
@@ -147,4 +151,4 @@ async function y(e, t = {}) {
|
|
|
147
151
|
}
|
|
148
152
|
}
|
|
149
153
|
//#endregion
|
|
150
|
-
export { e as COLD_START_MAX_ATTEMPTS, n as COLD_START_RETRY_BUDGET_MS, t as COLD_START_RETRY_DELAYS_MS, p as classifyFilesError,
|
|
154
|
+
export { e as COLD_START_MAX_ATTEMPTS, n as COLD_START_RETRY_BUDGET_MS, t as COLD_START_RETRY_DELAYS_MS, p as classifyFilesError, y as decideFilesRetry, f as extractErrorMessage, h as isDefinitiveFilesRefusal, x as runWithFilesRetry };
|