@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.mjs
CHANGED
|
@@ -164,6 +164,14 @@ const UPLOAD_REFUSAL_HEADER = 'X-Upload-Refusal';
|
|
|
164
164
|
*/
|
|
165
165
|
|
|
166
166
|
|
|
167
|
+
/**
|
|
168
|
+
* The code the SDK's upload throws for a transfer still DEFERRED at its idle
|
|
169
|
+
* limit: every byte is on Forge, which is still saving the file and finishes
|
|
170
|
+
* on its own, so the file is received, never failed, and sending it again
|
|
171
|
+
* would only transfer it twice. The SDK throws it; every client reads it here.
|
|
172
|
+
*/
|
|
173
|
+
const RECEIVED_STILL_SAVING = 'upload_received_publishing';
|
|
174
|
+
|
|
167
175
|
/** What a client does after a transfer request, read from its answer. */
|
|
168
176
|
const TRANSFER_VERDICT = Object.freeze({
|
|
169
177
|
/** 2xx: the request did what it asked. */
|
|
@@ -11991,7 +11999,7 @@ function readTransferAnswer(answer, read) {
|
|
|
11991
11999
|
if (outcome.verdict === TRANSFER_VERDICT.DEFERRED) {
|
|
11992
12000
|
return {
|
|
11993
12001
|
outcome,
|
|
11994
|
-
failure: new UploadApiError(RECEIVED_PUBLISHING_MESSAGE,
|
|
12002
|
+
failure: new UploadApiError(RECEIVED_PUBLISHING_MESSAGE, RECEIVED_STILL_SAVING, status, { status }, outcome),
|
|
11995
12003
|
};
|
|
11996
12004
|
}
|
|
11997
12005
|
const detail = summarizeErrorBody(answer.body);
|
|
@@ -14838,7 +14846,7 @@ class UploadRenderer {
|
|
|
14838
14846
|
statusCode: error.statusCode,
|
|
14839
14847
|
});
|
|
14840
14848
|
}
|
|
14841
|
-
else if (error.code ===
|
|
14849
|
+
else if (error.code === RECEIVED_STILL_SAVING) {
|
|
14842
14850
|
// Every byte reached the server, which is still saving the file and
|
|
14843
14851
|
// finishes it on its own: nothing failed, and nothing is left to do.
|
|
14844
14852
|
// The host still hears it through onError, with this code, which
|
|
@@ -17303,7 +17311,7 @@ class SparkVault {
|
|
|
17303
17311
|
}
|
|
17304
17312
|
/** Get the SDK version */
|
|
17305
17313
|
static get version() {
|
|
17306
|
-
return '11.1.
|
|
17314
|
+
return '11.1.5';
|
|
17307
17315
|
}
|
|
17308
17316
|
}
|
|
17309
17317
|
if (typeof window !== 'undefined') {
|