From b3875fb3992c5d29ec479061bec3eb8f12e9a0da Mon Sep 17 00:00:00 2001 From: Muhammad Javed Date: Sat, 6 Feb 2021 01:42:11 +0500 Subject: [PATCH 1/3] Add functions:list to docs/commands/functions.md --- docs/commands/functions.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/commands/functions.md b/docs/commands/functions.md index b0e44aea2a8..f6a9ffa1014 100644 --- a/docs/commands/functions.md +++ b/docs/commands/functions.md @@ -18,6 +18,7 @@ netlify functions | Subcommand | description | |:--------------------------- |:-----| +| [`functions:list`](/docs/commands/functions.md#functionslist) | List locally created functions | | [`functions:build`](/docs/commands/functions.md#functionsbuild) | Build functions locally | | [`functions:create`](/docs/commands/functions.md#functionscreate) | Create a new function locally | | [`functions:invoke`](/docs/commands/functions.md#functionsinvoke) | Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions | @@ -30,6 +31,27 @@ netlify functions:create --name function-xyz netlify functions:build --name function-abc --timeout 30s ``` +--- +## `functions:list` + +List locally created functions + + +**Usage** + +```bash +netlify functions:list +``` + +**Flags** + +- `functions` (*string*) - Specify a functions folder to serve +- `name` (*string*) - name to print +- `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 +- `json` (*boolean*) - Output function data as JSON + --- ## `functions:build` From db2b91873d61d73f0ccf7ef3a8b27693d08cda4e Mon Sep 17 00:00:00 2001 From: Muhammad Javed Date: Sat, 6 Feb 2021 01:59:46 +0500 Subject: [PATCH 2/3] Add functions:list to docs (README.md) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2a9bff66de2..c54384c9a04 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ Manage netlify functions | Subcommand | description | |:--------------------------- |:-----| +| [`functions:list`](/docs/commands/functions.md#functionslist) | List locally created functions | | [`functions:build`](/docs/commands/functions.md#functionsbuild) | Build functions locally | | [`functions:create`](/docs/commands/functions.md#functionscreate) | Create a new function locally | | [`functions:invoke`](/docs/commands/functions.md#functionsinvoke) | Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions | From b3f2d50f72927779ec914f9cb07e2d62c862e599 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Mon, 8 Feb 2021 19:23:29 +0100 Subject: [PATCH 3/3] feat(command-functions-list): remove hidden flag --- README.md | 2 +- docs/README.md | 1 + docs/commands/functions.md | 48 ++++++++++++++++++---------------- docs/commands/index.md | 1 + src/commands/functions/list.js | 3 --- 5 files changed, 29 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index c54384c9a04..133b483a0df 100644 --- a/README.md +++ b/README.md @@ -124,10 +124,10 @@ Manage netlify functions | Subcommand | description | |:--------------------------- |:-----| -| [`functions:list`](/docs/commands/functions.md#functionslist) | List locally created functions | | [`functions:build`](/docs/commands/functions.md#functionsbuild) | Build functions locally | | [`functions:create`](/docs/commands/functions.md#functionscreate) | Create a new function locally | | [`functions:invoke`](/docs/commands/functions.md#functionsinvoke) | Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions | +| [`functions:list`](/docs/commands/functions.md#functionslist) | List functions that exist locally | ### [init](/docs/commands/init.md) diff --git a/docs/README.md b/docs/README.md index 4dc9ba7b88a..8ef06f249b6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -91,6 +91,7 @@ Manage netlify functions | [`functions:build`](/docs/commands/functions.md#functionsbuild) | Build functions locally | | [`functions:create`](/docs/commands/functions.md#functionscreate) | Create a new function locally | | [`functions:invoke`](/docs/commands/functions.md#functionsinvoke) | Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions | +| [`functions:list`](/docs/commands/functions.md#functionslist) | List functions that exist locally | ### [init](/docs/commands/init.md) diff --git a/docs/commands/functions.md b/docs/commands/functions.md index f6a9ffa1014..ba7e34b2594 100644 --- a/docs/commands/functions.md +++ b/docs/commands/functions.md @@ -18,10 +18,10 @@ netlify functions | Subcommand | description | |:--------------------------- |:-----| -| [`functions:list`](/docs/commands/functions.md#functionslist) | List locally created functions | | [`functions:build`](/docs/commands/functions.md#functionsbuild) | Build functions locally | | [`functions:create`](/docs/commands/functions.md#functionscreate) | Create a new function locally | | [`functions:invoke`](/docs/commands/functions.md#functionsinvoke) | Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions | +| [`functions:list`](/docs/commands/functions.md#functionslist) | List functions that exist locally | **Examples** @@ -31,27 +31,6 @@ netlify functions:create --name function-xyz netlify functions:build --name function-abc --timeout 30s ``` ---- -## `functions:list` - -List locally created functions - - -**Usage** - -```bash -netlify functions:list -``` - -**Flags** - -- `functions` (*string*) - Specify a functions folder to serve -- `name` (*string*) - name to print -- `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 -- `json` (*boolean*) - Output function data as JSON - --- ## `functions:build` @@ -143,6 +122,31 @@ $ netlify functions:invoke myfunction --querystring "foo=1 $ netlify functions:invoke myfunction --payload "./pathTo.json" ``` +--- +## `functions:list` + +List functions that exist locally + +Helpful for making sure that you have formatted your functions correctly + +NOT the same as listing the functions that have been deployed. For that info you need to go to your Netlify deploy log. + + +**Usage** + +```bash +netlify functions:list +``` + +**Flags** + +- `name` (*string*) - name to print +- `functions` (*string*) - Specify a functions folder to serve +- `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 + --- diff --git a/docs/commands/index.md b/docs/commands/index.md index 0c5426604d2..2d0bfd9cee1 100644 --- a/docs/commands/index.md +++ b/docs/commands/index.md @@ -77,6 +77,7 @@ Manage netlify functions | [`functions:build`](/docs/commands/functions.md#functionsbuild) | Build functions locally | | [`functions:create`](/docs/commands/functions.md#functionscreate) | Create a new function locally | | [`functions:invoke`](/docs/commands/functions.md#functionsinvoke) | Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions | +| [`functions:list`](/docs/commands/functions.md#functionslist) | List functions that exist locally | ### [init](/docs/commands/init.md) diff --git a/src/commands/functions/list.js b/src/commands/functions/list.js index 3ee2910f29c..3c149bad416 100644 --- a/src/commands/functions/list.js +++ b/src/commands/functions/list.js @@ -109,7 +109,4 @@ FunctionsListCommand.flags = { ...FunctionsListCommand.flags, } -// TODO make visible once implementation complete -FunctionsListCommand.hidden = true - module.exports = FunctionsListCommand