From b6acf196275ff2e0adafdfaa232d8ad4b0a3490b Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Thu, 20 Jun 2024 08:34:30 +0100 Subject: [PATCH 01/12] Adjust document url --- .eslintrc | 5 +- README.md | 309 ++++++++++++++++++++++++++- package.json | 11 +- src/commands/generate-types/index.ts | 55 +++++ src/commands/get/index.ts | 22 +- src/util/doGet.ts | 21 ++ src/util/get-all-features.ts | 27 +++ src/util/json-to-typescript.ts | 27 +++ tsconfig.json | 1 + 9 files changed, 463 insertions(+), 15 deletions(-) create mode 100644 src/commands/generate-types/index.ts create mode 100644 src/util/doGet.ts create mode 100644 src/util/get-all-features.ts create mode 100644 src/util/json-to-typescript.ts diff --git a/.eslintrc b/.eslintrc index 7b84619..c86fed4 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,5 +2,8 @@ "extends": [ "oclif", "oclif-typescript" - ] + ], + "rules": { + "no-prototype-builtins": 0 + } } diff --git a/README.md b/README.md index 129c452..57808bf 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ $ npm install -g flagsmith-cli $ flagsmith COMMAND running command... $ flagsmith (--version) -flagsmith-cli/0.1.2 darwin-arm64 node-v18.13.0 +flagsmith-cli/0.2.0 darwin-arm64 node-v21.6.1 $ flagsmith --help [COMMAND] USAGE $ flagsmith COMMAND @@ -64,6 +64,313 @@ USAGE * [`flagsmith get [ENVIRONMENT]`](#flagsmith-get-environment) * [`flagsmith help [COMMANDS]`](#flagsmith-help-commands) +* [`flagsmith plugins`](#flagsmith-plugins) +* [`flagsmith plugins:install PLUGIN...`](#flagsmith-pluginsinstall-plugin) +* [`flagsmith plugins:inspect PLUGIN...`](#flagsmith-pluginsinspect-plugin) +* [`flagsmith plugins:install PLUGIN...`](#flagsmith-pluginsinstall-plugin-1) +* [`flagsmith plugins:link PLUGIN`](#flagsmith-pluginslink-plugin) +* [`flagsmith plugins:uninstall PLUGIN...`](#flagsmith-pluginsuninstall-plugin) +* [`flagsmith plugins:uninstall PLUGIN...`](#flagsmith-pluginsuninstall-plugin-1) +* [`flagsmith plugins:uninstall PLUGIN...`](#flagsmith-pluginsuninstall-plugin-2) +* [`flagsmith plugins update`](#flagsmith-plugins-update) + +## `flagsmith get [ENVIRONMENT]` + +Retrieve flagsmith features from the Flagsmith API and output them to a file. + +``` +USAGE + $ flagsmith get [ENVIRONMENT] [-o ] [-a ] [-i ] [-p] [-e flags|environment] + +ARGUMENTS + ENVIRONMENT The flagsmith environment key to use, defaults to the environment variable FLAGSMITH_ENVIRONMENT + +FLAGS + -a, --api= The API URL to fetch the feature flags from + -e, --entity=