From 1acf158f514742c69447481bff3a6b5edd90d8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Thu, 8 Feb 2018 18:31:02 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20Add=20support=20for=20non-tty=20?= =?UTF-8?q?(e.g.=20CI)=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 99 ++++---------- lib/tasks.js | 90 ++++++++++++ package-lock.json | 338 +++++++++++++++++++++++++++++++++++++++++----- package.json | 2 +- 4 files changed, 418 insertions(+), 111 deletions(-) create mode 100644 lib/tasks.js diff --git a/app.js b/app.js index ea9752f..6d70d27 100755 --- a/app.js +++ b/app.js @@ -3,15 +3,11 @@ /* Make sure that AWS uses local config files, since this is a CLI util */ process.env.AWS_SDK_LOAD_CONFIG = 'true' -const ora = require('ora') const neodoc = require('neodoc') -const parseArn = require('aws-arn-parser') -const prettyBytes = require('pretty-bytes') const awsHasRegion = require('aws-has-region') +const Listr = require('listr') -const amazon = require('./lib/amazon') -const builder = require('./lib/builder') -const swagger = require('./lib/swagger') +const tasks = require('./lib/tasks') class UserError extends Error {} @@ -30,81 +26,38 @@ Options: --deploy-to Deploy the API to the specified stage, and make it callable from the Internet. ` +const createList = new Listr([ + tasks.packageApp, + tasks.createLambdaRole, + tasks.createLambdaFunction, + tasks.loadSwaggerDefinition, + tasks.generateSwaggerDefinition, + tasks.createApiGateway, + tasks.deployApi +]) + +const updateList = new Listr([ + tasks.packageApp, + tasks.updateLambdaFunction, + tasks.loadSwaggerDefinition, + tasks.generateSwaggerDefinition, + tasks.updateApiGateway, + tasks.deployApi +]) + async function main () { const args = neodoc.run(usage) - const spinner = ora() if (!awsHasRegion()) { throw new UserError(awsHasRegion.errorText) } - try { - if (args.create) { - spinner.start('Packaging app for Lambda') - const zipFile = await builder.createZipFile(process.cwd()) - spinner.succeed(`App packaged successfully! Final size: ${prettyBytes(zipFile.byteLength)}`) - - let roleArn = args['--role'] - if (!roleArn) { - spinner.start('Creating Lambda role') - roleArn = await amazon.createLambdaRole(args['']) - spinner.succeed(`Created new Lambda role with ARN: ${roleArn}`) - } - - spinner.start('Creating Lambda function') - const lambdaArn = await amazon.createFunction({ zipFile, functionName: args[''], role: roleArn }) - spinner.succeed(`Created new Lambda function with ARN: ${lambdaArn}`) - - const definition = args['--swagger'] - ? await swagger.loadSwaggerFile(args['--swagger'], lambdaArn) - : await swagger.forwardAllDefinition(lambdaArn) - - spinner.start('Creating new API Gateway') - const { id } = await amazon.createApiGateway({ definition, lambdaArn }) - spinner.succeed(`Created new API Gateway with id: ${id}`) - - if (args['--deploy-to']) { - const stage = args['--deploy-to'] - const { region } = parseArn(lambdaArn) - - spinner.start('Deploying the API to a live address') - await amazon.deployApiGateway({ id, stage }) - spinner.succeed(`Now serving live requests at: https://${id}.execute-api.${region}.amazonaws.com/${stage}`) - } - } - - if (args.update) { - spinner.start('Packaging app for Lambda') - const zipFile = await builder.createZipFile(process.cwd()) - spinner.succeed(`App packaged successfully! Final size: ${prettyBytes(zipFile.byteLength)}`) - - spinner.start('Creating Lambda function') - const lambdaArn = await amazon.updateFunction({ zipFile, functionName: args[''] }) - spinner.succeed(`Updated existing Lambda function with ARN: ${lambdaArn}`) - - const definition = args['--swagger'] - ? await swagger.loadSwaggerFile(args['--swagger'], lambdaArn) - : await swagger.forwardAllDefinition(lambdaArn) - - const id = args['--rest-api-id'] - - spinner.start('Updating existing API Gateway') - await amazon.updateApiGateway({ id, definition, lambdaArn }) - spinner.succeed(`Updated existing API Gateway with id: ${id}`) - - if (args['--deploy-to']) { - const stage = args['--deploy-to'] - const { region } = parseArn(lambdaArn) - - spinner.start('Deploying the API to a live address') - await amazon.deployApiGateway({ id, stage }) - spinner.succeed(`Now serving live requests at: https://${id}.execute-api.${region}.amazonaws.com/${stage}`) - } - } - } catch (err) { - spinner.fail(err.toString()) + if (args.create) { + await createList.run({ args }) + } - throw err + if (args.update) { + await updateList.run({ args }) } } diff --git a/lib/tasks.js b/lib/tasks.js new file mode 100644 index 0000000..8aa181d --- /dev/null +++ b/lib/tasks.js @@ -0,0 +1,90 @@ +const parseArn = require('aws-arn-parser') +const prettyBytes = require('pretty-bytes') + +const amazon = require('./amazon') +const builder = require('./builder') +const swagger = require('./swagger') + +exports.packageApp = { + title: 'Packaging app for Lambda', + task: async (ctx, task) => { + ctx.zipFile = await builder.createZipFile(process.cwd()) + task.title = `App packaged successfully! Final size: ${prettyBytes(ctx.zipFile.byteLength)}` + } +} + +exports.createLambdaRole = { + title: 'Creating Lambda role', + task: async (ctx, task) => { + if (ctx.args['--role']) { + ctx.roleArn = ctx.args['--role'] + task.skip('Using provided role') + } else { + ctx.roleArn = await amazon.createLambdaRole(ctx.args['']) + task.title = `Created new Lambda role with ARN: ${ctx.roleArn}` + } + } +} + +exports.createLambdaFunction = { + title: 'Creating Lambda function', + task: async (ctx, task) => { + ctx.lambdaArn = await amazon.createFunction({ zipFile: ctx.zipFile, functionName: ctx.args[''], role: ctx.roleArn }) + task.title = `Created new Lambda function with ARN: ${ctx.lambdaArn}` + } +} + +exports.updateLambdaFunction = { + title: 'Updating Lambda function', + task: async (ctx, task) => { + ctx.lambdaArn = await amazon.updateFunction({ zipFile: ctx.zipFile, functionName: ctx.args[''] }) + task.title = `Updated existing Lambda function with ARN: ${ctx.lambdaArn}` + } +} + +exports.loadSwaggerDefinition = { + title: 'Load Swagger definition', + enabled: (ctx) => Boolean(ctx.args['--swagger']), + task: async (ctx, task) => { + ctx.definition = await swagger.loadSwaggerFile(ctx.args['--swagger'], ctx.lambdaArn) + task.title = 'Loaded Swagger definition from file' + } +} + +exports.generateSwaggerDefinition = { + title: 'Generate Swagger definition', + enabled: (ctx) => !ctx.args['--swagger'], + task: async (ctx, task) => { + ctx.definition = await swagger.forwardAllDefinition(ctx.lambdaArn) + task.title = 'Generated "forward all" Swagger definition' + } +} + +exports.createApiGateway = { + title: 'Creating new API Gateway', + task: async (ctx, task) => { + ctx.id = (await amazon.createApiGateway({ definition: ctx.definition, lambdaArn: ctx.lambdaArn })).id + task.title = `Created new API Gateway with id: ${ctx.id}` + } +} + +exports.updateApiGateway = { + title: 'Updating existing API Gateway', + task: async (ctx, task) => { + ctx.id = ctx.args['--rest-api-id'] + await amazon.updateApiGateway({ id: ctx.id, definition: ctx.definition, lambdaArn: ctx.lambdaArn }) + task.title = `Updated existing API Gateway with id: ${ctx.id}` + } +} + +exports.deployApi = { + title: 'Deploying the API to a live address', + enabled: (ctx) => Boolean(ctx.args['--deploy-to']), + task: async (ctx, task) => { + const stage = ctx.args['--deploy-to'] + const { region } = parseArn(ctx.lambdaArn) + + await amazon.deployApiGateway({ id: ctx.id, stage }) + task.title = `Now serving live requests at: https://${ctx.id}.execute-api.${region}.amazonaws.com/${stage}` + } +} diff --git a/package-lock.json b/package-lock.json index 01f2644..4394967 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,11 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -14,6 +19,11 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, + "any-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.2.0.tgz", + "integrity": "sha1-xnhwBYADV5AJCD9UrAq6+1wz0kI=" + }, "argparse": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", @@ -76,18 +86,19 @@ "supports-color": "2.0.0" } }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "cli-truncate": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", "requires": { - "restore-cursor": "2.0.0" + "slice-ansi": "0.0.4", + "string-width": "1.0.2" } }, - "cli-spinners": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.0.0.tgz", - "integrity": "sha1-75h+09SDkaw9q5GAtAanQhgNbmo=" + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "cp-file": { "version": "4.2.0", @@ -116,6 +127,16 @@ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz", "integrity": "sha1-zFRJaF37hesRyYKKzHy4erW7/MA=" }, + "date-fns": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", + "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==" + }, + "elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=" + }, "error-ex": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", @@ -153,6 +174,20 @@ "strip-eof": "1.0.0" } }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -181,6 +216,14 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "requires": { + "repeating": "2.0.1" + } + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -191,6 +234,35 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", + "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "requires": { + "symbol-observable": "0.2.4" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -220,6 +292,132 @@ "esprima": "4.0.0" } }, + "listr": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/listr/-/listr-0.13.0.tgz", + "integrity": "sha1-ILsLowuuZg7oTMBQPfS+PVYjiH0=", + "requires": { + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "figures": "1.7.0", + "indent-string": "2.1.0", + "is-observable": "0.2.0", + "is-promise": "2.1.0", + "is-stream": "1.1.0", + "listr-silent-renderer": "1.1.1", + "listr-update-renderer": "0.4.0", + "listr-verbose-renderer": "0.4.1", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "ora": "0.2.3", + "p-map": "1.2.0", + "rxjs": "5.5.6", + "stream-to-observable": "0.2.0", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, + "cli-spinners": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", + "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=" + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "ora": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-spinners": "0.1.2", + "object-assign": "4.1.1" + } + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + } + } + }, + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=" + }, + "listr-update-renderer": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", + "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", + "requires": { + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "elegant-spinner": "1.0.1", + "figures": "1.7.0", + "indent-string": "3.2.0", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" + } + } + }, + "listr-verbose-renderer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", + "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.29.0", + "figures": "1.7.0" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + } + } + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -255,6 +453,39 @@ "chalk": "1.1.3" } }, + "log-update": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "requires": { + "ansi-escapes": "1.4.0", + "cli-cursor": "1.0.2" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + } + } + }, "lru-cache": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", @@ -272,11 +503,6 @@ "pify": "2.3.0" } }, - "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=" - }, "neodoc": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/neodoc/-/neodoc-1.4.0.tgz", @@ -301,30 +527,26 @@ "path-key": "2.0.1" } }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "1.1.0" - } + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, - "ora": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-1.3.0.tgz", - "integrity": "sha1-gAeN0rkqk0r2ajrXKluRBpTt5Ro=", - "requires": { - "chalk": "1.1.3", - "cli-cursor": "2.1.0", - "cli-spinners": "1.0.0", - "log-symbols": "1.0.2" - } + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -368,13 +590,12 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "is-finite": "1.0.2" } }, "rm-file": { @@ -385,6 +606,21 @@ "nested-error-stacks": "2.0.0" } }, + "rxjs": { + "version": "5.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", + "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", + "requires": { + "symbol-observable": "1.0.1" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" + } + } + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", @@ -418,6 +654,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" + }, "slide": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", @@ -428,6 +669,24 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "stream-to-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.2.0.tgz", + "integrity": "sha1-WdbqOT2HwsDdrBCqDVYbxrpvDhA=", + "requires": { + "any-observable": "0.2.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -451,6 +710,11 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, + "symbol-observable": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", + "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=" + }, "url": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", diff --git a/package.json b/package.json index 7dfacc6..523f564 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,10 @@ "aws-sdk": "^2.97.0", "cp-file": "^4.2.0", "execa": "^0.8.0", + "listr": "^0.13.0", "load-json-file": "^2.0.0", "load-yaml-file": "^0.1.0", "neodoc": "^1.4.0", - "ora": "^1.3.0", "path-exists": "^3.0.0", "pretty-bytes": "^4.0.2", "rm-file": "^1.0.0",