diff --git a/lib/main.js.map b/lib/main.js.map index 4b7f3a4..e167e48 100644 --- a/lib/main.js.map +++ b/lib/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA4F;AAC5F,+BAAiF;AACjF,+BAA+B;AAC/B,qCAAwE;AACxE,iEAAyE;AAEzE,2CAAmG;AACnG,yCAA0D;AAC1D,iDAAsD;AACtD,uCAAuD;AAEvD,MAAM,OAAO,GAAoC,EAAE,CAAC;AACpD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;AACzC,IAAI,mBAAuC,CAAC;AAC5C,MAAM,cAAc,GAA0D,EAAE,CAAC;AAEjF,MAAM,IAAI,GAAG,KAAK;KACf,UAAU,CAAC,qBAAW,CAAC,IAAI,CAAC;KAC5B,KAAK,CAAC,wCAAwC,CAAC;KAC/C,OAAO,CAAC;IACP,KAAK,EAAE;QACL,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,mCAAmC;QAC7C,KAAK,EAAE,GAAG;KACX;IACD,KAAK,EAAE;QACL,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,wDAAwD;QAClE,KAAK,EAAE,GAAG;KACX;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,gCAAgC;QAC1C,KAAK,EAAE,GAAG;KACX;IACD,OAAO,EAAE;QACP,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,kCAAkC;QAC5C,KAAK,EAAE,GAAG;KACX;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,uBAAuB;KAClC;IACD,UAAU,EAAE;QACV,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,wFAAwF;QAClG,KAAK,EAAE,GAAG;KACX;IACD,cAAc,EAAE;QACd,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,wBAAwB;KACnC;IACD,WAAW,EAA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achost.js index c377e98..f2e1226 100644 --- a/lib/terminals/uachost.js +++ b/lib/terminals/uachost.js @@ -67,6 +67,7 @@ function connectToClient(path) { buffer = buffer.slice(dataSize); else buffer = undefined; + dataSize = 1; } } function handleResponse(data) { @@ -75,8 +76,7 @@ function connectToClient(path) { const buf = Buffer.allocUnsafe(5); buf.writeUInt8(1 /* Data */, 0); buf.writeUInt32BE(data.length, 1); - client.write(buf); - client.write(data); + client.write(Buffer.concat([buf, data])); } else { const dataLength = Buffer.byteLength(data, encoding); @@ -97,12 +97,13 @@ function connectToClient(path) { process.exit(); } function handleError(error) { + const encoding = host && host.encoding || 'utf8'; const message = error.message || JSON.stringify(error); - const dataLength = Buffer.byteLength(message, 'utf8'); + const dataLength = Buffer.byteLength(message, encoding); const buf = Buffer.allocUnsafe(5 + dataLength); buf.writeUInt8(254 /* Error */, 0); buf.writeUInt32BE(dataLength, 1); - buf.write(message, 5, dataLength, 'utf8'); + buf.write(message, 5, dataLength, encoding); client.write(buf); } function handleRemoteClose() { diff --git a/lib/terminals/uachost.js.map b/lib/terminals/uachost.js.map index a9a2203..e8221bc 100644 --- a/lib/terminals/uachost.js.map +++ b/lib/terminals/uachost.js.map @@ -1 +1 @@ -{"version":3,"file":"uachost.js","sourceRoot":"","sources":["../../src/terminals/uachost.ts"],"names":[],"mappings":";;AAAA,6BAA+C;AAC/C,+BAAwC;AAExC,yCAA2C;AAU3C,SAAgB,eAAe,CAAC,IAAY;IAC1C,IAAI,MAA0B,CAAC;IAC/B,IAAI,IAAuC,CAAC;IAC5C,MAAM,MAAM,GAAG,aAAa,CAAC,WAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5D,MAAM;SACL,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACzB,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC;SAC9B,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAEhC,SAAS,aAAa,CAAC,IAAY;QACjC,IAAG,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AO,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC;AACH,CAAC;AAtGD,0CAsGC"} \ No newline at end of file diff --git a/lib/terminals/uacwrapper.js b/lib/terminals/uacwrapper.js index 9e16fe3..189d23d 100644 --- a/lib/terminals/uacwrapper.js +++ b/lib/terminals/uacwrapper.js @@ -131,8 +131,6 @@ class UACClient extends base_1.TerminalBase { this._pushData('\x1b[2J\x1b[1;1H\x1b[?25h\x1b[0m'); } let dataSize = 1; - if (this.rawBuffer.length < dataSize) - return; while (this.rawBuffer && this.rawBuffer.length >= dataSize) { const { rawBuffer: buffer } = this; const cmd = buffer.readUInt8(0); @@ -144,23 +142,33 @@ class UACClient extends base_1.TerminalBase { return; this._pushData(buffer.slice(5, dataSize)); break; + case 254 /* Error */: + dataSize += buffer.readUInt32BE(1) + 4; + if (buffer.length < dataSize) + return; + throw new Error(`Remote error: ${buffer.toString('utf8', 5, dataSize)}`); case 255 /* Exit */: dataSize += 4; if (buffer.length < dataSize) return; this.emit('end', buffer.readUInt16BE(1), buffer.readUInt16BE(3)); throw new Error('Remote dismissed'); - default: throw new Error('Invalid Code'); + default: throw new Error(`Invalid Code: ${cmd}`); } } - catch (_a) { - this.pty.end(); - delete this.pty; + catch (error) { + console.error(process.platform === 'win32' ? error : (error.message || error)); + if (this.pty) { + this.pty.end(); + delete this.pty; + } + return; } if (buffer.length > dataSize) this.rawBuffer = buffer.slice(dataSize); else this.rawBuffer = undefined; + dataSize = 1; } } handleError(error) { diff --git a/lib/terminals/uacwrapper.js.map b/lib/terminals/uacwrapper.js.map index d266ce6..2c727ca 100644 --- a/lib/terminals/uacwrapper.js.map +++ b/lib/terminals/uacwrapper.js.map @@ -1 +1 @@ -{"version":3,"file":"uacwrapper.js","sourceRoot":"","sources":["../../src/terminals/uacwrapper.ts"],"names":[],"mappings":";;AAAA,iDAAyC;AACzC,mCAAqC;AACrC,8CAA8C;AAC9C,6BAAmD;AACnD,+BAAkD;AAClD,+BAAiC;AACjC,4CAA0C;AA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,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;wBACjE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;oBACtC,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;iBAC1C;aACF;YAAC,WAAM;gBACN,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;gBACf,OAAO,IAAI,CAAC,GAAG,CAAC;aACjB;YACD,IAAG,MAAM,CAAC,MAAM,GAAG,QAAQ;gBACzB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;;gBAExC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;SAC9B;IACH,CAAC;IAEO,WAAW,CAAC,KAAa;QAC/B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAEO,kBAAkB,CAAC,IAAa;QACtC,IAAG,IAAI,EAAE;YACP,IAAG,IAAI,CAAC,GAAG,EAAE;gBACX,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;gBACf,OAAO,IAAI,CAAC,GAAG,CAAC;aACjB;YACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC,CAAC;SACzE;IACH,CAAC;IAEO,UAAU;QAChB,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;CACF;AApKD,8BAoKC"} \ No newline at end of file +{"version":3,"file":"uacwrapper.js","sourceRoot":"","sources":["../../src/terminals/uacwrapper.ts"],"names":[],"mappings":";;AAAA,iDAAyC;AACzC,mCAAqC;AACrC,8CAA8C;AAC9C,6BAAmD;AACnD,+BAAkD;AAClD,+BAAiC;AACjC,4CAA0C;AAC1C,sDAA6C;AAC7C,iCAAuD;AAGvD,MAAM,eAAe,GAAG,yBAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CA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ClB,CAAC;CACF;AA5KD,8BA4KC"} \ No newline at end of file diff --git a/package.json b/package.json index 7e72a38..d17ef05 100644 --- a/package.json +++ b/package.json @@ -27,20 +27,21 @@ }, "homepage": "https://github.com/JLChnToZ/uniterm#readme", "devDependencies": { - "electron": "^3.0.9", - "electron-packager": "^12.2.0", - "electron-prebuilt-compile": "3.0.6", + "electron": "4.0.0", + "electron-packager": "^13.0.1", + "electron-prebuilt-compile": "^4.0.0", "electron-rebuild": "^1.8.2", - "tslint": "^5.11.0", - "typescript": "^3.1.6" + "node-abi": "^2.5.1", + "tslint": "^5.12.0", + "typescript": "^3.2.2" }, "dependencies": { - "@types/hyperscript": "0.0.3", "@types/gist-package-json": "git+https://gist.github.com/5c1cc527fe6b5b7dba41fec7fe54bf6e.git", + "@types/hyperscript": "0.0.3", "@types/js-yaml": "^3.11.2", "@types/shell-escape": "^0.2.0", "@types/which": "^1.3.1", - "@types/yargs": "^12.0.1", + "@types/yargs": "^12.0.4", "about-window": "^1.12.1", "code-to-signal": "^1.0.2", "default-shell": "^1.0.1", @@ -52,7 +53,7 @@ "tocas-ui": "^2.3.2", "which": "^1.3.1", "wslpty": "^0.2.1", - "xterm": "^3.8.0", - "yargs": "^12.0.2" + "xterm": "^3.9.1", + "yargs": "^12.0.5" } } diff --git a/src/main.ts b/src/main.ts index 26b8ad5..580bdd1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -75,7 +75,7 @@ const args = yargs .version(versionString) .help(); -interface Arguments extends yargs.Arguments { +interface Arguments { /** Working directory to start shell. */ cwd?: string; c?: string; /** Add/modify environment variable passed into the shell. */ @@ -109,7 +109,7 @@ interface Arguments extends yargs.Arguments { pipe?: string; } -const argv: Arguments = app.isPackaged ? +const argv: yargs.Arguments = app.isPackaged ? args.parse(process.argv.slice(1)) : args.argv; @@ -229,7 +229,7 @@ function getWindow(newWindow?: boolean) { }); } -async function openShell(lArgv: Arguments, cwd: string) { +async function openShell(lArgv: yargs.Arguments, cwd: string) { // Join env values const env: { [key: string]: string } = {}; if(Array.isArray(lArgv.env) && lArgv.env.length) diff --git a/src/terminals/uachost.ts b/src/terminals/uachost.ts index e194ab7..d78c0ab 100644 --- a/src/terminals/uachost.ts +++ b/src/terminals/uachost.ts @@ -66,6 +66,7 @@ export function connectToClient(path: string) { buffer = buffer.slice(dataSize); else buffer = undefined; + dataSize = 1; } } @@ -75,8 +76,7 @@ export function connectToClient(path: string) { const buf = Buffer.allocUnsafe(5); buf.writeUInt8(CMDType.Data, 0); buf.writeUInt32BE(data.length, 1); - client.write(buf); - client.write(data); + client.write(Buffer.concat([buf, data])); } else { const dataLength = Buffer.byteLength(data, encoding); const buf = Buffer.allocUnsafe(5 + dataLength); @@ -98,12 +98,13 @@ export function connectToClient(path: string) { } function handleError(error: Error) { + const encoding = host && host.encoding || 'utf8'; const message = error.message || JSON.stringify(error); - const dataLength = Buffer.byteLength(message, 'utf8'); + const dataLength = Buffer.byteLength(message, encoding); const buf = Buffer.allocUnsafe(5 + dataLength); buf.writeUInt8(CMDType.Error, 0); buf.writeUInt32BE(dataLength, 1); - buf.write(message, 5, dataLength, 'utf8'); + buf.write(message, 5, dataLength, encoding); client.write(buf); } diff --git a/src/terminals/uacwrapper.ts b/src/terminals/uacwrapper.ts index 2554f54..1025e24 100644 --- a/src/terminals/uacwrapper.ts +++ b/src/terminals/uacwrapper.ts @@ -135,7 +135,6 @@ export class UACClient extends TerminalBase { this._pushData('\x1b[2J\x1b[1;1H\x1b[?25h\x1b[0m'); } let dataSize = 1; - if(this.rawBuffer.length < dataSize) return; while(this.rawBuffer && this.rawBuffer.length >= dataSize) { const { rawBuffer: buffer } = this; const cmd = buffer.readUInt8(0) as CMDType; @@ -146,21 +145,30 @@ export class UACClient extends TerminalBase { if(buffer.length < dataSize) return; this._pushData(buffer.slice(5, dataSize)); break; + case CMDType.Error: + dataSize += buffer.readUInt32BE(1) + 4; + if(buffer.length < dataSize) return; + throw new Error(`Remote error: ${buffer.toString('utf8', 5, dataSize)}`); case CMDType.Exit: dataSize += 4; if(buffer.length < dataSize) return; this.emit('end', buffer.readUInt16BE(1), buffer.readUInt16BE(3)); throw new Error('Remote dismissed'); - default: throw new Error('Invalid Code'); + default: throw new Error(`Invalid Code: ${cmd}`); } - } catch { - this.pty.end(); - delete this.pty; + } catch(error) { + console.error(process.platform === 'win32' ? error : (error.message || error)); + if(this.pty) { + this.pty.end(); + delete this.pty; + } + return; } if(buffer.length > dataSize) this.rawBuffer = buffer.slice(dataSize); else this.rawBuffer = undefined; + dataSize = 1; } } diff --git a/yarn.lock b/yarn.lock index 021de80..5322cc7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -61,9 +61,10 @@ resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.1.tgz#7802c380887986ca909008afea4e08025b130f8d" integrity sha512-ZrJDWpvg75LTGX4XwuneY9s6bF3OeZcGTpoGh3zDV9ytzcHMFsRrMIaLBRJZQMBoGyKs6unBQfVdrLZiYfb1zQ== -"@types/yargs@^12.0.1": - version "12.0.1" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.1.tgz#c5ce4ad64499010ae4dc2acd9b14d49749a44233" +"@types/yargs@^12.0.4": + version "12.0.4" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.4.tgz#14a37542f01a1ed4d743d5f8bc3f40e63e5835d4" + integrity sha512-hBYcOaYPnlAPj2OZbivFFzsW61mN0L3N0Aq4KwRt/ZXlw1c25Srj8413MBu5IhFGOyOdjLi2/qOqtStDTXGs9g== abab@^1.0.0: version "1.0.4" @@ -798,10 +799,6 @@ balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" -base64-js@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" - base64-js@^1.2.3: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" @@ -918,10 +915,6 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - camelcase@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" @@ -1346,6 +1339,13 @@ debug@^3.0.0, debug@^3.1.0: dependencies: ms "^2.1.1" +debug@^4.0.1, debug@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1546,9 +1546,18 @@ electron-download@^4.1.0, electron-download@^4.1.1: semver "^5.4.1" sumchecker "^2.0.2" -electron-osx-sign@^0.4.1: +electron-notarize@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-0.0.5.tgz#d9e95c763a6af853ce16d31dde72d73cb25b0703" + integrity sha512-YzrqZ6RDQ7Wt2RWlxzRoQUuxnTeXrfp7laH7XKcmQqrZ6GaAr50DMPvFMpqDKdrZSHSbcgZgB7ktIQbjvITmCQ== + dependencies: + debug "^4.1.0" + fs-extra "^7.0.0" + +electron-osx-sign@^0.4.11: version "0.4.11" resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.11.tgz#8377732fe7b207969f264b67582ee47029ce092f" + integrity sha512-VVd40nrnVqymvFrY9ZkOYgHJOvexHHYTR3di/SN+mjJ0OWhR1I8BRVj3U+Yamw6hnkZZNKZp52rqL5EFAAPFkQ== dependencies: bluebird "^3.5.0" compare-version "^0.1.2" @@ -1557,37 +1566,39 @@ electron-osx-sign@^0.4.1: minimist "^1.2.0" plist "^3.0.1" -electron-packager@^12.2.0: - version "12.2.0" - resolved "https://registry.yarnpkg.com/electron-packager/-/electron-packager-12.2.0.tgz#e38e0702a12e5f62a00a03aabd0b9ad28aebab4b" +electron-packager@^13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/electron-packager/-/electron-packager-13.0.1.tgz#126b697aa2006d8e5df9eb28faa303b6167b08d4" + integrity sha512-fXfldaZ1wihpPaMTSGMxvCeETJwVArlnMmKafVXLJbbZwS+WTjY4iL7ju9WMQ0LNGuiiIwSMCQFxt5iA087mqg== dependencies: asar "^0.14.0" - debug "^3.0.0" + debug "^4.0.1" electron-download "^4.1.1" - electron-osx-sign "^0.4.1" + electron-notarize "^0.0.5" + electron-osx-sign "^0.4.11" extract-zip "^1.0.3" - fs-extra "^5.0.0" + fs-extra "^7.0.0" galactus "^0.2.1" get-package-info "^1.0.0" - nodeify "^1.0.1" parse-author "^2.0.0" - pify "^3.0.0" - plist "^2.0.0" + pify "^4.0.0" + plist "^3.0.0" rcedit "^1.0.0" resolve "^1.1.6" sanitize-filename "^1.6.0" semver "^5.3.0" - yargs-parser "^10.0.0" + yargs-parser "^11.0.0" -electron-prebuilt-compile@3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/electron-prebuilt-compile/-/electron-prebuilt-compile-3.0.6.tgz#b126f4f36a17f386bd733f3cf8cf2824506f565a" +electron-prebuilt-compile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/electron-prebuilt-compile/-/electron-prebuilt-compile-4.0.0.tgz#3262fe69fa343022353e4c8bd16c60e8f181c47e" + integrity sha512-mIQSctVTH6zq0P5oBb5XI+aT6grCIXIF3ntIxx45HNoAQggMUmA9Gf1dUquila3gSHzMN6pcN7ClpEPXPvFm+w== dependencies: babel-plugin-array-includes "^2.0.3" babel-plugin-transform-async-to-generator "^6.24.1" babel-preset-es2016-node5 "^1.1.2" babel-preset-react "^6.24.1" - electron "3.0.6" + electron "4.0.0" electron-compile "*" electron-compilers "*" yargs "^6.6.0" @@ -1611,17 +1622,10 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47: version "1.3.88" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.88.tgz#f36ab32634f49ef2b0fdc1e82e2d1cc17feb29e7" -electron@3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.6.tgz#2d7b4ed521e90c69d83ffe5696db173b0e7b2473" - dependencies: - "@types/node" "^8.0.24" - electron-download "^4.1.0" - extract-zip "^1.0.3" - -electron@^3.0.9: - version "3.0.10" - resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.10.tgz#7d412856e8cf0d3041a612a32dd09e2af2d50f50" +electron@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/electron/-/electron-4.0.0.tgz#6ccb40cc8bf2d49954dcea73b97ae7ad12ee04b3" + integrity sha512-3XPG/3IXlvnT1oe1K6zEushoD0SKbP8xwdrL10EWGe6k2iOV4hSHqJ8vWnR8yZ7VbSXmBRfomEFDNAo/q/cwKw== dependencies: "@types/node" "^8.0.24" electron-download "^4.1.0" @@ -1846,9 +1850,10 @@ fs-extra@^4.0.0, fs-extra@^4.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" +fs-extra@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" @@ -2220,7 +2225,7 @@ is-promise@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" -is-promise@~1, is-promise@~1.0.0: +is-promise@~1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-1.0.1.tgz#31573761c057e33c2e91aab9e96da08cefbe76e5" @@ -2683,6 +2688,13 @@ node-abi@^2.0.0: dependencies: semver "^5.4.1" +node-abi@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.5.1.tgz#bb17288fc3b2f68fea0ed9897c66979fd754ed47" + integrity sha512-oDbFc7vCFx0RWWCweTer3hFm1u+e60N5FtGnmRV6QqvgATGFH/XRR6vqWIeBVosCYCqt6YdIr2L0exLZuEdVcQ== + dependencies: + semver "^5.4.1" + node-gyp@^3.6.0: version "3.8.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" @@ -2719,13 +2731,6 @@ node-source-walk@^4.0.0: dependencies: "@babel/parser" "^7.0.0" -nodeify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/nodeify/-/nodeify-1.0.1.tgz#64ab69a7bdbaf03ce107b4f0335c87c0b9e91b1d" - dependencies: - is-promise "~1.0.0" - promise "~1.3.0" - "nopt@2 || 3", nopt@3.x, nopt@^3.0.1: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -3007,9 +3012,10 @@ pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" +pify@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== pinkie-promise@^2.0.0: version "2.0.1" @@ -3021,15 +3027,7 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -plist@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/plist/-/plist-2.1.0.tgz#57ccdb7a0821df21831217a3cad54e3e146a1025" - dependencies: - base64-js "1.2.0" - xmlbuilder "8.2.2" - xmldom "0.1.x" - -plist@^3.0.1: +plist@^3.0.0, plist@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c" dependencies: @@ -3289,12 +3287,6 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -promise@~1.3.0: - version "1.3.0" - resolved "http://registry.npmjs.org/promise/-/promise-1.3.0.tgz#e5cc9a4c8278e4664ffedc01c7da84842b040175" - dependencies: - is-promise "~1" - promise@~2.0: version "2.0.0" resolved "http://registry.npmjs.org/promise/-/promise-2.0.0.tgz#46648aa9d605af5d2e70c3024bf59436da02b80e" @@ -4015,9 +4007,10 @@ tslib@^1.8.0, tslib@^1.8.1: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" -tslint@^5.11.0: - version "5.11.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed" +tslint@^5.12.0: + version "5.12.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.12.0.tgz#47f2dba291ed3d580752d109866fb640768fca36" + integrity sha512-CKEcH1MHUBhoV43SA/Jmy1l24HJJgI0eyLbBNSRyFlsQvb9v6Zdq+Nz2vEOH00nC5SUx4SneJ59PZUS/ARcokQ== dependencies: babel-code-frame "^6.22.0" builtin-modules "^1.1.1" @@ -4064,10 +4057,15 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@>=1.6, typescript@^3.1.6: +typescript@>=1.6: version "3.2.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.1.tgz#0b7a04b8cf3868188de914d9568bd030f0c56192" +typescript@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5" + integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg== + uglify-js@^2.4.19: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" @@ -4245,10 +4243,6 @@ wslpty@^0.2.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -xmlbuilder@8.2.2: - version "8.2.2" - resolved "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773" - xmlbuilder@^9.0.7: version "9.0.7" resolved "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" @@ -4263,9 +4257,10 @@ xtend@~2.1.1: dependencies: object-keys "~0.4.0" -xterm@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.8.0.tgz#55d1de518bdc9c9793823f5e4e97d6898972938d" +xterm@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.9.1.tgz#65756beb09bb6fb44aeb29032adcd6789aaaa5f4" + integrity sha512-5AZlhP0jvH/Sskx1UvvNFMqDRHVFqapl59rjV3RRpTJmveoharJplxPfzSThk85I4+AZo2xvD0X0nh0AAzkeZQ== y18n@^3.2.1: version "3.2.1" @@ -4279,13 +4274,7 @@ yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" -yargs-parser@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - dependencies: - camelcase "^4.1.0" - -yargs-parser@^11.1.1: +yargs-parser@^11.0.0, yargs-parser@^11.1.1: version "11.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" dependencies: @@ -4311,9 +4300,10 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" -yargs@^12.0.2: +yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" + integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== dependencies: cliui "^4.0.0" decamelize "^1.2.0"