From 94cad7b7b44ec2267f12fbf6abe35bc14b26e458 Mon Sep 17 00:00:00 2001 From: Prashanth Date: Tue, 21 May 2019 12:02:41 -0700 Subject: [PATCH 1/5] Use newer packages --- package-lock.json | 104 +++++++++++++++++++++++++++++++++++++++++----- package.json | 3 +- 2 files changed, 95 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index fe3826b9b..4e8199934 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,47 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@azure/arm-cosmosdb": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@azure/arm-cosmosdb/-/arm-cosmosdb-3.0.0.tgz", + "integrity": "sha512-cyFVcdNRMXG/n0grej1VFl68D4zsnLJQGX3+X54vzvEb6TlCPID8u/btS+JXK3yH7YITWCIzJXC00msiuFsmsg==", + "requires": { + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", + "tslib": "^1.9.3" + } + }, + "@azure/ms-rest-azure-js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-js/-/ms-rest-azure-js-1.3.4.tgz", + "integrity": "sha512-aRYOK1xHR7nRfFVKXinM8DXtprsRpBkivKcUNKbJYzYS+Px+95uI2eYBheO8oe4yYhDZ0htN8oRBua+DuOpYyg==", + "requires": { + "@azure/ms-rest-js": "^1.8.1", + "tslib": "^1.9.2" + } + }, + "@azure/ms-rest-js": { + "version": "1.8.7", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-1.8.7.tgz", + "integrity": "sha512-JTVf4hu+/TnOQW1bprK+wxCBgJdZR6aC3oeAW35CfbxL4NVVgwEQ4+c1JOG8ph0WHGEL8bfyDF2vIjV/RuHkdg==", + "requires": { + "@types/tunnel": "0.0.0", + "axios": "^0.18.0", + "form-data": "^2.3.2", + "tough-cookie": "^2.4.3", + "tslib": "^1.9.2", + "tunnel": "0.0.6", + "uuid": "^3.2.1", + "xml2js": "^0.4.19" + }, + "dependencies": { + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + } + } + }, "@types/bson": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@types/bson/-/bson-1.0.11.tgz", @@ -346,8 +387,7 @@ "@types/node": { "version": "6.14.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-6.14.2.tgz", - "integrity": "sha512-JWB3xaVfsfnFY8Ofc9rTB/op0fqqTSqy4vBcVk1LuRJvta7KTX+D//fCkiTMeLGhdr2EbFZzQjC97gvmPilk9Q==", - "dev": true + "integrity": "sha512-JWB3xaVfsfnFY8Ofc9rTB/op0fqqTSqy4vBcVk1LuRJvta7KTX+D//fCkiTMeLGhdr2EbFZzQjC97gvmPilk9Q==" }, "@types/socket.io": { "version": "1.4.40", @@ -364,6 +404,14 @@ "integrity": "sha512-Vs55Kq8F+OWvy1RLA31rT+cAyemzgm0EWNeax6BWF8H7QiiOYMJIdcwSDdm5LVgfEkoepsWkS+40+WNb7BUMbg==", "dev": true }, + "@types/tunnel": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.0.tgz", + "integrity": "sha512-FGDp0iBRiBdPjOgjJmn1NH0KDLN+Z8fRmo+9J7XGBhubq1DPrGrbmG4UTlGzrpbCpesMqD0sWkzi27EYkOMHyg==", + "requires": { + "@types/node": "*" + } + }, "@webassemblyjs/ast": { "version": "1.7.11", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.11.tgz", @@ -1092,13 +1140,13 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, - "azure-arm-cosmosdb": { - "version": "1.1.2", - "resolved": "http://registry.npmjs.org/azure-arm-cosmosdb/-/azure-arm-cosmosdb-1.1.2.tgz", - "integrity": "sha512-NdjUeSoNzV2Ljajomy7mQW8WrbysGg6jPpTGztlpyLgGCBFMO9llvzKCoRTNMs9Van50lrJrmcbhbJNFn3PPjw==", + "axios": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "ms-rest": "^2.3.2", - "ms-rest-azure": "^2.5.5" + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" } }, "azure-arm-resource": { @@ -3414,6 +3462,24 @@ "readable-stream": "^2.0.4" } }, + "follow-redirects": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", + "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", + "requires": { + "debug": "^3.2.6" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -7655,6 +7721,11 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", @@ -8881,8 +8952,7 @@ "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, "tslint": { "version": "5.12.0", @@ -10376,6 +10446,20 @@ "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", "dev": true }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, "xmldom": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", diff --git a/package.json b/package.json index f57ff118e..c1a410062 100644 --- a/package.json +++ b/package.json @@ -906,8 +906,7 @@ }, "dependencies": { "antlr4ts": "^0.4.1-alpha.0", - "azure-arm-cosmosdb": "^1.1.2", - "azure-arm-resource": "^3.0.0-preview", + "@azure/arm-cosmosdb": "^3.0.0", "d3": "^3.0.0", "documentdb": "^1.14.2", "event-stream": "3.3.4", From a3837a90a019ecfe01ce3bad327a29355ed9e1db Mon Sep 17 00:00:00 2001 From: Prashanth Date: Wed, 22 May 2019 19:30:50 -0700 Subject: [PATCH 2/5] Management plane API switch --- package-lock.json | 134 ++++++++++-------- package.json | 10 +- src/commands/deleteCosmosDBAccount.ts | 2 +- src/docdb/tree/DocDBAccountTreeItemBase.ts | 2 +- src/experiences.ts | 2 +- src/graph/gremlinEndpoints.ts | 2 +- src/graph/tree/GraphAccountTreeItem.ts | 2 +- src/mongo/tree/MongoAccountTreeItem.ts | 2 +- src/tree/AttachedAccountsTreeItem.ts | 6 +- .../CosmosDBAccountCreateStep.ts | 4 +- .../CosmosDBAccountNameStep.ts | 2 +- .../ICosmosDBWizardContext.ts | 2 +- src/tree/SubscriptionTreeItem.ts | 4 +- 13 files changed, 98 insertions(+), 76 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e8199934..433e1215c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,15 +14,61 @@ "tslib": "^1.9.3" } }, + "@azure/arm-resources": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azure/arm-resources/-/arm-resources-1.0.1.tgz", + "integrity": "sha512-wIUJmtFoxPJiyyVmVstoWU31ffNLL9+fU6MtD4SH7nFk1ikSt2lTHE3clYX51jHhKcyFwdBo6Z3IQgrOwc1jcw==", + "requires": { + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", + "tslib": "^1.9.3" + } + }, + "@azure/arm-storage": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@azure/arm-storage/-/arm-storage-8.1.0.tgz", + "integrity": "sha512-Rsy8X92aUfmsz5Yv3VrxVMEdpcEWcHan7vnJxKKQo+qMugA1+h4xtj1M4mxoSfaTH13hPyUSoFHEWhemqtNqMw==", + "requires": { + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", + "tslib": "^1.9.3" + } + }, + "@azure/arm-subscriptions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@azure/arm-subscriptions/-/arm-subscriptions-1.0.0.tgz", + "integrity": "sha512-DoZFcF+ePkGhrxQ4X/LxBoWipqpkZIt9g+itXJ4HaQNExn0hNO27Cs6kNZYpIdCs5Zu+2DbjRs2i8OqG3QbE9w==", + "requires": { + "@azure/ms-rest-azure-js": "^1.1.0", + "@azure/ms-rest-js": "^1.1.0", + "tslib": "^1.9.3" + } + }, + "@azure/ms-rest-azure-env": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-1.1.2.tgz", + "integrity": "sha512-l7z0DPCi2Hp88w12JhDTtx5d0Y3+vhfE7JKJb9O7sEz71Cwp053N8piTtTnnk/tUor9oZHgEKi/p3tQQmLPjvA==" + }, "@azure/ms-rest-azure-js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-js/-/ms-rest-azure-js-1.3.4.tgz", - "integrity": "sha512-aRYOK1xHR7nRfFVKXinM8DXtprsRpBkivKcUNKbJYzYS+Px+95uI2eYBheO8oe4yYhDZ0htN8oRBua+DuOpYyg==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-js/-/ms-rest-azure-js-1.3.5.tgz", + "integrity": "sha512-gk6RdpSEblvYEJhK+WjDDJnMLVNrjb/53qINyXXbgY5bs0UbRNFCJwRKsfRGoUB8WgHkQj5mtztR4V1PNAB9Eg==", "requires": { "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.2" } }, + "@azure/ms-rest-browserauth": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-browserauth/-/ms-rest-browserauth-0.1.4.tgz", + "integrity": "sha512-yV7B+dQzvuHwWpS2KJuu+wU56CdPIUBCJQVG8iidCPXp1zCqGSH5HcbmxHzESMSieDrMeybtPeLx/PNA6Y7YYA==", + "requires": { + "@azure/ms-rest-azure-env": "^1.1.0", + "@azure/ms-rest-js": "^1.8.1", + "adal-angular": "^1.0.17", + "tslib": "^1.9.3" + } + }, "@azure/ms-rest-js": { "version": "1.8.7", "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-1.8.7.tgz", @@ -45,6 +91,16 @@ } } }, + "@azure/ms-rest-nodeauth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-nodeauth/-/ms-rest-nodeauth-2.0.1.tgz", + "integrity": "sha512-iBhdBC6uN1YapRZeCYdeK87gvQN6mqADqD9H5eGiT8YDtyabd7vc6fTY1VvJ4XOZbI3bJDLlkDTQAjaPbyoGTQ==", + "requires": { + "@azure/ms-rest-azure-env": "^1.1.2", + "@azure/ms-rest-js": "^1.8.7", + "adal-node": "^0.1.28" + } + }, "@types/bson": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@types/bson/-/bson-1.0.11.tgz", @@ -629,6 +685,11 @@ "acorn": "^5.0.0" } }, + "adal-angular": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/adal-angular/-/adal-angular-1.0.17.tgz", + "integrity": "sha1-bpNuDkH5HTsqiOf/ypwvb29WLMQ=" + }, "adal-node": { "version": "0.1.28", "resolved": "https://registry.npmjs.org/adal-node/-/adal-node-0.1.28.tgz", @@ -1149,24 +1210,6 @@ "is-buffer": "^1.1.5" } }, - "azure-arm-resource": { - "version": "3.0.0-preview", - "resolved": "https://registry.npmjs.org/azure-arm-resource/-/azure-arm-resource-3.0.0-preview.tgz", - "integrity": "sha512-5AxK9Nnk9hRDtyiXkaqvHV2BvII12JpPpTTHL8p9ZKgkwy67mWk+repoe9PnjxwG2Rm1RadutonccynJ+VHVAw==", - "requires": { - "ms-rest": "^2.0.0", - "ms-rest-azure": "^2.0.0" - } - }, - "azure-arm-storage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/azure-arm-storage/-/azure-arm-storage-3.2.0.tgz", - "integrity": "sha512-jrew8qgqCiJ66QyjAhQis7AXhK6hp5soypvcxio3g/b1mNJr7RsQ6vD5zBRebcvM+QBGzvv7COiXy/xzibyOgA==", - "requires": { - "ms-rest": "^2.2.2", - "ms-rest-azure": "^2.3.3" - } - }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -5337,7 +5380,8 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "is-typedarray": { "version": "1.0.0", @@ -6375,34 +6419,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, - "ms-rest": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/ms-rest/-/ms-rest-2.3.8.tgz", - "integrity": "sha512-8kaerSPk0Z9W6z8VnJXjKOHDaGGXbsGyO22X4DFtlllzbYLryWo0Dor+jnIKpgvUOzQKSoLW2fel81piG3LnHQ==", - "requires": { - "duplexer": "^0.1.1", - "is-buffer": "^1.1.6", - "is-stream": "^1.1.0", - "moment": "^2.21.0", - "request": "^2.88.0", - "through": "^2.3.8", - "tunnel": "0.0.5", - "uuid": "^3.2.1" - } - }, - "ms-rest-azure": { - "version": "2.5.9", - "resolved": "https://registry.npmjs.org/ms-rest-azure/-/ms-rest-azure-2.5.9.tgz", - "integrity": "sha512-qonobzWLS7Jl6qwgTuA/SfyCtnv7olvCRKrcF8nzXSj68ds4Oj3K64ntzgQajroKa0hKVMcPUFbTk1IYMGvu8w==", - "requires": { - "adal-node": "^0.1.28", - "async": "2.6.0", - "moment": "^2.22.2", - "ms-rest": "^2.3.2", - "request": "^2.88.0", - "uuid": "^3.2.1" - } - }, "multimatch": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", @@ -9948,16 +9964,18 @@ } }, "vscode-azureextensionui": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/vscode-azureextensionui/-/vscode-azureextensionui-0.24.0.tgz", - "integrity": "sha512-IgyQEHMUbzvwy5ZBolZCvK3BpPW6mBAzcMPxWkiT9IcYAM1D8JSg546xCvzCYMDR0o1T/iJ8t7Ki9H4MjHfSYQ==", - "requires": { - "azure-arm-resource": "^3.0.0-preview", - "azure-arm-storage": "^3.1.0", + "version": "file:../vscode-azuretools/ui/vscode-azureextensionui-0.25.0.tgz", + "integrity": "sha512-skxvgp20gwSeMW4ks07RzGSpgxnNdJwkGpdRf7NCnWzbv1BDVK4/lLSHLBnk77Xiy9u5Nowqf0UHQVMHLodIbw==", + "requires": { + "@azure/arm-resources": "^1.0.1", + "@azure/arm-storage": "^8.1.0", + "@azure/arm-subscriptions": "^1.0.0", + "@azure/ms-rest-azure-js": "^1.3.5", + "@azure/ms-rest-browserauth": "^0.1.4", + "@azure/ms-rest-js": "^1.8.7", + "@azure/ms-rest-nodeauth": "^2.0.0", "fs-extra": "^4.0.3", "html-to-text": "^4.0.0", - "ms-rest": "^2.2.2", - "ms-rest-azure": "^2.4.4", "opn": "^6.0.0", "semver": "^5.6.0", "vscode-extension-telemetry": "^0.1.0", diff --git a/package.json b/package.json index c1a410062..61366303e 100644 --- a/package.json +++ b/package.json @@ -905,21 +905,25 @@ "webpack-cli": "^3.1.2" }, "dependencies": { - "antlr4ts": "^0.4.1-alpha.0", "@azure/arm-cosmosdb": "^3.0.0", + "@azure/ms-rest-azure-js": "^1.3.5", + "@azure/ms-rest-browserauth": "^0.1.4", + "@azure/ms-rest-js": "^1.8.7", + "@azure/ms-rest-nodeauth": "^2.0.0", + "antlr4ts": "^0.4.1-alpha.0", "d3": "^3.0.0", "documentdb": "^1.14.2", "event-stream": "3.3.4", "fs-extra": "^4.0.2", "gremlin": "^2.6.0", + "html-to-text": "^4.0.0", "mongodb": "^2.2.25", "mongodb-extended-json": "^1.10.0", - "ms-rest": "^2.2.1", "node-uuid": "1.4.8", "socket.io": "^1.7.3", "socket.io-client": "^1.7.3", "underscore": "^1.8.3", - "vscode-azureextensionui": "^0.24.0", + "vscode-azureextensionui": "file:../vscode-azuretools/ui/vscode-azureextensionui-0.25.0.tgz", "vscode-json-languageservice": "^3.0.8", "vscode-languageclient": "^4.4.0", "vscode-languageserver": "^4.4.0", diff --git a/src/commands/deleteCosmosDBAccount.ts b/src/commands/deleteCosmosDBAccount.ts index 64b9ba5eb..336abf2fa 100644 --- a/src/commands/deleteCosmosDBAccount.ts +++ b/src/commands/deleteCosmosDBAccount.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient } from 'azure-arm-cosmosdb'; +import { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; import * as vscode from 'vscode'; import { AzureTreeItem, createAzureClient, DialogResponses } from 'vscode-azureextensionui'; import { UserCancelledError } from 'vscode-azureextensionui'; diff --git a/src/docdb/tree/DocDBAccountTreeItemBase.ts b/src/docdb/tree/DocDBAccountTreeItemBase.ts index 1a2d59da3..07b0696d4 100644 --- a/src/docdb/tree/DocDBAccountTreeItemBase.ts +++ b/src/docdb/tree/DocDBAccountTreeItemBase.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DatabaseAccount } from 'azure-arm-cosmosdb/lib/models'; +import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models'; import { DatabaseMeta, DocumentClient, FeedOptions, QueryIterator } from 'documentdb'; import * as path from 'path'; import * as vscode from 'vscode'; diff --git a/src/experiences.ts b/src/experiences.ts index 2191a6c7d..f8f8b7bee 100644 --- a/src/experiences.ts +++ b/src/experiences.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DatabaseAccount } from 'azure-arm-cosmosdb/lib/models'; +import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models'; import { IAzureQuickPickItem } from 'vscode-azureextensionui'; export enum API { diff --git a/src/graph/gremlinEndpoints.ts b/src/graph/gremlinEndpoints.ts index ff64c1b32..ea8a203cd 100644 --- a/src/graph/gremlinEndpoints.ts +++ b/src/graph/gremlinEndpoints.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient } from 'azure-arm-cosmosdb'; +import { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; export interface IGremlinEndpoint { host: string; diff --git a/src/graph/tree/GraphAccountTreeItem.ts b/src/graph/tree/GraphAccountTreeItem.ts index 24f3a5ab2..1feb9352e 100644 --- a/src/graph/tree/GraphAccountTreeItem.ts +++ b/src/graph/tree/GraphAccountTreeItem.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DatabaseAccount } from 'azure-arm-cosmosdb/lib/models'; +import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models'; import { DatabaseMeta } from 'documentdb'; import { AzureParentTreeItem } from 'vscode-azureextensionui'; import { DocDBAccountTreeItemBase } from '../../docdb/tree/DocDBAccountTreeItemBase'; diff --git a/src/mongo/tree/MongoAccountTreeItem.ts b/src/mongo/tree/MongoAccountTreeItem.ts index ff8711dbc..580b8a6f5 100644 --- a/src/mongo/tree/MongoAccountTreeItem.ts +++ b/src/mongo/tree/MongoAccountTreeItem.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DatabaseAccount } from 'azure-arm-cosmosdb/lib/models'; +import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models'; import { Db } from 'mongodb'; import * as path from 'path'; import * as vscode from 'vscode'; diff --git a/src/tree/AttachedAccountsTreeItem.ts b/src/tree/AttachedAccountsTreeItem.ts index 1685c549b..b2af85ae2 100644 --- a/src/tree/AttachedAccountsTreeItem.ts +++ b/src/tree/AttachedAccountsTreeItem.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ServiceClientCredentials } from 'ms-rest'; -import { AzureEnvironment } from 'ms-rest-azure'; +import { Environment } from '@azure/ms-rest-azure-env/lib/azureEnvironment'; +import { ServiceClientCredentials } from "@azure/ms-rest-js"; import * as path from 'path'; import * as vscode from 'vscode'; import { appendExtensionUserAgent, AzExtParentTreeItem, AzExtTreeItem, AzureParentTreeItem, AzureTreeItem, GenericTreeItem, ISubscriptionRoot, UserCancelledError } from 'vscode-azureextensionui'; @@ -373,7 +373,7 @@ class AttachedAccountRoot implements ISubscriptionRoot { throw this._error; } - public get environment(): AzureEnvironment { + public get environment(): Environment { throw this._error; } } diff --git a/src/tree/CosmosDBAccountWizard/CosmosDBAccountCreateStep.ts b/src/tree/CosmosDBAccountWizard/CosmosDBAccountCreateStep.ts index 023f6e841..5d73cf42a 100644 --- a/src/tree/CosmosDBAccountWizard/CosmosDBAccountCreateStep.ts +++ b/src/tree/CosmosDBAccountWizard/CosmosDBAccountCreateStep.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient } from 'azure-arm-cosmosdb'; -import { Capability } from 'azure-arm-cosmosdb/lib/models'; +import { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; +import { Capability } from '@azure/arm-cosmosdb/esm/models'; import { Progress } from 'vscode'; import { AzureWizardExecuteStep, createAzureClient } from 'vscode-azureextensionui'; import { ext } from '../../extensionVariables'; diff --git a/src/tree/CosmosDBAccountWizard/CosmosDBAccountNameStep.ts b/src/tree/CosmosDBAccountWizard/CosmosDBAccountNameStep.ts index fb6ab811c..791096574 100644 --- a/src/tree/CosmosDBAccountWizard/CosmosDBAccountNameStep.ts +++ b/src/tree/CosmosDBAccountWizard/CosmosDBAccountNameStep.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient } from 'azure-arm-cosmosdb'; +import { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; import { AzureNameStep, createAzureClient, ResourceGroupListStep, resourceGroupNamingRules } from 'vscode-azureextensionui'; import { ext } from '../../extensionVariables'; import { ICosmosDBWizardContext } from './ICosmosDBWizardContext'; diff --git a/src/tree/CosmosDBAccountWizard/ICosmosDBWizardContext.ts b/src/tree/CosmosDBAccountWizard/ICosmosDBWizardContext.ts index 74653941b..e3e555a26 100644 --- a/src/tree/CosmosDBAccountWizard/ICosmosDBWizardContext.ts +++ b/src/tree/CosmosDBAccountWizard/ICosmosDBWizardContext.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DatabaseAccount } from 'azure-arm-cosmosdb/lib/models'; +import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models'; import { IResourceGroupWizardContext } from 'vscode-azureextensionui'; import { Experience } from '../../experiences'; diff --git a/src/tree/SubscriptionTreeItem.ts b/src/tree/SubscriptionTreeItem.ts index 275ebd9bf..dad240c2d 100644 --- a/src/tree/SubscriptionTreeItem.ts +++ b/src/tree/SubscriptionTreeItem.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient } from 'azure-arm-cosmosdb'; -import { DatabaseAccount, DatabaseAccountListKeysResult, DatabaseAccountsListResult } from 'azure-arm-cosmosdb/lib/models'; +import { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; +import { DatabaseAccount, DatabaseAccountListKeysResult, DatabaseAccountsListResult } from '@azure/arm-cosmosdb/esm/models'; import * as vscode from 'vscode'; import { AzExtTreeItem, AzureTreeItem, AzureWizard, createAzureClient, IActionContext, LocationListStep, ResourceGroupListStep, SubscriptionTreeItemBase } from 'vscode-azureextensionui'; import { DocDBAccountTreeItem } from "../docdb/tree/DocDBAccountTreeItem"; From 57b2e6684f2bb5b2b1f4489b0c5e6fffd1da69e4 Mon Sep 17 00:00:00 2001 From: Prashanth Date: Wed, 22 May 2019 19:41:11 -0700 Subject: [PATCH 3/5] Bump ui version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 61366303e..fee754938 100644 --- a/package.json +++ b/package.json @@ -923,7 +923,7 @@ "socket.io": "^1.7.3", "socket.io-client": "^1.7.3", "underscore": "^1.8.3", - "vscode-azureextensionui": "file:../vscode-azuretools/ui/vscode-azureextensionui-0.25.0.tgz", + "vscode-azureextensionui": "^0.26.0", "vscode-json-languageservice": "^3.0.8", "vscode-languageclient": "^4.4.0", "vscode-languageserver": "^4.4.0", From 5be9bceb2a3420a5e00b84a80fe7420061753896 Mon Sep 17 00:00:00 2001 From: Prashanth Date: Thu, 20 Jun 2019 17:59:57 -0700 Subject: [PATCH 4/5] dbAccounts.get -> use correct field from response --- src/graph/gremlinEndpoints.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graph/gremlinEndpoints.ts b/src/graph/gremlinEndpoints.ts index ea8a203cd..268290fe3 100644 --- a/src/graph/gremlinEndpoints.ts +++ b/src/graph/gremlinEndpoints.ts @@ -18,7 +18,7 @@ export async function TryGetGremlinEndpointFromAzure(client: CosmosDBManagementC if (error) { reject(error); } else { - let body = <{ properties: { gremlinEndpoint: string } }>JSON.parse((<{ body?: string }>response).body); + let body = <{ properties: { gremlinEndpoint: string } }>JSON.parse((<{ bodyAsText?: string }>response).bodyAsText); let endpointUri = body.properties.gremlinEndpoint; if (endpointUri) { resolve(parseEndpointUrl(endpointUri)); From d32ff4500f2a26b977683856a273492fd1d89334 Mon Sep 17 00:00:00 2001 From: Prashanth Date: Fri, 21 Jun 2019 17:19:32 -0700 Subject: [PATCH 5/5] Remove submodule imports from the diff --- src/docdb/tree/DocDBAccountTreeItemBase.ts | 4 ++-- src/experiences.ts | 6 +++--- src/graph/tree/GraphAccountTreeItem.ts | 4 ++-- src/mongo/tree/MongoAccountTreeItem.ts | 4 ++-- src/tree/AttachedAccountsTreeItem.ts | 2 +- .../CosmosDBAccountCreateStep.ts | 5 ++--- .../CosmosDBAccountWizard/ICosmosDBWizardContext.ts | 4 ++-- src/tree/SubscriptionTreeItem.ts | 13 ++++++------- 8 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/docdb/tree/DocDBAccountTreeItemBase.ts b/src/docdb/tree/DocDBAccountTreeItemBase.ts index 0c6799c1b..bc00e617a 100644 --- a/src/docdb/tree/DocDBAccountTreeItemBase.ts +++ b/src/docdb/tree/DocDBAccountTreeItemBase.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models'; +import { CosmosDBManagementModels as CosmosModels } from '@azure/arm-cosmosdb'; import { DatabaseMeta, DocumentClient, FeedOptions, QueryIterator } from 'documentdb'; import * as path from 'path'; import * as vscode from 'vscode'; @@ -26,7 +26,7 @@ export abstract class DocDBAccountTreeItemBase extends DocDBTreeItemBase { private _root: IMongoTreeRoot; - constructor(parent: AzureParentTreeItem, id: string, label: string, connectionString: string, isEmulator: boolean, readonly databaseAccount?: DatabaseAccount) { + constructor(parent: AzureParentTreeItem, id: string, label: string, connectionString: string, isEmulator: boolean, readonly databaseAccount?: CosmosModels.DatabaseAccount) { super(parent); this.id = id; this.label = label; diff --git a/src/tree/AttachedAccountsTreeItem.ts b/src/tree/AttachedAccountsTreeItem.ts index a611af235..4a597c0eb 100644 --- a/src/tree/AttachedAccountsTreeItem.ts +++ b/src/tree/AttachedAccountsTreeItem.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Environment } from '@azure/ms-rest-azure-env/lib/azureEnvironment'; +import { Environment } from '@azure/ms-rest-azure-env'; import { ServiceClientCredentials } from "@azure/ms-rest-js"; import * as path from 'path'; import * as vscode from 'vscode'; diff --git a/src/tree/CosmosDBAccountWizard/CosmosDBAccountCreateStep.ts b/src/tree/CosmosDBAccountWizard/CosmosDBAccountCreateStep.ts index 5d73cf42a..989c6b9bd 100644 --- a/src/tree/CosmosDBAccountWizard/CosmosDBAccountCreateStep.ts +++ b/src/tree/CosmosDBAccountWizard/CosmosDBAccountCreateStep.ts @@ -3,8 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; -import { Capability } from '@azure/arm-cosmosdb/esm/models'; +import { CosmosDBManagementClient, CosmosDBManagementModels as CosmosModels } from '@azure/arm-cosmosdb'; import { Progress } from 'vscode'; import { AzureWizardExecuteStep, createAzureClient } from 'vscode-azureextensionui'; import { ext } from '../../extensionVariables'; @@ -27,7 +26,7 @@ export class CosmosDBAccountCreateStep extends AzureWizardExecuteStep{ name: wizardContext.defaultExperience.capability }); + options.capabilities.push({ name: wizardContext.defaultExperience.capability }); } wizardContext.databaseAccount = await client.databaseAccounts.createOrUpdate(wizardContext.resourceGroup.name, wizardContext.accountName, options); diff --git a/src/tree/CosmosDBAccountWizard/ICosmosDBWizardContext.ts b/src/tree/CosmosDBAccountWizard/ICosmosDBWizardContext.ts index e3e555a26..969f811b0 100644 --- a/src/tree/CosmosDBAccountWizard/ICosmosDBWizardContext.ts +++ b/src/tree/CosmosDBAccountWizard/ICosmosDBWizardContext.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DatabaseAccount } from '@azure/arm-cosmosdb/esm/models'; +import { CosmosDBManagementModels as CosmosModels } from '@azure/arm-cosmosdb'; import { IResourceGroupWizardContext } from 'vscode-azureextensionui'; import { Experience } from '../../experiences'; @@ -18,7 +18,7 @@ export interface ICosmosDBWizardContext extends IResourceGroupWizardContext { * The newly created Cosmos DB account * This will be defined after `CosmosDBAccountStep.execute` occurs. */ - databaseAccount?: DatabaseAccount; + databaseAccount?: CosmosModels.DatabaseAccount; /** * The defaultExperience to use diff --git a/src/tree/SubscriptionTreeItem.ts b/src/tree/SubscriptionTreeItem.ts index b63547eba..fc3ebe9ed 100644 --- a/src/tree/SubscriptionTreeItem.ts +++ b/src/tree/SubscriptionTreeItem.ts @@ -3,8 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; -import { DatabaseAccount, DatabaseAccountListKeysResult, DatabaseAccountsListResult } from '@azure/arm-cosmosdb/esm/models'; +import { CosmosDBManagementClient, CosmosDBManagementModels as CosmosModels } from '@azure/arm-cosmosdb'; import * as vscode from 'vscode'; import { AzExtTreeItem, AzureTreeItem, AzureWizard, createAzureClient, ICreateChildImplContext, LocationListStep, ResourceGroupListStep, SubscriptionTreeItemBase } from 'vscode-azureextensionui'; import { DocDBAccountTreeItem } from "../docdb/tree/DocDBAccountTreeItem"; @@ -28,12 +27,12 @@ export class SubscriptionTreeItem extends SubscriptionTreeItemBase { public async loadMoreChildrenImpl(_clearCache: boolean): Promise { const client: CosmosDBManagementClient = createAzureClient(this.root, CosmosDBManagementClient); - const accounts: DatabaseAccountsListResult = await client.databaseAccounts.list(); + const accounts: CosmosModels.DatabaseAccountsListResult = await client.databaseAccounts.list(); return await this.createTreeItemsWithErrorHandling( accounts, 'invalidCosmosDBAccount', - async (db: DatabaseAccount) => await this.initChild(client, db), - (db: DatabaseAccount) => db.name + async (db: CosmosModels.DatabaseAccount) => await this.initChild(client, db), + (db: CosmosModels.DatabaseAccount) => db.name ); } @@ -65,7 +64,7 @@ export class SubscriptionTreeItem extends SubscriptionTreeItemBase { return await this.initChild(client, wizardContext.databaseAccount); } - private async initChild(client: CosmosDBManagementClient, databaseAccount: DatabaseAccount): Promise { + private async initChild(client: CosmosDBManagementClient, databaseAccount: CosmosModels.DatabaseAccount): Promise { const experience = tryGetExperience(databaseAccount); const resourceGroup: string = azureUtils.getResourceGroupFromId(databaseAccount.id); const accountKindLabel = getExperienceLabel(databaseAccount); @@ -77,7 +76,7 @@ export class SubscriptionTreeItem extends SubscriptionTreeItemBase { // Use the default connection string return new MongoAccountTreeItem(this, databaseAccount.id, label, result.connectionStrings[0].connectionString, isEmulator, databaseAccount); } else { - const keyResult: DatabaseAccountListKeysResult = await client.databaseAccounts.listKeys(resourceGroup, databaseAccount.name); + const keyResult: CosmosModels.DatabaseAccountListKeysResult = await client.databaseAccounts.listKeys(resourceGroup, databaseAccount.name); switch (experience && experience.api) { case "Table": return new TableAccountTreeItem(this, databaseAccount.id, label, databaseAccount.documentEndpoint, keyResult.primaryMasterKey, isEmulator, databaseAccount);