chrome-webstore-upload 3.1.1 → 3.1.2

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.
Files changed (3) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +1 -0
  3. package/package.json +1 -1
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.1",
3
+ "version": "3.1.2",
4
4
  "description": "Upload Chrome Extensions to the Chrome Web Store",
5
5
  "keywords": [
6
6
  "chrome",