chrome-webstore-upload 3.1.2 → 3.1.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/index.d.ts +19 -4
- package/index.js +1 -1
- package/package.json +1 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ReadStream } from 'node:fs';
|
|
2
|
-
import { type JsonObject } from 'type-fest';
|
|
3
2
|
export declare const refreshTokenURI = "https://www.googleapis.com/oauth2/v4/token";
|
|
4
3
|
export type APIClientOptions = {
|
|
5
4
|
extensionId: string;
|
|
@@ -7,15 +6,31 @@ export type APIClientOptions = {
|
|
|
7
6
|
refreshToken: string;
|
|
8
7
|
clientSecret: string | undefined;
|
|
9
8
|
};
|
|
9
|
+
export type ItemResource = {
|
|
10
|
+
kind: 'chromewebstore#item';
|
|
11
|
+
id: string;
|
|
12
|
+
publicKey: string;
|
|
13
|
+
uploadState: 'FAILURE' | 'IN_PROGRESS' | 'NOT_FOUND' | 'SUCCESS';
|
|
14
|
+
itemError: Array<{
|
|
15
|
+
error_code: string;
|
|
16
|
+
error_detail: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
export type PublishResponse = {
|
|
20
|
+
kind: 'chromewebstore#item';
|
|
21
|
+
item_id: string;
|
|
22
|
+
status: Array<'OK' | 'NOT_AUTHORIZED' | 'INVALID_DEVELOPER' | 'DEVELOPER_NO_OWNERSHIP' | 'DEVELOPER_SUSPENDED' | 'ITEM_NOT_FOUND' | 'ITEM_PENDING_REVIEW' | 'ITEM_TAKEN_DOWN' | 'PUBLISHER_SUSPENDED'>;
|
|
23
|
+
statusDetail: string[];
|
|
24
|
+
};
|
|
10
25
|
declare class APIClient {
|
|
11
26
|
extensionId: string;
|
|
12
27
|
clientId: string;
|
|
13
28
|
refreshToken: string;
|
|
14
29
|
clientSecret: string | undefined;
|
|
15
30
|
constructor(options: APIClientOptions);
|
|
16
|
-
uploadExisting(readStream: ReadStream | ReadableStream, token?: Promise<string>): Promise<
|
|
17
|
-
publish(target?: string, token?: Promise<string>, deployPercentage?: number | undefined): Promise<
|
|
18
|
-
get(projection?: string, token?: Promise<string>): Promise<
|
|
31
|
+
uploadExisting(readStream: ReadStream | ReadableStream, token?: string | Promise<string>): Promise<ItemResource>;
|
|
32
|
+
publish(target?: string, token?: string | Promise<string>, deployPercentage?: number | undefined): Promise<PublishResponse>;
|
|
33
|
+
get(projection?: string, token?: string | Promise<string>): Promise<ItemResource>;
|
|
19
34
|
fetchToken(): Promise<string>;
|
|
20
35
|
_headers(token: string): {
|
|
21
36
|
Authorization: string;
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-webstore-upload",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Upload Chrome Extensions to the Chrome Web Store",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chrome",
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"dot-json": "^1.3.0",
|
|
67
67
|
"fetch-mock": "^9.11.0",
|
|
68
68
|
"node-fetch": "^2.7.0",
|
|
69
|
-
"type-fest": "^4.9.0",
|
|
70
69
|
"typescript": "^5.3.3",
|
|
71
70
|
"utc-version": "^2.0.2",
|
|
72
71
|
"vitest": "^1.6.0",
|