diff --git a/.gitignore b/.gitignore index a6b1b1dd76..15811c88d6 100644 --- a/.gitignore +++ b/.gitignore @@ -64,15 +64,14 @@ fabric.properties !/.idea/artifacts/ /.idea/dictionaries/ /gui/BrightSide-win32-x64/ -**/lib/ typings/ /gui/BrightSide-linux-x64/ /gui/BrightSide-darwin-x64/ /brightside.iml /config/ **/docs/typedoc/ -**/__tests__/__results__/ -packages/zosunix/__tests__/__results__/ +__tests__/__results__/ +packages/**/__tests__/__results__/ /__tests__/tmpproj/ /__tests__/src/locales /.nyc_output @@ -96,7 +95,13 @@ imperative_debug.log *.bat -/packages/cli/lib +# we do not commit lib files +/__tests__/__packages__/cli-test-utils/lib/ +/packages/*/lib/ +/packages/imperative/__tests__/**/lib/ +# we DO commit pre-compiled plugin test modules +!/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/*/lib/ + /packages/cli/__tests__/__results__ /packages/cli/prebuilds zowe.config.json diff --git a/__tests__/setup.js b/__tests__/setup.js new file mode 100644 index 0000000000..881c084c24 --- /dev/null +++ b/__tests__/setup.js @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +module.exports = async function (globalConfig, projectConfig) { + require('events').EventEmitter.defaultMaxListeners = Infinity; +} \ No newline at end of file diff --git a/__tests__/teardown.js b/__tests__/teardown.js new file mode 100644 index 0000000000..96c8ae316d --- /dev/null +++ b/__tests__/teardown.js @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +module.exports = async function (globalConfig, projectConfig) { + process.exitCode = 0; // Thanks Node 20 +} \ No newline at end of file diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index fe53ccb33d..fad59a0c67 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -29,11 +29,9 @@ "glob": "^7.1.6", "husky": "^6.0.0", "jest": "^28.1.3", - "jest-cli": "^29.0.0", "jest-environment-node": "^28.0.0", "jest-environment-node-debug": "^2.0.0", "jest-junit": "^12.0.0", - "jest-sonar-reporter": "^2.0.0", "jest-stare": "^2.2.0", "js-yaml": "^4.1.0", "jsonfile": "^4.0.0", @@ -508,21 +506,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -9840,14 +9823,24 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001302", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001302.tgz", - "integrity": "sha512-YYTMO+tfwvgUN+1ZnRViE53Ma1S/oETg+J2lISsqi/ZTNThj3ZYBOKP2rHwJc37oCsPqAzJ3w2puZHn0xlLPPw==", + "version": "1.0.30001550", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001550.tgz", + "integrity": "sha512-p82WjBYIypO0ukTsd/FG3Xxs+4tFeaY9pfT4amQL8KWtYH7H9nYwReGAbMTJ0hsmRO8IfDtsS6p3ZWj8+1c2RQ==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "node_modules/cbor": { "version": "8.1.0", @@ -14254,1067 +14247,6 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "node_modules/jest-cli": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.2.1.tgz", - "integrity": "sha512-UIMD5aNqvPKpdlJSaeUAoLfxsh9TZvOkaMETx5qXnkboc317bcbb0eLHbIj8sFBHdcJAIAM+IRKnIU7Wi61MBw==", - "dev": true, - "dependencies": { - "@jest/core": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/@jest/console": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.2.1.tgz", - "integrity": "sha512-MF8Adcw+WPLZGBiNxn76DOuczG3BhODTcMlDCA4+cFi41OkaY/lyI0XUUhi73F88Y+7IHoGmD80pN5CtxQUdSw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/core": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.2.1.tgz", - "integrity": "sha512-kuLKYqnqgerXkBUwlHVxeSuhSnd+JMnMCLfU98bpacBSfWEJPegytDh3P2m15/JHzet32hGGld4KR4OzMb6/Tg==", - "dev": true, - "dependencies": { - "@jest/console": "^29.2.1", - "@jest/reporters": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.2.0", - "jest-config": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-resolve-dependencies": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "jest-watcher": "^29.2.1", - "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/@jest/environment": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.2.1.tgz", - "integrity": "sha512-EutqA7T/X6zFjw6mAWRHND+ZkTPklmIEWCNbmwX6uCmOrFrWaLbDZjA+gePHJx6fFMMRvNfjXcvzXEtz54KPlg==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "jest-mock": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-o14R2t2tHHHudwji43UKkzmmH49xfF5T++FQBK2tl88qwuBWQOcx7fNUYl+mA/9TPNAN0FkQ3usnpyS8FUwsvQ==", - "dev": true, - "dependencies": { - "expect": "^29.2.1", - "jest-snapshot": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/expect-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.2.1.tgz", - "integrity": "sha512-yr4aHNg5Z1CjKby5ozm7sKjgBlCOorlAoFcvrOQ/4rbZRfgZQdnmh7cth192PYIgiPZo2bBXvqdOApnAMWFJZg==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.2.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/fake-timers": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.2.1.tgz", - "integrity": "sha512-KWil+8fef7Uj/P/PTZlPKk1Pw117wAmr71VWFV8ZDtRtkwmTG8oY4IRf0Ss44J2y5CYRy8d/zLOhxyoGRENjvA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/globals": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.2.1.tgz", - "integrity": "sha512-Z4EejYPP1OPVq2abk1+9urAwJqkgw5jB2UJGlPjb5ZwzPQF8WLMcigKEfFzZb2OHhEVPP0RZD0/DbVTY1R6iQA==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/types": "^29.2.1", - "jest-mock": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/reporters": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.2.1.tgz", - "integrity": "sha512-sCsfUKM/yIF4nNed3e/rIgVIS58EiASGMDEPWqItfLZ9UO1ALW2ASDNJzdWkxEt0T8o2Ztj619G0KKrvK+McAw==", - "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@jridgewell/trace-mapping": "^0.3.15", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/source-map": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.2.0.tgz", - "integrity": "sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/test-result": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.2.1.tgz", - "integrity": "sha512-lS4+H+VkhbX6z64tZP7PAUwPqhwj3kbuEHcaLuaBuB+riyaX7oa1txe0tXgrFj5hRWvZKvqO7LZDlNWeJ7VTPA==", - "dev": true, - "dependencies": { - "@jest/console": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/test-sequencer": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.2.1.tgz", - "integrity": "sha512-O/pnk0/xGj3lxPVNwB6HREJ7AYvUdyP2xo/s14/9Dtf091HoOeyIhWLKQE/4HzB8lNQBMo6J5mg0bHz/uCWK7w==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.2.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/transform": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.2.1.tgz", - "integrity": "sha512-xup+iEuaIRSQabQaeqxaQyN0vg1Dctrp9oTObQsNf3sZEowTIa5cANYuoyi8Tqhg4GCqEVLTf18KW7ii0UeFVA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.2.1", - "@jridgewell/trace-mapping": "^0.3.15", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/types": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.2.1.tgz", - "integrity": "sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-cli/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/babel-jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.2.1.tgz", - "integrity": "sha512-gQJwArok0mqoREiCYhXKWOgUhElJj9DpnssW6GL8dG7ARYqHEhrM9fmPHTjdqEGRVXZAd6+imo3/Vwa8TjLcsw==", - "dev": true, - "dependencies": { - "@jest/transform": "^29.2.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.2.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/jest-cli/node_modules/babel-plugin-jest-hoist": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.2.0.tgz", - "integrity": "sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/babel-preset-jest": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.2.0.tgz", - "integrity": "sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^29.2.0", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/jest-cli/node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-cli/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-cli/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-cli/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/jest-cli/node_modules/diff-sequences": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.2.0.tgz", - "integrity": "sha512-413SY5JpYeSBZxmenGEmCVQ8mCgtFJF0w9PROdaS6z987XC2Pd2GOKqOITLtMftmyFZqgtCOb/QA7/Z3ZXfzIw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-BJtA754Fba0YWRWHgjKUMTA3ltWarKgITXHQnbZ2mTxTXC4yMQlR0FI7HkB3fJYkhWBf4qjNiqvg3LDtXCcVRQ==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-changed-files": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.2.0.tgz", - "integrity": "sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA==", - "dev": true, - "dependencies": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-circus": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.2.1.tgz", - "integrity": "sha512-W+ZQQ5ln4Db2UZNM4NJIeasnhCdDhSuYW4eLgNAUi0XiSSpF634Kc5wiPvGiHvTgXMFVn1ZgWIijqhi9+kLNLg==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "p-limit": "^3.1.0", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-config": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.2.1.tgz", - "integrity": "sha512-EV5F1tQYW/quZV2br2o88hnYEeRzG53Dfi6rSG3TZBuzGQ6luhQBux/RLlU5QrJjCdq3LXxRRM8F1LP6DN1ycA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.2.1", - "@jest/types": "^29.2.1", - "babel-jest": "^29.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.2.1", - "jest-environment-node": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/jest-diff": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.2.1.tgz", - "integrity": "sha512-gfh/SMNlQmP3MOUgdzxPOd4XETDJifADpT937fN1iUGz+9DgOu2eUPHH25JDkLVcLwwqxv3GzVyK4VBUr9fjfA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.2.0", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-docblock": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", - "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-each": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.2.1.tgz", - "integrity": "sha512-sGP86H/CpWHMyK3qGIGFCgP6mt+o5tu9qG4+tobl0LNdgny0aitLXs9/EBacLy3Bwqy+v4uXClqJgASJWcruYw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.2.1", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-environment-node": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.2.1.tgz", - "integrity": "sha512-PulFKwEMz6nTAdLUwglFKei3b/LixwlRiqTN6nvPE1JtrLtlnpd6LXnFI1NFHYJGlTmIWilMP2n9jEtPPKX50g==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-get-type": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", - "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-haste-map": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.2.1.tgz", - "integrity": "sha512-wF460rAFmYc6ARcCFNw4MbGYQjYkvjovb9GBT+W10Um8q5nHq98jD6fHZMDMO3tA56S8XnmNkM8GcA8diSZfnA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-cli/node_modules/jest-leak-detector": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.2.1.tgz", - "integrity": "sha512-1YvSqYoiurxKOJtySc+CGVmw/e1v4yNY27BjWTVzp0aTduQeA7pdieLiW05wTYG/twlKOp2xS/pWuikQEmklug==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-matcher-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.2.1.tgz", - "integrity": "sha512-hUTBh7H/Mnb6GTpihbLh8uF5rjAMdekfW/oZNXUMAXi7bbmym2HiRpzgqf/zzkjgejMrVAkPdVSQj+32enlUww==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-message-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.2.1.tgz", - "integrity": "sha512-Dx5nEjw9V8C1/Yj10S/8ivA8F439VS8vTq1L7hEgwHFn9ovSKNpYW/kwNh7UglaEgXO42XxzKJB+2x0nSglFVw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.2.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-mock": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.2.1.tgz", - "integrity": "sha512-NDphaY/GqyQpTfnTZiTqqpMaw4Z0I7XnB7yBgrT6IwYrLGxpOhrejYr4ANY4YvO2sEGdd8Tx/6D0+WLQy7/qDA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "@types/node": "*", - "jest-util": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-regex-util": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", - "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-resolve": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.2.1.tgz", - "integrity": "sha512-1dJTW76Z9622Viq4yRcwBuEXuzGtE9B2kdl05RC8Om/lAzac9uEgC+M8Q5osVidbuBPmxm8wSrcItYhca2ZAtQ==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-resolve-dependencies": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.2.1.tgz", - "integrity": "sha512-o3mUGX2j08usj1jIAIE8KmUVpqVAn54k80kI27ldbZf2oJn6eghhB6DvJxjrcH40va9CQgWTfU5f2Ag/MoUqgQ==", - "dev": true, - "dependencies": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-runner": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.2.1.tgz", - "integrity": "sha512-PojFI+uVhQ4u4YZKCN/a3yU0/l/pJJXhq1sW3JpCp8CyvGBYGddRFPKZ1WihApusxqWRTHjBJmGyPWv6Av2lWA==", - "dev": true, - "dependencies": { - "@jest/console": "^29.2.1", - "@jest/environment": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-leak-detector": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-resolve": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-util": "^29.2.1", - "jest-watcher": "^29.2.1", - "jest-worker": "^29.2.1", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-runtime": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.2.1.tgz", - "integrity": "sha512-PSQ880OoIW9y8E6/jjhGn3eQNgNc6ndMzCZaKqy357bv7FqCfSyYepu3yDC6Sp1Vkt+GhP2M/PVgldS2uZSFZg==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/globals": "^29.2.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-snapshot": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.2.1.tgz", - "integrity": "sha512-KZdLD7iEz5M4ZYd+ezZ/kk73z+DtNbk/yJ4Qx7408Vb0CCuclJIZPa/HmIwSsCfIlOBNcYTKufr7x/Yv47oYlg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.2.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "natural-compare": "^1.4.0", - "pretty-format": "^29.2.1", - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", - "integrity": "sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-validate": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.2.1.tgz", - "integrity": "sha512-DZVX5msG6J6DL5vUUw+++6LEkXUsPwB5R7fsfM7BXdz2Ipr0Ib046ak+8egrwAR++pvSM/5laxLK977ieIGxkQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "leven": "^3.1.0", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-watcher": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.2.1.tgz", - "integrity": "sha512-7jFaHUaRq50l4w/f6RuY713bvI5XskMmjWCE54NGYcY74fLkShS8LucXJke1QfGnwDSCoIqGnGGGKPwdaBYz2Q==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.2.1", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-worker": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.2.1.tgz", - "integrity": "sha512-ROHTZ+oj7sBrgtv46zZ84uWky71AoYi0vEV9CdEtc1FQunsoAGe5HbQmW76nI5QWdvECVPrSi1MCVUmizSavMg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "jest-util": "^29.2.1", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/pretty-format": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.2.1.tgz", - "integrity": "sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/jest-cli/node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/jest-cli/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/jest-cli/node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/jest-cli/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-cli/node_modules/yargs": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", - "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-cli/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/jest-cli/node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/jest-diff": { "version": "27.0.6", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.0.6.tgz", @@ -26075,15 +25007,6 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, - "@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -33996,9 +32919,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001302", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001302.tgz", - "integrity": "sha512-YYTMO+tfwvgUN+1ZnRViE53Ma1S/oETg+J2lISsqi/ZTNThj3ZYBOKP2rHwJc37oCsPqAzJ3w2puZHn0xlLPPw==", + "version": "1.0.30001550", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001550.tgz", + "integrity": "sha512-p82WjBYIypO0ukTsd/FG3Xxs+4tFeaY9pfT4amQL8KWtYH7H9nYwReGAbMTJ0hsmRO8IfDtsS6p3ZWj8+1c2RQ==", "dev": true }, "cbor": { @@ -37552,826 +36475,6 @@ } } }, - "jest-cli": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.2.1.tgz", - "integrity": "sha512-UIMD5aNqvPKpdlJSaeUAoLfxsh9TZvOkaMETx5qXnkboc317bcbb0eLHbIj8sFBHdcJAIAM+IRKnIU7Wi61MBw==", - "dev": true, - "requires": { - "@jest/core": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "dependencies": { - "@jest/console": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.2.1.tgz", - "integrity": "sha512-MF8Adcw+WPLZGBiNxn76DOuczG3BhODTcMlDCA4+cFi41OkaY/lyI0XUUhi73F88Y+7IHoGmD80pN5CtxQUdSw==", - "dev": true, - "requires": { - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.2.1.tgz", - "integrity": "sha512-kuLKYqnqgerXkBUwlHVxeSuhSnd+JMnMCLfU98bpacBSfWEJPegytDh3P2m15/JHzet32hGGld4KR4OzMb6/Tg==", - "dev": true, - "requires": { - "@jest/console": "^29.2.1", - "@jest/reporters": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.2.0", - "jest-config": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-resolve-dependencies": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "jest-watcher": "^29.2.1", - "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.2.1.tgz", - "integrity": "sha512-EutqA7T/X6zFjw6mAWRHND+ZkTPklmIEWCNbmwX6uCmOrFrWaLbDZjA+gePHJx6fFMMRvNfjXcvzXEtz54KPlg==", - "dev": true, - "requires": { - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "jest-mock": "^29.2.1" - } - }, - "@jest/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-o14R2t2tHHHudwji43UKkzmmH49xfF5T++FQBK2tl88qwuBWQOcx7fNUYl+mA/9TPNAN0FkQ3usnpyS8FUwsvQ==", - "dev": true, - "requires": { - "expect": "^29.2.1", - "jest-snapshot": "^29.2.1" - } - }, - "@jest/expect-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.2.1.tgz", - "integrity": "sha512-yr4aHNg5Z1CjKby5ozm7sKjgBlCOorlAoFcvrOQ/4rbZRfgZQdnmh7cth192PYIgiPZo2bBXvqdOApnAMWFJZg==", - "dev": true, - "requires": { - "jest-get-type": "^29.2.0" - } - }, - "@jest/fake-timers": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.2.1.tgz", - "integrity": "sha512-KWil+8fef7Uj/P/PTZlPKk1Pw117wAmr71VWFV8ZDtRtkwmTG8oY4IRf0Ss44J2y5CYRy8d/zLOhxyoGRENjvA==", - "dev": true, - "requires": { - "@jest/types": "^29.2.1", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" - } - }, - "@jest/globals": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.2.1.tgz", - "integrity": "sha512-Z4EejYPP1OPVq2abk1+9urAwJqkgw5jB2UJGlPjb5ZwzPQF8WLMcigKEfFzZb2OHhEVPP0RZD0/DbVTY1R6iQA==", - "dev": true, - "requires": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/types": "^29.2.1", - "jest-mock": "^29.2.1" - } - }, - "@jest/reporters": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.2.1.tgz", - "integrity": "sha512-sCsfUKM/yIF4nNed3e/rIgVIS58EiASGMDEPWqItfLZ9UO1ALW2ASDNJzdWkxEt0T8o2Ztj619G0KKrvK+McAw==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@jridgewell/trace-mapping": "^0.3.15", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - } - }, - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/source-map": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.2.0.tgz", - "integrity": "sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.15", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - } - }, - "@jest/test-result": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.2.1.tgz", - "integrity": "sha512-lS4+H+VkhbX6z64tZP7PAUwPqhwj3kbuEHcaLuaBuB+riyaX7oa1txe0tXgrFj5hRWvZKvqO7LZDlNWeJ7VTPA==", - "dev": true, - "requires": { - "@jest/console": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.2.1.tgz", - "integrity": "sha512-O/pnk0/xGj3lxPVNwB6HREJ7AYvUdyP2xo/s14/9Dtf091HoOeyIhWLKQE/4HzB8lNQBMo6J5mg0bHz/uCWK7w==", - "dev": true, - "requires": { - "@jest/test-result": "^29.2.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "slash": "^3.0.0" - } - }, - "@jest/transform": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.2.1.tgz", - "integrity": "sha512-xup+iEuaIRSQabQaeqxaQyN0vg1Dctrp9oTObQsNf3sZEowTIa5cANYuoyi8Tqhg4GCqEVLTf18KW7ii0UeFVA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.2.1", - "@jridgewell/trace-mapping": "^0.3.15", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - } - }, - "@jest/types": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.2.1.tgz", - "integrity": "sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "babel-jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.2.1.tgz", - "integrity": "sha512-gQJwArok0mqoREiCYhXKWOgUhElJj9DpnssW6GL8dG7ARYqHEhrM9fmPHTjdqEGRVXZAd6+imo3/Vwa8TjLcsw==", - "dev": true, - "requires": { - "@jest/transform": "^29.2.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.2.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - } - }, - "babel-plugin-jest-hoist": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.2.0.tgz", - "integrity": "sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-preset-jest": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.2.0.tgz", - "integrity": "sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^29.2.0", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true - }, - "diff-sequences": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.2.0.tgz", - "integrity": "sha512-413SY5JpYeSBZxmenGEmCVQ8mCgtFJF0w9PROdaS6z987XC2Pd2GOKqOITLtMftmyFZqgtCOb/QA7/Z3ZXfzIw==", - "dev": true - }, - "expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-BJtA754Fba0YWRWHgjKUMTA3ltWarKgITXHQnbZ2mTxTXC4yMQlR0FI7HkB3fJYkhWBf4qjNiqvg3LDtXCcVRQ==", - "dev": true, - "requires": { - "@jest/expect-utils": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1" - } - }, - "jest-changed-files": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.2.0.tgz", - "integrity": "sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA==", - "dev": true, - "requires": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - } - }, - "jest-circus": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.2.1.tgz", - "integrity": "sha512-W+ZQQ5ln4Db2UZNM4NJIeasnhCdDhSuYW4eLgNAUi0XiSSpF634Kc5wiPvGiHvTgXMFVn1ZgWIijqhi9+kLNLg==", - "dev": true, - "requires": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "p-limit": "^3.1.0", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-config": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.2.1.tgz", - "integrity": "sha512-EV5F1tQYW/quZV2br2o88hnYEeRzG53Dfi6rSG3TZBuzGQ6luhQBux/RLlU5QrJjCdq3LXxRRM8F1LP6DN1ycA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.2.1", - "@jest/types": "^29.2.1", - "babel-jest": "^29.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.2.1", - "jest-environment-node": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - } - }, - "jest-diff": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.2.1.tgz", - "integrity": "sha512-gfh/SMNlQmP3MOUgdzxPOd4XETDJifADpT937fN1iUGz+9DgOu2eUPHH25JDkLVcLwwqxv3GzVyK4VBUr9fjfA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^29.2.0", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - } - }, - "jest-docblock": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", - "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.2.1.tgz", - "integrity": "sha512-sGP86H/CpWHMyK3qGIGFCgP6mt+o5tu9qG4+tobl0LNdgny0aitLXs9/EBacLy3Bwqy+v4uXClqJgASJWcruYw==", - "dev": true, - "requires": { - "@jest/types": "^29.2.1", - "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.2.1", - "pretty-format": "^29.2.1" - } - }, - "jest-environment-node": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.2.1.tgz", - "integrity": "sha512-PulFKwEMz6nTAdLUwglFKei3b/LixwlRiqTN6nvPE1JtrLtlnpd6LXnFI1NFHYJGlTmIWilMP2n9jEtPPKX50g==", - "dev": true, - "requires": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" - } - }, - "jest-get-type": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", - "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", - "dev": true - }, - "jest-haste-map": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.2.1.tgz", - "integrity": "sha512-wF460rAFmYc6ARcCFNw4MbGYQjYkvjovb9GBT+W10Um8q5nHq98jD6fHZMDMO3tA56S8XnmNkM8GcA8diSZfnA==", - "dev": true, - "requires": { - "@jest/types": "^29.2.1", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - } - }, - "jest-leak-detector": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.2.1.tgz", - "integrity": "sha512-1YvSqYoiurxKOJtySc+CGVmw/e1v4yNY27BjWTVzp0aTduQeA7pdieLiW05wTYG/twlKOp2xS/pWuikQEmklug==", - "dev": true, - "requires": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - } - }, - "jest-matcher-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.2.1.tgz", - "integrity": "sha512-hUTBh7H/Mnb6GTpihbLh8uF5rjAMdekfW/oZNXUMAXi7bbmym2HiRpzgqf/zzkjgejMrVAkPdVSQj+32enlUww==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - } - }, - "jest-message-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.2.1.tgz", - "integrity": "sha512-Dx5nEjw9V8C1/Yj10S/8ivA8F439VS8vTq1L7hEgwHFn9ovSKNpYW/kwNh7UglaEgXO42XxzKJB+2x0nSglFVw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.2.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.2.1.tgz", - "integrity": "sha512-NDphaY/GqyQpTfnTZiTqqpMaw4Z0I7XnB7yBgrT6IwYrLGxpOhrejYr4ANY4YvO2sEGdd8Tx/6D0+WLQy7/qDA==", - "dev": true, - "requires": { - "@jest/types": "^29.2.1", - "@types/node": "*", - "jest-util": "^29.2.1" - } - }, - "jest-regex-util": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", - "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", - "dev": true - }, - "jest-resolve": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.2.1.tgz", - "integrity": "sha512-1dJTW76Z9622Viq4yRcwBuEXuzGtE9B2kdl05RC8Om/lAzac9uEgC+M8Q5osVidbuBPmxm8wSrcItYhca2ZAtQ==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.2.1.tgz", - "integrity": "sha512-o3mUGX2j08usj1jIAIE8KmUVpqVAn54k80kI27ldbZf2oJn6eghhB6DvJxjrcH40va9CQgWTfU5f2Ag/MoUqgQ==", - "dev": true, - "requires": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.2.1" - } - }, - "jest-runner": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.2.1.tgz", - "integrity": "sha512-PojFI+uVhQ4u4YZKCN/a3yU0/l/pJJXhq1sW3JpCp8CyvGBYGddRFPKZ1WihApusxqWRTHjBJmGyPWv6Av2lWA==", - "dev": true, - "requires": { - "@jest/console": "^29.2.1", - "@jest/environment": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-leak-detector": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-resolve": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-util": "^29.2.1", - "jest-watcher": "^29.2.1", - "jest-worker": "^29.2.1", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - } - }, - "jest-runtime": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.2.1.tgz", - "integrity": "sha512-PSQ880OoIW9y8E6/jjhGn3eQNgNc6ndMzCZaKqy357bv7FqCfSyYepu3yDC6Sp1Vkt+GhP2M/PVgldS2uZSFZg==", - "dev": true, - "requires": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/globals": "^29.2.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - } - }, - "jest-snapshot": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.2.1.tgz", - "integrity": "sha512-KZdLD7iEz5M4ZYd+ezZ/kk73z+DtNbk/yJ4Qx7408Vb0CCuclJIZPa/HmIwSsCfIlOBNcYTKufr7x/Yv47oYlg==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.2.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "natural-compare": "^1.4.0", - "pretty-format": "^29.2.1", - "semver": "^7.3.5" - } - }, - "jest-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", - "integrity": "sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==", - "dev": true, - "requires": { - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "jest-validate": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.2.1.tgz", - "integrity": "sha512-DZVX5msG6J6DL5vUUw+++6LEkXUsPwB5R7fsfM7BXdz2Ipr0Ib046ak+8egrwAR++pvSM/5laxLK977ieIGxkQ==", - "dev": true, - "requires": { - "@jest/types": "^29.2.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "leven": "^3.1.0", - "pretty-format": "^29.2.1" - } - }, - "jest-watcher": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.2.1.tgz", - "integrity": "sha512-7jFaHUaRq50l4w/f6RuY713bvI5XskMmjWCE54NGYcY74fLkShS8LucXJke1QfGnwDSCoIqGnGGGKPwdaBYz2Q==", - "dev": true, - "requires": { - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.2.1", - "string-length": "^4.0.1" - } - }, - "jest-worker": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.2.1.tgz", - "integrity": "sha512-ROHTZ+oj7sBrgtv46zZ84uWky71AoYi0vEV9CdEtc1FQunsoAGe5HbQmW76nI5QWdvECVPrSi1MCVUmizSavMg==", - "dev": true, - "requires": { - "@types/node": "*", - "jest-util": "^29.2.1", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "pretty-format": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.2.1.tgz", - "integrity": "sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, - "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", - "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "optional": true, - "peer": true - } - } - }, "jest-diff": { "version": "27.0.6", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.0.6.tgz", diff --git a/package.json b/package.json index 7963b66f39..a57e34add0 100644 --- a/package.json +++ b/package.json @@ -58,11 +58,9 @@ "glob": "^7.1.6", "husky": "^6.0.0", "jest": "^28.1.3", - "jest-cli": "^29.0.0", "jest-environment-node": "^28.0.0", "jest-environment-node-debug": "^2.0.0", "jest-junit": "^12.0.0", - "jest-sonar-reporter": "^2.0.0", "jest-stare": "^2.2.0", "js-yaml": "^4.1.0", "jsonfile": "^4.0.0", @@ -84,6 +82,8 @@ "disableSourceMapSupport": true } }, + "globalSetup": "./__tests__/setup.js", + "globalTeardown": "./__tests__/teardown.js", "watchPathIgnorePatterns": [ ".*jest-stare.*\\.js" ], @@ -95,7 +95,19 @@ "setupFilesAfterEnv": [ "./__tests__/beforeTests.js" ], - "testResultsProcessor": "jest-stare", + "transformIgnorePatterns": [ "^.+\\.js$", "^.+\\.json$" ], + "reporters": [ + "default", + ["jest-junit", { + "outputDirectory": "__tests__/__results__", + "reportTestSuiteErrors": true + }], + ["jest-stare", { + "resultDir": "__tests__/__results__/jest-stare", + "coverageLink": "../unit/coverage/lcov-report/index.html" + }], + ["github-actions", { "silent": false } ] + ], "transform": { "\\.ts$": "ts-jest" }, @@ -106,33 +118,16 @@ ], "testEnvironment": "node", "collectCoverageFrom": [ - "packages/**/*.ts", - "!**/__tests__/**", - "!packages/**/doc/I*.ts", - "!**/main.ts" + "packages/*/src/**/*.ts", + "!packages/*/src/**/doc/I*.ts", + "!packages/cli/src/main.ts" ], - "collectCoverage": false, "coverageReporters": [ "json", "lcov", "text", "cobertura" ], - "coverageDirectory": "/__tests__/__results__/unit/coverage" - }, - "jestSonar": { - "reportPath": "__tests__/__results__/jest-sonar" - }, - "jest-stare": { - "resultDir": "__tests__/__results__/jest-stare", - "coverageLink": "../unit/coverage/lcov-report/index.html", - "additionalResultsProcessors": [ - "jest-junit", - "jest-sonar-reporter" - ] - }, - "jest-junit": { - "outputDirectory": "__tests__/__results__", - "reportTestSuiteErrors": true + "coverageDirectory": "__tests__/__results__/unit/coverage" } } diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index c25ea61138..c5c45fede9 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Imperative package will be documented in this file. +## Recent Changes + +- BugFix: Fix for `AbstactRestClient` failing to return when streaming a large dataset or USS file [#1805](https://github.com/zowe/zowe-cli/issues/1805), [#1813](https://github.com/zowe/zowe-cli/issues/1813), and [#1824](https://github.com/zowe/zowe-cli/issues/1824) + ## `5.18.2` - BugFix: Fixed normalization on stream chunk boundaries [#1815](https://github.com/zowe/zowe-cli/issues/1815) diff --git a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/Cmd.cli.respond.with-data-object.integration.test.ts b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/Cmd.cli.respond.with-data-object.integration.test.ts index ff21bae4ee..c56c5b9d27 100644 --- a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/Cmd.cli.respond.with-data-object.integration.test.ts +++ b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/Cmd.cli.respond.with-data-object.integration.test.ts @@ -45,7 +45,8 @@ describe("cmd-cli respond with-data-object", () => { TEST_ENVIRONMENT.workingDir); expect(response.status).toBe(1); expect(response.stdout.toString()).toBe(""); - expect(response.stderr.toString()).toMatchSnapshot(); + const regex = /(Unexpected token i in JSON at position 0)|(Unexpected token 'i', "invalid json!" is not valid JSON)/; + expect(response.stderr.toString()).toMatch(regex); }); it("should allow us to formulate a response object with a data object and produce JSON", async () => { diff --git a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/Cmd.cli.respond.with-syntax-errors.integration.test.ts b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/Cmd.cli.respond.with-syntax-errors.integration.test.ts index 8a7e7cd77b..f4ca5be96d 100644 --- a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/Cmd.cli.respond.with-syntax-errors.integration.test.ts +++ b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/Cmd.cli.respond.with-syntax-errors.integration.test.ts @@ -30,6 +30,8 @@ describe("cmd-cli respond with-syntax-errors", () => { TEST_ENVIRONMENT.workingDir); expect(response.stdout.toString()).toBe(""); expect(response.status).toBe(1); - expect(response.stderr.toString()).toMatchSnapshot(); + + const regex = /(Unexpected token d in JSON at position 1)|(Expected property name or '}' in JSON at position 1)/; + expect(response.stderr.toString()).toMatch(regex); }); }); diff --git a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/__snapshots__/Cmd.cli.respond.with-data-object.integration.test.ts.snap b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/__snapshots__/Cmd.cli.respond.with-data-object.integration.test.ts.snap index 2d2b7ad10c..a2fedd27c5 100644 --- a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/__snapshots__/Cmd.cli.respond.with-data-object.integration.test.ts.snap +++ b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/__snapshots__/Cmd.cli.respond.with-data-object.integration.test.ts.snap @@ -31,22 +31,6 @@ Use \\"cmd-cli respond with-data-object --help\\" to view command description, u " `; -exports[`cmd-cli respond with-data-object should display a syntax error if the JSON object passed is not valid 1`] = ` -" -Syntax Error: -Invalid JSON string supplied for the following option: ---data-object - -You specified: -invalid json! - -JSON parsing failed with the following error: -Unexpected token i in JSON at position 0 - -Use \\"cmd-cli respond with-data-object --help\\" to view command description, usage, and options. -" -`; - exports[`cmd-cli respond with-data-object should display the help 1`] = ` " COMMAND NAME diff --git a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/__snapshots__/Cmd.cli.respond.with-syntax-errors.integration.test.ts.snap b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/__snapshots__/Cmd.cli.respond.with-syntax-errors.integration.test.ts.snap deleted file mode 100644 index f150d691d9..0000000000 --- a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/respond/__snapshots__/Cmd.cli.respond.with-syntax-errors.integration.test.ts.snap +++ /dev/null @@ -1,126 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cmd-cli respond with-syntax-errors should produce a bunch of syntax errors 1`] = ` -" -Syntax Error: -No value specified for option: ---empty-value - -This option requires a value of type: -string - -Option Description: -This will cause an empty value error Lorem ipsum dolor sit amet, consectetur -adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna -aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi -ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in -voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint -occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim -id est laborum. - -Syntax Error: -You must specify one of the following options for this command: -[--must-specify-one-of-abc-maybe-a, --must-specify-one-of-abc-maybe-b, --must-specify-one-of-abc-maybe-c] - -Syntax Error: -You may specify only one of the following options for this command: -[--only-specify-one-of-abc-maybe-a, --only-specify-one-of-abc-maybe-b] - -You specified the following: -[--only-specify-one-of-abc-maybe-a, --only-specify-one-of-abc-maybe-b] - -Syntax Error: -Invalid format specified for positional option: -positionalparams - -You specified: -XYZ - -Option must match the following regular expression: -ABC - -Syntax Error: -Missing Required Option: ---long-option (--lo) - -Option Description: -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu -fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in -culpa qui officia deserunt mollit anim id est laborum. - -Syntax Error: -Invalid JSON string supplied for the following option: ---json-option - -You specified: -{das342112309432 - -JSON parsing failed with the following error: -Unexpected token d in JSON at position 1 - -Syntax Error: -If you do not specify the following option: ---absence-impl-a - -You must specify one of these options: -[--absence-impl-b, --absence-impl-c] - -Syntax Error: -Invalid value specified for option: ---value-range - -You specified: -blah - -The value must be a number - -Syntax Error: -Invalid file path specified for option: ---fake-file - -You specified: -\\"fakeeeeeeeeeeeeee\\" - -The file does not exist - -Syntax Error: -Invalid value length for option: ---string-length-over-max - -You specified a string of length 13: -asldkfjasdlfj - -The length must be between 1 and 3 (inclusive) - -Syntax Error: -You cannot specify the following option multiple times: ---requires-another - -Syntax Error: -If you specify the following option: ---requires-another - -You must also specify: ---required-by-another - -Syntax Error: -The following options conflict (mutually exclusive): ---conflicts-with ---conflicts-with-another - -Syntax Error: -Invalid value specified for option: ---allowable-error - -You specified: -hello - -The value must match one of the following regular expressions: -[ '^ABC$', '^123$' ]. - -Use \\"cmd-cli respond with-syntax-errors --help\\" to view command description, usage, and options. -" -`; diff --git a/packages/imperative/__tests__/src/example_clis/with_experimental/__integration__/ExperimentalExample.spec.ts b/packages/imperative/__tests__/src/example_clis/with_experimental/__integration__/ExperimentalExample.integration.spec.ts similarity index 100% rename from packages/imperative/__tests__/src/example_clis/with_experimental/__integration__/ExperimentalExample.spec.ts rename to packages/imperative/__tests__/src/example_clis/with_experimental/__integration__/ExperimentalExample.integration.spec.ts diff --git a/packages/imperative/__tests__/src/example_clis/with_profiles/__integration__/AutoGeneratedProfileCommands.spec.ts b/packages/imperative/__tests__/src/example_clis/with_profiles/__integration__/AutoGeneratedProfileCommands.integration.spec.ts similarity index 95% rename from packages/imperative/__tests__/src/example_clis/with_profiles/__integration__/AutoGeneratedProfileCommands.spec.ts rename to packages/imperative/__tests__/src/example_clis/with_profiles/__integration__/AutoGeneratedProfileCommands.integration.spec.ts index c6d5388fee..4487177c91 100644 --- a/packages/imperative/__tests__/src/example_clis/with_profiles/__integration__/AutoGeneratedProfileCommands.spec.ts +++ b/packages/imperative/__tests__/src/example_clis/with_profiles/__integration__/AutoGeneratedProfileCommands.integration.spec.ts @@ -66,20 +66,27 @@ describe("We should provide auto-generated profile commands for convenience, " + it("If we turn off auto-generating profile commands, " + "commands should NOT be generated for each profile type", () => { const cliBinNoCommands = __dirname + "/../ProfileExampleCLINoAutoGen.ts"; - T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "--help"], ["Error"], + T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "--help"], + ["Command failed due to improper syntax", "Unknown group: profiles"], "stderr", false, this); // validate commands have been generated for each type of profile - T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "create"], ["Error"], + T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "create"], + ["Command failed due to improper syntax", "Unknown group: profiles"], "stderr", false, this); - T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "create", profileTypeA], ["Error"], + T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "create", profileTypeA], + ["Command failed due to improper syntax", "Unknown group: profiles"], "stderr", false, this); - T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "set"], ["Error"], + T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "set"], + ["Command failed due to improper syntax", "Unknown group: profiles"], "stderr", false, this); - T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "list"], ["Error"], + T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "list"], + ["Command failed due to improper syntax", "Unknown group: profiles"], "stderr", false, this); - T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "delete"], ["Error"], + T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "delete"], + ["Command failed due to improper syntax", "Unknown group: profiles"], "stderr", false, this); - T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "update"], ["Error"], + T.findExpectedOutputInCommand(cliBinNoCommands, ["profiles", "update"], + ["Command failed due to improper syntax", "Unknown group: profiles"], "stderr", false, this); }); diff --git a/packages/imperative/__tests__/src/packages/imperative/__integration__/PluginManagementFacility.spec.ts b/packages/imperative/__tests__/src/packages/imperative/__integration__/PluginManagementFacility.integration.spec.ts similarity index 100% rename from packages/imperative/__tests__/src/packages/imperative/__integration__/PluginManagementFacility.spec.ts rename to packages/imperative/__tests__/src/packages/imperative/__integration__/PluginManagementFacility.integration.spec.ts diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/suites/UsingPlugins.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/suites/UsingPlugins.ts index d9fd00fd90..a83a30019f 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/suites/UsingPlugins.ts +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/suites/UsingPlugins.ts @@ -232,9 +232,7 @@ describe("Using a Plugin", () => { cmd = pluginName + " imperative-error"; result = T.executeTestCLICommand(cliBin, this, cmd.split(" ")); expect(result.stdout).toContain("Command ERR called!"); - expect(result.stderr).toContain("Command Error:"); expect(result.stderr).toContain("Plugin threw an imperative error!"); - expect(result.stderr).toContain("Error Details:"); expect(result.stderr).toContain("More details!"); diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.d.ts new file mode 100644 index 0000000000..07bdf06834 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.d.ts @@ -0,0 +1,12 @@ +/* +* 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. +* +*/ + +export * from "./sample-plugin"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.js new file mode 100644 index 0000000000..78d995df6d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +// import { SamplePlugin } from './sample-plugin'; +// import { IPluginMain, ICommandDefinition } from 'imperative'; +// import chalk from 'chalk'; +// import {join} from "path"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.js.map new file mode 100644 index 0000000000..d4d2a32e02 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,oEAAoE;AACpE,6BAA6B;AAC7B,6BAA6B"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts new file mode 100644 index 0000000000..582325e640 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts @@ -0,0 +1,19 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +/** + * Defining handler to be use for the 'bar' command. + */ +export default class BarHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.js new file mode 100644 index 0000000000..ce5d45ad93 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.js @@ -0,0 +1,22 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'bar' command. + */ +class BarHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("@TODO Complete this command: bar"); + }); + } +} +exports.default = BarHandler; +//# sourceMappingURL=bar.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map new file mode 100644 index 0000000000..a1876fe264 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bar.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/bar/bar.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts new file mode 100644 index 0000000000..622d44f45a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts @@ -0,0 +1,15 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +export default class FooHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.js new file mode 100644 index 0000000000..ca9a85c2ae --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.js @@ -0,0 +1,19 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class FooHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("Invoked sample-plugin foo handler"); + }); + } +} +exports.default = FooHandler; +//# sourceMappingURL=foo.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map new file mode 100644 index 0000000000..f4e1b7616d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"foo.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/foo/foo.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YAEjD,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,6BAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.d.ts new file mode 100644 index 0000000000..af95b3191b --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.d.ts @@ -0,0 +1,16 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +export default class HealthCheckHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.js new file mode 100644 index 0000000000..9254a82bef --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.js @@ -0,0 +1,20 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class HealthCheckHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Invoked health check handler"); + params.response.build(); + }); + } +} +exports.default = HealthCheckHandler; +//# sourceMappingURL=healthCheck.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.js.map new file mode 100644 index 0000000000..3264cfa41d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/healthCheck.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../../src/sample-plugin/healthCheck.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YAE5C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,qCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.d.ts new file mode 100644 index 0000000000..6e3215bd99 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.d.ts @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +export * from "./healthCheck.handler"; +export * from "./cmd/foo/foo.handler"; +export * from "./cmd/bar/bar.handler"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.js new file mode 100644 index 0000000000..4f4f0f7ccd --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.js @@ -0,0 +1,9 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./healthCheck.handler")); +__export(require("./cmd/foo/foo.handler")); +__export(require("./cmd/bar/bar.handler")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.js.map new file mode 100644 index 0000000000..b8b70b056a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/chained_handler_plugin/lib/sample-plugin/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sample-plugin/index.ts"],"names":[],"mappings":";;;;;AACA,2CAAsC;AACtC,2CAAsC;AACtC,2CAAsC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.d.ts new file mode 100644 index 0000000000..07bdf06834 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.d.ts @@ -0,0 +1,12 @@ +/* +* 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. +* +*/ + +export * from "./sample-plugin"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.js new file mode 100644 index 0000000000..78d995df6d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +// import { SamplePlugin } from './sample-plugin'; +// import { IPluginMain, ICommandDefinition } from 'imperative'; +// import chalk from 'chalk'; +// import {join} from "path"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.js.map new file mode 100644 index 0000000000..d4d2a32e02 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,oEAAoE;AACpE,6BAA6B;AAC7B,6BAA6B"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts new file mode 100644 index 0000000000..582325e640 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts @@ -0,0 +1,19 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +/** + * Defining handler to be use for the 'bar' command. + */ +export default class BarHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.js new file mode 100644 index 0000000000..ce5d45ad93 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.js @@ -0,0 +1,22 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'bar' command. + */ +class BarHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("@TODO Complete this command: bar"); + }); + } +} +exports.default = BarHandler; +//# sourceMappingURL=bar.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map new file mode 100644 index 0000000000..a1876fe264 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bar.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/bar/bar.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts new file mode 100644 index 0000000000..622d44f45a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts @@ -0,0 +1,15 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +export default class FooHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.js new file mode 100644 index 0000000000..ca9a85c2ae --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.js @@ -0,0 +1,19 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class FooHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("Invoked sample-plugin foo handler"); + }); + } +} +exports.default = FooHandler; +//# sourceMappingURL=foo.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map new file mode 100644 index 0000000000..f4e1b7616d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"foo.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/foo/foo.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YAEjD,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,6BAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.d.ts new file mode 100644 index 0000000000..af95b3191b --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.d.ts @@ -0,0 +1,16 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +export default class HealthCheckHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.js new file mode 100644 index 0000000000..9254a82bef --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.js @@ -0,0 +1,20 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class HealthCheckHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Invoked health check handler"); + params.response.build(); + }); + } +} +exports.default = HealthCheckHandler; +//# sourceMappingURL=healthCheck.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.js.map new file mode 100644 index 0000000000..3264cfa41d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/healthCheck.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../../src/sample-plugin/healthCheck.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YAE5C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,qCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.d.ts new file mode 100644 index 0000000000..6e3215bd99 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.d.ts @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +export * from "./healthCheck.handler"; +export * from "./cmd/foo/foo.handler"; +export * from "./cmd/bar/bar.handler"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.js new file mode 100644 index 0000000000..4f4f0f7ccd --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.js @@ -0,0 +1,9 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./healthCheck.handler")); +__export(require("./cmd/foo/foo.handler")); +__export(require("./cmd/bar/bar.handler")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.js.map new file mode 100644 index 0000000000..b8b70b056a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin/lib/sample-plugin/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sample-plugin/index.ts"],"names":[],"mappings":";;;;;AACA,2CAAsC;AACtC,2CAAsC;AACtC,2CAAsC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.d.ts new file mode 100644 index 0000000000..07bdf06834 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.d.ts @@ -0,0 +1,12 @@ +/* +* 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. +* +*/ + +export * from "./sample-plugin"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.js new file mode 100644 index 0000000000..78d995df6d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +// import { SamplePlugin } from './sample-plugin'; +// import { IPluginMain, ICommandDefinition } from 'imperative'; +// import chalk from 'chalk'; +// import {join} from "path"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.js.map new file mode 100644 index 0000000000..d4d2a32e02 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,oEAAoE;AACpE,6BAA6B;AAC7B,6BAA6B"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.d.ts new file mode 100644 index 0000000000..ecc751945c --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.d.ts @@ -0,0 +1,18 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +/** + * Defining handler to be use for the 'bar' command. + */ +export default class BarHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.js new file mode 100644 index 0000000000..ce5d45ad93 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.js @@ -0,0 +1,22 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'bar' command. + */ +class BarHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("@TODO Complete this command: bar"); + }); + } +} +exports.default = BarHandler; +//# sourceMappingURL=bar.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.js.map new file mode 100644 index 0000000000..a1876fe264 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/bar/bar.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bar.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/bar/bar.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.d.ts new file mode 100644 index 0000000000..622d44f45a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.d.ts @@ -0,0 +1,15 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +export default class FooHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.js new file mode 100644 index 0000000000..ca9a85c2ae --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.js @@ -0,0 +1,19 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class FooHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("Invoked sample-plugin foo handler"); + }); + } +} +exports.default = FooHandler; +//# sourceMappingURL=foo.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.js.map new file mode 100644 index 0000000000..f4e1b7616d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/cmd/foo/foo.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"foo.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/foo/foo.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YAEjD,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,6BAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.d.ts new file mode 100644 index 0000000000..d87293706b --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.d.ts @@ -0,0 +1,15 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +export default class HealthCheckHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.js new file mode 100644 index 0000000000..9254a82bef --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.js @@ -0,0 +1,20 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class HealthCheckHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Invoked health check handler"); + params.response.build(); + }); + } +} +exports.default = HealthCheckHandler; +//# sourceMappingURL=healthCheck.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.js.map new file mode 100644 index 0000000000..3264cfa41d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/healthCheck.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../../src/sample-plugin/healthCheck.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YAE5C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,qCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.d.ts new file mode 100644 index 0000000000..6e3215bd99 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.d.ts @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +export * from "./healthCheck.handler"; +export * from "./cmd/foo/foo.handler"; +export * from "./cmd/bar/bar.handler"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.js new file mode 100644 index 0000000000..4f4f0f7ccd --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.js @@ -0,0 +1,9 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./healthCheck.handler")); +__export(require("./cmd/foo/foo.handler")); +__export(require("./cmd/bar/bar.handler")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.js.map new file mode 100644 index 0000000000..b8b70b056a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2/lib/sample-plugin/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sample-plugin/index.ts"],"names":[],"mappings":";;;;;AACA,2CAAsC;AACtC,2CAAsC;AACtC,2CAAsC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.d.ts new file mode 100644 index 0000000000..07bdf06834 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.d.ts @@ -0,0 +1,12 @@ +/* +* 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. +* +*/ + +export * from "./sample-plugin"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.js new file mode 100644 index 0000000000..aa219d8f2a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.js.map new file mode 100644 index 0000000000..1ed2df62ca --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.d.ts new file mode 100644 index 0000000000..ecc751945c --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.d.ts @@ -0,0 +1,18 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +/** + * Defining handler to be use for the 'bar' command. + */ +export default class BarHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.js new file mode 100644 index 0000000000..59718d22de --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.js @@ -0,0 +1,25 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// const imperative_cli_1 = require("imperative"); +/** + * Defining handler to be use for the 'bar' command. + */ +class BarHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + // const impFileLogger = imperative_cli_1.Logger.getImperativeLogger(); + // impFileLogger.debug("Invoked normal-plugin-3 bar handler"); + params.response.console.log("You have executed the Bar command!"); + }); + } +} +exports.default = BarHandler; +//# sourceMappingURL=bar.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.js.map new file mode 100644 index 0000000000..7d4e2abfd4 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/bar/bar.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bar.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/bar/bar.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mDAA2E;AAE3E;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,MAAM,aAAa,GAAW,uBAAM,CAAC,mBAAmB,EAAE,CAAC;YAC3D,aAAa,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACzD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QACpE,CAAC;KAAA;CACF;AAND,6BAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.d.ts new file mode 100644 index 0000000000..622d44f45a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.d.ts @@ -0,0 +1,15 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +export default class FooHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.js new file mode 100644 index 0000000000..b5a3ca2d8e --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.js @@ -0,0 +1,25 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// const imperative_cli_1 = require("imperative"); +class FooHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + // const impFileLogger = imperative_cli_1.Logger.getImperativeLogger(); + const profile = params.profiles.get("foo"); + const successMsg = "You executed the Foo command with size = " + + profile.size + " and duration = " + profile.duration; + // impFileLogger.debug(successMsg); + params.response.console.log(successMsg); + }); + } +} +exports.default = FooHandler; +//# sourceMappingURL=foo.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.js.map new file mode 100644 index 0000000000..cf95112e2d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/foo/foo.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"foo.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/foo/foo.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mDAA2E;AAE3E;IACe,OAAO,CAAC,MAA0B;;YAC7C,MAAM,aAAa,GAAW,uBAAM,CAAC,mBAAmB,EAAE,CAAC;YAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAE3C,MAAM,UAAU,GAAG,2CAA2C;gBAC5D,OAAO,CAAC,IAAI,GAAG,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC;YACvD,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC1C,CAAC;KAAA;CACF;AAVD,6BAUC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.d.ts new file mode 100644 index 0000000000..d49223a05e --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.d.ts @@ -0,0 +1,13 @@ +/* +* 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. +* +*/ + +import { ICommandDefinition } from "@zowe/imperative"; +export declare const GlobCmd1Definition: ICommandDefinition; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.js new file mode 100644 index 0000000000..42c7826ad6 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GlobCmd1Definition = { + name: "globcmd1", + summary: "First command created by globs", + description: "The first of 2 commands created by globs.", + type: "command", + handler: "./lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler" +}; +//# sourceMappingURL=globcmd1.definition.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.js.map new file mode 100644 index 0000000000..7759d88c3b --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"globcmd1.definition.js","sourceRoot":"","sources":["../../../../../src/sample-plugin/cmd/globgroup/globcmd1/globcmd1.definition.ts"],"names":[],"mappings":";;AACa,QAAA,kBAAkB,GAAuB;IAClD,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,gCAAgC;IACzC,WAAW,EAAE,2CAA2C;IACxD,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,6DAA6D;CACzE,CAAC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.d.ts new file mode 100644 index 0000000000..56108fd594 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.d.ts @@ -0,0 +1,18 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +/** + * Defining handler to be use for the 'bar' command. + */ +export default class GlobCmd1Handler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.js new file mode 100644 index 0000000000..c1a4cc8a1a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.js @@ -0,0 +1,25 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const imperative_cli_1 = require("imperative"); +/** + * Defining handler to be use for the 'bar' command. + */ +class GlobCmd1Handler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + const impFileLogger = imperative_cli_1.Logger.getImperativeLogger(); + impFileLogger.debug("Invoked sample-plugin globcmd1 handler"); + params.response.console.log("You have executed the globcmd1 command. It's definition was processed by globs."); + }); + } +} +exports.default = GlobCmd1Handler; +//# sourceMappingURL=globcmd1.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.js.map new file mode 100644 index 0000000000..43919f82bb --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"globcmd1.handler.js","sourceRoot":"","sources":["../../../../../src/sample-plugin/cmd/globgroup/globcmd1/globcmd1.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mDAA2E;AAE3E;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,MAAM,aAAa,GAAW,uBAAM,CAAC,mBAAmB,EAAE,CAAC;YAC3D,aAAa,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC9D,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iFAAiF,CAAC,CAAC;QACjH,CAAC;KAAA;CACF;AAND,kCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.d.ts new file mode 100644 index 0000000000..47cdae63e9 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.d.ts @@ -0,0 +1,13 @@ +/* +* 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. +* +*/ + +import { ICommandDefinition } from "@zowe/imperative"; +export declare const GlobCmd2Definition: ICommandDefinition; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.js new file mode 100644 index 0000000000..831d2371e4 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GlobCmd2Definition = { + name: "globcmd2", + summary: "Second command created by globs", + description: "The second of 2 commands created by globs.", + type: "command", + handler: "./lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler" +}; +//# sourceMappingURL=globcmd2.definition.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.js.map new file mode 100644 index 0000000000..7ac2b2614c --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"globcmd2.definition.js","sourceRoot":"","sources":["../../../../../src/sample-plugin/cmd/globgroup/globcmd2/globcmd2.definition.ts"],"names":[],"mappings":";;AACa,QAAA,kBAAkB,GAAuB;IAClD,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,iCAAiC;IAC1C,WAAW,EAAE,4CAA4C;IACzD,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,6DAA6D;CACzE,CAAC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.d.ts new file mode 100644 index 0000000000..86f5886c25 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.d.ts @@ -0,0 +1,18 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +/** + * Defining handler to be use for the 'bar' command. + */ +export default class GlobCmd2Handler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.js new file mode 100644 index 0000000000..1f40f53f53 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.js @@ -0,0 +1,25 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const imperative_cli_1 = require("imperative"); +/** + * Defining handler to be use for the 'bar' command. + */ +class GlobCmd2Handler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + const impFileLogger = imperative_cli_1.Logger.getImperativeLogger(); + impFileLogger.debug("Invoked sample-plugin globcmd2 handler"); + params.response.console.log("You have executed the globcmd2 command. It's definition was processed by globs."); + }); + } +} +exports.default = GlobCmd2Handler; +//# sourceMappingURL=globcmd2.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.js.map new file mode 100644 index 0000000000..565f9b8bcb --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"globcmd2.handler.js","sourceRoot":"","sources":["../../../../../src/sample-plugin/cmd/globgroup/globcmd2/globcmd2.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mDAA2E;AAE3E;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,MAAM,aAAa,GAAW,uBAAM,CAAC,mBAAmB,EAAE,CAAC;YAC3D,aAAa,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC9D,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iFAAiF,CAAC,CAAC;QACjH,CAAC;KAAA;CACF;AAND,kCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.d.ts new file mode 100644 index 0000000000..0ebf63ff74 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.d.ts @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +import { ICommandDefinition } from "@zowe/imperative"; +declare const GlobGroupDefinition: ICommandDefinition; +export = GlobGroupDefinition; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.js new file mode 100644 index 0000000000..533fb2674f --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.js @@ -0,0 +1,13 @@ +"use strict"; +const globcmd1_definition_1 = require("./globcmd1/globcmd1.definition"); +const globcmd2_definition_1 = require("./globcmd2/globcmd2.definition"); +const GlobGroupDefinition = { + name: "globgroup", + summary: "The command group definition of commands formed from globs", + description: "[actions] in Brightside are groups of commands.\n" + + "For this action (\"globgroup\") we include 2 simple commands formed from globs.", + type: "group", + children: [globcmd1_definition_1.GlobCmd1Definition, globcmd2_definition_1.GlobCmd2Definition] +}; +module.exports = GlobGroupDefinition; +//# sourceMappingURL=globgroup.definition.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.js.map new file mode 100644 index 0000000000..f8e00bb6ef --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/cmd/globgroup/globgroup.definition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"globgroup.definition.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/globgroup/globgroup.definition.ts"],"names":[],"mappings":";AACA,wEAAoE;AACpE,wEAAoE;AAEpE,MAAM,mBAAmB,GAAuB;IAC9C,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,4DAA4D;IACrE,WAAW,EAAE,mDAAmD;QAC9D,iFAAiF;IACnF,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,wCAAkB,EAAE,wCAAkB,CAAC;CACnD,CAAC;AAEF,iBAAS,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.d.ts new file mode 100644 index 0000000000..18bda355ce --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.d.ts @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +import { IImperativeConfig } from "@zowe/imperative"; +declare const config: IImperativeConfig; +export = config; 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 new file mode 100644 index 0000000000..f336c1c779 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.js @@ -0,0 +1,55 @@ +"use strict"; +const FooProfileConfig_1 = require("./profiles/FooProfileConfig"); +const BarProfileConfig_1 = require("./profiles/BarProfileConfig"); +const config = { + /** + * You can use both "definitions" and commandModuleGlobs -- + * the list of commands will be combined between the two + */ + definitions: [ + { + name: "foo", + description: "dummy foo command", + type: "command", + handler: "./lib/sample-plugin/cmd/foo/foo.handler", + profile: { + required: ["foo"] + } + }, + { + name: "bar", + description: "dummy bar command", + type: "command", + handler: "./lib/sample-plugin/cmd/bar/bar.handler", + profile: { + required: ["bar"] + } + } + ], + pluginHealthCheck: "./lib/sample-plugin/healthCheck.handler", + commandModuleGlobs: ["**/cmd/*/*.definition!(.d).*s"], + rootCommandDescription: "Test plugin with globs and profiles", + pluginBaseCliVersion: "^0.4.0-1", + defaultHome: "../../../../../../__results__/.pluginstest", + productDisplayName: "Sample CLI", + primaryTextColor: "blue", + name: "normal-plugin-3", + logging: { + additionalLogging: [ + { + apiName: "another", + }, + { + apiName: "yetAnother", + logFile: "a/different/place/here.log", + } + ] + }, + secondaryTextColor: "yellow", + profiles: [FooProfileConfig_1.FooProfileConfig, BarProfileConfig_1.BarProfileConfig], + progressBarSpinner: ".oO0Oo.", + experimentalCommandDescription: "These commands may damage your fruits." + // autoGenerateProfileCommands: false +}; +module.exports = config; +//# sourceMappingURL=configuration.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.js.map new file mode 100644 index 0000000000..e01f482294 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/configuration.js.map @@ -0,0 +1 @@ +{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/sample-plugin/configuration.ts"],"names":[],"mappings":";AA0BA,kEAA6D;AAC7D,kEAA6D;AAE7D,MAAM,MAAM,GAAsB;IAChC;;;OAGG;IACH,WAAW,EAAE;QACX;YACE,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,yCAAyC;YAClD,OAAO,EAAE;gBACP,QAAQ,EAAE,CAAC,KAAK,CAAC;aAClB;SACF;QACD;YACE,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,yCAAyC;YAClD,OAAO,EAAE;gBACP,QAAQ,EAAE,CAAC,KAAK,CAAC;aAClB;SACF;KACF;IACD,kBAAkB,EAAE,CAAC,+BAA+B,CAAC;IACrD,iBAAiB,EAAE,yCAAyC;IAC5D,sBAAsB,EAAE,0BAA0B;IAClD,oBAAoB,EAAE,UAAU;IAChC,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,eAAe;IAC5B,kBAAkB,EAAE,YAAY;IAChC,gBAAgB,EAAE,MAAM;IACxB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE;QACP,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,SAAS;aACnB;YACD;gBACE,OAAO,EAAE,YAAY;gBACrB,OAAO,EAAE,4BAA4B;aACtC;SACF;KACF;IACD,kBAAkB,EAAE,QAAQ;IAC5B,QAAQ,EAAE,CAAC,mCAAgB,EAAE,mCAAgB,CAAC;IAC9C,kBAAkB,EAAE,SAAS;IAC7B,8BAA8B,EAAE,wCAAwC;IACxE,qCAAqC;CACtC,CAAC;AAEF,iBAAS,MAAM,CAAC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.d.ts new file mode 100644 index 0000000000..d87293706b --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.d.ts @@ -0,0 +1,15 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +export default class HealthCheckHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.js new file mode 100644 index 0000000000..414a67deca --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.js @@ -0,0 +1,22 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const imperative_cli_1 = require("imperative"); +class HealthCheckHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + const impFileLogger = imperative_cli_1.Logger.getImperativeLogger(); + impFileLogger.debug("Invoked health check handler"); + params.response.console.log("You would report problems identified by healthCheck."); + }); + } +} +exports.default = HealthCheckHandler; +//# sourceMappingURL=healthCheck.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.js.map new file mode 100644 index 0000000000..71daee2d8e --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/healthCheck.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../../src/sample-plugin/healthCheck.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mDAA2E;AAE3E;IACe,OAAO,CAAC,MAA0B;;YAC7C,MAAM,aAAa,GAAW,uBAAM,CAAC,mBAAmB,EAAE,CAAC;YAC3D,aAAa,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;YACpD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;QACtF,CAAC;KAAA;CACF;AAND,qCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.d.ts new file mode 100644 index 0000000000..6e3215bd99 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.d.ts @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +export * from "./healthCheck.handler"; +export * from "./cmd/foo/foo.handler"; +export * from "./cmd/bar/bar.handler"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.js new file mode 100644 index 0000000000..4f4f0f7ccd --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.js @@ -0,0 +1,9 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./healthCheck.handler")); +__export(require("./cmd/foo/foo.handler")); +__export(require("./cmd/bar/bar.handler")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.js.map new file mode 100644 index 0000000000..b8b70b056a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sample-plugin/index.ts"],"names":[],"mappings":";;;;;AACA,2CAAsC;AACtC,2CAAsC;AACtC,2CAAsC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.d.ts new file mode 100644 index 0000000000..e44d668747 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.d.ts @@ -0,0 +1,13 @@ +/* +* 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. +* +*/ + +import { ICommandProfileTypeConfiguration } from "@zowe/imperative"; +export declare const BarProfileConfig: ICommandProfileTypeConfiguration; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.js new file mode 100644 index 0000000000..0fe0879033 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BarProfileConfig = { + type: "bar", + schema: { + type: "object", + title: "The Bar command profile schema", + description: "Credentials for the Bar command", + properties: { + username: { + optionDefinition: { + description: "The username to associate to this profile", + type: "string", + name: "username", + required: true + }, + type: "string" + }, + password: { + optionDefinition: { + description: "The password to associate to this profile", + type: "string", + name: "password", + required: true + }, + type: "string" + } + } + } +}; +//# sourceMappingURL=BarProfileConfig.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.js.map new file mode 100644 index 0000000000..29b0fed5ce --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/BarProfileConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BarProfileConfig.js","sourceRoot":"","sources":["../../../src/sample-plugin/profiles/BarProfileConfig.ts"],"names":[],"mappings":";;AAEa,QAAA,gBAAgB,GAAqC;IAChE,IAAI,EAAE,KAAK;IACX,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,gCAAgC;QACvC,WAAW,EAAE,iCAAiC;QAC9C,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,gBAAgB,EAAE;oBAChB,WAAW,EAAE,2CAA2C;oBACxD,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE,IAAI;iBACf;gBACD,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE;gBACR,gBAAgB,EAAE;oBAChB,WAAW,EAAE,2CAA2C;oBACxD,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE,IAAI;iBACf;gBACD,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACF,CAAC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.d.ts new file mode 100644 index 0000000000..04ecd37df6 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.d.ts @@ -0,0 +1,13 @@ +/* +* 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. +* +*/ + +import { ICommandProfileTypeConfiguration } from "@zowe/imperative"; +export declare const FooProfileConfig: ICommandProfileTypeConfiguration; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.js new file mode 100644 index 0000000000..6230f814d1 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FooProfileConfig = { + type: "foo", + schema: { + type: "object", + title: "The Foo command profile schema", + description: "The Foo command profile description", + properties: { + size: { + optionDefinition: { + description: "How big is the Foo", + type: "string", + name: "size", aliases: ["s"], + required: true, + defaultValue: "small" + }, + type: "string", + }, + duration: { + optionDefinition: { + description: "How may days will it take to fix Foo", + type: "number", + name: "duration", aliases: ["d"], + required: false + }, + type: "number", + }, + }, + required: ["size", "duration"], + }, + validationPlanModule: __dirname + "/FooProfileValidationPlan" +}; +//# sourceMappingURL=FooProfileConfig.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.js.map new file mode 100644 index 0000000000..faacb48882 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FooProfileConfig.js","sourceRoot":"","sources":["../../../src/sample-plugin/profiles/FooProfileConfig.ts"],"names":[],"mappings":";;AAEa,QAAA,gBAAgB,GAAqC;IAChE,IAAI,EAAE,KAAK;IACX,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,gCAAgC;QACvC,WAAW,EAAE,qCAAqC;QAClD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,gBAAgB,EAAE;oBAChB,WAAW,EAAE,oBAAoB;oBACjC,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC;oBAC5B,QAAQ,EAAE,IAAI;oBACd,YAAY,EAAE,QAAQ;iBACvB;gBACD,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE;gBACR,gBAAgB,EAAE;oBAChB,WAAW,EAAE,sCAAsC;oBACnD,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC;oBAChC,QAAQ,EAAE,KAAK;iBAChB;gBACD,IAAI,EAAE,QAAQ;aACf;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;KAC/B;IACD,oBAAoB,EAAE,SAAS,GAAG,2BAA2B;CAC9D,CAAC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.d.ts new file mode 100644 index 0000000000..3497620481 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.d.ts @@ -0,0 +1,17 @@ +/* +* 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. +* +*/ + +import { IProfileValidationPlan, IProfileValidationTask } from "@zowe/imperative"; +declare class FooProfileValidationPlan implements IProfileValidationPlan { + public readonly tasks: IProfileValidationTask[]; + public readonly failureSuggestions: string; +} +export = FooProfileValidationPlan; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.js new file mode 100644 index 0000000000..21d7508653 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.js @@ -0,0 +1,69 @@ +"use strict"; +// you can implement the validation plan as a Typescript class +// or any other way that allows us to do: new (require("your profile validation plan module file name")) +class FooProfileValidationPlan { + get tasks() { + return [{ + name: "Check the size of the Foo", + description: "The size of the Foo should be manageable", + taskFunction: (profile, done) => { + let outcome; + let description; + if (profile.size === "small") { + outcome = "OK"; + description = "We will be alright"; + } + else if (profile.size === "medium") { + outcome = "Warning"; + description = "This will take some effort to fix"; + } + else if (profile.size === "large") { + outcome = "Failed"; + description = "This is an insurmountable problem. Don't try to fix"; + } + else { + outcome = "Failed"; + description = "The size is unknown: " + profile.size; + } + const result = { + associatedEndpoints: [], outcome, resultDescription: description + }; + done(result); + }, + // only run these tasks if the size is small enough + // if the size task fails, these will be skipped with a warning + dependentTasks: [ + { + name: "Repair in time", + description: "Can the foo be fixed before our deadline", + taskFunction: (profile, done) => { + const daysToDeadline = 100; + let outcome; + let description; + if (profile.duration <= daysToDeadline) { + outcome = "OK"; + description = "We can complete on time."; + } + else if (profile.duration > daysToDeadline && profile.duration <= (daysToDeadline + 20)) { + outcome = "Warning"; + description = "We will lose money, but should keep the customer"; + } + else { + outcome = "Failed"; + description = "We are out of business"; + } + const result = { + associatedEndpoints: [], outcome, resultDescription: description + }; + done(result); + } + } + ] + }]; + } + get failureSuggestions() { + return "You should have contracted with one of our competitors"; + } +} +module.exports = FooProfileValidationPlan; +//# sourceMappingURL=FooProfileValidationPlan.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.js.map new file mode 100644 index 0000000000..bed5009bc4 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_3/lib/sample-plugin/profiles/FooProfileValidationPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FooProfileValidationPlan.js","sourceRoot":"","sources":["../../../src/sample-plugin/profiles/FooProfileValidationPlan.ts"],"names":[],"mappings":";AAGA,8DAA8D;AAC9D,yGAAyG;AACzG;IACE,IAAW,KAAK;QACd,MAAM,CAAC,CAAC;gBACN,IAAI,EAAE,2BAA2B;gBACjC,WAAW,EAAE,0CAA0C;gBACvD,YAAY,EAAE,CAAC,OAAY,EAAE,IAAoD,EAAE,EAAE;oBACnF,IAAI,OAA2B,CAAC;oBAChC,IAAI,WAAW,CAAC;oBAChB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC;wBAC7B,OAAO,GAAG,IAAI,CAAC;wBACf,WAAW,GAAG,oBAAoB,CAAC;oBACrC,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;wBACrC,OAAO,GAAG,SAAS,CAAC;wBACpB,WAAW,GAAG,mCAAmC,CAAC;oBACpD,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC;wBACpC,OAAO,GAAG,QAAQ,CAAC;wBACnB,WAAW,GAAG,qDAAqD,CAAC;oBACtE,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACN,OAAO,GAAG,QAAQ,CAAC;wBACnB,WAAW,GAAG,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;oBACvD,CAAC;oBACD,MAAM,MAAM,GAAiC;wBAC3C,mBAAmB,EAAE,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW;qBACjE,CAAC;oBACF,IAAI,CAAC,MAAM,CAAC,CAAC;gBACf,CAAC;gBACD,mDAAmD;gBACnD,+DAA+D;gBAC/D,cAAc,EAAE;oBACd;wBACE,IAAI,EAAE,gBAAgB;wBACtB,WAAW,EAAE,0CAA0C;wBACvD,YAAY,EAAE,CAAC,OAAY,EAAE,IAAoD,EAAE,EAAE;4BACnF,MAAM,cAAc,GAAW,GAAG,CAAC;4BACnC,IAAI,OAA2B,CAAC;4BAChC,IAAI,WAAW,CAAC;4BAChB,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,cAAc,CAAC,CAAC,CAAC;gCACvC,OAAO,GAAG,IAAI,CAAC;gCACf,WAAW,GAAG,0BAA0B,CAAC;4BAC3C,CAAC;4BAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,GAAG,cAAc,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;gCAC1F,OAAO,GAAG,SAAS,CAAC;gCACpB,WAAW,GAAG,kDAAkD,CAAC;4BACnE,CAAC;4BAAC,IAAI,CAAC,CAAC;gCACN,OAAO,GAAG,QAAQ,CAAC;gCACnB,WAAW,GAAG,wBAAwB,CAAC;4BACzC,CAAC;4BAED,MAAM,MAAM,GAAiC;gCAC3C,mBAAmB,EAAE,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW;6BACjE,CAAC;4BACF,IAAI,CAAC,MAAM,CAAC,CAAC;wBACf,CAAC;qBACF;iBACF;aACF,CAAC,CAAC;IACL,CAAC;IAED,IAAW,kBAAkB;QAC3B,MAAM,CAAC,wDAAwD,CAAC;IAClE,CAAC;CACF;AAED,iBAAS,wBAAwB,CAAC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.d.ts new file mode 100644 index 0000000000..07bdf06834 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.d.ts @@ -0,0 +1,12 @@ +/* +* 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. +* +*/ + +export * from "./sample-plugin"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.js new file mode 100644 index 0000000000..78d995df6d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +// import { SamplePlugin } from './sample-plugin'; +// import { IPluginMain, ICommandDefinition } from 'imperative'; +// import chalk from 'chalk'; +// import {join} from "path"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.js.map new file mode 100644 index 0000000000..d4d2a32e02 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,oEAAoE;AACpE,6BAA6B;AAC7B,6BAA6B"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.d.ts new file mode 100644 index 0000000000..7902016a89 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.d.ts @@ -0,0 +1,19 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +/** + * Defining handler to be use for the 'bar' command. + */ +export default class ImperativeApisHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.js new file mode 100644 index 0000000000..73bd714d73 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.js @@ -0,0 +1,42 @@ +"use strict"; +var T = require("@zowe/imperative"); + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'imperative-apis' command. + */ +class ImperativeApisHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + var iApi = T.Imperative.api; + + if (iApi != null) { + params.response.console.log("Imperative APIs are accessible from the test plugin"); + } else { + throw new T.ImperativeError({msg: "Imperative APIs are not accessible from the test plugin"}); + } + + if (iApi.imperativeLogger != null) { + params.response.console.log("Imperative APIs imperativeLogger is accessible from the test plugin"); + } else { + throw new T.ImperativeError({msg: "Imperative APIs imperativeLogger is not accessible from the test plugin"}); + } + + if (iApi.appLogger != null) { + params.response.console.log("Imperative APIs appLogger is accessible from the test plugin"); + } else { + throw new T.ImperativeError({msg: "Imperative APIs appLogger is not accessible from the test plugin"}); + } + }); + } +} +exports.default = ImperativeApisHandler; +//# sourceMappingURL=imperativeApis.handler.js.handler.js.map diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.js.map new file mode 100644 index 0000000000..8e85791b7f --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-apis/imperativeApis.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"imperativeApis.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/imperative-apis/imperativeApis.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.d.ts new file mode 100644 index 0000000000..87d7f37206 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.d.ts @@ -0,0 +1,19 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +/** + * Defining handler to be use for the 'bar' command. + */ +export default class ImperativeConfigHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.js new file mode 100644 index 0000000000..c8a7428cd3 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.js @@ -0,0 +1,61 @@ +"use strict"; +var T = require("@zowe/imperative"); + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'imperative-config' command. + */ +class ImperativeConfigHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + var loadedConfig = T.ImperativeConfig.instance.loadedConfig; + var testCliConfig = require(__dirname + "/../../../../../../test_cli/TestConfiguration"); + + if (loadedConfig != null) { + params.response.console.log("Imperative configuration is accessible from the test plugin"); + } else { + throw new T.ImperativeError({msg: "Imperative configuration is not accessible from the test plugin"}); + } + + if (loadedConfig.rootCommandDescription === testCliConfig.rootCommandDescription) { + params.response.console.log("Imperative configuration does contain the expected rootCommandDescription"); + } else { + throw new T.ImperativeError({msg: "Imperative configuration does not contain the expected rootCommandDescription"}); + } + + if (loadedConfig.defaultHome === testCliConfig.defaultHome) { + params.response.console.log("Imperative configuration does contain the expected defaultHome"); + } else { + throw new T.ImperativeError({msg: "Imperative configuration does not contain the expected defaultHome"}); + } + + if (loadedConfig.productDisplayName === testCliConfig.productDisplayName) { + params.response.console.log("Imperative configuration does contain the expected productDisplayName"); + } else { + throw new T.ImperativeError({msg: "Imperative configuration does not contain the expected productDisplayName"}); + } + + if (loadedConfig.name === testCliConfig.name) { + params.response.console.log("Imperative configuration does contain the expected name"); + } else { + throw new T.ImperativeError({msg: "Imperative configuration does not contain the expected name"}); + } + + if (loadedConfig.profiles === testCliConfig.profiles) { + params.response.console.log("Imperative configuration does contain the expected profiles"); + } else { + throw new T.ImperativeError({msg: "Imperative configuration does not contain the expected profiles"}); + } + }); + } +} +exports.default = ImperativeConfigHandler; +//# sourceMappingURL=imperativeConfig.handler.js.handler.js.map diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.js.map new file mode 100644 index 0000000000..6ce2775b06 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-config/imperativeConfig.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"imperativeConfig.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/imperative-config/imperativeConfig.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.d.ts new file mode 100644 index 0000000000..859d4e0008 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.d.ts @@ -0,0 +1,19 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +/** + * Defining handler to be use for the 'bar' command. + */ +export default class ImperativeErrorHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.js new file mode 100644 index 0000000000..99bb161db4 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.js @@ -0,0 +1,25 @@ +"use strict"; +var ImperativeError = require("@zowe/imperative").ImperativeError; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'err' command. + */ +class ImperativeErrorHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("Command ERR called!"); + throw new ImperativeError({msg: "Plugin threw an imperative error!", additionalDetails: "More details!"}); + }); + } +} +exports.default = ImperativeErrorHandler; +//# sourceMappingURL=imperativeError.handler.js.map diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.js.map new file mode 100644 index 0000000000..f06f9e453d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-error/imperativeError.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"imperativeError.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/imperative-error/imperativeError.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.d.ts new file mode 100644 index 0000000000..3cd678ec9e --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.d.ts @@ -0,0 +1,19 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +/** + * Defining handler to be use for the 'bar' command. + */ +export default class ImperativeLoggingHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.js new file mode 100644 index 0000000000..e3d7f9c9d9 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.js @@ -0,0 +1,40 @@ +"use strict"; +var T = require("@zowe/imperative"); +var path = require("path"); + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'imperative-logging' command. + */ +class ImperativeLoggingHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + var aLogger = T.Imperative.api.appLogger; + aLogger.debug(`Log message from test plugin: DEBUG: ${params.arguments.test}`); + aLogger.info(`Log message from test plugin: INFO: ${params.arguments.test}`); + aLogger.warn(`Log message from test plugin: WARN: ${params.arguments.test}`); + aLogger.error(`Log message from test plugin: ERROR: ${params.arguments.test}`); + + var iLogger = T.Imperative.api.imperativeLogger; + iLogger.debug(`Log message from test plugin: DEBUG: ${params.arguments.test}`); + iLogger.info(`Log message from test plugin: INFO: ${params.arguments.test}`); + iLogger.warn(`Log message from test plugin: WARN: ${params.arguments.test}`); + iLogger.error(`Log message from test plugin: ERROR: ${params.arguments.test}`); + + var config = T.ImperativeConfig.instance.loadedConfig; + params.response.console.log(`${params.arguments.test}: Messages logged successfully to the following locations`); + params.response.console.log(path.join(config.defaultHome, "imperative", "logs", "imperative.log")); + params.response.console.log(path.join(config.defaultHome, config.name, "logs", config.name + ".log")); + }); + } +} +exports.default = ImperativeLoggingHandler; +//# sourceMappingURL=imperativeLogging.handler.js.handler.js.map diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.js.map new file mode 100644 index 0000000000..e7d952b081 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"imperativeLogging.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/imperative-logging/imperativeLogging.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.d.ts new file mode 100644 index 0000000000..af95b3191b --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.d.ts @@ -0,0 +1,16 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +export default class HealthCheckHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.js new file mode 100644 index 0000000000..9254a82bef --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.js @@ -0,0 +1,20 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class HealthCheckHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Invoked health check handler"); + params.response.build(); + }); + } +} +exports.default = HealthCheckHandler; +//# sourceMappingURL=healthCheck.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.js.map new file mode 100644 index 0000000000..3264cfa41d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/healthCheck.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../../src/sample-plugin/healthCheck.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YAE5C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,qCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.d.ts new file mode 100644 index 0000000000..881b4b5c35 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.d.ts @@ -0,0 +1,16 @@ +/* +* 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. +* +*/ + +export * from "./healthCheck.handler"; +export * from "./cmd/imperative-apis/imperativeApis.handler"; +export * from "./cmd/imperative-config/imperativeConfig.handler"; +export * from "./cmd/imperative-error/imperativeError.handler"; +export * from "./cmd/imperative-logging/imperativeLogging.handler"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.js new file mode 100644 index 0000000000..4f4f0f7ccd --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.js @@ -0,0 +1,9 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./healthCheck.handler")); +__export(require("./cmd/foo/foo.handler")); +__export(require("./cmd/bar/bar.handler")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.js.map new file mode 100644 index 0000000000..b8b70b056a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_misc/lib/sample-plugin/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sample-plugin/index.ts"],"names":[],"mappings":";;;;;AACA,2CAAsC;AACtC,2CAAsC;AACtC,2CAAsC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.d.ts new file mode 100644 index 0000000000..07bdf06834 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.d.ts @@ -0,0 +1,12 @@ +/* +* 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. +* +*/ + +export * from "./sample-plugin"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.js new file mode 100644 index 0000000000..78d995df6d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +// import { SamplePlugin } from './sample-plugin'; +// import { IPluginMain, ICommandDefinition } from 'imperative'; +// import chalk from 'chalk'; +// import {join} from "path"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.js.map new file mode 100644 index 0000000000..d4d2a32e02 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,oEAAoE;AACpE,6BAA6B;AAC7B,6BAA6B"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts new file mode 100644 index 0000000000..582325e640 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts @@ -0,0 +1,19 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +/** + * Defining handler to be use for the 'bar' command. + */ +export default class BarHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.js new file mode 100644 index 0000000000..ce5d45ad93 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.js @@ -0,0 +1,22 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'bar' command. + */ +class BarHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("@TODO Complete this command: bar"); + }); + } +} +exports.default = BarHandler; +//# sourceMappingURL=bar.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map new file mode 100644 index 0000000000..a1876fe264 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bar.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/bar/bar.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts new file mode 100644 index 0000000000..622d44f45a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts @@ -0,0 +1,15 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +export default class FooHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.js new file mode 100644 index 0000000000..ca9a85c2ae --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.js @@ -0,0 +1,19 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class FooHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("Invoked sample-plugin foo handler"); + }); + } +} +exports.default = FooHandler; +//# sourceMappingURL=foo.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map new file mode 100644 index 0000000000..f4e1b7616d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"foo.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/foo/foo.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YAEjD,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,6BAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.d.ts new file mode 100644 index 0000000000..af95b3191b --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.d.ts @@ -0,0 +1,16 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +export default class HealthCheckHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.js new file mode 100644 index 0000000000..9254a82bef --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.js @@ -0,0 +1,20 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class HealthCheckHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Invoked health check handler"); + params.response.build(); + }); + } +} +exports.default = HealthCheckHandler; +//# sourceMappingURL=healthCheck.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.js.map new file mode 100644 index 0000000000..3264cfa41d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/healthCheck.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../../src/sample-plugin/healthCheck.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YAE5C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,qCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.d.ts new file mode 100644 index 0000000000..6e3215bd99 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.d.ts @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +export * from "./healthCheck.handler"; +export * from "./cmd/foo/foo.handler"; +export * from "./cmd/bar/bar.handler"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.js new file mode 100644 index 0000000000..64d2245712 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.js @@ -0,0 +1,10 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./healthCheck.handler")); +__export(require("./PluginLifeCycle")); +__export(require("./cmd/foo/foo.handler")); +__export(require("./cmd/bar/bar.handler")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.js.map new file mode 100644 index 0000000000..b8b70b056a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sample-plugin/index.ts"],"names":[],"mappings":";;;;;AACA,2CAAsC;AACtC,2CAAsC;AACtC,2CAAsC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_good_lifeCycle.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_good_lifeCycle.js new file mode 100644 index 0000000000..c349da6c3e --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_good_lifeCycle.js @@ -0,0 +1,31 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const imperative_1 = require("@zowe/imperative"); + +const knownCredMgr = imperative_1.CredentialManagerOverride.getKnownCredMgrs()[1]; +const credMgrDisplayName = knownCredMgr.credMgrDisplayName; + +class PluginLifeCycle extends imperative_1.AbstractPluginLifeCycle { + async postInstall() { + return __awaiter(this, void 0, void 0, function* () { + imperative_1.CredentialManagerOverride.recordCredMgrInConfig(credMgrDisplayName); + imperative_1.Logger.getImperativeLogger().debug("The plugin did a post-install action"); + }); + } + async preUninstall() { + return __awaiter(this, void 0, void 0, function* () { + imperative_1.CredentialManagerOverride.recordDefaultCredMgrInConfig(credMgrDisplayName); + imperative_1.Logger.getImperativeLogger().debug("The plugin did a pre-uninstall action"); + }); + } +} + +module.exports = PluginLifeCycle; \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_no_post_install.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_no_post_install.js new file mode 100644 index 0000000000..09019aee69 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_no_post_install.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const imperative_1 = require("@zowe/imperative"); + +class PluginLifeCycle extends imperative_1.AbstractPluginLifeCycle { + // postInstall is purposely missing + + preUninstall() { + // preUninstall is not used as part of this test class + } +} + +module.exports = PluginLifeCycle; \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_no_pre_uninstall.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_no_pre_uninstall.js new file mode 100644 index 0000000000..8a91369c6f --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_no_pre_uninstall.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const imperative_1 = require("@zowe/imperative"); + +class PluginLifeCycle extends imperative_1.AbstractPluginLifeCycle { + postInstall() { + // postInstall is not used as part of this test class + } + + // preUninstall is purposely missing +} + +module.exports = PluginLifeCycle; \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_unknown_name.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_unknown_name.js new file mode 100644 index 0000000000..21201bc73f --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/lifeCycle/class_unknown_name.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const imperative_1 = require("@zowe/imperative"); + +const unknownCredMgrDisplayName = "A CredMgr name that is not known"; + +class PluginLifeCycle extends imperative_1.AbstractPluginLifeCycle { + postInstall() { + imperative_1.CredentialManagerOverride.recordCredMgrInConfig(unknownCredMgrDisplayName); + } + preUninstall() { + imperative_1.CredentialManagerOverride.recordDefaultCredMgrInConfig(unknownCredMgrDisplayName); + } +} + +module.exports = PluginLifeCycle; \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.d.ts new file mode 100644 index 0000000000..8d410f5bb7 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.d.ts @@ -0,0 +1,26 @@ +/* +* 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. +* +*/ + +import { Logger } from "@zowe/imperative"; +declare const _default: { + new (service: string): { + consoleLog: Logger; + deleteCredentials(account: string): Promise; + loadCredentials(account: string): Promise; + saveCredentials(account: string, credentials: string): Promise; + initialize?(): Promise; + readonly service: string; + delete(account: string): Promise; + load(account: string): Promise; + save(account: string, secureValue: string): Promise; + }; +}; +export = _default; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.js new file mode 100644 index 0000000000..2303e1c668 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.js @@ -0,0 +1,57 @@ +"use strict"; +/* +* 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. * +* * +*/ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const imperative_1 = require("@zowe/imperative"); +module.exports = class CredentialManagerOverrides extends imperative_1.AbstractCredentialManager { + constructor(service, displayName) { + super(service, displayName); + this.consoleLog = imperative_1.Logger.getConsoleLogger(); + this.consoleLog.level = "info"; + } + deleteCredentials(account) { + return __awaiter(this, void 0, void 0, function* () { + this.consoleLog.info("CredentialManager in sample-plugin is deleting:\n" + + ` service = ${this.service}\n` + + ` account = ${account}`); + }); + } + loadCredentials(account) { + return __awaiter(this, void 0, void 0, function* () { + this.consoleLog.info("CredentialManager in sample-plugin is loading:\n" + + ` service = ${this.service}\n` + + ` account = ${account}`); + const loadedProfResult = { + message: "Creds loaded from sample-plugin", + type: "SomeTypeOfProfile", + failNotFound: true + }; + const loadResultString = JSON.stringify(loadedProfResult, null, 2); + return Buffer.from(loadResultString).toString("base64"); + }); + } + saveCredentials(account, credentials) { + return __awaiter(this, void 0, void 0, function* () { + this.consoleLog.info("CredentialManager in sample-plugin is saving these creds:\n" + + ` service = ${this.service}\n` + + ` account = ${account}\n` + + ` credentials = ${credentials.length * Math.random()}`); + }); + } +}; +//# sourceMappingURL=CredentialManager.override.js.map diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.js.map new file mode 100644 index 0000000000..d2dc891d4d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/lib/sample-plugin/overrides/CredentialManager.override.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CredentialManager.override.js","sourceRoot":"","sources":["../../src/overrides/CredentialManager.override.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;;;;;;;AAEF,uDAA2G;AAuB3G,iBAAS,gCAAiC,SAAQ,sCAAyB;IAIvE,YAAY,OAAe;QACvB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHX,eAAU,GAAG,mBAAM,CAAC,gBAAgB,EAAE,CAAC;IAI/C,CAAC;IAEY,iBAAiB,CAAC,OAAe;;YAC1C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,mDAAmD;gBACpE,iBAAiB,IAAI,CAAC,OAAO,IAAI;gBACjC,iBAAiB,OAAO,EAAE,CAC7B,CAAC;QACN,CAAC;KAAA;IAEY,eAAe,CAAC,OAAe;;YACxC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,kDAAkD;gBAClE,iBAAiB,IAAI,CAAC,OAAO,IAAI;gBACjC,iBAAiB,OAAO,EAAE,CAC9B,CAAC;YACF,MAAM,gBAAgB,GAAmB;gBACrC,OAAO,EAAE,iCAAiC;gBAC1C,IAAI,EAAE,mBAAmB;gBACzB,YAAY,EAAE,IAAI;aACrB,CAAC;YACF,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACnE,OAAO,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC5D,CAAC;KAAA;IAEY,eAAe,CAAC,OAAe,EAAE,WAA6B;;YACvE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,6DAA6D;gBAC9E,qBAAqB,IAAI,CAAC,OAAO,IAAI;gBACrC,qBAAqB,OAAO,IAAI;gBAChC,qBAAqB,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAC5D,CAAC;QACN,CAAC;KAAA;CACJ,CAAC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.d.ts new file mode 100644 index 0000000000..07bdf06834 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.d.ts @@ -0,0 +1,12 @@ +/* +* 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. +* +*/ + +export * from "./sample-plugin"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.js new file mode 100644 index 0000000000..78d995df6d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +// import { SamplePlugin } from './sample-plugin'; +// import { IPluginMain, ICommandDefinition } from 'imperative'; +// import chalk from 'chalk'; +// import {join} from "path"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.js.map new file mode 100644 index 0000000000..d4d2a32e02 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,oEAAoE;AACpE,6BAA6B;AAC7B,6BAA6B"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts new file mode 100644 index 0000000000..582325e640 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.d.ts @@ -0,0 +1,19 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +/** + * Defining handler to be use for the 'bar' command. + */ +export default class BarHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.js new file mode 100644 index 0000000000..ce5d45ad93 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.js @@ -0,0 +1,22 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Defining handler to be use for the 'bar' command. + */ +class BarHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("@TODO Complete this command: bar"); + }); + } +} +exports.default = BarHandler; +//# sourceMappingURL=bar.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map new file mode 100644 index 0000000000..a1876fe264 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/bar/bar.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bar.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/bar/bar.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;GAEG;AACH;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAGhD,+EAA+E;YAC/E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AARD,6BAQC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts new file mode 100644 index 0000000000..622d44f45a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.d.ts @@ -0,0 +1,15 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; +export default class FooHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.js new file mode 100644 index 0000000000..ca9a85c2ae --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.js @@ -0,0 +1,19 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class FooHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + params.response.console.log("Invoked sample-plugin foo handler"); + }); + } +} +exports.default = FooHandler; +//# sourceMappingURL=foo.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map new file mode 100644 index 0000000000..f4e1b7616d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/cmd/foo/foo.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"foo.handler.js","sourceRoot":"","sources":["../../../../src/sample-plugin/cmd/foo/foo.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YAEjD,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,6BAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.d.ts new file mode 100644 index 0000000000..af95b3191b --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.d.ts @@ -0,0 +1,16 @@ +/* +* 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. +* +*/ + +import { ICommandHandler, IHandlerParameters } from "@zowe/imperative"; + +export default class HealthCheckHandler implements ICommandHandler { + public process(params: IHandlerParameters): Promise; +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.js new file mode 100644 index 0000000000..9254a82bef --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.js @@ -0,0 +1,20 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +class HealthCheckHandler { + process(params) { + return __awaiter(this, void 0, void 0, function* () { + console.log("Invoked health check handler"); + params.response.build(); + }); + } +} +exports.default = HealthCheckHandler; +//# sourceMappingURL=healthCheck.handler.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.js.map new file mode 100644 index 0000000000..3264cfa41d --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/healthCheck.handler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"healthCheck.handler.js","sourceRoot":"","sources":["../../src/sample-plugin/healthCheck.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;IACe,OAAO,CAAC,MAA0B;;YAC7C,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YAE5C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AAND,qCAMC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.d.ts b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.d.ts new file mode 100644 index 0000000000..6e3215bd99 --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.d.ts @@ -0,0 +1,14 @@ +/* +* 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. +* +*/ + +export * from "./healthCheck.handler"; +export * from "./cmd/foo/foo.handler"; +export * from "./cmd/bar/bar.handler"; diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.js b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.js new file mode 100644 index 0000000000..4f4f0f7ccd --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.js @@ -0,0 +1,9 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./healthCheck.handler")); +__export(require("./cmd/foo/foo.handler")); +__export(require("./cmd/bar/bar.handler")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.js.map b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.js.map new file mode 100644 index 0000000000..b8b70b056a --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/space in path plugin/lib/sample-plugin/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sample-plugin/index.ts"],"names":[],"mappings":";;;;;AACA,2CAAsC;AACtC,2CAAsC;AACtC,2CAAsC"} \ No newline at end of file diff --git a/packages/imperative/__tests__/src/packages/profiles/__integration__/BasicProfileManager.initialize.spec.ts b/packages/imperative/__tests__/src/packages/profiles/__integration__/BasicProfileManager.initialize.spec.ts index 3981947ec3..3d2ae4b317 100644 --- a/packages/imperative/__tests__/src/packages/profiles/__integration__/BasicProfileManager.initialize.spec.ts +++ b/packages/imperative/__tests__/src/packages/profiles/__integration__/BasicProfileManager.initialize.spec.ts @@ -9,7 +9,7 @@ * */ -jest.mock("../../../../../packages/utilities/src/ImperativeConfig"); +jest.mock("../../../../../src/utilities/src/ImperativeConfig"); import * as TestUtil from "../../../TestUtil"; import { BasicProfileManager } from "../../../../../src/index"; diff --git a/packages/imperative/__tests__/src/packages/profiles/__integration__/BasicProfileManager.spec.ts b/packages/imperative/__tests__/src/packages/profiles/__integration__/BasicProfileManager.spec.ts index 726d8fbf91..1d629a28cc 100644 --- a/packages/imperative/__tests__/src/packages/profiles/__integration__/BasicProfileManager.spec.ts +++ b/packages/imperative/__tests__/src/packages/profiles/__integration__/BasicProfileManager.spec.ts @@ -19,9 +19,9 @@ describe("Imperative should allow CLI implementations to configure their own pro const mainModule = process.mainModule; const loadChangingDependencies = () => { return { - Imperative: require("../../../../../packages/imperative/src/Imperative").Imperative, - ImperativeConfig: require("../../../../../packages/utilities/src/ImperativeConfig").ImperativeConfig, - ImperativeError: require("../../../../../packages/error/src/ImperativeError").ImperativeError + Imperative: require("../../../../../src/imperative/src/Imperative").Imperative, + ImperativeConfig: require("../../../../../src/utilities/src/ImperativeConfig").ImperativeConfig, + ImperativeError: require("../../../../../src/error/src/ImperativeError").ImperativeError }; }; diff --git a/packages/imperative/src/imperative/__tests__/config/cmd/report-env/EnvQuery.unit.test.ts b/packages/imperative/src/imperative/__tests__/config/cmd/report-env/EnvQuery.unit.test.ts index 049c123d49..7a426f180c 100644 --- a/packages/imperative/src/imperative/__tests__/config/cmd/report-env/EnvQuery.unit.test.ts +++ b/packages/imperative/src/imperative/__tests__/config/cmd/report-env/EnvQuery.unit.test.ts @@ -243,7 +243,8 @@ describe("Tests for EnvQuery module", () => { it("should report that no other Zowe variables are set", async () => { const itemObj: IGetItemVal = await EnvQuery.getEnvItemVal(ItemId.OTHER_ZOWE_VARS); expect(itemObj.itemVal).toBeNull(); - expect(itemObj.itemValMsg).toContain("No other 'ZOWE_' variables have been set."); + const regex = /(^ZOWE_)|(No other 'ZOWE_' variables have been set.)/; + expect(itemObj.itemValMsg).toMatch(regex); expect(itemObj.itemProbMsg).toBe(""); }); diff --git a/packages/imperative/src/imperative/__tests__/plugins/cmd/firststeps/showfirststeps.handler.unit.test.ts b/packages/imperative/src/imperative/__tests__/plugins/cmd/firststeps/showfirststeps.handler.unit.test.ts index 08928d0498..3e2e3f79a2 100644 --- a/packages/imperative/src/imperative/__tests__/plugins/cmd/firststeps/showfirststeps.handler.unit.test.ts +++ b/packages/imperative/src/imperative/__tests__/plugins/cmd/firststeps/showfirststeps.handler.unit.test.ts @@ -14,6 +14,7 @@ import Mock = jest.Mock; jest.mock("../../../../../cmd/src/response/CommandResponse"); jest.mock("../../../../../cmd/src/response/HandlerResponse"); +import { HandlerResponse, IHandlerParameters } from "../../../../../cmd"; import { ImperativeConfig } from "../../../../../utilities/src/ImperativeConfig"; import { IImperativeConfig } from "../../../../src/doc/IImperativeConfig"; import { resolve } from "path"; @@ -22,7 +23,6 @@ import FirststepsHandler from "../../../../src/plugins/cmd/showfirststeps/showfi import { ImperativeError } from "../../../../../error/src/ImperativeError"; import { IPluginCfgProps } from "../../../../src/plugins/doc/IPluginCfgProps"; import { PluginManagementFacility } from "../../../../src/plugins/PluginManagementFacility"; -import { HandlerResponse, IHandlerParameters } from "../../../../../cmd"; describe("Plugin first steps command handler", () => { diff --git a/packages/imperative/src/imperative/__tests__/plugins/cmd/install/install.handler.unit.test.ts b/packages/imperative/src/imperative/__tests__/plugins/cmd/install/install.handler.unit.test.ts index 234df54400..a5971d7653 100644 --- a/packages/imperative/src/imperative/__tests__/plugins/cmd/install/install.handler.unit.test.ts +++ b/packages/imperative/src/imperative/__tests__/plugins/cmd/install/install.handler.unit.test.ts @@ -37,6 +37,7 @@ jest.doMock("path", () => { }; }); +import { HandlerResponse, IHandlerParameters } from "../../../../../cmd"; import { Console } from "../../../../../console"; import { ImperativeError } from "../../../../../error"; import { install } from "../../../../src/plugins/utilities/npm-interface"; @@ -49,7 +50,6 @@ import { PMFConstants } from "../../../../src/plugins/utilities/PMFConstants"; import { TextUtils } from "../../../../../utilities"; import { getRegistry, npmLogin } from "../../../../src/plugins/utilities/NpmFunctions"; import * as spawn from "cross-spawn"; -import { HandlerResponse, IHandlerParameters } from "../../../../../cmd"; let expectedVal: unknown; let returnedVal: unknown; diff --git a/packages/imperative/src/imperative/__tests__/plugins/cmd/list/list.handler.unit.test.ts b/packages/imperative/src/imperative/__tests__/plugins/cmd/list/list.handler.unit.test.ts index 0c68e491bb..ba6d499011 100644 --- a/packages/imperative/src/imperative/__tests__/plugins/cmd/list/list.handler.unit.test.ts +++ b/packages/imperative/src/imperative/__tests__/plugins/cmd/list/list.handler.unit.test.ts @@ -18,12 +18,12 @@ jest.mock("../../../../../cmd/src/response/CommandResponse"); jest.mock("../../../../../cmd/src/response/HandlerResponse"); jest.mock("../../../../../logger"); +import { HandlerResponse, IHandlerParameters } from "../../../../../cmd"; import { Console } from "../../../../../console"; import { IPluginJson } from "../../../../src/plugins/doc/IPluginJson"; import ListHandler from "../../../../src/plugins/cmd/list/list.handler"; import { Logger } from "../../../../../logger/"; import { readFileSync } from "jsonfile"; -import { HandlerResponse, IHandlerParameters } from "../../../../../cmd"; const stripAnsi = require("strip-ansi"); diff --git a/packages/imperative/src/imperative/__tests__/plugins/cmd/uninstall/uninstall.handler.unit.test.ts b/packages/imperative/src/imperative/__tests__/plugins/cmd/uninstall/uninstall.handler.unit.test.ts index 0b2cb292b1..0c7ebdb07a 100644 --- a/packages/imperative/src/imperative/__tests__/plugins/cmd/uninstall/uninstall.handler.unit.test.ts +++ b/packages/imperative/src/imperative/__tests__/plugins/cmd/uninstall/uninstall.handler.unit.test.ts @@ -21,6 +21,7 @@ jest.mock("../../../../../cmd/src/response/HandlerResponse"); jest.mock("../../../../../cmd/src/doc/handler/IHandlerParameters"); jest.mock("../../../../../logger"); +import { HandlerResponse, IHandlerParameters } from "../../../../../cmd"; import { Console } from "../../../../../console"; import { ConfigurationLoader } from "../../../../src/ConfigurationLoader"; import { CredentialManagerOverride } from "../../../../../security"; @@ -36,7 +37,6 @@ import * as ChildProcesses from "child_process"; import * as JsonFile from "jsonfile"; import * as NpmInterface from "../../../../src/plugins/utilities/npm-interface"; import * as NpmFunctions from "../../../../src/plugins/utilities/NpmFunctions"; -import { HandlerResponse, IHandlerParameters } from "../../../../../cmd"; describe("Plugin Management Facility uninstall handler", () => { diff --git a/packages/imperative/src/operations/__tests__/__integration__/Operations.unit.spec.ts b/packages/imperative/src/operations/__tests__/__integration__/Operations.integration.spec.ts similarity index 100% rename from packages/imperative/src/operations/__tests__/__integration__/Operations.unit.spec.ts rename to packages/imperative/src/operations/__tests__/__integration__/Operations.integration.spec.ts diff --git a/packages/imperative/src/rest/src/client/AbstractRestClient.ts b/packages/imperative/src/rest/src/client/AbstractRestClient.ts index 612e370db0..8a5731a478 100644 --- a/packages/imperative/src/rest/src/client/AbstractRestClient.ts +++ b/packages/imperative/src/rest/src/client/AbstractRestClient.ts @@ -699,6 +699,10 @@ export abstract class AbstractRestClient { causeErrors: this.dataString, source: "http" })); + } else if (this.mResponseStream != null && this.mResponseStream.writableEnded) { + // This will correct any instances where the finished event does not get emitted + // even though the stream processing has ended. + this.mResolve(this.dataString); } else if (this.mResponseStream != null && !this.mResponseStream.writableFinished) { this.mResponseStream.on("finish", () => this.mResolve(this.dataString)); } else { diff --git a/packages/imperative/tsconfig-tests.json b/packages/imperative/tsconfig-tests.json index 3fbcda2970..6bd842eb0f 100644 --- a/packages/imperative/tsconfig-tests.json +++ b/packages/imperative/tsconfig-tests.json @@ -34,5 +34,6 @@ ], "files": [ "../../__types__/wontache.d.ts" - ] + ], + "allowJs": true }