@sparkvault/sdk-mobile 7.2.3 → 7.2.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/app-sdk/filename.d.ts +26 -18
- package/dist/app-sdk/filename.js +86 -45
- package/dist/app-sdk/filename.js.map +1 -1
- package/dist/app-sdk/transfer-retry.d.ts +25 -20
- package/dist/app-sdk/transfer-retry.js +62 -32
- package/dist/app-sdk/transfer-retry.js.map +1 -1
- package/dist/app-sdk/upload-publication.d.ts +31 -5
- package/dist/app-sdk/upload-publication.js +31 -5
- package/dist/app-sdk/upload-publication.js.map +1 -1
- package/dist/errors.d.ts +18 -7
- package/dist/errors.js +1 -0
- package/dist/errors.js.map +1 -1
- package/dist/ingots.test-d.d.ts +1 -1
- package/dist/tus.d.ts +25 -19
- package/dist/tus.js +39 -26
- package/dist/tus.js.map +1 -1
- package/dist/types.d.ts +13 -2
- package/dist/validation.d.ts +4 -1
- package/dist/validation.js +8 -3
- package/dist/validation.js.map +1 -1
- package/package.json +1 -1
- package/src/app-sdk/filename.js +89 -47
- package/src/app-sdk/transfer-retry.js +63 -31
- package/src/app-sdk/upload-publication.js +34 -5
- package/src/errors.ts +19 -7
- package/src/ingots.test-d.ts +1 -0
- package/src/tus.ts +45 -26
- package/src/types.ts +13 -2
- package/src/validation.ts +13 -3
|
@@ -7,6 +7,17 @@
|
|
|
7
7
|
* @returns {boolean}
|
|
8
8
|
*/
|
|
9
9
|
export function hasControlOrBidiCharacter(text: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* `name` without the trailing dots and white space a save drops: "page.html."
|
|
12
|
+
* and "page.html " are "page.html", "notes. ." is "notes", and a name of only
|
|
13
|
+
* dots and white space is ''. lastExtension reads the extension in front of
|
|
14
|
+
* them, and Forge completes a saved name after them (./media-type-node.js
|
|
15
|
+
* withMediaTypeExtension: "notes." under text/plain saves as "notes.txt").
|
|
16
|
+
*
|
|
17
|
+
* @param {string} name
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
export function trimDroppedTrailing(name: string): string;
|
|
10
21
|
/**
|
|
11
22
|
* What stops `name` from being stored as a file name, or null when nothing
|
|
12
23
|
* does. Length and emptiness are the storing runtime's own limits.
|
|
@@ -24,7 +35,13 @@ export function storableFilenameProblem(name: string): string | null;
|
|
|
24
35
|
export function toSavedFilename(name: string): string;
|
|
25
36
|
/**
|
|
26
37
|
* The name a download is saved under: the file's own name by the saved-name
|
|
27
|
-
* rule (toSavedFilename), or SAVED_FILENAME_FALLBACK when it has none
|
|
38
|
+
* rule (toSavedFilename), or SAVED_FILENAME_FALLBACK when it has none, or one
|
|
39
|
+
* of only dots or spaces, invisible characters among them
|
|
40
|
+
* (isOnlyDotsOrSpaces): such a name, completed for its type
|
|
41
|
+
* (./media-type-node.js downloadFilename), would be an extension alone, which
|
|
42
|
+
* a browser saves without its leading dots (`...` completed for a text file
|
|
43
|
+
* is `.txt`, which saves as `txt`, and `..<U+034F>` is `..<U+034F>.txt`,
|
|
44
|
+
* which saves as `<U+034F>.txt` and shows as `.txt`).
|
|
28
45
|
*
|
|
29
46
|
* @param {string|null|undefined} name
|
|
30
47
|
* @returns {string}
|
|
@@ -53,22 +70,11 @@ export function splitExtension(name: string): {
|
|
|
53
70
|
extension: string;
|
|
54
71
|
};
|
|
55
72
|
/**
|
|
56
|
-
* `name`
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @param {string} name
|
|
63
|
-
* @returns {string}
|
|
64
|
-
*/
|
|
65
|
-
export function trimDroppedTrailing(name: string): string;
|
|
66
|
-
/**
|
|
67
|
-
* The extension `name` shows, lowercase and without its dot: what follows its
|
|
68
|
-
* last dot once its invisible characters are read past and the
|
|
69
|
-
* trailing dots and white space a save drops are trimmed
|
|
70
|
-
* (trimDroppedTrailing). It is the extension a saved copy opens as wherever
|
|
71
|
-
* the name holds no invisible character: "invoice.note.html" and
|
|
73
|
+
* The extension `name` shows, lowercase and without its dot: what follows the
|
|
74
|
+
* last dot of what the name shows once saved (nameAsShown: read past its
|
|
75
|
+
* invisible characters, without the trailing dots and white space a save
|
|
76
|
+
* drops). It is the extension a saved copy opens as wherever the name holds
|
|
77
|
+
* no invisible character: "invoice.note.html" and
|
|
72
78
|
* "page.html." open as 'html', "logs.tar.gz" as 'gz', ".html" as 'html'
|
|
73
79
|
* (Windows reads a leading dot's extension), and a name with no dot as ''.
|
|
74
80
|
* "Invoice.pdf<U+034F>" shows 'pdf', so no rule completes it with a second
|
|
@@ -119,7 +125,9 @@ export const SAVED_FILENAME_FALLBACK: "download";
|
|
|
119
125
|
* that cannot import an ES module (the x.sv reveal page): it declares
|
|
120
126
|
* `savedFilename` and everything it reads at the script's top level, built
|
|
121
127
|
* from the functions and constants above, so the page runs this rule, not a
|
|
122
|
-
* copy. A new module-scope binding the rule reads must be added here.
|
|
128
|
+
* copy. A new module-scope binding the rule reads must be added here. Marked
|
|
129
|
+
* pure so a bundle that never reads it (the console's, the help desk portal's)
|
|
130
|
+
* drops it.
|
|
123
131
|
*/
|
|
124
132
|
export const SAVED_FILENAME_SCRIPT: string;
|
|
125
133
|
/** The longest name an ingot stores, in UTF-16 code units. */
|
package/dist/app-sdk/filename.js
CHANGED
|
@@ -44,13 +44,70 @@ export function hasControlOrBidiCharacter(text) {
|
|
|
44
44
|
}
|
|
45
45
|
/** Characters the file systems a name is saved to refuse. */
|
|
46
46
|
const NON_PORTABLE_FILENAME_CHARACTERS = /[:*?"<>|]/;
|
|
47
|
+
/**
|
|
48
|
+
* A character a save drops from a name's end. Windows drops trailing dots and
|
|
49
|
+
* spaces from a name it saves ("page.html." is saved as "page.html"); any
|
|
50
|
+
* other trailing white space is dropped alike, so a name never hides the
|
|
51
|
+
* extension a saved copy could open as.
|
|
52
|
+
*/
|
|
53
|
+
const DROPPED_TRAILING_CHARACTER = /[\s.]/u;
|
|
54
|
+
/**
|
|
55
|
+
* `name` without the trailing dots and white space a save drops: "page.html."
|
|
56
|
+
* and "page.html " are "page.html", "notes. ." is "notes", and a name of only
|
|
57
|
+
* dots and white space is ''. lastExtension reads the extension in front of
|
|
58
|
+
* them, and Forge completes a saved name after them (./media-type-node.js
|
|
59
|
+
* withMediaTypeExtension: "notes." under text/plain saves as "notes.txt").
|
|
60
|
+
*
|
|
61
|
+
* @param {string} name
|
|
62
|
+
* @returns {string}
|
|
63
|
+
*/
|
|
64
|
+
export function trimDroppedTrailing(name) {
|
|
65
|
+
let end = name.length;
|
|
66
|
+
while (end > 0 && DROPPED_TRAILING_CHARACTER.test(name[end - 1]))
|
|
67
|
+
end -= 1;
|
|
68
|
+
return name.slice(0, end);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Invisible characters (Unicode's Default_Ignorable_Code_Point): the joiners,
|
|
72
|
+
* variation selectors, tags and bidirectional controls, which display as
|
|
73
|
+
* nothing, and the Hangul fillers, which display as blank space. None shows
|
|
74
|
+
* in a name, and a save keeps several (`Invoice.pdf<U+034F>` saves as itself
|
|
75
|
+
* in Chromium and Firefox, and shows as `Invoice.pdf`).
|
|
76
|
+
*/
|
|
77
|
+
const INVISIBLE_CHARACTERS = /\p{Default_Ignorable_Code_Point}/gu;
|
|
78
|
+
/**
|
|
79
|
+
* What `name` shows once saved: the name read past its invisible characters
|
|
80
|
+
* (INVISIBLE_CHARACTERS), without the trailing dots and white space a save
|
|
81
|
+
* drops (trimDroppedTrailing). The extension a name shows is read in it
|
|
82
|
+
* (lastExtension), and a name it leaves nothing of is one of only dots or
|
|
83
|
+
* spaces (isOnlyDotsOrSpaces).
|
|
84
|
+
*
|
|
85
|
+
* @param {string} name
|
|
86
|
+
* @returns {string}
|
|
87
|
+
*/
|
|
88
|
+
function nameAsShown(name) {
|
|
89
|
+
return trimDroppedTrailing(name.replace(INVISIBLE_CHARACTERS, ''));
|
|
90
|
+
}
|
|
47
91
|
/** Why a name cannot be stored, as storableFilenameProblem reports it. */
|
|
48
92
|
export const FILENAME_PROBLEMS = Object.freeze({
|
|
49
93
|
UNSAFE_CHARACTER: 'unsafe_character',
|
|
50
94
|
NON_PORTABLE_CHARACTER: 'non_portable_character',
|
|
51
95
|
ONLY_DOTS_OR_SPACES: 'only_dots_or_spaces'
|
|
52
96
|
});
|
|
53
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Whether `name` is one of only dots or spaces: a name that is not empty yet
|
|
99
|
+
* shows nothing once saved (nameAsShown), every character in it a dot, white
|
|
100
|
+
* space or an invisible character (`...` and ` . `, and `..<U+034F>` and
|
|
101
|
+
* `.<U+200B>.`, which show as `..`). No such name is stored
|
|
102
|
+
* (storableFilenameProblem), and a file that has one saves under the
|
|
103
|
+
* fallback name (savedFilename).
|
|
104
|
+
*
|
|
105
|
+
* @param {string} name
|
|
106
|
+
* @returns {boolean}
|
|
107
|
+
*/
|
|
108
|
+
function isOnlyDotsOrSpaces(name) {
|
|
109
|
+
return name !== '' && nameAsShown(name) === '';
|
|
110
|
+
}
|
|
54
111
|
/**
|
|
55
112
|
* What stops `name` from being stored as a file name, or null when nothing
|
|
56
113
|
* does. Length and emptiness are the storing runtime's own limits.
|
|
@@ -63,7 +120,7 @@ export function storableFilenameProblem(name) {
|
|
|
63
120
|
return FILENAME_PROBLEMS.UNSAFE_CHARACTER;
|
|
64
121
|
if (NON_PORTABLE_FILENAME_CHARACTERS.test(name))
|
|
65
122
|
return FILENAME_PROBLEMS.NON_PORTABLE_CHARACTER;
|
|
66
|
-
if (
|
|
123
|
+
if (isOnlyDotsOrSpaces(name))
|
|
67
124
|
return FILENAME_PROBLEMS.ONLY_DOTS_OR_SPACES;
|
|
68
125
|
return null;
|
|
69
126
|
}
|
|
@@ -80,24 +137,39 @@ export function toSavedFilename(name) {
|
|
|
80
137
|
export const SAVED_FILENAME_FALLBACK = 'download';
|
|
81
138
|
/**
|
|
82
139
|
* The name a download is saved under: the file's own name by the saved-name
|
|
83
|
-
* rule (toSavedFilename), or SAVED_FILENAME_FALLBACK when it has none
|
|
140
|
+
* rule (toSavedFilename), or SAVED_FILENAME_FALLBACK when it has none, or one
|
|
141
|
+
* of only dots or spaces, invisible characters among them
|
|
142
|
+
* (isOnlyDotsOrSpaces): such a name, completed for its type
|
|
143
|
+
* (./media-type-node.js downloadFilename), would be an extension alone, which
|
|
144
|
+
* a browser saves without its leading dots (`...` completed for a text file
|
|
145
|
+
* is `.txt`, which saves as `txt`, and `..<U+034F>` is `..<U+034F>.txt`,
|
|
146
|
+
* which saves as `<U+034F>.txt` and shows as `.txt`).
|
|
84
147
|
*
|
|
85
148
|
* @param {string|null|undefined} name
|
|
86
149
|
* @returns {string}
|
|
87
150
|
*/
|
|
88
151
|
export function savedFilename(name) {
|
|
89
|
-
return typeof name === 'string' && name !== ''
|
|
152
|
+
return typeof name === 'string' && name !== '' && !isOnlyDotsOrSpaces(name)
|
|
153
|
+
? toSavedFilename(name)
|
|
154
|
+
: SAVED_FILENAME_FALLBACK;
|
|
90
155
|
}
|
|
91
156
|
/**
|
|
92
157
|
* The saved-name rule as the source of a classic browser script, for a page
|
|
93
158
|
* that cannot import an ES module (the x.sv reveal page): it declares
|
|
94
159
|
* `savedFilename` and everything it reads at the script's top level, built
|
|
95
160
|
* from the functions and constants above, so the page runs this rule, not a
|
|
96
|
-
* copy. A new module-scope binding the rule reads must be added here.
|
|
161
|
+
* copy. A new module-scope binding the rule reads must be added here. Marked
|
|
162
|
+
* pure so a bundle that never reads it (the console's, the help desk portal's)
|
|
163
|
+
* drops it.
|
|
97
164
|
*/
|
|
98
|
-
export const SAVED_FILENAME_SCRIPT = [
|
|
165
|
+
export const SAVED_FILENAME_SCRIPT = /* @__PURE__ */ [
|
|
99
166
|
`var UNSAFE_FILENAME_CHARACTERS = ${UNSAFE_FILENAME_CHARACTERS};`,
|
|
167
|
+
`var DROPPED_TRAILING_CHARACTER = ${DROPPED_TRAILING_CHARACTER};`,
|
|
168
|
+
`var INVISIBLE_CHARACTERS = ${INVISIBLE_CHARACTERS};`,
|
|
100
169
|
`var SAVED_FILENAME_FALLBACK = ${JSON.stringify(SAVED_FILENAME_FALLBACK)};`,
|
|
170
|
+
trimDroppedTrailing,
|
|
171
|
+
nameAsShown,
|
|
172
|
+
isOnlyDotsOrSpaces,
|
|
101
173
|
toSavedFilename,
|
|
102
174
|
savedFilename
|
|
103
175
|
].join('\n');
|
|
@@ -145,42 +217,11 @@ export function splitExtension(name) {
|
|
|
145
217
|
: { stem: name, extension: '' };
|
|
146
218
|
}
|
|
147
219
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* extension a saved copy
|
|
152
|
-
|
|
153
|
-
const DROPPED_TRAILING_CHARACTER = /[\s.]/u;
|
|
154
|
-
/**
|
|
155
|
-
* `name` without the trailing dots and white space a save drops: "page.html."
|
|
156
|
-
* and "page.html " are "page.html", "notes. ." is "notes", and a name of only
|
|
157
|
-
* dots and white space is ''. lastExtension reads the extension in front of
|
|
158
|
-
* them, and Forge completes a saved name after them (./media-type-node.js
|
|
159
|
-
* withMediaTypeExtension: "notes." under text/plain saves as "notes.txt").
|
|
160
|
-
*
|
|
161
|
-
* @param {string} name
|
|
162
|
-
* @returns {string}
|
|
163
|
-
*/
|
|
164
|
-
export function trimDroppedTrailing(name) {
|
|
165
|
-
let end = name.length;
|
|
166
|
-
while (end > 0 && DROPPED_TRAILING_CHARACTER.test(name[end - 1]))
|
|
167
|
-
end -= 1;
|
|
168
|
-
return name.slice(0, end);
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Invisible characters (Unicode's Default_Ignorable_Code_Point): the joiners,
|
|
172
|
-
* variation selectors, tags and bidirectional controls, which display as
|
|
173
|
-
* nothing, and the Hangul fillers, which display as blank space. None shows
|
|
174
|
-
* in a name, and a save keeps several (`Invoice.pdf<U+034F>` saves as itself
|
|
175
|
-
* in Chromium and Firefox, and shows as `Invoice.pdf`).
|
|
176
|
-
*/
|
|
177
|
-
const INVISIBLE_CHARACTERS = /\p{Default_Ignorable_Code_Point}/gu;
|
|
178
|
-
/**
|
|
179
|
-
* The extension `name` shows, lowercase and without its dot: what follows its
|
|
180
|
-
* last dot once its invisible characters are read past and the
|
|
181
|
-
* trailing dots and white space a save drops are trimmed
|
|
182
|
-
* (trimDroppedTrailing). It is the extension a saved copy opens as wherever
|
|
183
|
-
* the name holds no invisible character: "invoice.note.html" and
|
|
220
|
+
* The extension `name` shows, lowercase and without its dot: what follows the
|
|
221
|
+
* last dot of what the name shows once saved (nameAsShown: read past its
|
|
222
|
+
* invisible characters, without the trailing dots and white space a save
|
|
223
|
+
* drops). It is the extension a saved copy opens as wherever the name holds
|
|
224
|
+
* no invisible character: "invoice.note.html" and
|
|
184
225
|
* "page.html." open as 'html', "logs.tar.gz" as 'gz', ".html" as 'html'
|
|
185
226
|
* (Windows reads a leading dot's extension), and a name with no dot as ''.
|
|
186
227
|
* "Invoice.pdf<U+034F>" shows 'pdf', so no rule completes it with a second
|
|
@@ -199,9 +240,9 @@ const INVISIBLE_CHARACTERS = /\p{Default_Ignorable_Code_Point}/gu;
|
|
|
199
240
|
* @returns {string}
|
|
200
241
|
*/
|
|
201
242
|
export function lastExtension(name) {
|
|
202
|
-
const
|
|
203
|
-
const dot =
|
|
204
|
-
return dot === -1 ? '' :
|
|
243
|
+
const shown = nameAsShown(name);
|
|
244
|
+
const dot = shown.lastIndexOf('.');
|
|
245
|
+
return dot === -1 ? '' : shown.slice(dot + 1).toLowerCase();
|
|
205
246
|
}
|
|
206
247
|
/**
|
|
207
248
|
* The longest prefix of `text` within `maxLength` UTF-16 units that splits no
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filename.js","sourceRoot":"","sources":["../../src/app-sdk/filename.js"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,oDAAoD;AACpD,8DAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,MAAM,2BAA2B,GAAG,MAAM,CAAC,GAAG,CAAA,oDAA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AACH,MAAM,UAAU,gBAAgB,CAAC,IAAI,EAAE,SAAS;IAC9C,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG,SAAS;YAAE,MAAM;QAC3D,SAAS,IAAI,SAAS,CAAC;IACzB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc;IACtD,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,SAAS,CAAC,MAAM,GAAG,SAAS;QACjC,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,EAAE;QACvE,CAAC,CAAC,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
* @property {number|null} retryAfterMs - The answer's `Retry-After`, in ms from
|
|
13
13
|
* the answer (an HTTP-date already past reads as 0); null when absent or unreadable
|
|
14
14
|
* @property {number|null} offset - The answer's `Upload-Offset`; null when absent or unreadable
|
|
15
|
-
* @property {string|null} coreCode - The code
|
|
16
|
-
*
|
|
17
|
-
* naming none, its `X-Upload-Refusal`): REFUSED for
|
|
18
|
-
* (`
|
|
19
|
-
* (`
|
|
20
|
-
*
|
|
15
|
+
* @property {string|null} coreCode - The code of the refusal Core decided, as
|
|
16
|
+
* the answer named it (a 404, 410 or 412, or a 409 naming no offset: its
|
|
17
|
+
* body's details or, those naming none, its `X-Upload-Refusal`): REFUSED for
|
|
18
|
+
* any code a 409 names (`VAULT_DELETION_SCHEDULED`) and for a terminal
|
|
19
|
+
* answer's final refusal (`UPLOAD_POOL_FULL`, `UPLOAD_SUPERSEDED`), GONE for
|
|
20
|
+
* any other code a terminal answer names (`NOT_FOUND`,
|
|
21
|
+
* `UPLOAD_PROTOCOL_RETIRED`, a 412's, one this policy does not know); null
|
|
22
|
+
* when the answer names none
|
|
21
23
|
*/
|
|
22
24
|
/**
|
|
23
25
|
* Read the answer to a transfer request the way the policy does.
|
|
@@ -179,10 +181,10 @@ export const TRANSFER_VERDICT: Readonly<{
|
|
|
179
181
|
/** 2xx: the request did what it asked. */
|
|
180
182
|
OK: "ok";
|
|
181
183
|
/**
|
|
182
|
-
* No answer (a reset, a timeout), 408, 425, 429, a 5xx, or a 409
|
|
183
|
-
* `Upload-Offset`
|
|
184
|
-
* never sooner than `Retry-After`, then ask
|
|
185
|
-
* sending a chunk again.
|
|
184
|
+
* No answer (a reset, a timeout), 408, 425, 429, a 5xx, or a 409 naming
|
|
185
|
+
* neither an `Upload-Offset` nor a code of Core's (another request holds
|
|
186
|
+
* the session's lease): back off, never sooner than `Retry-After`, then ask
|
|
187
|
+
* the server's offset before sending a chunk again.
|
|
186
188
|
*/
|
|
187
189
|
RETRY: "retry";
|
|
188
190
|
/** 409 with `Upload-Offset`: the session stands elsewhere; continue from that offset at once. */
|
|
@@ -201,10 +203,11 @@ export const TRANSFER_VERDICT: Readonly<{
|
|
|
201
203
|
*/
|
|
202
204
|
GONE: "gone";
|
|
203
205
|
/**
|
|
204
|
-
* Any other status,
|
|
205
|
-
* (`coreCode`: UPLOAD_POOL_FULL, UPLOAD_SUPERSEDED)
|
|
206
|
-
*
|
|
207
|
-
*
|
|
206
|
+
* Any other status, a 404, 410 or 412 naming a final refusal of Core's
|
|
207
|
+
* (`coreCode`: UPLOAD_POOL_FULL, UPLOAD_SUPERSEDED), or a 409 naming any
|
|
208
|
+
* code of Core's (`coreCode`: VAULT_DELETION_SCHEDULED, whose session
|
|
209
|
+
* stands): the server's verdict on this request, which repeating it, or a
|
|
210
|
+
* new upload of the same file, earns again.
|
|
208
211
|
*/
|
|
209
212
|
REFUSED: "refused";
|
|
210
213
|
}>;
|
|
@@ -247,12 +250,14 @@ export type TransferOutcome = {
|
|
|
247
250
|
*/
|
|
248
251
|
offset: number | null;
|
|
249
252
|
/**
|
|
250
|
-
* - The code
|
|
251
|
-
*
|
|
252
|
-
* naming none, its `X-Upload-Refusal`): REFUSED for
|
|
253
|
-
* (`
|
|
254
|
-
* (`
|
|
255
|
-
*
|
|
253
|
+
* - The code of the refusal Core decided, as
|
|
254
|
+
* the answer named it (a 404, 410 or 412, or a 409 naming no offset: its
|
|
255
|
+
* body's details or, those naming none, its `X-Upload-Refusal`): REFUSED for
|
|
256
|
+
* any code a 409 names (`VAULT_DELETION_SCHEDULED`) and for a terminal
|
|
257
|
+
* answer's final refusal (`UPLOAD_POOL_FULL`, `UPLOAD_SUPERSEDED`), GONE for
|
|
258
|
+
* any other code a terminal answer names (`NOT_FOUND`,
|
|
259
|
+
* `UPLOAD_PROTOCOL_RETIRED`, a 412's, one this policy does not know); null
|
|
260
|
+
* when the answer names none
|
|
256
261
|
*/
|
|
257
262
|
coreCode: string | null;
|
|
258
263
|
};
|
|
@@ -22,20 +22,29 @@
|
|
|
22
22
|
* both bounds start over whenever the server confirms progress.
|
|
23
23
|
*
|
|
24
24
|
* Forge's own answers beyond the general rule:
|
|
25
|
-
* -
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* of the
|
|
36
|
-
* for
|
|
37
|
-
*
|
|
38
|
-
*
|
|
25
|
+
* - an answer naming a refusal Core decided names Core's code: a terminal
|
|
26
|
+
* answer (a 404, 410 or 412) the code Core ended the upload with, and a 409
|
|
27
|
+
* relaying Core's refusal of the transfer the code Core refused it with.
|
|
28
|
+
* Its error envelope names it in `error.details.coreCode` (for the refusals
|
|
29
|
+
* Forge words itself and the ones it relays from Core's check of a
|
|
30
|
+
* transfer), and every one of them in `X-Upload-Refusal`, which is all a
|
|
31
|
+
* HEAD's answer, having no body, can carry; the body's code wins when both
|
|
32
|
+
* name one;
|
|
33
|
+
* - the 409, in three kinds: one carrying `Upload-Offset` names where the
|
|
34
|
+
* session stands (continue from there); one naming Core's code is Core's
|
|
35
|
+
* refusal of the transfer in its vault's current state, a vault scheduled
|
|
36
|
+
* for deletion (VAULT_DELETION_SCHEDULED), which keeps the session (until
|
|
37
|
+
* it lapses on its 72 h idle window, upload-expiry.js) and which neither
|
|
38
|
+
* the same request nor a new upload gets past until a person cancels the
|
|
39
|
+
* deletion, so it is reported, never retried; and one naming
|
|
40
|
+
* neither means another request holds the session's write lease, a chunk
|
|
41
|
+
* or the finalization (retry after its `Retry-After`);
|
|
42
|
+
* - a terminal answer's code decides its verdict: a full storage pool or a
|
|
43
|
+
* later upload that replaced this one is a refusal no new upload of the
|
|
44
|
+
* same file remedies, and any other code (the file the upload was for
|
|
45
|
+
* gone, a retired contract, a replacement base that moved on, a code this
|
|
46
|
+
* policy does not know) ends the session, which a new upload can start
|
|
47
|
+
* over;
|
|
39
48
|
* - a 503 carrying `Retry-After` to the receipt (the PATCH at the final
|
|
40
49
|
* offset) is a deferral: Forge holds every byte and is still publishing,
|
|
41
50
|
* and finishes without the client, so it is asked again, each time after a
|
|
@@ -61,10 +70,10 @@ export const TRANSFER_VERDICT = Object.freeze({
|
|
|
61
70
|
/** 2xx: the request did what it asked. */
|
|
62
71
|
OK: 'ok',
|
|
63
72
|
/**
|
|
64
|
-
* No answer (a reset, a timeout), 408, 425, 429, a 5xx, or a 409
|
|
65
|
-
* `Upload-Offset`
|
|
66
|
-
* never sooner than `Retry-After`, then ask
|
|
67
|
-
* sending a chunk again.
|
|
73
|
+
* No answer (a reset, a timeout), 408, 425, 429, a 5xx, or a 409 naming
|
|
74
|
+
* neither an `Upload-Offset` nor a code of Core's (another request holds
|
|
75
|
+
* the session's lease): back off, never sooner than `Retry-After`, then ask
|
|
76
|
+
* the server's offset before sending a chunk again.
|
|
68
77
|
*/
|
|
69
78
|
RETRY: 'retry',
|
|
70
79
|
/** 409 with `Upload-Offset`: the session stands elsewhere; continue from that offset at once. */
|
|
@@ -83,10 +92,11 @@ export const TRANSFER_VERDICT = Object.freeze({
|
|
|
83
92
|
*/
|
|
84
93
|
GONE: 'gone',
|
|
85
94
|
/**
|
|
86
|
-
* Any other status,
|
|
87
|
-
* (`coreCode`: UPLOAD_POOL_FULL, UPLOAD_SUPERSEDED)
|
|
88
|
-
*
|
|
89
|
-
*
|
|
95
|
+
* Any other status, a 404, 410 or 412 naming a final refusal of Core's
|
|
96
|
+
* (`coreCode`: UPLOAD_POOL_FULL, UPLOAD_SUPERSEDED), or a 409 naming any
|
|
97
|
+
* code of Core's (`coreCode`: VAULT_DELETION_SCHEDULED, whose session
|
|
98
|
+
* stands): the server's verdict on this request, which repeating it, or a
|
|
99
|
+
* new upload of the same file, earns again.
|
|
90
100
|
*/
|
|
91
101
|
REFUSED: 'refused'
|
|
92
102
|
});
|
|
@@ -101,6 +111,11 @@ const SERVICE_UNAVAILABLE = 503;
|
|
|
101
111
|
* (UPLOAD_GONE, or Core's own relayed), a relayed 404, and Core's own 412.
|
|
102
112
|
*/
|
|
103
113
|
const TERMINAL_STATUSES = new Set([404, 410, 412]);
|
|
114
|
+
/**
|
|
115
|
+
* Forge's 409: about where the session stands (`Upload-Offset`), another
|
|
116
|
+
* request's lease on it, or Core's refusal of the transfer, relayed.
|
|
117
|
+
*/
|
|
118
|
+
const CONFLICT = 409;
|
|
104
119
|
/** Core's error codes are upper-case words joined by underscores; anything else names no code. */
|
|
105
120
|
const CORE_CODE = /^[A-Z][A-Z0-9_]{0,63}$/;
|
|
106
121
|
const UPLOAD_OFFSET_HEADER = 'Upload-Offset';
|
|
@@ -134,12 +149,14 @@ const DEFAULT_MAX_CONSECUTIVE_FAILURES = 8;
|
|
|
134
149
|
* @property {number|null} retryAfterMs - The answer's `Retry-After`, in ms from
|
|
135
150
|
* the answer (an HTTP-date already past reads as 0); null when absent or unreadable
|
|
136
151
|
* @property {number|null} offset - The answer's `Upload-Offset`; null when absent or unreadable
|
|
137
|
-
* @property {string|null} coreCode - The code
|
|
138
|
-
*
|
|
139
|
-
* naming none, its `X-Upload-Refusal`): REFUSED for
|
|
140
|
-
* (`
|
|
141
|
-
* (`
|
|
142
|
-
*
|
|
152
|
+
* @property {string|null} coreCode - The code of the refusal Core decided, as
|
|
153
|
+
* the answer named it (a 404, 410 or 412, or a 409 naming no offset: its
|
|
154
|
+
* body's details or, those naming none, its `X-Upload-Refusal`): REFUSED for
|
|
155
|
+
* any code a 409 names (`VAULT_DELETION_SCHEDULED`) and for a terminal
|
|
156
|
+
* answer's final refusal (`UPLOAD_POOL_FULL`, `UPLOAD_SUPERSEDED`), GONE for
|
|
157
|
+
* any other code a terminal answer names (`NOT_FOUND`,
|
|
158
|
+
* `UPLOAD_PROTOCOL_RETIRED`, a 412's, one this policy does not know); null
|
|
159
|
+
* when the answer names none
|
|
143
160
|
*/
|
|
144
161
|
/**
|
|
145
162
|
* Read the answer to a transfer request the way the policy does.
|
|
@@ -177,7 +194,7 @@ export function classifyTransferResponse({ status, headers = null, details = nul
|
|
|
177
194
|
}
|
|
178
195
|
const header = (name) => (headers === null ? null : headers(name));
|
|
179
196
|
const offset = readCount(header(UPLOAD_OFFSET_HEADER));
|
|
180
|
-
const coreCode =
|
|
197
|
+
const coreCode = mayNameCoreCode(status, offset)
|
|
181
198
|
? coreCodeIn(details) ?? coreCodeOf(header(UPLOAD_REFUSAL_HEADER))
|
|
182
199
|
: null;
|
|
183
200
|
const retryAfterMs = readRetryAfterMs(header(RETRY_AFTER_HEADER), now);
|
|
@@ -188,16 +205,29 @@ export function classifyTransferResponse({ status, headers = null, details = nul
|
|
|
188
205
|
coreCode
|
|
189
206
|
};
|
|
190
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Whether an answer may name the code of a refusal Core decided: a terminal
|
|
210
|
+
* answer does, and so does a 409 naming no offset. A 409 carrying
|
|
211
|
+
* `Upload-Offset` is Forge's own, about where the session stands.
|
|
212
|
+
*/
|
|
213
|
+
function mayNameCoreCode(status, offset) {
|
|
214
|
+
return TERMINAL_STATUSES.has(status) || (status === CONFLICT && offset === null);
|
|
215
|
+
}
|
|
191
216
|
/**
|
|
192
217
|
* The verdict on a status that came with an answer: `offset` its readable
|
|
193
|
-
* `Upload-Offset`, `coreCode` the code of Core's
|
|
218
|
+
* `Upload-Offset`, `coreCode` the code of Core's the answer names,
|
|
194
219
|
* `deferral` whether it answered the receipt with a readable `Retry-After`.
|
|
195
220
|
*/
|
|
196
221
|
function verdictFor(status, { offset, coreCode, deferral }) {
|
|
197
222
|
if (status >= 200 && status < 300)
|
|
198
223
|
return TRANSFER_VERDICT.OK;
|
|
199
|
-
if (status ===
|
|
200
|
-
|
|
224
|
+
if (status === CONFLICT) {
|
|
225
|
+
if (offset !== null)
|
|
226
|
+
return TRANSFER_VERDICT.RESYNC;
|
|
227
|
+
// Core's 409 refuses the transfer in its vault's current state: the
|
|
228
|
+
// session stands, and the same request or a new upload earns it again.
|
|
229
|
+
return coreCode === null ? TRANSFER_VERDICT.RETRY : TRANSFER_VERDICT.REFUSED;
|
|
230
|
+
}
|
|
201
231
|
if (coreCode !== null)
|
|
202
232
|
return UPLOAD_FINAL_REFUSAL_CODES.includes(coreCode) ? TRANSFER_VERDICT.REFUSED : TRANSFER_VERDICT.GONE;
|
|
203
233
|
if (status === 404 || status === 410)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer-retry.js","sourceRoot":"","sources":["../../src/app-sdk/transfer-retry.js"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,0DAA0D;AAC1D,8DAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,qBAAqB,EAAE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AI,mBAAmB;YACrB,OAAO,mBAAmB,CAAC;QAC7B,CAAC;QACD,IAAI,OAAO;YACT,OAAO,mBAAmB,GAAG,SAAS,CAAC;QACzC,CAAC;QACD,IAAI,eAAe;YACjB,OAAO,MAAM,EAAE,CAAC;QAClB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,6DAA6D;AAC7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjD,gDAAgD;IAChD,OAAO,EAAE,SAAS;IAClB,yFAAyF;IACzF,YAAY,EAAE,cAAc;IAC5B,qFAAqF;IACrF,UAAU,EAAE,YAAY;CACzB,CAAC,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE;IAClE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QAC3G,MAAM,IAAI,SAAS,CAAC,yEAAyE,SAAS,QAAQ,SAAS,EAAE,CAAC,CAAC;IAC7H,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC;QAAE,OAAO,qBAAqB,CAAC,OAAO,CAAC;IACtF,IAAI,MAAM,GAAG,SAAS;QAAE,OAAO,qBAAqB,CAAC,YAAY,CAAC;IAClE,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,GAAG,SAAS,KAAK,CAAC;QAAE,OAAO,qBAAqB,CAAC,UAAU,CAAC;IAC9F,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -50,7 +50,9 @@ export function uploadTokenRevocationReason(record: Object | null | undefined):
|
|
|
50
50
|
* The upload publication contract between Forge and Core's activation, and
|
|
51
51
|
* the facts of a transfer token both services spell: its shape, the
|
|
52
52
|
* publication it is bound to (a content version, and the one an ingot row
|
|
53
|
-
* names),
|
|
53
|
+
* names), Core's revocation of an upload's token, and the refusals of Core's
|
|
54
|
+
* a transfer's answer names (the header, and the lock of a vault scheduled
|
|
55
|
+
* for deletion).
|
|
54
56
|
*
|
|
55
57
|
* Forge stamps UPLOAD_PUBLICATION_PROTOCOL on every upload session it creates
|
|
56
58
|
* and on the final state it hands Core's activation (POST
|
|
@@ -151,9 +153,33 @@ export const UPLOAD_TOKEN_REVOCATION: Readonly<{
|
|
|
151
153
|
}>;
|
|
152
154
|
}>;
|
|
153
155
|
/**
|
|
154
|
-
* The
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
156
|
+
* The code Core refuses every use of a vault's content with (409) while the
|
|
157
|
+
* vault is scheduled for deletion, until a company admin cancels the
|
|
158
|
+
* deletion or it runs and the vault is gone: a transfer token's use, each
|
|
159
|
+
* request of a transfer (Forge asks Core before every one and relays the
|
|
160
|
+
* refusal naming this code), and an upload's activation, which Forge defers.
|
|
161
|
+
* The lock refuses an upload's requests and never ends its session, so a
|
|
162
|
+
* client keeps the session and reports the lock. The session still lapses
|
|
163
|
+
* on its own idle window (upload-expiry.js), which is shorter than the
|
|
164
|
+
* deletion's delay: an upload resumed after a cancelled deletion goes on from
|
|
165
|
+
* its offset while the session stands, and starts over once it has lapsed.
|
|
166
|
+
*/
|
|
167
|
+
export const VAULT_DELETION_SCHEDULED: "VAULT_DELETION_SCHEDULED";
|
|
168
|
+
/**
|
|
169
|
+
* The words a vault scheduled for deletion refuses every use of its content
|
|
170
|
+
* in (VAULT_DELETION_SCHEDULED), whichever service or client meets it:
|
|
171
|
+
* Core's refusal, and a client's report of it from an answer with no body
|
|
172
|
+
* to carry Core's (a HEAD's, naming the code in UPLOAD_REFUSAL_HEADER alone).
|
|
173
|
+
*/
|
|
174
|
+
export const VAULT_DELETION_SCHEDULED_MESSAGE: "This vault is scheduled for deletion. Cancel its deletion in vault settings before accessing its contents.";
|
|
175
|
+
/**
|
|
176
|
+
* The response header that names the code of a refusal Core decided: Forge
|
|
177
|
+
* sends it on every terminal answer to a tus request (a 404, 410 or 412) and
|
|
178
|
+
* on every answer relaying Core's decision about a transfer's vault (the 409
|
|
179
|
+
* VAULT_DELETION_SCHEDULED, a 404 naming the vault), a download's and a
|
|
180
|
+
* HEAD's (which has no body) included, so a
|
|
181
|
+
* client tells an upload the owner's pool cannot take from one a later
|
|
182
|
+
* upload superseded, and Core's lock from another request holding the
|
|
183
|
+
* session's lease, without reading a body.
|
|
158
184
|
*/
|
|
159
185
|
export const UPLOAD_REFUSAL_HEADER: "X-Upload-Refusal";
|