From 069bb0ca4a378b6605958fa513a3ffcade92e699 Mon Sep 17 00:00:00 2001 From: Sun Zheng'an Date: Fri, 1 Mar 2019 15:03:38 +0800 Subject: [PATCH] Rewrite all the code in TypeScript --- .gitignore | 3 +- README.md | 22 +++---- gulpfile.js | 29 --------- gulpfile.ts | 29 +++++++++ index.js | 117 ------------------------------------- index.ts | 140 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 18 +++++- test/index.js | 6 +- tsconfig.json | 20 +++++++ yarn.lock | 159 +++++++++++++++++++++++++++++++++++++++++++++++++- 10 files changed, 378 insertions(+), 165 deletions(-) delete mode 100644 gulpfile.js create mode 100644 gulpfile.ts delete mode 100644 index.js create mode 100644 index.ts create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index 49e0c28..853bab9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /node_modules/ /npm-debug.log -.nyc_output/ +/.nyc_output/ +/lib/ diff --git a/README.md b/README.md index 6fa732b..e3884ae 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Or you can use this shorthand: gulp.task('greet', shell.task('echo Hello, World!')) ``` -You can find more examples in the [gulpfile](https://github.com/sun-zheng-an/gulp-shell/blob/master/gulpfile.js) of this project. +You can find more examples in the [gulpfile](https://github.com/sun-zheng-an/gulp-shell/blob/master/gulpfile.ts) of this project. **WARNING**: Running commands like ~~`gulp.src('').pipe(shell('whatever'))`~~ is [considered as an anti-pattern](https://github.com/sun-zheng-an/gulp-shell/issues/55). **PLEASE DON'T DO THAT ANYMORE**. @@ -43,7 +43,7 @@ You can find more examples in the [gulpfile](https://github.com/sun-zheng-an/gul #### commands -type: `Array` or `String` +type: `string` or `Array` A command can be a [template][] which can be interpolated by some [file][] info (e.g. `file.path`). @@ -51,7 +51,7 @@ A command can be a [template][] which can be interpolated by some [file][] info #### options.cwd -type: `String` +type: `string` default: [`process.cwd()`](http://nodejs.org/api/process.html#process_process_cwd) @@ -59,7 +59,7 @@ Sets the current working directory for the command. This can be a [template][] w #### options.env -type: `Object` +type: `object` By default, all the commands will be executed in an environment with all the variables in [`process.env`](http://nodejs.org/api/process.html#process_process_env) and `PATH` prepended by `./node_modules/.bin` (allowing you to run executables in your Node's dependencies). @@ -69,7 +69,7 @@ For example, setting it to `{ PATH: process.env.PATH }` will reset the `PATH` if #### options.shell -type: `String` +type: `string` default: `/bin/sh` on UNIX, and `cmd.exe` on Windows @@ -77,7 +77,7 @@ Change it to `bash` if you like. #### options.quiet -type: `Boolean` +type: `boolean` default: `false` @@ -85,7 +85,7 @@ By default, it will print the command output. #### options.verbose -type: `Boolean` +type: `boolean` default: `false` @@ -93,7 +93,7 @@ Set to `true` to print the command(s) to stdout as they are executed #### options.ignoreErrors -type: `Boolean` +type: `boolean` default: `false` @@ -101,16 +101,16 @@ By default, it will emit an `error` event when the command finishes unsuccessful #### options.errorMessage -type: `String` +type: `string` -default: ``Command `<%= command %>` failed with exit code <%= error.code %>`` +default: `` Command `<%= command %>` failed with exit code <%= error.code %> `` You can add a custom error message for when the command fails. This can be a [template][] which can be interpolated with the current `command`, some [file][] info (e.g. `file.path`) and some error info (e.g. `error.code`). #### options.templateData -type: `Object` +type: `object` The data that can be accessed in [template][]. diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index ba114f4..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,29 +0,0 @@ -const gulp = require('gulp') -const shell = require('./') - -const paths = { - js: ['*.js', 'test/*.js'] -} - -gulp.task('test', shell.task('mocha')) - -gulp.task('coverage', shell.task('nyc mocha')) - -gulp.task( - 'coveralls', - gulp.series( - 'coverage', - shell.task('nyc report --reporter=text-lcov | coveralls') - ) -) - -gulp.task('format', shell.task('prettier --write ' + paths.js.join(' '))) - -gulp.task('default', gulp.series('coverage', 'format')) - -gulp.task( - 'watch', - gulp.series('default', function watch() { - gulp.watch(paths.js, gulp.task('default')) - }) -) diff --git a/gulpfile.ts b/gulpfile.ts new file mode 100644 index 0000000..42ed8cc --- /dev/null +++ b/gulpfile.ts @@ -0,0 +1,29 @@ +import gulp from 'gulp' +import shell from './index' + +const files = ['*.ts', 'test/*.js'] + +gulp.task('build', shell.task('tsc')) + +gulp.task('test', shell.task('mocha')) + +gulp.task('coverage', shell.task('nyc mocha')) + +gulp.task( + 'coveralls', + gulp.series( + 'coverage', + shell.task('nyc report --reporter=text-lcov | coveralls') + ) +) + +gulp.task('format', shell.task('prettier --write ' + files.join(' '))) + +gulp.task('default', gulp.series('build', 'coverage', 'format')) + +gulp.task( + 'watch', + gulp.series('default', () => { + gulp.watch(files, gulp.task('default')) + }) +) diff --git a/index.js b/index.js deleted file mode 100644 index b79f37e..0000000 --- a/index.js +++ /dev/null @@ -1,117 +0,0 @@ -const _ = require('lodash') -const async = require('async') -const chalk = require('chalk') -const fancyLog = require('fancy-log') -const path = require('path') -const PluginError = require('plugin-error') -const spawn = require('child_process').spawn -const template = require('lodash.template') -const through = require('through2') - -const PLUGIN_NAME = 'gulp-shell' - -function normalizeCommands(commands) { - if (typeof commands === 'string') { - commands = [commands] - } - - if (!Array.isArray(commands)) { - throw new PluginError(PLUGIN_NAME, 'Missing commands') - } - - return commands -} - -function normalizeOptions(options) { - options = _.extend( - { - cwd: process.cwd(), - shell: true, - quiet: false, - verbose: false, - ignoreErrors: false, - errorMessage: - 'Command `<%= command %>` failed with exit code <%= error.code %>' - }, - options - ) - - const pathToBin = path.join(process.cwd(), 'node_modules', '.bin') - const pathName = /^win/.test(process.platform) ? 'Path' : 'PATH' - const newPath = pathToBin + path.delimiter + process.env[pathName] - options.env = _.extend({}, process.env, { [pathName]: newPath }, options.env) - - return options -} - -function runCommands(commands, options, file, done) { - async.eachSeries( - commands, - (command, done) => { - const context = _.extend({ file }, options.templateData) - command = template(command)(context) - - if (options.verbose) { - fancyLog(chalk.cyan(command)) - } - - const child = spawn(command, { - env: options.env, - cwd: template(options.cwd)(context), - shell: options.shell, - stdio: options.quiet ? 'ignore' : 'inherit' - }) - - child.on('exit', code => { - if (code === 0 || options.ignoreErrors) { - return done() - } - - const context = _.extend( - { - command, - file, - error: { code } - }, - options.templateData - ) - - const message = template(options.errorMessage)(context) - - done(new PluginError(PLUGIN_NAME, message)) - }) - }, - done - ) -} - -function shell(commands, options) { - commands = normalizeCommands(commands) - options = normalizeOptions(options) - - const stream = through.obj(function(file, _encoding, done) { - runCommands(commands, options, file, error => { - if (error) { - this.emit('error', error) - } else { - this.push(file) - } - done() - }) - }) - - stream.resume() - - return stream -} - -shell.task = (commands, options) => done => { - runCommands( - normalizeCommands(commands), - normalizeOptions(options), - null, - done - ) -} - -module.exports = shell diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..336e22d --- /dev/null +++ b/index.ts @@ -0,0 +1,140 @@ +import { eachSeries, ErrorCallback } from 'async' +import chalk from 'chalk' +import { spawn } from 'child_process' +import fancyLog from 'fancy-log' +import template from 'lodash.template' +import * as path from 'path' +import PluginError from 'plugin-error' +import { obj as throughObj } from 'through2' +import { TaskFunction } from 'undertaker' +import Vinyl from 'vinyl' + +const PLUGIN_NAME = 'gulp-shell' + +interface Options { + cwd?: string + env?: NodeJS.ProcessEnv + shell?: true | string + quiet?: boolean + verbose?: boolean + ignoreErrors?: boolean + errorMessage?: string + templateData?: object +} + +const normalizeCommands = (commands: string | string[]): string[] => { + if (typeof commands === 'string') { + commands = [commands] + } + + if (!Array.isArray(commands)) { + throw new PluginError(PLUGIN_NAME, 'Missing commands') + } + + return commands +} + +const normalizeOptions = (options: Options = {}): Required => { + const pathToBin = path.join(process.cwd(), 'node_modules', '.bin') + const pathName = /^win/.test(process.platform) ? 'Path' : 'PATH' + const newPath = pathToBin + path.delimiter + process.env[pathName] + const env = { + ...process.env, + [pathName]: newPath, + ...options.env + } + + return { + cwd: process.cwd(), + env, + shell: true, + quiet: false, + verbose: false, + ignoreErrors: false, + errorMessage: + 'Command `<%= command %>` failed with exit code <%= error.code %>', + templateData: {}, + ...options + } +} + +const runCommands = ( + commands: string[], + options: Required, + file: Vinyl | null, + done: ErrorCallback +): void => { + eachSeries( + commands, + (command, done) => { + const context = { file, ...options.templateData } + command = template(command)(context) + + if (options.verbose) { + fancyLog(chalk.cyan(command)) + } + + const child = spawn(command, { + env: options.env, + cwd: template(options.cwd)(context), + shell: options.shell, + stdio: options.quiet ? 'ignore' : 'inherit' + }) + + child.on('exit', code => { + if (code === 0 || options.ignoreErrors) { + return done() + } + + const context = { + command, + file, + error: { code }, + ...options.templateData + } + + const message = template(options.errorMessage)(context) + + done(new PluginError(PLUGIN_NAME, message)) + }) + }, + done + ) +} + +const shell = ( + commands: string | string[], + options?: Options +): NodeJS.ReadWriteStream => { + const normalizedCommands = normalizeCommands(commands) + const normalizedOptions = normalizeOptions(options) + + const stream = throughObj(function(file, _encoding, done) { + runCommands(normalizedCommands, normalizedOptions, file, error => { + if (error) { + this.emit('error', error) + } else { + this.push(file) + } + done() + }) + }) + + stream.resume() + + return stream +} + +shell.task = ( + commands: string | string[], + options?: Options +): TaskFunction => done => { + runCommands( + normalizeCommands(commands), + normalizeOptions(options), + null, + done + ) +} + +export = shell diff --git a/package.json b/package.json index 9b58aff..6d7b2ba 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,13 @@ "name": "gulp-shell", "version": "0.6.5", "description": "A handy command line interface for gulp", - "main": "index.js", + "main": "./lib/index.js", + "typings": "./lib/index.d.ts", + "files": [ + "lib/index.*" + ], "scripts": { + "build": "gulp build", "test": "gulp test", "coveralls": "gulp coveralls" }, @@ -24,6 +29,14 @@ }, "homepage": "https://github.com/sun-zheng-an/gulp-shell", "devDependencies": { + "@types/async": "^2.4.1", + "@types/chai": "^4.1.7", + "@types/fancy-log": "^1.3.1", + "@types/gulp": "^4.0.5", + "@types/lodash.template": "^4.4.5", + "@types/mocha": "^5.2.6", + "@types/node": "^11.10.4", + "@types/through2": "^2.0.34", "chai": "^4.2.0", "coveralls": "^3.0.3", "gulp": "^4.0.0", @@ -31,13 +44,14 @@ "mocha-lcov-reporter": "^1.3.0", "nyc": "^13.3.0", "prettier": "^1.16.4", + "ts-node": "^8.0.2", + "typescript": "^3.3.3333", "vinyl": "^2.2.0" }, "dependencies": { "async": "^2.6.2", "chalk": "^2.4.2", "fancy-log": "^1.3.3", - "lodash": "^4.17.11", "lodash.template": "^4.4.0", "plugin-error": "^1.0.1", "through2": "^3.0.1" diff --git a/test/index.js b/test/index.js index 31854c1..86b8e60 100644 --- a/test/index.js +++ b/test/index.js @@ -1,12 +1,12 @@ /* eslint-env mocha */ -const expect = require('chai').expect -const join = require('path').join +const { expect } = require('chai') +const { join } = require('path') const Vinyl = require('vinyl') const shell = require('..') -function expectToBeOk(stream, done) { +const expectToBeOk = (stream, done) => { stream.on('error', done).on('data', () => { done() }) diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..67e21ab --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + + "esModuleInterop": true + }, + + "files": ["index.ts"] +} diff --git a/yarn.lock b/yarn.lock index d16481c..0887e07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -90,6 +90,122 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" +"@types/async@^2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/async/-/async-2.4.1.tgz#43c3b2c60eab41c25ca0009c07ca7d619d943119" + integrity sha512-C09BK/wXzbW+/JK9zckhe+FeSbg7NmvVjUWwApnw7ksRpUq3ecGLiq2Aw1LlY4Z/VmtdhSaIs7jO5/MWRYMcOA== + +"@types/chai@^4.1.7": + version "4.1.7" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.7.tgz#1b8e33b61a8c09cbe1f85133071baa0dbf9fa71a" + integrity sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA== + +"@types/chokidar@*": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@types/chokidar/-/chokidar-1.7.5.tgz#1fa78c8803e035bed6d98e6949e514b133b0c9b6" + integrity sha512-PDkSRY7KltW3M60hSBlerxI8SFPXsO3AL/aRVsO4Kh9IHRW74Ih75gUuTd/aE4LSSFqypb10UIX3QzOJwBQMGQ== + dependencies: + "@types/events" "*" + "@types/node" "*" + +"@types/events@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + +"@types/fancy-log@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@types/fancy-log/-/fancy-log-1.3.1.tgz#dd94fbc8c2e2ab8ab402ca8d04bb8c34965f0696" + integrity sha512-31Dt9JaGfHretvwVxCBrCFL5iC9MQ3zOXpu+8C4qzW0cxc5rJJVGxB5c/vZ+wmeTk/JjPz/D0gv8BZ+Ip6iCqQ== + +"@types/glob-stream@*": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@types/glob-stream/-/glob-stream-6.1.0.tgz#7ede8a33e59140534f8d8adfb8ac9edfb31897bc" + integrity sha512-RHv6ZQjcTncXo3thYZrsbAVwoy4vSKosSWhuhuQxLOTv74OJuFQxXkmUuZCr3q9uNBEVCvIzmZL/FeRNbHZGUg== + dependencies: + "@types/glob" "*" + "@types/node" "*" + +"@types/glob@*": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/gulp@^4.0.5": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/gulp/-/gulp-4.0.5.tgz#f5f498d5bf9538364792de22490a12c0e6bc5eb4" + integrity sha512-nx1QjPTiRpvLfYsZ7MBu7bT6Cm7tAXyLbY0xbdx2IEMxCK2v2urIhJMQZHW0iV1TskM71Xl6p2uRRuWDbk+/7g== + dependencies: + "@types/chokidar" "*" + "@types/undertaker" "*" + "@types/vinyl-fs" "*" + +"@types/lodash.template@^4.4.5": + version "4.4.5" + resolved "https://registry.yarnpkg.com/@types/lodash.template/-/lodash.template-4.4.5.tgz#40e1df204e40fb820870b0d629bd0b3a8124b02b" + integrity sha512-buhJodMUvXNhPCeB/6c80V5OBFUPT7LlZZy05WdV9A5h1E1LfZPso6PCVaHlXz70hB4/DqH5+0bkdNXJRCoYDQ== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.14.121" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.121.tgz#9327e20d49b95fc2bf983fc2f045b2c6effc80b9" + integrity sha512-ORj7IBWj13iYufXt/VXrCNMbUuCTJfhzme5kx9U/UtcIPdJYuvPDUAlHlbNhz/8lKCLy9XGIZnGrqXOtQbPGoQ== + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/mocha@^5.2.6": + version "5.2.6" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.6.tgz#b8622d50557dd155e9f2f634b7d68fd38de5e94b" + integrity sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw== + +"@types/node@*", "@types/node@^11.10.4": + version "11.10.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.10.4.tgz#3f5fc4f0f322805f009e00ab35a2ff3d6b778e42" + integrity sha512-wa09itaLE8L705aXd8F80jnFpxz3Y1/KRHfKsYL2bPc0XF+wEWu8sR9n5bmeu8Ba1N9z2GRNzm/YdHcghLkLKg== + +"@types/through2@^2.0.34": + version "2.0.34" + resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.34.tgz#9c2a259a238dace2a05a2f8e94b786961bc27ac4" + integrity sha512-nhRG8+RuG/L+0fAZBQYaRflXKjTrHOKH8MFTChnf+dNVMxA3wHYYrfj0tztK0W51ABXjGfRCDc0vRkecCOrsow== + dependencies: + "@types/node" "*" + +"@types/undertaker-registry@*": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/undertaker-registry/-/undertaker-registry-1.0.1.tgz#4306d4a03d7acedb974b66530832b90729e1d1da" + integrity sha512-Z4TYuEKn9+RbNVk1Ll2SS4x1JeLHecolIbM/a8gveaHsW0Hr+RQMraZACwTO2VD7JvepgA6UO1A1VrbktQrIbQ== + +"@types/undertaker@*": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/undertaker/-/undertaker-1.2.1.tgz#f39dabdd05661bbf2badb5072a2aa9ae4d6daaa6" + integrity sha512-JNWgZgrvd37nWKt0vT4kZQUlWPS6wN1e5ALpwElX7xt9Gka46Chc3zTTeQ6xykYYrWoIroCSdzn0jgzRf+DKHA== + dependencies: + "@types/undertaker-registry" "*" + +"@types/vinyl-fs@*": + version "2.4.11" + resolved "https://registry.yarnpkg.com/@types/vinyl-fs/-/vinyl-fs-2.4.11.tgz#b98119b8bb2494141eaf649b09fbfeb311161206" + integrity sha512-2OzQSfIr9CqqWMGqmcERE6Hnd2KY3eBVtFaulVo3sJghplUcaeMdL9ZjEiljcQQeHjheWY9RlNmumjIAvsBNaA== + dependencies: + "@types/glob-stream" "*" + "@types/node" "*" + "@types/vinyl" "*" + +"@types/vinyl@*": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.2.tgz#4f3b8dae8f5828d3800ef709b0cff488ee852de3" + integrity sha512-2iYpNuOl98SrLPBZfEN9Mh2JCJ2EI9HU35SfgBEb51DcmaHkhp8cKMblYeBqMQiwXMgAD3W60DbQ4i/UdLiXhw== + dependencies: + "@types/node" "*" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -186,6 +302,11 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +arg@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.0.tgz#583c518199419e0037abb74062c37f8519e575f0" + integrity sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -825,7 +946,7 @@ detect-libc@^1.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= -diff@3.5.0: +diff@3.5.0, diff@^3.1.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== @@ -2058,6 +2179,11 @@ make-dir@^2.0.0: pify "^4.0.1" semver "^5.6.0" +make-error@^1.1.1: + version "1.3.5" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" + integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== + make-iterator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" @@ -3163,6 +3289,14 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" +source-map-support@^0.5.6: + version "0.5.10" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.10.tgz#2214080bc9d51832511ee2bab96e3c2f9353120c" + integrity sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" @@ -3173,7 +3307,7 @@ source-map@^0.5.0, source-map@^0.5.6: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.1, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -3476,6 +3610,17 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= +ts-node@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.0.2.tgz#9ecdf8d782a0ca4c80d1d641cbb236af4ac1b756" + integrity sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw== + dependencies: + arg "^4.1.0" + diff "^3.1.0" + make-error "^1.1.1" + source-map-support "^0.5.6" + yn "^3.0.0" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -3498,6 +3643,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@^3.3.3333: + version "3.3.3333" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" + integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw== + uglify-js@^3.1.4: version "3.4.9" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" @@ -3802,3 +3952,8 @@ yargs@^7.1.0: which-module "^1.0.0" y18n "^3.2.1" yargs-parser "^5.0.0" + +yn@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.0.0.tgz#0073c6b56e92aed652fbdfd62431f2d6b9a7a091" + integrity sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q==