Show warning when user selects deployment.template.json to do deployment (#104)

* Show warning when user selects deployment.template.json to do deployment

* Remove fqdn-multi
This commit is contained in:
Jun Han 2018-06-25 12:00:12 +08:00 коммит произвёл GitHub
Родитель ad2ea07725
Коммит 448abafaae
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 8 добавлений и 35 удалений

37
package-lock.json сгенерированный
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "azure-iot-toolkit",
"version": "0.6.2",
"version": "1.0.0-rc",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -1499,14 +1499,6 @@
"mime-types": "^2.1.12"
}
},
"fqdn-multi": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/fqdn-multi/-/fqdn-multi-0.1.1.tgz",
"integrity": "sha1-fCLwkSZTSFzaCxmAuoXwqT4GgGE=",
"requires": {
"shelljs": "0.7.6"
}
},
"from": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
@ -2079,11 +2071,6 @@
"integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=",
"dev": true
},
"interpret": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz",
"integrity": "sha1-ggzdWIuGj/sZGoCVBtbJyPISsbA="
},
"is": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz",
@ -3146,7 +3133,8 @@
"path-parse": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
"dev": true
},
"pause-stream": {
"version": "0.0.11",
@ -3315,14 +3303,6 @@
"util-deprecate": "~1.0.1"
}
},
"rechoir": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
"requires": {
"resolve": "^1.1.6"
}
},
"reduplexer": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/reduplexer/-/reduplexer-1.1.0.tgz",
@ -3450,6 +3430,7 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
"integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==",
"dev": true,
"requires": {
"path-parse": "^1.0.5"
}
@ -3501,16 +3482,6 @@
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
"shelljs": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.6.tgz",
"integrity": "sha1-N5zM+1a5HIYB5HkzVutTgpJN6a0=",
"requires": {
"glob": "^7.0.0",
"interpret": "^1.0.0",
"rechoir": "^0.6.2"
}
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",

Просмотреть файл

@ -444,7 +444,6 @@
"azure-iot-device-mqtt": "1.1.7",
"azure-iothub": "^1.3.0",
"clipboardy": "^1.1.4",
"fqdn-multi": "^0.1.1",
"ms-rest": "^2.3.2",
"ms-rest-azure": "^2.5.5",
"strip-json-comments": "^2.0.1",

Просмотреть файл

@ -4,7 +4,6 @@
"use strict";
import axios from "axios";
import * as iothub from "azure-iothub";
import * as fqdn from "fqdn-multi";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
@ -125,6 +124,10 @@ export class IoTEdgeExplorer extends BaseExplorer {
}
filePath = filePathUri[0].fsPath;
}
if (path.basename(filePath) === "deployment.template.json") {
vscode.window.showWarningMessage("Please select 'deployment.json' under 'config' folder for deployment.");
return "";
}
return fs.readFileSync(filePath, "utf8");
}