chrome-webstore-upload-keys 1.1.4 → 1.1.6

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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "chrome-webstore-upload-keys",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "CLI tool to generate OAuth keys for the Chrome Web Store",
5
+ "readme": "See details on https://github.com/fregante/chrome-webstore-upload-keys",
5
6
  "keywords": [
6
7
  "chrome",
7
8
  "publish",
@@ -29,7 +30,7 @@
29
30
  "@clack/prompts": "^0.7.0",
30
31
  "@vercel/ncc": "^0.38.1",
31
32
  "get-port": "^7.0.0",
32
- "openurl": "^1.1.1",
33
+ "open": "^10.0.3",
33
34
  "p-defer": "^4.0.0",
34
35
  "xo": "^0.56.0"
35
36
  },
package/readme.md CHANGED
@@ -1,69 +1,17 @@
1
- # How to generate Google API keys
1
+ # chrome-webstore-upload-keys
2
2
 
3
- > Guide and OAuth helper to generate keys
3
+ 1. It requests your Google API client ID and client secret
4
+ 2. It opens a local server to handle the OAuth redirect from Google's servers with an `approvalCode`
5
+ 3. It uses Google's `oauth2` API to request a `refreshToken`
4
6
 
5
- Companion to [Web Store Upload](https://github.com/fregante/chrome-webstore-upload).
7
+ ## Usage
6
8
 
7
- You can follow this complete guide or the official-but-partial one at: https://developer.chrome.com/docs/webstore/using-api
9
+ ```
10
+ npx chrome-webstore-upload-keys
11
+ ```
8
12
 
9
- > [!TIP]
10
- > The names you enter here don't really matter. It's an app that only you will have access to. This will take approximately 10 minutes and Google likes to change these screens often. Sorry.
13
+ Follow the complete instructions at https://github.com/fregante/chrome-webstore-upload-keys
11
14
 
12
- 1. Visit https://console.developers.google.com/apis/credentials
13
- 0. Create a project:
15
+ ## Demo
14
16
 
15
- > <img width="772" alt="Google APIs: Create project" src="https://user-images.githubusercontent.com/1402241/77865620-9a8a3680-722f-11ea-99cb-b09e5c0c11ec.png">
16
-
17
- 0. Enter `chrome-webstore-upload` and **Create**
18
- 0. Visit https://console.cloud.google.com/apis/credentials/consent
19
- 0. Select on **External** and **Create**
20
-
21
- > <img width="804" alt="OAuth Consent Screen" src="https://user-images.githubusercontent.com/1402241/133878019-f159f035-2b76-4686-a461-0e0005355da6.png">
22
-
23
- 0. Only enter the Application name (e.g. `chrome-webstore-upload`) and required email fields, and click **Save**
24
-
25
- > <img width="475" alt="Consent screen configuration" src="https://user-images.githubusercontent.com/1402241/77865809-82ff7d80-7230-11ea-8a96-e381d55524c5.png">
26
-
27
- 0. On the 3rd screen, add your own email address:
28
-
29
- > <img width="632" alt="Test users selection" src="https://user-images.githubusercontent.com/1402241/106213510-7c180300-6192-11eb-97b4-b4ae92424bf1.png">
30
-
31
- 0. Visit https://console.developers.google.com/apis/library/chromewebstore.googleapis.com
32
- 0. Click **Enable**
33
- 0. Visit https://console.developers.google.com/apis/credentials
34
- 0. Click **Create credentials** > **OAuth client ID**:
35
-
36
- > <img width="771" alt="Create credentials" src="https://user-images.githubusercontent.com/1402241/77865679-e89f3a00-722f-11ea-942d-5245091f22b8.png">
37
-
38
- 0. Select **Desktop app**, enter `Chrome Webstore Upload` and click **Create**
39
-
40
- > <img width="568" alt="Create OAuth client ID" src="https://user-images.githubusercontent.com/1402241/163124196-c4bb4f26-9766-4766-bb81-3982875d3a84.png">
41
-
42
- 0. Save your ✅ `clientId` and ✅ `clientSecret`:
43
-
44
- > <img width="554" alt="OAuth client created" src="https://user-images.githubusercontent.com/1402241/228934028-1ef55a41-cc92-4ecf-967a-1984a363c21d.png">
45
-
46
- 0. Visit https://console.cloud.google.com/apis/credentials/consent
47
- 0. Click **PUBLISH APP** and confirm
48
-
49
- > <img width="771" alt="Publish app" src="https://user-images.githubusercontent.com/27696701/114265946-2da2a280-9a26-11eb-9567-c4e00f572500.png">
50
-
51
- 0. Run this CLI tool to generate the required `refreshToken`
52
-
53
- ```sh
54
- npx chrome-webstore-upload-keys
55
- ```
56
- or
57
- ```sh
58
- bunx chrome-webstore-upload-keys
59
- ```
60
-
61
- > <img width="771" alt="chrome-webstore-upload-keys demo" src="./demo.gif">
62
-
63
- 9001. Done. Now you should have ✅ `clientId`, ✅ `clientSecret` and ✅ `refreshToken`. You can use these for all your extensions, but don't share them!
64
-
65
- ## What the CLI tool does
66
-
67
- 1. Requests the two keys you have
68
- 2. Opens a local server to handle the OAuth redirect from Google's servers with an `approvalCode`
69
- 3. Uses Google's `oauth2` API to request a `refreshToken`
17
+ ![CLI tool demo](./demo.gif)
@@ -1,21 +0,0 @@
1
- name: CI
2
- on:
3
- - push
4
- - pull_request
5
- jobs:
6
- test:
7
- name: Node.js ${{ matrix.node-version }}
8
- runs-on: ubuntu-latest
9
- strategy:
10
- fail-fast: false
11
- matrix:
12
- node-version:
13
- - 20
14
- - 18
15
- steps:
16
- - uses: actions/checkout@v4
17
- - uses: actions/setup-node@v4
18
- with:
19
- node-version: ${{ matrix.node-version }}
20
- - run: npm install
21
- - run: npm test