Skip to content

Commit 20c45de

Browse files
authored
feat: add tracking events and improve messaging (#171)
Removes simple-git dependency. Added functionality to open error report in browser by default in case of 422. Updated check build github action to run on dev branch PRs. Updated portal:copilot messaging. Resolved command-not-found plugin issues. Updated messaging when src directory is not found or is invalid. Removed unused packages. Added test for ensuring all commands have valid examples. Added tracking events for quickstart and updated tracking for all commands to include origin.
1 parent 577ec3a commit 20c45de

38 files changed

Lines changed: 729 additions & 203 deletions

.github/workflows/check_build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ name: Run and check build for current commit
44

55
# Controls when the workflow will run
66
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
8-
push:
9-
branches: [ alpha ]
7+
# Triggers the workflow on pull request events but only for the alpha and dev branches
108
pull_request:
11-
branches: [ alpha ]
9+
branches: [ alpha, dev ]
1210
# Allows you to run this workflow manually from the Actions tab
1311
workflow_dispatch:
1412

@@ -18,7 +16,7 @@ jobs:
1816
runs-on: ubuntu-latest
1917
strategy:
2018
matrix:
21-
node: [ '14', '18', '20' ]
19+
node: [ '18', '20', '22', '24' ]
2220
name: Node ${{ matrix.node }} sample
2321
steps:
2422
- name: checkout cli

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $ npm install -g @apimatic/cli
2424
$ apimatic COMMAND
2525
running command...
2626
$ apimatic (--version)
27-
@apimatic/cli/1.1.0-alpha.19 win32-x64 node-v20.18.3
27+
@apimatic/cli/1.1.0-alpha.21 win32-x64 node-v23.4.0
2828
$ apimatic --help [COMMAND]
2929
USAGE
3030
$ apimatic COMMAND
@@ -74,7 +74,7 @@ DESCRIPTION
7474
Collections.
7575
7676
EXAMPLES
77-
$ apimatic api:transform --format="OpenApi3Json" --file="./specs/sample.json" --destination="D:/"
77+
$ apimatic api:transform --format=OPENAPI3YAML --file="./specs/sample.json" --destination="D:/"
7878
7979
$ apimatic api:transform --format=RAML --url="https://petstore.swagger.io/v2/swagger.json" --destination="D:/"
8080
```
@@ -171,7 +171,7 @@ USAGE
171171
$ apimatic autocomplete [SHELL] [-r]
172172
173173
ARGUMENTS
174-
SHELL shell type
174+
SHELL (zsh|bash|powershell) Shell type
175175
176176
FLAGS
177177
-r, --refresh-cache Refresh cache (ignores displaying instructions)
@@ -181,8 +181,13 @@ DESCRIPTION
181181
182182
EXAMPLES
183183
$ apimatic autocomplete
184+
184185
$ apimatic autocomplete bash
186+
185187
$ apimatic autocomplete zsh
188+
189+
$ apimatic autocomplete powershell
190+
186191
$ apimatic autocomplete --refresh-cache
187192
```
188193

@@ -214,9 +219,10 @@ Configure API Copilot for your API Documentation portal
214219

215220
```
216221
USAGE
217-
$ apimatic portal:copilot [-i <value>] [--disable] [-k <value>]
222+
$ apimatic portal:copilot [-i <value>] [--disable] [-f] [-k <value>]
218223
219224
FLAGS
225+
-f, --force overwrite changes without asking for user consent.
220226
-i, --input=<value> [default: ./] path to the parent directory containing the 'src' directory, which includes API
221227
specifications and configuration files.
222228
-k, --auth-key=<value> override current authentication state with an authentication key.
@@ -399,9 +405,9 @@ DESCRIPTION
399405
Generate an SDK for your API
400406
401407
EXAMPLES
402-
$ apimatic sdk:generate --platform="java"
408+
$ apimatic sdk:generate --platform=java
403409
404-
$ apimatic sdk:generate --platform="csharp" --spec="./src/spec"
410+
$ apimatic sdk:generate --platform=csharp --spec="./src/spec"
405411
```
406412

407413
_See code: [src/commands/sdk/generate.ts](https://github.com/apimatic/apimatic-cli/blob/alpha/src/commands/sdk/generate.ts)_

0 commit comments

Comments
 (0)