@zeroheight/adoption-cli 0.4.0 → 0.4.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Release notes
2
2
 
3
- ## [0.4.0](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.3.1) - 2nd August 2024
3
+ ## [0.4.1](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.4.1) - 9th August 2024
4
+
5
+ - Update README
6
+ - Fix Changelog links
7
+
8
+ ## [0.4.0](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.4.0) - 2nd August 2024
4
9
 
5
10
  - Allow `--interactive false` option for `analyze` command to better sipport CI
6
11
 
package/README.md CHANGED
@@ -14,22 +14,67 @@ npm i @zeroheight/adoption-cli
14
14
 
15
15
  In the repository in which you wish to analyze the component usage, run the following command:
16
16
 
17
- ```
17
+ ```bash
18
18
  zh-adoption analyze
19
19
  ```
20
20
 
21
- You are able to limit the file extensions to include when searching for components by using `-e, --extensions [ext]` with a glob pattern to determine file extensions.
21
+ ### Options
22
+
23
+ `-e` / `--extensions`
24
+
25
+ Provide a glob pattern to search for files with a specific extension.
26
+
27
+ ```bash
28
+ zh-adoption analyze -e "**/*.{js,jsx,ts,tsx}"
29
+ ```
30
+
31
+ `-i` / `--ignore`
22
32
 
23
- You are able to state files to ignore when searching for components by using `-i, --ignore [ext]` with a glob pattern to determine ignored files.
33
+ Provide a glob pattern to ignore files, directories or file extensions when searching for components.
34
+
35
+ ```bash
36
+ zh-adoption analyze -i "**/*.{test,spec}.*"
37
+ ```
38
+
39
+ `-r` / `--repo-name`
40
+
41
+ Provide a name for the current repository. This must be passed when `-in` / `--interactive` is set to `false`.
42
+
43
+ ```bash
44
+ zh-adoption analyze -r "My Repo"
45
+ ```
46
+
47
+ `-in` / `--interactive`
48
+
49
+ Pass in `false` to disable the interactive mode e.g. when running in a CI environment.
50
+
51
+ ```bash
52
+ zh-adoption analyze --interactive false -r "My Repo"
53
+ ```
24
54
 
25
55
  ---
26
56
 
27
- To send adoption data to your [zeroheight](https://zeroheight.com/) account you will need to authenticate. This can be done as part of the `analyze` flow or separately by running:
57
+ To send adoption data to your [zeroheight](https://zeroheight.com/) account you will need to authenticate using a Client ID and Access Token.
58
+
59
+ ### Interactive mode
60
+
61
+ When running the `analyze` command, you will be prompted to authenticate. This will save the Client ID and Access Token to your local machine.
62
+
63
+ Alternatively, you can authenticate by running the following command:
28
64
 
29
65
  ```
30
66
  zh-adoption auth
31
67
  ```
32
68
 
69
+ ### Non-interactive mode
70
+
71
+ When running the `analyze` command with the `--interactive false` flag, you will need to provide the Client ID and Access Token as environment variables.
72
+
73
+ ```bash
74
+ export ZEROHEIGHT_CLIENT_ID="your-client-id"
75
+ export ZEROHEIGHT_ACCESS_TOKEN="your-access-token"
76
+ ```
77
+
33
78
  ---
34
79
 
35
80
  More info on the commands can be seen by running
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeroheight/adoption-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "license": "ISC",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {