From b52c7d261840d26967171c151e1c170c634b02d1 Mon Sep 17 00:00:00 2001 From: Amber Torrise Date: Thu, 9 Nov 2023 16:04:22 -0500 Subject: [PATCH] pluginHealthCheck, PMF_ROOT comment, flattenCommandTreeWithAliaises Signed-off-by: Amber Torrise --- .../apiml/__unit__/allPluginCfgPropsMock.json | 2 - .../plugins/suites/ValidatePlugin.ts | 82 - .../chained_handler_plugin/package.json | 1 - .../package.json | 1 - .../definition_empty_array/package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../definition_missing_handler/package.json | 1 - .../definition_missing_name/package.json | 1 - .../definition_missing_type/package.json | 1 - .../package.json | 1 - .../duplicated_base_cli_command/package.json | 1 - .../package.json | 1 - .../package.json | 1 - .../missing_command_handler/package.json | 1 - .../missing_definitions/package.json | 3 +- .../missing_dependencies/package.json | 1 - .../missing_healthcheck_handler/package.json | 1 - .../missing_pluginBaseCliVersion/package.json | 1 - .../dummy.handler.js | 14 - .../missing_pluginHealthCheck/package.json | 41 - .../package.json | 1 - .../profile_dup_in_plugin/configuration.js | 1 - .../profile_dup_with_cli/configuration.js | 1 - .../missing_name_plugin/package.json | 1 - .../test_plugins/normal_plugin/package.json | 1 - .../test_plugins/normal_plugin_2/package.json | 1 - .../lib/sample-plugin/configuration.js | 1 - .../normal_plugin_misc/package.json | 1 - .../test_plugins/override_plugin/package.json | 1 - .../space in path plugin/package.json | 1 - .../__tests__/utils/CommandUtils.unit.test.ts | 2 +- .../CommandUtils.unit.test.ts.snap | 2855 +---------------- .../src/cmd/src/utils/CommandUtils.ts | 11 - .../PluginManagementFacility.unit.test.ts | 41 - .../imperative/src/doc/IImperativeConfig.ts | 25 - .../src/plugins/PluginManagementFacility.ts | 1 - 38 files changed, 4 insertions(+), 3100 deletions(-) delete mode 100644 packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginHealthCheck/dummy.handler.js delete mode 100644 packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginHealthCheck/package.json diff --git a/packages/core/__tests__/apiml/__unit__/allPluginCfgPropsMock.json b/packages/core/__tests__/apiml/__unit__/allPluginCfgPropsMock.json index 29f97d35fb..4d7dcb37eb 100644 --- a/packages/core/__tests__/apiml/__unit__/allPluginCfgPropsMock.json +++ b/packages/core/__tests__/apiml/__unit__/allPluginCfgPropsMock.json @@ -6,7 +6,6 @@ "commandModuleGlobs": [ "**/*.definition!(.d).*s" ], - "pluginHealthCheck": "./lib/HealthCheck.handler", "rootCommandDescription": "CA Endevor SCM plug-in for listing Endevor environment information, working with elements and packages located in specified Endevor instance.", "envVariablePrefix": "ENDEVOR", "defaultHome": "C:\\Users\\ej608771/.endevor", @@ -309,7 +308,6 @@ "commandModuleGlobs": [ "**/cli/*/*.definition!(.d).*s" ], - "pluginHealthCheck": "C:\\Users\\ej608771\\.zowe\\plugins\\installed\\node_modules\\@broadcom\\jclcheck-for-zowe-cli\\lib/healthCheck.handler", "pluginSummary": "JCLCheck plugin", "pluginAliases": [ "jck" diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/suites/ValidatePlugin.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/suites/ValidatePlugin.ts index 2d1a783602..ebabe2e4f9 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/suites/ValidatePlugin.ts +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/suites/ValidatePlugin.ts @@ -247,88 +247,6 @@ describe("Validate plugin", () => { expect(result.status).toEqual(1); }); - // TODO: remove this test in V3, when pluginHealthCheck is removed - it("missing pluginHealthCheck property", () => { - const testPlugin = "missing_pluginHealthCheck"; - const fullPluginPath = join(testPluginDir, "error_plugins", testPlugin); - - let cmd = `plugins install ${fullPluginPath}`; - let result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); - expect(result.stdout).toContain(`Installed plugin name = '${testPlugin}'`); - - cmd = `plugins validate ${testPlugin}`; - result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); - result.stderr = removeNewline(result.stderr); - expect(result.stdout).toContain(testPlugin); - expect(result.stdout).toContain("This plugin was successfully validated. Enjoy the plugin."); - expect(result.stdout).not.toContain("Warning"); - expect(result.stdout).not.toContain("The plugin's configuration does not contain an 'imperative.pluginHealthCheck' property."); - expect(result.stderr).not.toContain("Problems detected during plugin validation."); - expect(result.status).toEqual(0); - }); - - // TODO: remove this test in V3, when pluginHealthCheck is removed - it("missing pluginHealthCheck property - warning", () => { - const testPlugin = "missing_pluginHealthCheck"; - const fullPluginPath = join(testPluginDir, "error_plugins", testPlugin); - - let cmd = `plugins install ${fullPluginPath}`; - let result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); - expect(result.stdout).toContain(`Installed plugin name = '${testPlugin}'`); - - cmd = `plugins validate ${testPlugin} --fail-on-warning`; - result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); - result.stderr = removeNewline(result.stderr); - expect(result.stdout).toContain(testPlugin); - expect(result.stdout).toContain("This plugin was successfully validated. Enjoy the plugin."); - expect(result.stdout).not.toContain("Warning"); - expect(result.stdout).not.toContain("The plugin's configuration does not contain an 'imperative.pluginHealthCheck' property."); - expect(result.stderr).not.toContain("Problems detected during plugin validation."); - expect(result.status).toEqual(0); - }); - - // TODO: remove this test in V3, when pluginHealthCheck is removed - it("missing pluginHealthCheck handler", () => { - const testPlugin = "missing_healthcheck_handler"; - const fullPluginPath = join(testPluginDir, "error_plugins", testPlugin); - - let cmd = `plugins install ${fullPluginPath}`; - let result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); - expect(result.stdout).toContain(`Installed plugin name = '${testPlugin}'`); - - cmd = `plugins validate ${testPlugin} --no-fail-on-error`; - result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); - result.stderr = removeNewline(result.stderr); - expect(result.stdout).toContain(testPlugin); - expect(result.stdout).toContain("This plugin was successfully validated. Enjoy the plugin."); - expect(result.stdout).not.toContain("Error"); - expect(result.stdout).not.toContain(`The program for the 'imperative.pluginHealthCheck' property does not exist:`); - expect(result.stdout).not.toContain("This plugin has configuration errors. No component of the plugin will be available"); - expect(result.stderr).not.toContain("Problems detected during plugin validation."); - expect(result.status).toEqual(0); - }); - - // TODO: remove this test in V3, when pluginHealthCheck is removed - it("missing pluginHealthCheck handler - error", () => { - const testPlugin = "missing_healthcheck_handler"; - const fullPluginPath = join(testPluginDir, "error_plugins", testPlugin); - - let cmd = `plugins install ${fullPluginPath}`; - let result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); - expect(result.stdout).toContain(`Installed plugin name = '${testPlugin}'`); - - cmd = `plugins validate ${testPlugin}`; - result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); - result.stderr = removeNewline(result.stderr); - expect(result.stdout).toContain(testPlugin); - expect(result.stdout).toContain("This plugin was successfully validated. Enjoy the plugin."); - expect(result.stdout).not.toContain("Error"); - expect(result.stdout).not.toContain(`The program for the 'imperative.pluginHealthCheck' property does not exist:`); - expect(result.stdout).not.toContain("This plugin has configuration errors. No component of the plugin will be available"); - expect(result.stderr).not.toContain("Problems detected during plugin validation."); - expect(result.status).toEqual(0); - }); - it("missing peerDependencies properties", () => { const testPlugin = "missing_dependencies"; const fullPluginPath = join(testPluginDir, "error_plugins", testPlugin); diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/package.json index 2d9511a451..a4462c7dbf 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/package.json @@ -10,7 +10,6 @@ "name": "chained-handler-plugin", "rootCommandDescription": "imperative working test plugin", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./lib/sample-plugin/healthCheck.handler", "pluginAliases": [ "chp", "chainedhandlerp" diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_bad_chained_handler/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_bad_chained_handler/package.json index dfccfd6f96..a593717a78 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_bad_chained_handler/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_bad_chained_handler/package.json @@ -10,7 +10,6 @@ "name": "definition_bad_chained_handler", "rootCommandDescription": "definition bad chained handler", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_empty_array/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_empty_array/package.json index 94b70a1436..1f93016c2c 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_empty_array/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_empty_array/package.json @@ -10,7 +10,6 @@ "name": "definition_empty_array", "rootCommandDescription": "definition empty array", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [] }, "peerDependencies": { diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_empty_chained_handler/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_empty_chained_handler/package.json index fce6748813..24b3cee220 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_empty_chained_handler/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_empty_chained_handler/package.json @@ -10,7 +10,6 @@ "name": "definition_empty_chained_handler", "rootCommandDescription": "definition empty chained handler", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_chained_handler/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_chained_handler/package.json index ac0e30bbce..3b7c3159a6 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_chained_handler/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_chained_handler/package.json @@ -10,7 +10,6 @@ "name": "definition_missing_chained_handler", "rootCommandDescription": "definition missing chained handler", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_description/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_description/package.json index 7803fc1414..cebf44fa68 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_description/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_description/package.json @@ -10,7 +10,6 @@ "name": "definition_missing_description", "rootCommandDescription": "definition missing description", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_handler/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_handler/package.json index fd6d54799f..727095a570 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_handler/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_handler/package.json @@ -10,7 +10,6 @@ "name": "definition_missing_handler", "rootCommandDescription": "definition missing handler", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_name/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_name/package.json index f2497789d1..5723e42824 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_name/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_name/package.json @@ -10,7 +10,6 @@ "name": "definition_missing_name", "rootCommandDescription": "definition missing name", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "description": "dummy foo command", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_type/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_type/package.json index 234197b925..63a75dfdc5 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_type/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_missing_type/package.json @@ -10,7 +10,6 @@ "name": "definition_missing_type", "rootCommandDescription": "definition missing type", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_type_group_without_children/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_type_group_without_children/package.json index 288f7480b5..2ed5d77f7e 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_type_group_without_children/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/definition_type_group_without_children/package.json @@ -10,7 +10,6 @@ "name": "definition_type_group_without_children", "rootCommandDescription": "definition type group without children", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/duplicated_base_cli_command/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/duplicated_base_cli_command/package.json index ea2957c5bd..4d67859119 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/duplicated_base_cli_command/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/duplicated_base_cli_command/package.json @@ -10,7 +10,6 @@ "name": "plugins", "rootCommandDescription": "duplicated base cli command", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/duplicated_installed_plugin_command/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/duplicated_installed_plugin_command/package.json index 71f37ceb63..6d13183e88 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/duplicated_installed_plugin_command/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/duplicated_installed_plugin_command/package.json @@ -10,7 +10,6 @@ "name": "normal-plugin", "rootCommandDescription": "duplicated installed plugin command", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/incompatible_imperative_version/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/incompatible_imperative_version/package.json index c7bab7c1b5..3dbbd6445d 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/incompatible_imperative_version/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/incompatible_imperative_version/package.json @@ -10,7 +10,6 @@ "name": "incompatible_imperative_version", "rootCommandDescription": "imperative working test plugin", "pluginBaseCliVersion": "^2.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_command_handler/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_command_handler/package.json index 45fa443285..95f46c2ae8 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_command_handler/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_command_handler/package.json @@ -10,7 +10,6 @@ "name": "missing_command_handler", "rootCommandDescription": "imperative working test plugin", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_definitions/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_definitions/package.json index 6ce9a4fc41..5fde89a050 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_definitions/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_definitions/package.json @@ -9,8 +9,7 @@ "imperative": { "name": "missing_definitions", "rootCommandDescription": "missing definitions", - "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler" + "pluginBaseCliVersion": "^1.0.0" }, "peerDependencies": { "@zowe/imperative": "1.0.0" diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_dependencies/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_dependencies/package.json index f619e6306e..80f9528f1d 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_dependencies/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_dependencies/package.json @@ -10,7 +10,6 @@ "name": "missing_dependencies", "rootCommandDescription": "imperative working test plugin", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_healthcheck_handler/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_healthcheck_handler/package.json index a9cfb8489c..5c5b588152 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_healthcheck_handler/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_healthcheck_handler/package.json @@ -10,7 +10,6 @@ "name": "missing_healthcheck_handler", "rootCommandDescription": "imperative working test plugin", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./non_existing_path", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginBaseCliVersion/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginBaseCliVersion/package.json index e0edb6227b..0db2951d39 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginBaseCliVersion/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginBaseCliVersion/package.json @@ -9,7 +9,6 @@ "imperative": { "name": "missing_pluginBaseCliVersion", "rootCommandDescription": "imperative working test plugin", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginHealthCheck/dummy.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginHealthCheck/dummy.handler.js deleted file mode 100644 index fe821d5fd8..0000000000 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginHealthCheck/dummy.handler.js +++ /dev/null @@ -1,14 +0,0 @@ -/* -* This program and the accompanying materials are made available under the terms of the -* Eclipse Public License v2.0 which accompanies this distribution, and is available at -* https://www.eclipse.org/legal/epl-v20.html -* -* SPDX-License-Identifier: EPL-2.0 -* -* Copyright Contributors to the Zowe Project. -* -*/ - -/** - * Dummy handler should not be called - */ \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginHealthCheck/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginHealthCheck/package.json deleted file mode 100644 index 07c75dba63..0000000000 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_pluginHealthCheck/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "missing_pluginHealthCheck", - "version": "1.0.1", - "description": "Some description", - "main": "../lib/index.js", - "files": [ - "lib" - ], - "imperative": { - "name": "missing_pluginHealthCheck", - "rootCommandDescription": "imperative working test plugin", - "pluginBaseCliVersion": "^1.0.0", - "definitions": [ - { - "name": "foo", - "description": "dummy foo command", - "type": "command", - "handler": "./dummy.handler" - }, - { - "name": "bar", - "description": "dummy bar command", - "type": "command", - "handler": "./dummy.handler" - } - ] - }, - "peerDependencies": { - "@zowe/imperative": "1.0.0" - }, - "typings": "lib/index.d.ts", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "EPL 2.0", - "private": false, - "publishConfig": { - "registry": "http://imperative-npm-registry:4873" - } -} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_rootCommandDescription/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_rootCommandDescription/package.json index 5dcfae10ca..8b8de2ca07 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_rootCommandDescription/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/missing_rootCommandDescription/package.json @@ -9,7 +9,6 @@ "imperative": { "name": "missing_rootCommandDescription", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/profile_dup_in_plugin/configuration.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/profile_dup_in_plugin/configuration.js index ac1ba1c267..44a7331899 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/profile_dup_in_plugin/configuration.js +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/profile_dup_in_plugin/configuration.js @@ -28,7 +28,6 @@ const config = { } } ], - pluginHealthCheck: "./healthCheck.handler", rootCommandDescription: "Test plugin with profiles", pluginBaseCliVersion: "^1.0.0", defaultHome: "../../../../../../__results__/.pluginstest", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/profile_dup_with_cli/configuration.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/profile_dup_with_cli/configuration.js index 4cf6d9c949..cdb7189b84 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/profile_dup_with_cli/configuration.js +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/error_plugins/profile_dup_with_cli/configuration.js @@ -27,7 +27,6 @@ const config = { } } ], - pluginHealthCheck: "./healthCheck.handler", rootCommandDescription: "Test plugin with profiles", pluginBaseCliVersion: "^1.0.0", defaultHome: "../../../../../../__results__/.pluginstest", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/missing_name_plugin/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/missing_name_plugin/package.json index 65b16b3f39..5b3a578e38 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/missing_name_plugin/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/missing_name_plugin/package.json @@ -9,7 +9,6 @@ "imperative": { "rootCommandDescription": "missing name plugin", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./dummy.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/package.json index d7a7584112..1525fe3e5c 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/package.json @@ -10,7 +10,6 @@ "name": "normal-plugin", "rootCommandDescription": "imperative working test plugin", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./lib/sample-plugin/healthCheck.handler", "pluginAliases": [ "np", "normalp" diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/package.json index 26af69aec4..881151fbb2 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/package.json @@ -10,7 +10,6 @@ "name": "normal-plugin-2", "rootCommandDescription": "imperative working test plugin 2", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./lib/sample-plugin/healthCheck.handler", "definitions": [ { "name": "foo", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.js index f336c1c779..c8d906695c 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.js +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.js @@ -26,7 +26,6 @@ const config = { } } ], - pluginHealthCheck: "./lib/sample-plugin/healthCheck.handler", commandModuleGlobs: ["**/cmd/*/*.definition!(.d).*s"], rootCommandDescription: "Test plugin with globs and profiles", pluginBaseCliVersion: "^0.4.0-1", diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/package.json index 8cec963ec8..9395b56f88 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/package.json @@ -10,7 +10,6 @@ "name": "normal-plugin-misc", "rootCommandDescription": "imperative working test plugin", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./lib/sample-plugin/healthCheck.handler", "pluginAliases": [ "misc" ], diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json index e91c6c1b6f..8851951c26 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json @@ -10,7 +10,6 @@ "name": "override-plugin", "rootCommandDescription": "imperative override plugin rootCommandDescription", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./lib/sample-plugin/healthCheck.handler", "overrides": { "CredentialManager": "./sample-plugin/overrides/CredentialManager.override" }, diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/package.json index f731d2cd82..20f717eb7d 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/package.json @@ -10,7 +10,6 @@ "name": "space-in-path-plugin", "rootCommandDescription": "imperative working test plugin", "pluginBaseCliVersion": "^1.0.0", - "pluginHealthCheck": "./lib/sample-plugin/healthCheck.handler", "pluginAliases": [ "np", "normalp" diff --git a/packages/imperative/src/cmd/__tests__/utils/CommandUtils.unit.test.ts b/packages/imperative/src/cmd/__tests__/utils/CommandUtils.unit.test.ts index 37c067546f..c92e854337 100644 --- a/packages/imperative/src/cmd/__tests__/utils/CommandUtils.unit.test.ts +++ b/packages/imperative/src/cmd/__tests__/utils/CommandUtils.unit.test.ts @@ -89,7 +89,7 @@ describe("Command Utils", () => { }); it("We should be able to flatten a nested command tree with aliases for display and searching purposes", () => { - const flatten: ICommandTreeEntry[] = CommandUtils.flattenCommandTreeWithAliases(COMPLEX_COMMAND_WITH_ALIASES); + const flatten: ICommandTreeEntry[] = CommandUtils.flattenCommandTree(COMPLEX_COMMAND_WITH_ALIASES); TestLogger.info("Flattened Command Tree:\n" + inspect(flatten)); expect(flatten).toMatchSnapshot(); }); diff --git a/packages/imperative/src/cmd/__tests__/utils/__snapshots__/CommandUtils.unit.test.ts.snap b/packages/imperative/src/cmd/__tests__/utils/__snapshots__/CommandUtils.unit.test.ts.snap index 36b6b6ad5e..303a07dd65 100644 --- a/packages/imperative/src/cmd/__tests__/utils/__snapshots__/CommandUtils.unit.test.ts.snap +++ b/packages/imperative/src/cmd/__tests__/utils/__snapshots__/CommandUtils.unit.test.ts.snap @@ -377,162 +377,6 @@ Array [ "type": "group", }, }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "test-group tc", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, Object { "command": Object { "aliases": Array [ @@ -921,7 +765,7 @@ Array [ ], "type": "command", }, - "fullName": "test-group test-group-2 tc", + "fullName": "test-group test-group-2 test-command-one", "tree": Object { "aliases": Array [ "tg", @@ -1044,164 +888,8 @@ Array [ }, Object { "command": Object { - "aliases": Array [ - "tc", - ], "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "test-group test-group-2 test-command-one", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "description": "my command", - "name": "test-command-two", + "name": "test-command-two", "options": Array [ Object { "aliases": Array [ @@ -1351,2545 +1039,6 @@ Array [ "type": "group", }, }, - Object { - "command": Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - "fullName": "test-group tg2", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "test-group tg2 tc", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "test-group tg2 test-command-one", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "test-group tg2 test-command-two", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - "fullName": "tg", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "tg tc", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "tg test-command", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - "fullName": "tg test-group-2", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "tg test-group-2 tc", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "tg test-group-2 test-command-one", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "tg test-group-2 test-command-two", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - "fullName": "tg tg2", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "tg tg2 tc", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "tg tg2 test-command-one", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, - Object { - "command": Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - "fullName": "tg tg2 test-command-two", - "tree": Object { - "aliases": Array [ - "tg", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional1", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "aliases": Array [ - "tg2", - ], - "children": Array [ - Object { - "aliases": Array [ - "tc", - ], - "description": "my command", - "name": "test-command-one", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - Object { - "description": "my command", - "name": "test-command-two", - "options": Array [ - Object { - "aliases": Array [ - "to", - ], - "description": "the option", - "name": "test-option", - "type": "string", - }, - Object { - "aliases": Array [ - "tb", - ], - "description": "the boolean option", - "name": "test-boolean", - "type": "boolean", - }, - ], - "positionals": Array [ - Object { - "description": "the positional option", - "name": "positional2", - "required": false, - "type": "string", - }, - ], - "type": "command", - }, - ], - "description": "my group", - "name": "test-group-2", - "type": "group", - }, - ], - "description": "my group", - "name": "test-group", - "type": "group", - }, - }, ] `; diff --git a/packages/imperative/src/cmd/src/utils/CommandUtils.ts b/packages/imperative/src/cmd/src/utils/CommandUtils.ts index 8b3dbf75f2..f535661524 100644 --- a/packages/imperative/src/cmd/src/utils/CommandUtils.ts +++ b/packages/imperative/src/cmd/src/utils/CommandUtils.ts @@ -166,17 +166,6 @@ export class CommandUtils { }); } - /** - * Accepts the command definition document tree and flattens to a single level, including aliases. This is used to make searching - * commands and others easily. - * @param {ICommandDefinition} tree - The command document tree - * @deprecated Use CommandUtils.flattenCommandTree instead - * @return {ICommandTreeEntry[]} - The flattened document tree - */ - public static flattenCommandTreeWithAliases(tree: ICommandDefinition): ICommandTreeEntry[] { - return CommandUtils.flattenCommandTree(tree, true); - } - /** * TODO - This needs to be well tested * TODO - There is a situation where two groups could have the same child command diff --git a/packages/imperative/src/imperative/__tests__/plugins/PluginManagementFacility.unit.test.ts b/packages/imperative/src/imperative/__tests__/plugins/PluginManagementFacility.unit.test.ts index ea9ef295ef..45cfb9f1b1 100644 --- a/packages/imperative/src/imperative/__tests__/plugins/PluginManagementFacility.unit.test.ts +++ b/packages/imperative/src/imperative/__tests__/plugins/PluginManagementFacility.unit.test.ts @@ -87,7 +87,6 @@ describe("Plugin Management Facility", () => { pluginAliases: goodPluginAliases, pluginSummary: goodPluginSummary, rootCommandDescription: "imperative sample plugin", - pluginHealthCheck: "./lib/sample-plugin/healthCheck.handler", // TODO: remove in V3, when pluginHealthCheck is removed definitions: [ { name: "foo", @@ -734,46 +733,6 @@ describe("Plugin Management Facility", () => { "The plugin defines no commands and overrides no framework components."); }); - // TODO: remove this test in V3, when pluginHealthCheck is removed - it("should not record warning if pluginHealthCheck property does not exist", () => { - // remove pluginHealthCheck property from config - badPluginConfig = JSON.parse(JSON.stringify(basePluginConfig)); - delete badPluginConfig.pluginHealthCheck; - badPluginCfgProps = JSON.parse(JSON.stringify(basePluginCfgProps)); - badPluginCfgProps.impConfig = badPluginConfig; - - // Ensure we get to the function that we want to validate - mockConflictNmOrAlias.mockReturnValueOnce({ hasConflict: false }); - mockAreVersionsCompatible.mockReturnValueOnce(true); - - isValid = PMF.validatePlugin(badPluginCfgProps, basePluginCmdDef); - - // missing healthCheck is just a warning, so we succeed - expect(isValid).toBe(true); - - // we no longer report any error about missing pluginHealthCheck property - expect(pluginIssues.getIssueListForPlugin(pluginName).length).toBe(0); - }); - - // TODO: remove this test in V3, when pluginHealthCheck is removed - it("should not record error if pluginHealthCheck file does not exist", () => { - // set pluginHealthCheck property to a bogus file - badPluginConfig = JSON.parse(JSON.stringify(basePluginConfig)); - badPluginConfig.pluginHealthCheck = "./This/File/Does/Not/Exist"; - badPluginCfgProps = JSON.parse(JSON.stringify(basePluginCfgProps)); - badPluginCfgProps.impConfig = badPluginConfig; - - // Ensure we get to the function that we want to validate - mockConflictNmOrAlias.mockReturnValueOnce({ hasConflict: false }); - mockAreVersionsCompatible.mockReturnValueOnce(true); - - isValid = PMF.validatePlugin(badPluginCfgProps, basePluginCmdDef); - expect(isValid).toBe(true); - - // we no longer report any error about missing pluginHealthCheck file - expect(pluginIssues.getIssueListForPlugin(pluginName).length).toBe(0); - }); - it("should record error when ConfigurationValidator throws an exception", () => { // Ensure we get to the function that we want to validate PMF.conflictingNameOrAlias = realConflictName; diff --git a/packages/imperative/src/imperative/src/doc/IImperativeConfig.ts b/packages/imperative/src/imperative/src/doc/IImperativeConfig.ts index 2142fe3c5a..473941bae8 100644 --- a/packages/imperative/src/imperative/src/doc/IImperativeConfig.ts +++ b/packages/imperative/src/imperative/src/doc/IImperativeConfig.ts @@ -233,31 +233,6 @@ export interface IImperativeConfig { */ pluginLifeCycle?: string; - /** - * A path to a module (javascript file) that will perform a health check for a plugin. - * The health check should verify the health of the plugin. - * The implementor of a plugin determines what actions - * can confirm that the plugin is in an operational state. - * - * The health check should return true if all plugin health checks pass. - * It should return false otherwise. - * - * This property is unused for a base CLI. - * - * No Zowe CLI command currently calls the health check function. - * - * @deprecated - * This property is deprecated. Plugins that want to perform a health check can - * specify the pluginLifeCycle property to load a class from the plugin. - * The plugin can implement the postInstall() function of that class to perform - * a health check, or any other desired operation. Our intention is to remove - * the pluginHealthCheck property in Zowe V3. - * - * @type {string} - * @memberof IImperativeConfig - */ - pluginHealthCheck?: string; - /** * If the project you are configuring is an Imperative plugin, * you can assign aliases to the group that is added when a user diff --git a/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts b/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts index dda75c20d4..0a0c4d45c8 100644 --- a/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts +++ b/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts @@ -224,7 +224,6 @@ export class PluginManagementFacility { */ public loadAllPluginCfgProps(): void { // Initialize the plugin.json file if needed - // TODO Skip creation of PMF_ROOT directory once it is deprecated by team config if (!existsSync(this.pmfConst.PLUGIN_JSON)) { if (!existsSync(this.pmfConst.PMF_ROOT)) { this.impLogger.debug("Creating PMF_ROOT directory");