From 9b117cebba5cdeb7a9d389f2eb12aa695a7cf891 Mon Sep 17 00:00:00 2001 From: Justin Schneck Date: Wed, 24 Jul 2024 12:07:21 -0400 Subject: [PATCH 1/2] Update build instructions --- docs/build-and-deploy.md | 4 ++-- src/scripts/gen-cli.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/build-and-deploy.md b/docs/build-and-deploy.md index bf131976..c8c6085f 100644 --- a/docs/build-and-deploy.md +++ b/docs/build-and-deploy.md @@ -3,7 +3,7 @@ ## Build ``` -npm --prefix src build +npm --prefix src run build ``` Builds and outputs static content into the `build` directory ready to be served. @@ -11,7 +11,7 @@ Builds and outputs static content into the `build` directory ready to be served. ## Generate Peridio CLI Docs ``` -npm --prefix src gen-cli +npm --prefix src run gen-cli ``` This command uses your local Peridio CLI. The script itself hardcodes a particular version requirement of the CLI to help protect against documentation regression. diff --git a/src/scripts/gen-cli.js b/src/scripts/gen-cli.js index c911d4a1..273e5f10 100755 --- a/src/scripts/gen-cli.js +++ b/src/scripts/gen-cli.js @@ -53,14 +53,14 @@ function processCommandHelp(cmd) { }) } -exec('peridio --version', (_error, stdout) => { - const requiredVersion = 'peridio 0.22.0 56a27bc' +exec('peridio upgrade', (_error, stdout) => { + const latest = 'CLI already up to date' - if (stdout.includes(requiredVersion)) { + if (stdout.includes(latest)) { processCommandHelp([]) } else { console.error( - `Your local Peridio CLI has version (${stdout.trim()}) but this script requires version (${requiredVersion})`, + `You must update your Peridio CLI before generating docs`, ) } }) From f8f591b60fe6909edec30a97e9c3f83b89e60af3 Mon Sep 17 00:00:00 2001 From: Justin Schneck Date: Wed, 24 Jul 2024 12:07:43 -0400 Subject: [PATCH 2/2] Bump peridio cli docs to 0.23.0 --- src/docs/cli/ca-certificates/create.md | 2 ++ src/docs/cli/ca-certificates/update.md | 2 ++ src/docs/cli/tunnels/update.md | 1 + src/scripts/gen-cli.js | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/docs/cli/ca-certificates/create.md b/src/docs/cli/ca-certificates/create.md index a1300247..392b9803 100644 --- a/src/docs/cli/ca-certificates/create.md +++ b/src/docs/cli/ca-certificates/create.md @@ -12,6 +12,8 @@ Options: An arbitrary string attached to the jitp resource. Often useful for displaying to users --jitp-tags [...] Tags that will be automatically applied to devices that JITP with this CA certificate + --jitp-target + The target that will be automatically applied to devices that JITP with this CA certificate --jitp-product-name The product that will be automatically applied to devices that JITP with this CA certificate --jitp-cohort-prn diff --git a/src/docs/cli/ca-certificates/update.md b/src/docs/cli/ca-certificates/update.md index aa405384..6807634c 100644 --- a/src/docs/cli/ca-certificates/update.md +++ b/src/docs/cli/ca-certificates/update.md @@ -12,6 +12,8 @@ Options: An arbitrary string attached to the jitp resource. Often useful for displaying to users --jitp-tags [...] Tags that will be automatically applied to devices that JITP with this CA certificate + --jitp-target + The target that will be automatically applied to devices that JITP with this CA certificate --jitp-product-name The product that will be automatically applied to devices that JITP with this CA certificate --jitp-cohort-prn diff --git a/src/docs/cli/tunnels/update.md b/src/docs/cli/tunnels/update.md index 48b3b9d9..53443780 100644 --- a/src/docs/cli/tunnels/update.md +++ b/src/docs/cli/tunnels/update.md @@ -4,6 +4,7 @@ Usage: peridio tunnels update [OPTIONS] --prn Options: --prn The PRN of the resource to update --state The resource's state, currently only supports "closed" + --ttl Number of seconds to extend the tunnel for (1..3600) -h, --help Print help ``` \ No newline at end of file diff --git a/src/scripts/gen-cli.js b/src/scripts/gen-cli.js index 273e5f10..de10d6a1 100755 --- a/src/scripts/gen-cli.js +++ b/src/scripts/gen-cli.js @@ -60,7 +60,7 @@ exec('peridio upgrade', (_error, stdout) => { processCommandHelp([]) } else { console.error( - `You must update your Peridio CLI before generating docs`, + 'You must update your Peridio CLI before generating docs', ) } })