From dd8f21a6638f3d014873970fde267aff2498df6a Mon Sep 17 00:00:00 2001 From: Neil Macneale V Date: Mon, 16 Oct 2023 11:27:46 -0700 Subject: [PATCH 1/3] Things are beta --- package.json | 4 ++-- src/commands/project/init.ts | 5 +++-- src/commands/stack/add.ts | 4 +++- src/commands/stack/list.ts | 4 +++- src/commands/stack/select.ts | 4 +++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index e7b2e331..729a8c76 100644 --- a/package.json +++ b/package.json @@ -95,10 +95,10 @@ "description": "Manage endpoints in ~/.fauna-shell." }, "project": { - "description": "Manage project settings in .fauna-project." + "description": "Manage project settings in .fauna-project.\nNOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject to change." }, "stack": { - "description": "Manage stacks in the current project." + "description": "Manage stacks in the current project.\nNOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject to change." } } }, diff --git a/src/commands/project/init.ts b/src/commands/project/init.ts index 89daa0eb..9d339264 100644 --- a/src/commands/project/init.ts +++ b/src/commands/project/init.ts @@ -22,8 +22,9 @@ export class ProjectInitCommand extends Command { }), }; - static description = - "Initialize a project directory by generating a .fauna-project file."; + static description = `Initialize a project directory by generating a .fauna-project file. + +NOTE: \`fauna project\` and \`fauna stack\` are still in beta. Behavior is subject to change.`; static examples = [ "$ fauna project init", diff --git a/src/commands/stack/add.ts b/src/commands/stack/add.ts index 6464b817..9cc2c2fc 100644 --- a/src/commands/stack/add.ts +++ b/src/commands/stack/add.ts @@ -22,7 +22,9 @@ export default class AddStackCommand extends Command { }), }; - static description = "Add a new stack to `.fauna-project`."; + static description = `Add a new stack to \`.fauna-project\`. + +NOTE: \`fauna project\` and \`fauna stack\` are still in beta. Behavior is subject to change.`; static examples = [ "$ fauna stack add", diff --git a/src/commands/stack/list.ts b/src/commands/stack/list.ts index 3457acba..f49f477e 100644 --- a/src/commands/stack/list.ts +++ b/src/commands/stack/list.ts @@ -5,7 +5,9 @@ import chalk from "chalk"; export default class ListStackCommand extends Command { static flags = {}; - static description = "List stacks available in `.fauna-project`."; + static description = `List stacks available in \`.fauna-project\`. + +NOTE: \`fauna project\` and \`fauna stack\` are still in beta. Behavior is subject to change.`; static examples = ["$ fauna stack list"]; diff --git a/src/commands/stack/select.ts b/src/commands/stack/select.ts index 2f7775d1..65be2b5e 100644 --- a/src/commands/stack/select.ts +++ b/src/commands/stack/select.ts @@ -9,7 +9,9 @@ export default class SelectStackCommand extends Command { }), }; - static description = "Update the default stack in `.fauna-project`."; + static description = `Update the default stack in \`.fauna-project\`. + +NOTE: \`fauna project\` and \`fauna stack\` are still in beta. Behavior is subject to change.`; static examples = ["$ fauna stack select my-stack"]; From c962d4c84e8d242f7ba5441be9e31b1e4aa664a0 Mon Sep 17 00:00:00 2001 From: Neil Macneale V Date: Mon, 16 Oct 2023 11:29:17 -0700 Subject: [PATCH 2/3] Update README --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index e57dbb32..13277692 100644 --- a/README.md +++ b/README.md @@ -1058,6 +1058,9 @@ ARGUMENTS DESCRIPTION Initialize a project directory by generating a .fauna-project file. + NOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject + to change. + EXAMPLES $ fauna project init @@ -1250,6 +1253,9 @@ FLAGS DESCRIPTION Add a new stack to `.fauna-project`. + NOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject + to change. + EXAMPLES $ fauna stack add @@ -1271,6 +1277,9 @@ USAGE DESCRIPTION List stacks available in `.fauna-project`. + NOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject + to change. + EXAMPLES $ fauna stack list ``` @@ -1291,6 +1300,9 @@ ARGUMENTS DESCRIPTION Update the default stack in `.fauna-project`. + NOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject + to change. + EXAMPLES $ fauna stack select my-stack ``` From 8298bb77651755ec3c9f915e37f6b3e1f7ed10a2 Mon Sep 17 00:00:00 2001 From: Neil Macneale V Date: Mon, 16 Oct 2023 11:33:56 -0700 Subject: [PATCH 3/3] Remove the VERSION section in the README --- README.md | 3 --- readme.py | 9 ++++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 13277692..b0f2cfd2 100644 --- a/README.md +++ b/README.md @@ -816,9 +816,6 @@ Shows help for the Fauna CLI. ```sh faunadb shell -VERSION - fauna-shell/1.1.0 darwin-x64 node-v20.6.0 - USAGE $ fauna [COMMAND] diff --git a/readme.py b/readme.py index 3322f59e..e6cc4cb0 100644 --- a/readme.py +++ b/readme.py @@ -42,7 +42,14 @@ def run(command: list[str]) -> str: if end != None: print(f"updated command {command}") - result = run(["./bin/run", *command[1:], "--help"]).strip().split("\n") + result = run(["./bin/run", *command[1:], "--help"]).strip() + + # remove the VERSION section + if command == ["fauna", "help"]: + m = re.search("VERSION.*\n.*\n\n", result) + result = result[:m.start()] + result[m.end():] + + result = result.split("\n") lines[start:end] = result i += len(result) - (end - start)