From 9a0dc6cb978dbd00a2c9fa1085230ef8ab49ebcf Mon Sep 17 00:00:00 2001 From: Ben Novak Date: Tue, 20 Jun 2023 17:08:47 -0700 Subject: [PATCH] 3.13 (#218) * diag rule tweak * version bump and deps update * #206 tweaks * teem tweak * remoteCommand #211 * next api disable * final 3.13 update * test tweaks --- CHANGELOG.md | 22 ++ diagRules/tmosXcRules.json | 2 +- package-lock.json | 194 +++++++++--------- package.json | 13 +- src/extLoader.ts | 5 +- src/extension.ts | 158 +++++++++++--- src/extensionVariables.ts | 2 +- src/telemetry.ts | 77 +++---- src/test/suite/deviceMgmt.test.ts | 3 - src/treeViewsProviders/nextApiTreeProvider.ts | 2 +- 10 files changed, 302 insertions(+), 176 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 119b547..b131cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,10 +13,32 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ### Added +- [RFE] Can't delete tmsh scripts #214 + ### Changed + +### Fixed + +- [RFE] Config Explorer doesn't include cipher groups with the applications #213 + +--- + +## [3.13.0] - (06-20-2023) + +### Added + +- [RFE] add history to remote command execute #211 + ### Fixed +- f5-corkscrew v1.3.0 + - [BUG] Monitor no more display in Config explorer #217 +- deps updates +- [BUG] Error running command f5.addHost: command 'f5.addHost' not found. #206 +- [BUG] Error connecting to BIG-IP --- TypeError: Cannot read properties of undefined (reading 'paths') #215 + + --- ## [3.12.1] - (05-24-2022) diff --git a/diagRules/tmosXcRules.json b/diagRules/tmosXcRules.json index 6ae50ee..4086298 100644 --- a/diagRules/tmosXcRules.json +++ b/diagRules/tmosXcRules.json @@ -94,7 +94,7 @@ "code": "9929", "severity": "Warning", "title": "TMOS Route Domain not supported", - "message": "Route domains are note support in XC", + "message": "Route domains are not support in XC", "regex": "destination [\\S]+%(\\d{1,2}):\\d{1,5}" }, { diff --git a/package-lock.json b/package-lock.json index e9b636e..3ebc83d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "vscode-f5", - "version": "3.12.2", + "version": "3.13.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vscode-f5", - "version": "3.12.2", + "version": "3.13.0", "license": "Apache-2.0", "dependencies": { "@apidevtools/json-schema-ref-parser": "^9.1.0", "@f5devcentral/f5-fast-core": "^0.19.1", "ajv": "^8.11.2", "f5-conx-core": "^0.17.2", - "f5-corkscrew": "^1.1.3", + "f5-corkscrew": "^1.2.0", "js-yaml": "^4.0.0", "keytar": "^7.9.0", "openapi-data-validator": "^2.0.44" @@ -24,8 +24,8 @@ "@types/mocha": "^7.0.1", "@types/node": "^14.18.1", "@types/vscode": "^1.63.0", - "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.10.0", + "@typescript-eslint/eslint-plugin": "^5.60.0", + "@typescript-eslint/parser": "^5.60.0", "@vscode/test-electron": "^2.2.1", "eslint": "^8.12.0", "glob": "^7.1.6", @@ -492,15 +492,15 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.7.tgz", - "integrity": "sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz", + "integrity": "sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/type-utils": "5.59.7", - "@typescript-eslint/utils": "5.59.7", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/type-utils": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -526,14 +526,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz", - "integrity": "sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz", + "integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/typescript-estree": "5.59.7", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "debug": "^4.3.4" }, "engines": { @@ -553,13 +553,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.7.tgz", - "integrity": "sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz", + "integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/visitor-keys": "5.59.7" + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -570,13 +570,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.7.tgz", - "integrity": "sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz", + "integrity": "sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.7", - "@typescript-eslint/utils": "5.59.7", + "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -597,9 +597,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz", - "integrity": "sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz", + "integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -610,13 +610,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.7.tgz", - "integrity": "sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz", + "integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/visitor-keys": "5.59.7", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -637,17 +637,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.7.tgz", - "integrity": "sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz", + "integrity": "sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/typescript-estree": "5.59.7", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -663,12 +663,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.7.tgz", - "integrity": "sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz", + "integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.7", + "@typescript-eslint/types": "5.60.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1762,9 +1762,9 @@ } }, "node_modules/f5-corkscrew": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/f5-corkscrew/-/f5-corkscrew-1.1.3.tgz", - "integrity": "sha512-lIpURGPQGx9GvE8WX1UG2Jwi4T3OSzGnDF3ycTBRRmWLx+TjDmN/AsdkrZ6EnBHjLsArXQ8kNIGV7jy3GkwxAA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/f5-corkscrew/-/f5-corkscrew-1.2.0.tgz", + "integrity": "sha512-3dtZvNYcdEhLIb4iqWEs7JO1gvO2bfz5j3Jlh2u4/oCGD0LsIh2qFfwUwyYi1si2Qch3F63N7zqjFOoCn/tpOQ==", "dependencies": { "balanced-match": "^2.0.0", "decompress": "^4.2.1", @@ -1882,9 +1882,9 @@ "dev": true }, "node_modules/fast-xml-parser": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.2.tgz", - "integrity": "sha512-DLzIPtQqmvmdq3VUKR7T6omPK/VCRNqgFlGtbESfyhcH2R4I8EzK1/K6E8PkRCK2EabWrUHK32NjYRbEFnnz0Q==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz", + "integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==", "funding": [ { "type": "paypal", @@ -4646,15 +4646,15 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.7.tgz", - "integrity": "sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz", + "integrity": "sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/type-utils": "5.59.7", - "@typescript-eslint/utils": "5.59.7", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/type-utils": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -4664,53 +4664,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz", - "integrity": "sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz", + "integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/typescript-estree": "5.59.7", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.7.tgz", - "integrity": "sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz", + "integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/visitor-keys": "5.59.7" + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0" } }, "@typescript-eslint/type-utils": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.7.tgz", - "integrity": "sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz", + "integrity": "sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.59.7", - "@typescript-eslint/utils": "5.59.7", + "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz", - "integrity": "sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz", + "integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.7.tgz", - "integrity": "sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz", + "integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/visitor-keys": "5.59.7", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -4719,28 +4719,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.7.tgz", - "integrity": "sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz", + "integrity": "sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/typescript-estree": "5.59.7", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.7.tgz", - "integrity": "sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz", + "integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.7", + "@typescript-eslint/types": "5.60.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -5552,9 +5552,9 @@ } }, "f5-corkscrew": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/f5-corkscrew/-/f5-corkscrew-1.1.3.tgz", - "integrity": "sha512-lIpURGPQGx9GvE8WX1UG2Jwi4T3OSzGnDF3ycTBRRmWLx+TjDmN/AsdkrZ6EnBHjLsArXQ8kNIGV7jy3GkwxAA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/f5-corkscrew/-/f5-corkscrew-1.2.0.tgz", + "integrity": "sha512-3dtZvNYcdEhLIb4iqWEs7JO1gvO2bfz5j3Jlh2u4/oCGD0LsIh2qFfwUwyYi1si2Qch3F63N7zqjFOoCn/tpOQ==", "requires": { "balanced-match": "^2.0.0", "decompress": "^4.2.1", @@ -5654,9 +5654,9 @@ "dev": true }, "fast-xml-parser": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.2.tgz", - "integrity": "sha512-DLzIPtQqmvmdq3VUKR7T6omPK/VCRNqgFlGtbESfyhcH2R4I8EzK1/K6E8PkRCK2EabWrUHK32NjYRbEFnnz0Q==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz", + "integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==", "requires": { "strnum": "^1.0.5" } diff --git a/package.json b/package.json index 6fb6f51..570ce08 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "The F5 Extension", "description": "Supercharge your F5 automation development", "publisher": "F5DevCentral", - "version": "3.12.2", + "version": "3.13.0", "keywords": [ "F5", "F5Networks", @@ -58,8 +58,8 @@ "@types/mocha": "^7.0.1", "@types/node": "^14.18.1", "@types/vscode": "^1.63.0", - "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.10.0", + "@typescript-eslint/eslint-plugin": "^5.60.0", + "@typescript-eslint/parser": "^5.60.0", "@vscode/test-electron": "^2.2.1", "eslint": "^8.12.0", "glob": "^7.1.6", @@ -73,7 +73,7 @@ "@f5devcentral/f5-fast-core": "^0.19.1", "ajv": "^8.11.2", "f5-conx-core": "^0.17.2", - "f5-corkscrew": "^1.1.3", + "f5-corkscrew": "^1.2.0", "js-yaml": "^4.0.0", "keytar": "^7.9.0", "openapi-data-validator": "^2.0.44" @@ -99,7 +99,7 @@ "activationEvents": [ "*" ], - "main": "./out/extLoader.js", + "main": "./out/extension.js", "contributes": { "snippets": [ { @@ -206,7 +206,7 @@ { "id": "nxtApiView", "name": "NEXT API", - "when": "f5.preview" + "when": "false" }, { "id": "fastView", @@ -643,6 +643,7 @@ { "command": "f5.refreshNextApiTree", "title": "Refresh NEXT OPENAPI View", + "enablement": "false", "category": "F5", "icon": "$(refresh)" }, diff --git a/src/extLoader.ts b/src/extLoader.ts index 4ab8f3f..f342760 100644 --- a/src/extLoader.ts +++ b/src/extLoader.ts @@ -15,7 +15,10 @@ const perfStats: PerfStats = { // Object.defineProperty(exports, "__esModule", { value: true }); import { ExtensionContext } from 'vscode'; -import { activateInternal, deactivateInternal } from './extension'; +import { + activate as activateInternal, + deactivate as deactivateInternal +} from './extension'; // while this may load the code/references, it will be empty import { ext } from './extensionVariables'; diff --git a/src/extension.ts b/src/extension.ts index a9f03e8..5f5f867 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -27,6 +27,7 @@ import { Range, Position, languages, + ThemeIcon, } from 'vscode'; import jsYaml from 'js-yaml'; import * as path from 'path'; @@ -64,6 +65,7 @@ import { Telemetry } from './telemetry'; import { XcDiag } from './tmosXcDiag'; import { NextApi } from './nextApi'; import { CodeLensProvider } from './codeLens'; +import { createRequire } from 'module'; // turn off console logging logger.console = false; @@ -78,7 +80,7 @@ logger.output = function (log: string) { // provide extension functions for activation -export async function activateInternal(context: ExtensionContext) { +export async function activate(context: ExtensionContext) { process.on('unhandledRejection', error => { logger.error('--- unhandledRejection ---', error); @@ -141,7 +143,7 @@ export async function activateInternal(context: ExtensionContext) { new CfCore(context); - new NextApi(context, ext.eventEmitterGlobal); + // new NextApi(context, ext.eventEmitterGlobal); languages.registerCodeLensProvider({ language: 'json', @@ -932,32 +934,132 @@ export async function activateInternal(context: ExtensionContext) { ext.telemetry.capture({ command: 'f5.remoteCommand' }); - // todo: add a setting to hold the command and future history - await window.showQuickPick( - [ - 'cat /config/bigip.conf', - 'cat bigip.license', - 'tail -100 /var/log/ltm', - 'tmsh show /apm license' - ],{ - ignoreFocusOut: true, - title: 'Enter command to execute on the BIG-IP' - }) - .then(async cmd => { - - if (cmd) { - - await ext.f5Client?.https(`/mgmt/tm/util/bash`, { - method: 'POST', - data: { - command: 'run', - utilCmdArgs: `-c '${cmd}'` - } - }) - .then(resp => ext.panel.render(resp.data.commandResult)) - .catch(err => logger.error('bash command failed:', err)); + // get the cmd history from vscode global state + const histary: string[] = context.globalState.get('f5-rc-history', []); + + const historyDefaults = [ + 'cat /config/bigip.conf', + 'cat bigip.license', + 'tail -100 /var/log/ltm', + 'tmsh show /apm license' + ]; + + const cmd = await new Promise((resolve) => { + + const qp = window.createQuickPick() + + //build all the history items with delete buttons + const i = histary.map(label => ({ + label, + buttons: [{ iconPath: new ThemeIcon("trash"), tooltip: "Remove this item" }] + })) + + // build all the defaults (no delete button) + const ii = historyDefaults.map(label => ({ label })) + + // spread all the options together + qp.items = [...i, ...ii]; + + // allow focus out + qp.ignoreFocusOut = true; + + // event for history button (trash) + qp.onDidTriggerItemButton(async (_button) => { + + // isolat the value + const item = _button.item.label; + + // filter out this button item from the history array + const newHistary = histary.filter(x => x !== item) + // clear the history array + histary.length = 0 + // spread all the filtered records back into the history array + histary.push(...newHistary) + + // rerun the command to get new values + return commands.executeCommand('f5.remoteCommand') + + }), + + qp.onDidAccept(a => { + + // main quick pick object + const b = qp; + // if new item typed in + const bv = b.value; + // if existing item selected; + const bs = b.selectedItems[0]?.label; + + resolve(bv || bs); + qp.hide(); + }) + + qp.show(); + }) as string; + + if (cmd) { + + // console.log(cmd) + + await ext.f5Client?.https(`/mgmt/tm/util/bash`, { + method: 'POST', + data: { + command: 'run', + utilCmdArgs: `-c '${cmd}'` } - }); + }) + .then(resp => { + + // render the output for the user + ext.panel.render(resp.data.commandResult) + + // is command part of the historyDefaults + const isDefaultCmd = historyDefaults.indexOf(cmd); + + if (isDefaultCmd < 0) { + + //is command already in the history + const idx = histary.indexOf(cmd) + + // command is not in history + if(idx < 0) { + + // add the cmd to the top of the history array + histary.unshift(cmd) + + } else { + + // command found in history + // remove command by index + histary.splice(idx, 1) + // re-add command back to the top + histary.unshift(cmd) + } + + // if we exceed 5, remove oldest + if (histary.length > 5) histary.pop(); + + // save the array to the vscode global state + context.globalState.update('f5-rc-history', histary) + } + + }) + .catch(err => logger.error('bash command failed:', err)); + } + + + // } + + + + // // merge the history and defaults to disply for user, with latest history on top + // await window.showQuickPick([...histary, ...historyDefaults], { + // ignoreFocusOut: true, + // title: 'Enter command to execute on the BIG-IP' + // }) + // .then(async cmd => { + + })); @@ -969,6 +1071,6 @@ export async function activateInternal(context: ExtensionContext) { // this method is called when your extension is deactivated -export async function deactivateInternal(context: ExtensionContext) { +export async function deactivate(context: ExtensionContext) { // log deactivation event } diff --git a/src/extensionVariables.ts b/src/extensionVariables.ts index 6754b25..668811c 100644 --- a/src/extensionVariables.ts +++ b/src/extensionVariables.ts @@ -169,7 +169,7 @@ export async function loadSettings() { process.env.F5_VSCODE_LOG_LEVEL = f5Cfg.get('logLevel'); - process.env[ext.teemEnv] = f5Cfg.get('f5.TEEM')!; + process.env[ext.teemEnv] = f5Cfg.get('TEEM'); process.env.F5_CONX_CORE_REJECT_UNAUTORIZED = f5Cfg.get('rejectUnauthorizedBIGIP')!.toString(); diff --git a/src/telemetry.ts b/src/telemetry.ts index b7eb4a5..afb4815 100644 --- a/src/telemetry.ts +++ b/src/telemetry.ts @@ -272,45 +272,46 @@ export class Telemetry { */ private async send(): Promise { - if (process.env[ext.teemEnv] === 'false' || !this.apiKey) { - return; - } - - // combine base telemetry details with - const reqOpts = { - method: 'POST', - url: this.endPoint, - headers: { - "F5-ApiKey": this.apiKey, - "F5-DigitalAssetId": this.instanceGUID, - "F5-TraceId": randomUUID(), - }, - data: Object.assign( - this.telemetryBase(), - { - observationStartTime: new Date().toISOString(), - observationEndTime: new Date().toISOString(), - epochTime: Date.now(), - telemtryId: randomUUID(), - telemetryRecords: this.journal - } - ) - }; - - // console.log(JSON.stringify(reqOpts)); - - return this.https.makeRequest(reqOpts as uuidAxiosRequestConfig) - .then(resp => { - console.debug(`telemtry resp: ${resp.statusText}-${resp.status}`); - - // clear journal on successful send - this.journal.length = 0; - }) - .catch(err => { - console.debug(`telemtry error`, err); - }); - + const teemEnvLabel = ext.teemEnv; + const teemEnv = process.env[teemEnvLabel]; + + if (teemEnv === 'true' && this.apiKey) { + + // combine base telemetry details with + const reqOpts = { + method: 'POST', + url: this.endPoint, + headers: { + "F5-ApiKey": this.apiKey, + "F5-DigitalAssetId": this.instanceGUID, + "F5-TraceId": randomUUID(), + }, + data: Object.assign( + this.telemetryBase(), + { + observationStartTime: new Date().toISOString(), + observationEndTime: new Date().toISOString(), + epochTime: Date.now(), + telemtryId: randomUUID(), + telemetryRecords: this.journal + } + ) + }; + + // console.log(JSON.stringify(reqOpts)); + + return this.https.makeRequest(reqOpts as uuidAxiosRequestConfig) + .then(resp => { + console.debug(`telemtry resp: ${resp.statusText}-${resp.status}`); + + // clear journal on successful send + this.journal.length = 0; + }) + .catch(err => { + console.debug(`telemtry error`, err); + }); + } } diff --git a/src/test/suite/deviceMgmt.test.ts b/src/test/suite/deviceMgmt.test.ts index 08a0be0..6edb9a5 100644 --- a/src/test/suite/deviceMgmt.test.ts +++ b/src/test/suite/deviceMgmt.test.ts @@ -1,6 +1,3 @@ -import * as assert from 'assert'; -import fs = require('fs'); -import path = require('path'); import { commands } from 'vscode'; import { logger } from '../../logger'; diff --git a/src/treeViewsProviders/nextApiTreeProvider.ts b/src/treeViewsProviders/nextApiTreeProvider.ts index a77c249..2f13e15 100644 --- a/src/treeViewsProviders/nextApiTreeProvider.ts +++ b/src/treeViewsProviders/nextApiTreeProvider.ts @@ -82,7 +82,7 @@ export class NextApiTreeProvider implements TreeDataProvider { this.connected = ext?.f5Client; this.oai = ext.f5Client.openApi; - this.pathsTreeObj = this.pathTree(); + // this.pathsTreeObj = this.pathTree(); } else if (local) {