Skip to content

Commit

Permalink
feat: add kebab-case options to cli flags (#5395)
Browse files Browse the repository at this point in the history
* feat: add kebab-case options to cli flags - first example

* feat: remove option_deprecation functions and just leave old options

* docs: update docs

* fix: add --http-proxy-certificate-filename and hide --httpProxyCertificateFilename

* fix: add --prod-if-unlocked and hide --prodIfUnlocked for deploy

* fix: add --git-remote-name and hide --gitRemoteName for init and link

* fix: add --replace-existing and hide --replaceExisting from env-import

* fix: add --target-port and hide --targetPort for dev

* fix: add --session-id and hide --sessionId for dev

* fix: add --functions-port and hide --functionsPort for dev and serve

* fix: add --edge-inspect-brk and hide --edgeInspectBrk from dev

* fix: add --edge-inspect and hide --edgeInspect to dev
  • Loading branch information
khendrikse committed Jan 18, 2023
1 parent 87adddc commit 6d6531a
Show file tree
Hide file tree
Showing 32 changed files with 251 additions and 165 deletions.
24 changes: 12 additions & 12 deletions docs/commands/addons.md
Expand Up @@ -22,8 +22,8 @@ netlify addons
**Flags**

- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

| Subcommand | description |
|:--------------------------- |:-----|
Expand Down Expand Up @@ -62,8 +62,8 @@ netlify addons:auth
**Flags**

- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

---
## `addons:config`
Expand All @@ -83,8 +83,8 @@ netlify addons:config
**Flags**

- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

---
## `addons:create`
Expand All @@ -105,8 +105,8 @@ netlify addons:create
**Flags**

- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

---
## `addons:delete`
Expand All @@ -128,8 +128,8 @@ netlify addons:delete

- `force` (*boolean*) - delete without prompting (useful for CI)
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

---
## `addons:list`
Expand All @@ -146,8 +146,8 @@ netlify addons:list

- `json` (*boolean*) - Output add-on data as JSON
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

---

Expand Down
6 changes: 3 additions & 3 deletions docs/commands/api.md
Expand Up @@ -23,10 +23,10 @@ netlify api
**Flags**

- `data` (*string*) - Data to use
- `list` (*boolean*) - List out available API methods
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `list` (*boolean*) - List out available API methods

**Examples**

Expand Down
4 changes: 2 additions & 2 deletions docs/commands/build.md
Expand Up @@ -19,8 +19,8 @@ netlify build
- `dry` (*boolean*) - Dry run: show instructions without running them
- `offline` (*boolean*) - disables any features that require network access
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

**Examples**

Expand Down
8 changes: 4 additions & 4 deletions docs/commands/completion.md
Expand Up @@ -18,8 +18,8 @@ netlify completion
**Flags**

- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

| Subcommand | description |
|:--------------------------- |:-----|
Expand All @@ -46,8 +46,8 @@ netlify completion:install
**Flags**

- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

---

Expand Down
10 changes: 5 additions & 5 deletions docs/commands/deploy.md
Expand Up @@ -93,14 +93,14 @@ netlify deploy
- `message` (*string*) - A short message to include in the deploy log
- `open` (*boolean*) - Open site after deploy
- `prod` (*boolean*) - Deploy to production
- `prodIfUnlocked` (*boolean*) - Deploy to production if unlocked, create a draft otherwise
- `prod-if-unlocked` (*boolean*) - Deploy to production if unlocked, create a draft otherwise
- `site` (*string*) - A site name or ID to deploy to
- `skip-functions-cache` (*boolean*) - Ignore any functions created as part of a previous `build` or `deploy` commands, forcing them to be bundled again as part of the deployment
- `timeout` (*string*) - Timeout to wait for deployment to finish
- `trigger` (*boolean*) - Trigger a new build of your site on Netlify without uploading local files
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `trigger` (*boolean*) - Trigger a new build of your site on Netlify without uploading local files

**Examples**

Expand All @@ -109,7 +109,7 @@ netlify deploy
netlify deploy --site my-first-site
netlify deploy --prod
netlify deploy --prod --open
netlify deploy --prodIfUnlocked
netlify deploy --prod-if-unlocked
netlify deploy --message "A message with an $ENV_VAR"
netlify deploy --auth $NETLIFY_AUTH_TOKEN
netlify deploy --trigger
Expand Down
28 changes: 14 additions & 14 deletions docs/commands/dev.md
Expand Up @@ -21,20 +21,20 @@ netlify dev
- `context` (*string*) - Specify a deploy context or branch for environment variables (contexts: "production", "deploy-preview", "branch-deploy", "dev")
- `country` (*string*) - Two-letter country code (https://ntl.fyi/country-codes) to use as mock geolocation (enables --geo=mock automatically)
- `dir` (*string*) - dir with static files
- `edgeInspect` (*string*) - enable the V8 Inspector Protocol for Edge Functions, with an optional address in the host:port format
- `edgeInspectBrk` (*string*) - enable the V8 Inspector Protocol for Edge Functions and pause execution on the first line of code, with an optional address in the host:port format
- `edge-inspect` (*string*) - enable the V8 Inspector Protocol for Edge Functions, with an optional address in the host:port format
- `edge-inspect-brk` (*string*) - enable the V8 Inspector Protocol for Edge Functions and pause execution on the first line of code, with an optional address in the host:port format
- `framework` (*string*) - framework to use. Defaults to #auto which automatically detects a framework
- `functions` (*string*) - specify a functions folder to serve
- `functionsPort` (*string*) - port of functions server
- `functions-port` (*string*) - port of functions server
- `geo` (*cache | mock | update*) - force geolocation data to be updated, use cached data from the last 24h if found, or use a mock location
- `live` (*boolean*) - start a public live session
- `offline` (*boolean*) - disables any features that require network access
- `port` (*string*) - port of netlify dev
- `sessionId` (*string*) - (Graph) connect to cloud session with ID [sessionId]
- `targetPort` (*string*) - port of target app server
- `session-id` (*string*) - (Graph) connect to cloud session with ID [sessionId]
- `target-port` (*string*) - port of target app server
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

| Subcommand | description |
|:--------------------------- |:-----|
Expand All @@ -46,13 +46,13 @@ netlify dev
```bash
netlify dev
netlify dev -d public
netlify dev -c "hugo server -w" --targetPort 1313
netlify dev -c "hugo server -w" --target-port 1313
netlify dev --context production
netlify dev --graph
netlify dev --edgeInspect
netlify dev --edgeInspect=127.0.0.1:9229
netlify dev --edgeInspectBrk
netlify dev --edgeInspectBrk=127.0.0.1:9229
netlify dev --edge-inspect
netlify dev --edge-inspect=127.0.0.1:9229
netlify dev --edge-inspect-brk
netlify dev --edge-inspect-brk=127.0.0.1:9229
BROWSER=none netlify dev # disable browser auto opening
```

Expand All @@ -76,8 +76,8 @@ netlify dev:exec

- `context` (*string*) - Specify a deploy context or branch for environment variables (contexts: "production", "deploy-preview", "branch-deploy", "dev")
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

**Examples**

Expand Down
38 changes: 19 additions & 19 deletions docs/commands/env.md
Expand Up @@ -17,8 +17,8 @@ netlify env
**Flags**

- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

| Subcommand | description |
|:--------------------------- |:-----|
Expand Down Expand Up @@ -55,10 +55,10 @@ netlify env:clone
**Flags**

- `from` (*string*) - Site ID (From)
- `to` (*string*) - Site ID (To)
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `to` (*string*) - Site ID (To)

**Examples**

Expand All @@ -85,10 +85,10 @@ netlify env:get
**Flags**

- `context` (*string*) - Specify a deploy context or branch (contexts: "production", "deploy-preview", "branch-deploy", "dev")
- `scope` (*builds | functions | post-processing | runtime | any*) - Specify a scope
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `scope` (*builds | functions | post-processing | runtime | any*) - Specify a scope

**Examples**

Expand Down Expand Up @@ -116,10 +116,10 @@ netlify env:import

**Flags**

- `replaceExisting` (*boolean*) - Replace all existing variables instead of merging them with the current ones
- `replace-existing` (*boolean*) - Replace all existing variables instead of merging them with the current ones
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

---
## `env:list`
Expand All @@ -135,12 +135,12 @@ netlify env:list
**Flags**

- `context` (*string*) - Specify a deploy context or branch (contexts: "production", "deploy-preview", "branch-deploy", "dev")
- `debug` (*boolean*) - Print debugging information
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `json` (*boolean*) - Output environment variables as JSON
- `plain` (*boolean*) - Output environment variables as plaintext
- `scope` (*builds | functions | post-processing | runtime | any*) - Specify a scope
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server

**Examples**

Expand Down Expand Up @@ -171,10 +171,10 @@ netlify env:set
**Flags**

- `context` (*string*) - Specify a deploy context or branch (contexts: "production", "deploy-preview", "branch-deploy", "dev") (default: all contexts)
- `scope` (*builds | functions | post-processing | runtime*) - Specify a scope (default: all scopes)
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `scope` (*builds | functions | post-processing | runtime*) - Specify a scope (default: all scopes)

**Examples**

Expand Down Expand Up @@ -205,8 +205,8 @@ netlify env:unset

- `context` (*string*) - Specify a deploy context or branch (contexts: "production", "deploy-preview", "branch-deploy", "dev") (default: all contexts)
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

**Examples**

Expand Down
36 changes: 18 additions & 18 deletions docs/commands/functions.md
Expand Up @@ -18,8 +18,8 @@ netlify functions
**Flags**

- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server

| Subcommand | description |
|:--------------------------- |:-----|
Expand Down Expand Up @@ -51,10 +51,10 @@ netlify functions:build
**Flags**

- `functions` (*string*) - Specify a functions directory to build to
- `src` (*string*) - Specify the source directory for the functions
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `src` (*string*) - Specify the source directory for the functions

---
## `functions:create`
Expand All @@ -73,12 +73,12 @@ netlify functions:create

**Flags**

- `language` (*string*) - function language
- `name` (*string*) - function name
- `url` (*string*) - pull template from URL
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `language` (*string*) - function language
- `url` (*string*) - pull template from URL

**Examples**

Expand Down Expand Up @@ -110,11 +110,11 @@ netlify functions:invoke
- `name` (*string*) - function name to invoke
- `no-identity` (*boolean*) - simulate Netlify Identity authentication JWT. pass --no-identity to affirm unauthenticated request
- `payload` (*string*) - Supply POST payload in stringified json, or a path to a json file
- `port` (*string*) - Port where netlify dev is accessible. e.g. 8888
- `querystring` (*string*) - Querystring to add to your function invocation
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `port` (*string*) - Port where netlify dev is accessible. e.g. 8888

**Examples**

Expand Down Expand Up @@ -146,10 +146,10 @@ netlify functions:list
**Flags**
- `functions` (*string*) - Specify a functions directory to list
- `json` (*boolean*) - Output function data as JSON
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `json` (*boolean*) - Output function data as JSON
---
## `functions:serve`
Expand All @@ -165,11 +165,11 @@ netlify functions:serve
**Flags**
- `functions` (*string*) - Specify a functions directory to serve
- `debug` (*boolean*) - Print debugging information
- `http-proxy` (*string*) - Proxy server address to route requests through.
- `http-proxy-certificate-filename` (*string*) - Certificate file to use when connecting using a proxy server
- `offline` (*boolean*) - disables any features that require network access
- `port` (*string*) - Specify a port for the functions server
- `debug` (*boolean*) - Print debugging information
- `httpProxy` (*string*) - Proxy server address to route requests through.
- `httpProxyCertificateFilename` (*string*) - Certificate file to use when connecting using a proxy server
---
Expand Down

1 comment on commit 6d6531a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Package size: 267 MB

Please sign in to comment.