chrome-webstore-upload 3.1.1 → 3.1.3
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 +2 -1
- package/index.js +1 -0
- package/package.json +4 -2
package/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReadStream } from 'node:fs';
|
|
1
2
|
import { type JsonObject } from 'type-fest';
|
|
2
3
|
export declare const refreshTokenURI = "https://www.googleapis.com/oauth2/v4/token";
|
|
3
4
|
export type APIClientOptions = {
|
|
@@ -12,7 +13,7 @@ declare class APIClient {
|
|
|
12
13
|
refreshToken: string;
|
|
13
14
|
clientSecret: string | undefined;
|
|
14
15
|
constructor(options: APIClientOptions);
|
|
15
|
-
uploadExisting(readStream: ReadableStream, token?: Promise<string>): Promise<JsonObject>;
|
|
16
|
+
uploadExisting(readStream: ReadStream | ReadableStream, token?: Promise<string>): Promise<JsonObject>;
|
|
16
17
|
publish(target?: string, token?: Promise<string>, deployPercentage?: number | undefined): Promise<JsonObject>;
|
|
17
18
|
get(projection?: string, token?: Promise<string>): Promise<JsonObject>;
|
|
18
19
|
fetchToken(): Promise<string>;
|
package/index.js
CHANGED
|
@@ -53,6 +53,7 @@ class APIClient {
|
|
|
53
53
|
headers: this._headers(await token),
|
|
54
54
|
// @ts-expect-error Node extension? 🤷♂️ Required https://github.com/nodejs/node/issues/46221
|
|
55
55
|
duplex: 'half',
|
|
56
|
+
// Until they figure it out, this seems to work. Alternatively use https://stackoverflow.com/a/76780381/288906
|
|
56
57
|
body: readStream,
|
|
57
58
|
});
|
|
58
59
|
const response = await request.json();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-webstore-upload",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "Upload Chrome Extensions to the Chrome Web Store",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chrome",
|
|
@@ -61,12 +61,14 @@
|
|
|
61
61
|
],
|
|
62
62
|
"space": 4
|
|
63
63
|
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"type-fest": "^4.26.1"
|
|
66
|
+
},
|
|
64
67
|
"devDependencies": {
|
|
65
68
|
"@sindresorhus/tsconfig": "^5.0.0",
|
|
66
69
|
"dot-json": "^1.3.0",
|
|
67
70
|
"fetch-mock": "^9.11.0",
|
|
68
71
|
"node-fetch": "^2.7.0",
|
|
69
|
-
"type-fest": "^4.9.0",
|
|
70
72
|
"typescript": "^5.3.3",
|
|
71
73
|
"utc-version": "^2.0.2",
|
|
72
74
|
"vitest": "^1.6.0",
|