diff --git a/docs/commands/addons.md b/docs/commands/addons.md index e682cc6ae4f..e1dbcb6cf48 100644 --- a/docs/commands/addons.md +++ b/docs/commands/addons.md @@ -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 | |:--------------------------- |:-----| @@ -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` @@ -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` @@ -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` @@ -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` @@ -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 --- diff --git a/docs/commands/api.md b/docs/commands/api.md index edba304c284..ace6863f771 100644 --- a/docs/commands/api.md +++ b/docs/commands/api.md @@ -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** diff --git a/docs/commands/build.md b/docs/commands/build.md index 517df146b56..9514fcda8d1 100644 --- a/docs/commands/build.md +++ b/docs/commands/build.md @@ -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** diff --git a/docs/commands/completion.md b/docs/commands/completion.md index 1ca92b6a703..c622468d4a9 100644 --- a/docs/commands/completion.md +++ b/docs/commands/completion.md @@ -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 | |:--------------------------- |:-----| @@ -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 --- diff --git a/docs/commands/deploy.md b/docs/commands/deploy.md index c058eee05f6..6028c105c36 100644 --- a/docs/commands/deploy.md +++ b/docs/commands/deploy.md @@ -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** @@ -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 diff --git a/docs/commands/dev.md b/docs/commands/dev.md index 637361953c4..2ad554716b8 100644 --- a/docs/commands/dev.md +++ b/docs/commands/dev.md @@ -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 | |:--------------------------- |:-----| @@ -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 ``` @@ -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** diff --git a/docs/commands/env.md b/docs/commands/env.md index 1ba283df72e..92b398dae87 100644 --- a/docs/commands/env.md +++ b/docs/commands/env.md @@ -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 | |:--------------------------- |:-----| @@ -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** @@ -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** @@ -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` @@ -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** @@ -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** @@ -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** diff --git a/docs/commands/functions.md b/docs/commands/functions.md index bba0cd83c41..66fb53a976a 100644 --- a/docs/commands/functions.md +++ b/docs/commands/functions.md @@ -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 | |:--------------------------- |:-----| @@ -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` @@ -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** @@ -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** @@ -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` @@ -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 --- diff --git a/docs/commands/graph.md b/docs/commands/graph.md index 7256577a157..998cafe217c 100644 --- a/docs/commands/graph.md +++ b/docs/commands/graph.md @@ -17,8 +17,8 @@ netlify graph **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 | |:--------------------------- |:-----| @@ -52,8 +52,8 @@ netlify graph:config:write **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 --- ## `graph:edit` @@ -69,8 +69,8 @@ netlify graph:edit **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 --- ## `graph:handler` @@ -92,8 +92,8 @@ netlify graph:handler - `codegen` (*string*) - The id of the specific code generator to use - `data` (*string*) - Optional data to pass along to the code generator - `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 --- ## `graph:init` @@ -109,8 +109,8 @@ netlify graph:init **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 --- ## `graph:library` @@ -126,8 +126,8 @@ netlify graph:library **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 --- ## `graph:operations` @@ -143,8 +143,8 @@ netlify graph:operations **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 --- ## `graph:pull` @@ -160,8 +160,8 @@ netlify graph:pull **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 --- diff --git a/docs/commands/init.md b/docs/commands/init.md index 553550c84a4..0c2b8ead056 100644 --- a/docs/commands/init.md +++ b/docs/commands/init.md @@ -17,11 +17,11 @@ netlify init **Flags** - `force` (*boolean*) - Reinitialize CI hooks if the linked site is already configured to use CI -- `gitRemoteName` (*string*) - Name of Git remote to use. e.g. "origin" +- `git-remote-name` (*string*) - Name of Git remote to use. e.g. "origin" - `manual` (*boolean*) - Manually configure a git remote 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 diff --git a/docs/commands/link.md b/docs/commands/link.md index 3cca399bb34..08c9a9f1ddf 100644 --- a/docs/commands/link.md +++ b/docs/commands/link.md @@ -16,12 +16,12 @@ netlify link **Flags** -- `gitRemoteName` (*string*) - Name of Git remote to use. e.g. "origin" +- `git-remote-name` (*string*) - Name of Git remote to use. e.g. "origin" - `id` (*string*) - ID of site to link to -- `name` (*string*) - Name of site to link 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 +- `name` (*string*) - Name of site to link to **Examples** diff --git a/docs/commands/lm.md b/docs/commands/lm.md index d88c5b3b8a0..908bb79c433 100644 --- a/docs/commands/lm.md +++ b/docs/commands/lm.md @@ -19,8 +19,8 @@ netlify lm **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 | |:--------------------------- |:-----| @@ -51,8 +51,8 @@ netlify lm:info **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 --- ## `lm:install` @@ -71,8 +71,8 @@ netlify lm:install - `force` (*boolean*) - Force the credentials helper installation - `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 --- ## `lm:setup` @@ -90,8 +90,8 @@ netlify lm:setup - `force-install` (*boolean*) - Force the credentials helper installation - `skip-install` (*boolean*) - Skip the credentials helper installation check - `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 --- diff --git a/docs/commands/login.md b/docs/commands/login.md index b27eac7e387..73bfd855941 100644 --- a/docs/commands/login.md +++ b/docs/commands/login.md @@ -19,8 +19,8 @@ netlify login - `new` (*boolean*) - Login to new Netlify account - `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 diff --git a/docs/commands/open.md b/docs/commands/open.md index d177a012aa9..f4819fc1da9 100644 --- a/docs/commands/open.md +++ b/docs/commands/open.md @@ -18,8 +18,8 @@ netlify open - `admin` (*boolean*) - Open Netlify site - `site` (*boolean*) - Open site - `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 | |:--------------------------- |:-----| @@ -50,8 +50,8 @@ netlify open:admin **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 **Examples** @@ -73,8 +73,8 @@ netlify open:site **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 **Examples** diff --git a/docs/commands/sites.md b/docs/commands/sites.md index 40f6c267403..fa2c62507a5 100644 --- a/docs/commands/sites.md +++ b/docs/commands/sites.md @@ -18,8 +18,8 @@ netlify sites **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 | |:--------------------------- |:-----| @@ -56,8 +56,8 @@ netlify sites:create - `name` (*string*) - name of site - `with-ci` (*boolean*) - initialize CI hooks during site creation - `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 --- ## `sites:create-template` @@ -79,11 +79,11 @@ netlify sites:create-template - `account-slug` (*string*) - account slug to create the site under - `name` (*string*) - name of site +- `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 - `url` (*string*) - template url - `with-ci` (*boolean*) - initialize CI hooks during site creation -- `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** @@ -113,8 +113,8 @@ netlify sites: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 **Examples** @@ -137,8 +137,8 @@ netlify sites:list - `json` (*boolean*) - Output site 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 --- diff --git a/docs/commands/status.md b/docs/commands/status.md index 39505d4fc5a..30c3d62dc73 100644 --- a/docs/commands/status.md +++ b/docs/commands/status.md @@ -18,8 +18,8 @@ netlify status - `verbose` (*boolean*) - Output system info - `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 | |:--------------------------- |:-----| @@ -40,8 +40,8 @@ netlify status:hooks **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 --- diff --git a/docs/commands/switch.md b/docs/commands/switch.md index b698804a823..282c3a46090 100644 --- a/docs/commands/switch.md +++ b/docs/commands/switch.md @@ -17,8 +17,8 @@ netlify switch **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 diff --git a/docs/commands/unlink.md b/docs/commands/unlink.md index 11bcf0ce810..b19de006808 100644 --- a/docs/commands/unlink.md +++ b/docs/commands/unlink.md @@ -17,8 +17,8 @@ netlify unlink **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 diff --git a/docs/commands/watch.md b/docs/commands/watch.md index 6a119ad7f7c..4b15f46a1bd 100644 --- a/docs/commands/watch.md +++ b/docs/commands/watch.md @@ -17,8 +17,8 @@ netlify watch **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 **Examples** diff --git a/docs/netlify-dev.md b/docs/netlify-dev.md index 3d9eff585c7..094e5e1117b 100644 --- a/docs/netlify-dev.md +++ b/docs/netlify-dev.md @@ -89,7 +89,7 @@ OPTIONS -l, --live start a public live session -o, --offline disables any features that require network access -p, --port=port port of netlify dev - --targetPort=targetPort port of target app server + --target-port=targetPort port of target app server DESCRIPTION The dev command will run a local dev server with Netlify's proxy and redirect rules @@ -97,7 +97,7 @@ DESCRIPTION EXAMPLES $ netlify dev $ netlify dev -d public - $ netlify dev -c "hugo server -w" --targetPort 1313 + $ netlify dev -c "hugo server -w" --target-port 1313 ``` The command will automatically open your preferred browser to serve the application. You can customize this behaviour by diff --git a/src/commands/addons/addons.mjs b/src/commands/addons/addons.mjs index 917d7352feb..c52a812c3ca 100644 --- a/src/commands/addons/addons.mjs +++ b/src/commands/addons/addons.mjs @@ -30,7 +30,6 @@ export const createAddonsCommand = (program) => { .command('addons') .alias('addon') .description('(Beta) Manage Netlify Add-ons') - .noHelpOptions() .addExamples([ 'netlify addons:create addon-xyz', 'netlify addons:list', diff --git a/src/commands/base-command.mjs b/src/commands/base-command.mjs index 774a51b0947..80013e81c45 100644 --- a/src/commands/base-command.mjs +++ b/src/commands/base-command.mjs @@ -99,13 +99,29 @@ export default class BaseCommand extends Command { .addOption(new Option('--cwd ').hideHelp(true)) .addOption(new Option('-o, --offline').hideHelp(true)) .addOption(new Option('--auth ', 'Netlify auth token').hideHelp(true)) + .addOption( + new Option( + '--httpProxy [address]', + 'Old, prefer --http-proxy. Proxy server address to route requests through.', + ) + .default(process.env.HTTP_PROXY || process.env.HTTPS_PROXY) + .hideHelp(true), + ) + .addOption( + new Option( + '--httpProxyCertificateFilename [file]', + 'Old, prefer --http-proxy-certificate-filename. Certificate file to use when connecting using a proxy server.', + ) + .default(process.env.NETLIFY_PROXY_CERTIFICATE_FILENAME) + .hideHelp(true), + ) .option( - '--httpProxyCertificateFilename [file]', + '--http-proxy-certificate-filename [file]', 'Certificate file to use when connecting using a proxy server', process.env.NETLIFY_PROXY_CERTIFICATE_FILENAME, ) .option( - '--httpProxy [address]', + '--http-proxy [address]', 'Proxy server address to route requests through.', process.env.HTTP_PROXY || process.env.HTTPS_PROXY, ) diff --git a/src/commands/deploy/deploy.mjs b/src/commands/deploy/deploy.mjs index 6d9f6e57c4e..a8fc052ae14 100644 --- a/src/commands/deploy/deploy.mjs +++ b/src/commands/deploy/deploy.mjs @@ -5,6 +5,7 @@ import { cwd, env } from 'process' import { runCoreSteps } from '@netlify/build' import { restoreConfig, updateConfig } from '@netlify/config' +import { Option } from 'commander' import { get } from 'dot-prop' import inquirer from 'inquirer' import isObject from 'lodash/isObject.js' @@ -726,7 +727,15 @@ Support for package.json's main field, and intrinsic index.js entrypoints are co .option('-d, --dir ', 'Specify a folder to deploy') .option('-f, --functions ', 'Specify a functions folder to deploy') .option('-p, --prod', 'Deploy to production', false) - .option('--prodIfUnlocked', 'Deploy to production if unlocked, create a draft otherwise', false) + .addOption( + new Option( + '--prodIfUnlocked', + 'Old, prefer --prod-if-unlocked. Deploy to production if unlocked, create a draft otherwise', + ) + .default(false) + .hideHelp(true), + ) + .option('--prod-if-unlocked', 'Deploy to production if unlocked, create a draft otherwise', false) .option( '--alias ', 'Specifies the alias for deployment, the string at the beginning of the deploy subdomain. Useful for creating predictable deployment URLs. Avoid setting an alias string to the same value as a deployed branch. `alias` doesn’t create a branch deploy and can’t be used in conjunction with the branch subdomain feature. Maximum 37 characters.', @@ -754,7 +763,7 @@ Support for package.json's main field, and intrinsic index.js entrypoints are co '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', diff --git a/src/commands/dev/dev.mjs b/src/commands/dev/dev.mjs index 43abd9a2133..42f1bf6ce8c 100644 --- a/src/commands/dev/dev.mjs +++ b/src/commands/dev/dev.mjs @@ -220,13 +220,23 @@ export const createDevCommand = (program) => { normalizeContext, ) .option('-p ,--port ', 'port of netlify dev', (value) => Number.parseInt(value)) - .option('--targetPort ', 'port of target app server', (value) => Number.parseInt(value)) + .addOption( + new Option('--targetPort ', 'Old, prefer --target-port. Port of target app server') + .argParser((value) => Number.parseInt(value)) + .hideHelp(true), + ) + .option('--target-port ', 'port of target app server', (value) => Number.parseInt(value)) .option('--framework ', 'framework to use. Defaults to #auto which automatically detects a framework') .option('-d ,--dir ', 'dir with static files') .option('-f ,--functions ', 'specify a functions folder to serve') .option('-o ,--offline', 'disables any features that require network access') .option('-l, --live', 'start a public live session', false) - .option('--functionsPort ', 'port of functions server', (value) => Number.parseInt(value)) + .addOption( + new Option('--functionsPort ', 'Old, prefer --functions-port. Port of functions server') + .argParser((value) => Number.parseInt(value)) + .hideHelp(true), + ) + .option('--functions-port ', 'port of functions server', (value) => Number.parseInt(value)) .addOption( new Option( '--geo ', @@ -247,10 +257,25 @@ export const createDevCommand = (program) => { .hideHelp(), ) .addOption(new Option('--graph', 'enable Netlify Graph support').hideHelp()) - .addOption(new Option('--sessionId [sessionId]', '(Graph) connect to cloud session with ID [sessionId]')) + .addOption( + new Option( + '--sessionId [sessionId]', + 'Old, prefer --session-id. (Graph) connect to cloud session with ID [sessionId]', + ).hideHelp(true), + ) + .option('--session-id [sessionId]', '(Graph) connect to cloud session with ID [sessionId]') .addOption( new Option( '-e, --edgeInspect [address]', + 'Old, prefer --edge-inspect. Enable the V8 Inspector Protocol for Edge Functions, with an optional address in the host:port format', + ) + .conflicts('edgeInspectBrk') + .argParser(validateShortFlagArgs) + .hideHelp(true), + ) + .addOption( + new Option( + '-e, --edge-inspect [address]', 'enable the V8 Inspector Protocol for Edge Functions, with an optional address in the host:port format', ) .conflicts('edgeInspectBrk') @@ -259,6 +284,15 @@ export const createDevCommand = (program) => { .addOption( new Option( '-E, --edgeInspectBrk [address]', + 'Old, prefer --edge-inspect-brk. 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', + ) + .conflicts('edgeInspect') + .hideHelp(true) + .argParser(validateShortFlagArgs), + ) + .addOption( + new Option( + '-E, --edge-inspect-brk [address]', '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', ) .conflicts('edgeInspect') @@ -267,13 +301,13 @@ export const createDevCommand = (program) => { .addExamples([ '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', ]) .action(dev) diff --git a/src/commands/env/env-import.mjs b/src/commands/env/env-import.mjs index 7f556c23646..4c5e7866fa7 100644 --- a/src/commands/env/env-import.mjs +++ b/src/commands/env/env-import.mjs @@ -2,6 +2,7 @@ import { readFile } from 'fs/promises' import AsciiTable from 'ascii-table' +import { Option } from 'commander' import dotenv from 'dotenv' import { exit, log, logJson } from '../../utils/command-helpers.mjs' @@ -126,8 +127,16 @@ export const createEnvImportCommand = (program) => program .command('env:import') .argument('', '.env file to import') + .addOption( + new Option( + '-r --replaceExisting', + 'Old, prefer --replace-existing. Replace all existing variables instead of merging them with the current ones', + ) + .default(false) + .hideHelp(true), + ) .option( - '-r, --replaceExisting', + '-r, --replace-existing', 'Replace all existing variables instead of merging them with the current ones', false, ) diff --git a/src/commands/init/init.mjs b/src/commands/init/init.mjs index 7127ae66d12..75af4d00b6e 100644 --- a/src/commands/init/init.mjs +++ b/src/commands/init/init.mjs @@ -1,4 +1,5 @@ // @ts-check +import { Option } from 'commander' import dotProp from 'dot-prop' import inquirer from 'inquirer' import isEmpty from 'lodash/isEmpty.js' @@ -229,5 +230,11 @@ export const createInitCommand = (program) => ) .option('-m, --manual', 'Manually configure a git remote for CI') .option('--force', 'Reinitialize CI hooks if the linked site is already configured to use CI') - .option('--gitRemoteName ', 'Name of Git remote to use. e.g. "origin"') + .addOption( + new Option( + '--gitRemoteName ', + 'Old, prefer --git-remote-name. Name of Git remote to use. e.g. "origin"', + ).hideHelp(true), + ) + .option('--git-remote-name ', 'Name of Git remote to use. e.g. "origin"') .action(init) diff --git a/src/commands/link/link.mjs b/src/commands/link/link.mjs index 5aaa26185dd..fd5dc141323 100644 --- a/src/commands/link/link.mjs +++ b/src/commands/link/link.mjs @@ -1,4 +1,5 @@ // @ts-check +import { Option } from 'commander' import inquirer from 'inquirer' import { listSites } from '../../lib/api.mjs' @@ -345,6 +346,12 @@ export const createLinkCommand = (program) => .description('Link a local repo or project folder to an existing site on Netlify') .option('--id ', 'ID of site to link to') .option('--name ', 'Name of site to link to') - .option('--gitRemoteName ', 'Name of Git remote to use. e.g. "origin"') + .addOption( + new Option( + '--gitRemoteName ', + 'Old, prefer --git-remote-name. Name of Git remote to use. e.g. "origin"', + ).hideHelp(true), + ) + .option('--git-remote-name ', 'Name of Git remote to use. e.g. "origin"') .addExamples(['netlify link', 'netlify link --id 123-123-123-123', 'netlify link --name my-site-name']) .action(link) diff --git a/src/commands/serve/serve.mjs b/src/commands/serve/serve.mjs index 839d2530db2..b14ccb6e28f 100644 --- a/src/commands/serve/serve.mjs +++ b/src/commands/serve/serve.mjs @@ -165,7 +165,12 @@ export const createServeCommand = (program) => .option('-d ,--dir ', 'dir with static files') .option('-f ,--functions ', 'specify a functions folder to serve') .option('-o ,--offline', 'disables any features that require network access') - .option('--functionsPort ', 'port of functions server', (value) => Number.parseInt(value)) + .addOption( + new Option('--functionsPort ', 'Old, prefer --functions-port. Port of functions server') + .argParser((value) => Number.parseInt(value)) + .hideHelp(true), + ) + .option('--functions-port ', 'port of functions server', (value) => Number.parseInt(value)) .addOption( new Option( '--geo ', diff --git a/src/utils/get-repo-data.mjs b/src/utils/get-repo-data.mjs index 39a76cd84c9..9b740835b38 100644 --- a/src/utils/get-repo-data.mjs +++ b/src/utils/get-repo-data.mjs @@ -44,7 +44,7 @@ const getRepoData = async function ({ remoteName } = {}) { Object.keys(gitConfig.remote[remoteName]).length === 0 ) { throw new Error( - `The specified remote "${remoteName}" is not defined in Git repo. Please use --gitRemoteName flag to specify a remote.`, + `The specified remote "${remoteName}" is not defined in Git repo. Please use --git-remote-name flag to specify a remote.`, ) } diff --git a/tests/integration/600.framework-detection.test.cjs b/tests/integration/600.framework-detection.test.cjs index e443463f237..1265ccb9eba 100644 --- a/tests/integration/600.framework-detection.test.cjs +++ b/tests/integration/600.framework-detection.test.cjs @@ -100,7 +100,7 @@ test('should warn if using static server and `targetPort` is configured', async .buildAsync() await withDevServer( - { cwd: builder.directory, args: ['--dir', 'public', '--targetPort', '3000'] }, + { cwd: builder.directory, args: ['--dir', 'public', '--target-port', '3000'] }, async ({ output, url }) => { const response = await got(url).text() t.is(response, content) @@ -118,7 +118,7 @@ test('should run `command` when both `command` and `targetPort` are configured', // a failure is expected since we use `echo hello` instead of starting a server const error = await t.throwsAsync(() => withDevServer( - { cwd: builder.directory, args: ['--command', 'echo hello', '--targetPort', '3000'] }, + { cwd: builder.directory, args: ['--command', 'echo hello', '--target-port', '3000'] }, () => {}, true, ), @@ -165,7 +165,7 @@ test('should throw if framework=#custom but command is missing', async (t) => { await builder.withNetlifyToml({ config: { dev: { framework: '#custom' } } }).buildAsync() const error = await t.throwsAsync(() => - withDevServer({ cwd: builder.directory, args: ['--targetPort', '3000'] }, () => {}, true), + withDevServer({ cwd: builder.directory, args: ['--target-port', '3000'] }, () => {}, true), ) t.snapshot(normalize(error.stdout, { duration: true, filePath: true })) }) @@ -188,7 +188,7 @@ test('should start custom command if framework=#custom, command and targetPort a const error = await t.throwsAsync(() => withDevServer( - { cwd: builder.directory, args: ['--command', 'echo hello', '--targetPort', '3000'] }, + { cwd: builder.directory, args: ['--command', 'echo hello', '--target-port', '3000'] }, () => {}, true, ), @@ -208,7 +208,7 @@ test(`should print specific error when command doesn't exist`, async (t) => { args: [ '--command', 'oops-i-did-it-again forgot-to-use-a-valid-command', - '--targetPort', + '--target-port', '3000', '--framework', '#custom', @@ -258,7 +258,7 @@ test('should not run framework detection if command and targetPort are configure // a failure is expected since the command exits early const error = await t.throwsAsync(() => withDevServer( - { cwd: builder.directory, args: ['--command', 'echo hello', '--targetPort', '3000'] }, + { cwd: builder.directory, args: ['--command', 'echo hello', '--target-port', '3000'] }, () => {}, true, ), diff --git a/tests/integration/610.command.env.test.cjs b/tests/integration/610.command.env.test.cjs index a4cd3b69d77..9cd11201090 100644 --- a/tests/integration/610.command.env.test.cjs +++ b/tests/integration/610.command.env.test.cjs @@ -517,7 +517,7 @@ test('env:import --json --replace-existing should replace all existing vars and await withMockApi(importRoutes, async ({ apiUrl }) => { const cliResponse = await callCli( - ['env:import', '--replaceExisting', '--json', '.env'], + ['env:import', '--replace-existing', '--json', '.env'], getCLIOptions({ builder, apiUrl }), true, ) diff --git a/tests/integration/650.command.envelope.test.cjs b/tests/integration/650.command.envelope.test.cjs index b1ca65250de..5efe6203f90 100644 --- a/tests/integration/650.command.envelope.test.cjs +++ b/tests/integration/650.command.envelope.test.cjs @@ -537,7 +537,7 @@ test('env:import --json --replace-existing should replace all existing vars and await withMockApi(routes, async ({ apiUrl }) => { const cliResponse = await callCli( - ['env:import', '--replaceExisting', '--json', '.env'], + ['env:import', '--replace-existing', '--json', '.env'], getCLIOptions({ builder, apiUrl }), true, )