chrome-webstore-upload 5.0.0-2 → 5.0.0-4
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/distribution/errors.d.ts
CHANGED
package/distribution/errors.js
CHANGED
|
@@ -28,7 +28,8 @@ export function throwIfNotOk(request, response) {
|
|
|
28
28
|
if (!request.ok) {
|
|
29
29
|
const message = parseErrorMessage(response);
|
|
30
30
|
const error = new CWSError(message);
|
|
31
|
-
|
|
31
|
+
// https://github.com/fregante/chrome-webstore-upload/issues/117
|
|
32
|
+
error.cause = 'error' in response ? response['error'] : response;
|
|
32
33
|
throw error;
|
|
33
34
|
}
|
|
34
35
|
}
|
package/distribution/index.js
CHANGED
|
@@ -132,7 +132,7 @@ class APIClient {
|
|
|
132
132
|
return response.access_token;
|
|
133
133
|
}
|
|
134
134
|
async _waitUploadSuccess(response, maxAwaitInProgressResponseSeconds) {
|
|
135
|
-
if (response.uploadState !== '
|
|
135
|
+
if (response.uploadState !== 'IN_PROGRESS' || maxAwaitInProgressResponseSeconds < retryIntervalSeconds) {
|
|
136
136
|
return response;
|
|
137
137
|
}
|
|
138
138
|
// Wait before checking again
|
package/distribution/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type ItemResource = {
|
|
|
9
9
|
crxVersion: string;
|
|
10
10
|
itemId: string;
|
|
11
11
|
name: string;
|
|
12
|
-
uploadState:
|
|
12
|
+
uploadState: 'UPLOAD_STATE_UNSPECIFIED' | 'SUCCEEDED' | 'IN_PROGRESS' | 'FAILED' | 'NOT_FOUND';
|
|
13
13
|
};
|
|
14
14
|
export type PublishType = 'PUBLISH_TYPE_UNSPECIFIED' | 'DEFAULT_PUBLISH' | 'TRUSTED_TESTERS' | 'STAGED_PUBLISH';
|
|
15
15
|
export type PublishResponse = {
|
|
@@ -19,7 +19,7 @@ export type PublishResponse = {
|
|
|
19
19
|
};
|
|
20
20
|
export type ItemStatusResponse = {
|
|
21
21
|
itemId: string;
|
|
22
|
-
lastAsyncUploadState:
|
|
22
|
+
lastAsyncUploadState: 'UPLOAD_STATE_UNSPECIFIED' | 'SUCCEEDED' | 'IN_PROGRESS' | 'FAILED' | 'NOT_FOUND';
|
|
23
23
|
name: string;
|
|
24
24
|
publicKey: string;
|
|
25
25
|
publishedItemRevisionStatus: unknown;
|