@sparkvault/sdk-js 11.1.3 → 11.1.5
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.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -168,6 +168,14 @@ const UPLOAD_REFUSAL_HEADER = 'X-Upload-Refusal';
|
|
|
168
168
|
*/
|
|
169
169
|
|
|
170
170
|
|
|
171
|
+
/**
|
|
172
|
+
* The code the SDK's upload throws for a transfer still DEFERRED at its idle
|
|
173
|
+
* limit: every byte is on Forge, which is still saving the file and finishes
|
|
174
|
+
* on its own, so the file is received, never failed, and sending it again
|
|
175
|
+
* would only transfer it twice. The SDK throws it; every client reads it here.
|
|
176
|
+
*/
|
|
177
|
+
const RECEIVED_STILL_SAVING = 'upload_received_publishing';
|
|
178
|
+
|
|
171
179
|
/** What a client does after a transfer request, read from its answer. */
|
|
172
180
|
const TRANSFER_VERDICT = Object.freeze({
|
|
173
181
|
/** 2xx: the request did what it asked. */
|
|
@@ -11995,7 +12003,7 @@ function readTransferAnswer(answer, read) {
|
|
|
11995
12003
|
if (outcome.verdict === TRANSFER_VERDICT.DEFERRED) {
|
|
11996
12004
|
return {
|
|
11997
12005
|
outcome,
|
|
11998
|
-
failure: new UploadApiError(RECEIVED_PUBLISHING_MESSAGE,
|
|
12006
|
+
failure: new UploadApiError(RECEIVED_PUBLISHING_MESSAGE, RECEIVED_STILL_SAVING, status, { status }, outcome),
|
|
11999
12007
|
};
|
|
12000
12008
|
}
|
|
12001
12009
|
const detail = summarizeErrorBody(answer.body);
|
|
@@ -14842,7 +14850,7 @@ class UploadRenderer {
|
|
|
14842
14850
|
statusCode: error.statusCode,
|
|
14843
14851
|
});
|
|
14844
14852
|
}
|
|
14845
|
-
else if (error.code ===
|
|
14853
|
+
else if (error.code === RECEIVED_STILL_SAVING) {
|
|
14846
14854
|
// Every byte reached the server, which is still saving the file and
|
|
14847
14855
|
// finishes it on its own: nothing failed, and nothing is left to do.
|
|
14848
14856
|
// The host still hears it through onError, with this code, which
|
|
@@ -17307,7 +17315,7 @@ class SparkVault {
|
|
|
17307
17315
|
}
|
|
17308
17316
|
/** Get the SDK version */
|
|
17309
17317
|
static get version() {
|
|
17310
|
-
return '11.1.
|
|
17318
|
+
return '11.1.5';
|
|
17311
17319
|
}
|
|
17312
17320
|
}
|
|
17313
17321
|
if (typeof window !== 'undefined') {
|