diff --git a/language/README.md b/language/README.md index 85cac447a48..78a9983f6f4 100644 --- a/language/README.md +++ b/language/README.md @@ -36,25 +36,22 @@ __Usage:__ `node analyze.js --help` ``` Commands: - sentiment-text Detects sentiment of a string. - sentiment-file Detects sentiment in a file in Google Cloud Storage. - entities-text Detects entities in a string. - entities-file Detects entities in a file in Google Cloud Storage. - syntax-text Detects syntax of a string. - syntax-file Detects syntax in a file in Google Cloud Storage. + sentiment-text Detects sentiment of a string. + sentiment-file Detects sentiment in a file in Google Cloud Storage. + entities-text Detects entities in a string. + entities-file Detects entities in a file in Google Cloud Storage. + syntax-text Detects syntax of a string. + syntax-file Detects syntax in a file in Google Cloud Storage. Options: - --help Show help [boolean] + --help Show help [boolean] Examples: - node analyze.js sentiment-text "President Obama is speaking - at the White House." + node analyze.js sentiment-text "President Obama is speaking at the White House." node analyze.js sentiment-file my-bucket file.txt Detects sentiment in gs://my-bucket/file.txt - node analyze.js entities-text "President Obama is speaking - at the White House." + node analyze.js entities-text "President Obama is speaking at the White House." node analyze.js entities-file my-bucket file.txt Detects entities in gs://my-bucket/file.txt - node analyze.js syntax-text "President Obama is speaking at - the White House." + node analyze.js syntax-text "President Obama is speaking at the White House." node analyze.js syntax-file my-bucket file.txt Detects syntax in gs://my-bucket/file.txt For more information, see https://cloud.google.com/natural-language/docs diff --git a/language/analyze.js b/language/analyze.js index 5b2aae89052..cb6f60545bb 100644 --- a/language/analyze.js +++ b/language/analyze.js @@ -1,5 +1,5 @@ /** - * Copyright 2016, Google, Inc. + * Copyright 2017, Google, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,172 +15,206 @@ 'use strict'; -const Language = require('@google-cloud/language'); -const Storage = require('@google-cloud/storage'); - -// [START language_sentiment_string] function analyzeSentimentOfText (text) { + // [START language_sentiment_string] + // Imports the Google Cloud client library + const Language = require('@google-cloud/language'); + // Instantiates a client const language = Language(); + // The text to analyze, e.g. "Hello, world!" + // const text = 'Hello, world!'; + // Instantiates a Document, representing the provided text - const document = language.document({ - // The document text, e.g. "Hello, world!" - content: text - }); + const document = language.document({ content: text }); // Detects the sentiment of the document - return document.detectSentiment() + document.detectSentiment() .then((results) => { const sentiment = results[0]; - - console.log(`Sentiment: ${sentiment >= 0 ? 'positive' : 'negative'}.`); - - return sentiment; + console.log(`Score: ${sentiment.score}`); + console.log(`Magnitude: ${sentiment.magnitude}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END language_sentiment_string] } -// [END language_sentiment_string] -// [START language_sentiment_file] function analyzeSentimentInFile (bucketName, fileName) { - // Instantiates clients + // [START language_sentiment_file] + // Imports the Google Cloud client libraries + const Language = require('@google-cloud/language'); + const Storage = require('@google-cloud/storage'); + + // Instantiates the clients const language = Language(); const storage = Storage(); - // The bucket where the file resides, e.g. "my-bucket" - const bucket = storage.bucket(bucketName); - // The text file to analyze, e.g. "file.txt" - const file = bucket.file(fileName); + // The name of the bucket where the file resides, e.g. "my-bucket" + // const bucketName = 'my-bucket'; + + // The name of the file to analyze, e.g. "file.txt" + // const fileName = 'file.txt'; // Instantiates a Document, representing a text file in Cloud Storage const document = language.document({ - // The GCS file - content: file + // The Google Cloud Storage file + content: storage.bucket(bucketName).file(fileName) }); // Detects the sentiment of the document - return document.detectSentiment() + document.detectSentiment() .then((results) => { const sentiment = results[0]; - - console.log(`Sentiment: ${sentiment >= 0 ? 'positive' : 'negative'}.`); - - return sentiment; + console.log(`Score: ${sentiment.score}`); + console.log(`Magnitude: ${sentiment.magnitude}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END language_sentiment_file] } -// [END language_sentiment_file] -// [START language_entities_string] function analyzeEntitiesOfText (text) { + // [START language_entities_string] + // Imports the Google Cloud client library + const Language = require('@google-cloud/language'); + // Instantiates a client const language = Language(); + // The text to analyze, e.g. "Hello, world!" + // const text = 'Hello, world!'; + // Instantiates a Document, representing the provided text - const document = language.document({ - // The document text, e.g. "Hello, world!" - content: text - }); + const document = language.document({ content: text }); // Detects entities in the document - return document.detectEntities() + document.detectEntities() .then((results) => { const entities = results[0]; + console.log(JSON.stringify(results, null, 2)); console.log('Entities:'); - for (let type in entities) { - console.log(`${type}:`, entities[type]); - } - - return entities; + entities.forEach((entity) => { + console.log(entity.name); + console.log(` - Type: ${entity.type}, Salience: ${entity.salience}`); + }); + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END language_entities_string] } -// [END language_entities_string] -// [START language_entities_file] function analyzeEntitiesInFile (bucketName, fileName) { - // Instantiates clients + // [START language_entities_file] + // Imports the Google Cloud client libraries + const Language = require('@google-cloud/language'); + const Storage = require('@google-cloud/storage'); + + // Instantiates the clients const language = Language(); const storage = Storage(); - // The bucket where the file resides, e.g. "my-bucket" - const bucket = storage.bucket(bucketName); - // The text file to analyze, e.g. "file.txt" - const file = bucket.file(fileName); + // The name of the bucket where the file resides, e.g. "my-bucket" + // const bucketName = 'my-bucket'; + + // The name of the file to analyze, e.g. "file.txt" + // const fileName = 'file.txt'; // Instantiates a Document, representing a text file in Cloud Storage const document = language.document({ - // The GCS file - content: file + // The Google Cloud Storage file + content: storage.bucket(bucketName).file(fileName) }); // Detects entities in the document - return document.detectEntities() + document.detectEntities() .then((results) => { const entities = results[0]; console.log('Entities:'); - for (let type in entities) { - console.log(`${type}:`, entities[type]); - } - - return entities; + entities.forEach((entity) => { + console.log(entity.name); + console.log(` - Type: ${entity.type}, Salience: ${entity.salience}`); + }); + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END language_entities_file] } -// [END language_entities_file] -// [START language_syntax_string] function analyzeSyntaxOfText (text) { + // [START language_syntax_string] + // Imports the Google Cloud client library + const Language = require('@google-cloud/language'); + // Instantiates a client const language = Language(); + // The text to analyze, e.g. "Hello, world!" + // const text = 'Hello, world!'; + // Instantiates a Document, representing the provided text - const document = language.document({ - // The document text, e.g. "Hello, world!" - content: text - }); + const document = language.document({ content: text }); // Detects syntax in the document - return document.detectSyntax() + document.detectSyntax() .then((results) => { const syntax = results[0]; - console.log('Tags:'); - syntax.forEach((part) => console.log(part.tag)); - - return syntax; + console.log('Parts of speech:'); + syntax.forEach((part) => { + console.log(`${part.partOfSpeech.tag}:\t ${part.text.content}`); + }); + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END language_syntax_string] } -// [END language_syntax_string] -// [START language_syntax_file] function analyzeSyntaxInFile (bucketName, fileName) { - // Instantiates clients + // [START language_syntax_file] + // Imports the Google Cloud client libraries + const Language = require('@google-cloud/language'); + const Storage = require('@google-cloud/storage'); + + // Instantiates the clients const language = Language(); const storage = Storage(); - // The bucket where the file resides, e.g. "my-bucket" - const bucket = storage.bucket(bucketName); - // The text file to analyze, e.g. "file.txt" - const file = bucket.file(fileName); + // The name of the bucket where the file resides, e.g. "my-bucket" + // const bucketName = 'my-bucket'; + + // The name of the file to analyze, e.g. "file.txt" + // const fileName = 'file.txt'; // Instantiates a Document, representing a text file in Cloud Storage const document = language.document({ - // The GCS file - content: file + // The Google Cloud Storage file + content: storage.bucket(bucketName).file(fileName) }); // Detects syntax in the document - return document.detectSyntax() + document.detectSyntax() .then((results) => { const syntax = results[0]; - console.log('Tags:'); - syntax.forEach((part) => console.log(part.tag)); - - return syntax; + console.log('Parts of speech:'); + syntax.forEach((part) => { + console.log(`${part.partOfSpeech.tag}:\t ${part.text.content}`); + }); + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END language_syntax_file] } -// [END language_syntax_file] require(`yargs`) .demand(1) @@ -191,10 +225,10 @@ require(`yargs`) (opts) => analyzeSentimentOfText(opts.text) ) .command( - `sentiment-file `, + `sentiment-file `, `Detects sentiment in a file in Google Cloud Storage.`, {}, - (opts) => analyzeSentimentInFile(opts.bucket, opts.filename) + (opts) => analyzeSentimentInFile(opts.bucketName, opts.fileName) ) .command( `entities-text `, @@ -203,10 +237,10 @@ require(`yargs`) (opts) => analyzeEntitiesOfText(opts.text) ) .command( - `entities-file `, + `entities-file `, `Detects entities in a file in Google Cloud Storage.`, {}, - (opts) => analyzeEntitiesInFile(opts.bucket, opts.filename) + (opts) => analyzeEntitiesInFile(opts.bucketName, opts.fileName) ) .command( `syntax-text `, @@ -215,10 +249,10 @@ require(`yargs`) (opts) => analyzeSyntaxOfText(opts.text) ) .command( - `syntax-file `, + `syntax-file `, `Detects syntax in a file in Google Cloud Storage.`, {}, - (opts) => analyzeSyntaxInFile(opts.bucket, opts.filename) + (opts) => analyzeSyntaxInFile(opts.bucketName, opts.fileName) ) .example(`node $0 sentiment-text "President Obama is speaking at the White House."`) .example(`node $0 sentiment-file my-bucket file.txt`, `Detects sentiment in gs://my-bucket/file.txt`) diff --git a/language/package.json b/language/package.json index 957b286869d..9cdecaa5f17 100644 --- a/language/package.json +++ b/language/package.json @@ -8,9 +8,9 @@ "test": "cd ..; npm run st -- --verbose language/system-test/*.test.js" }, "dependencies": { - "@google-cloud/language": "0.8.0", - "@google-cloud/storage": "0.7.0", - "yargs": "6.6.0" + "@google-cloud/language": "0.10.2", + "@google-cloud/storage": "1.0.0", + "yargs": "7.0.2" }, "engines": { "node": ">=4.3.2" diff --git a/language/quickstart.js b/language/quickstart.js index fd40ed8a2b8..e3b9ed78eee 100644 --- a/language/quickstart.js +++ b/language/quickstart.js @@ -23,7 +23,7 @@ const Language = require('@google-cloud/language'); const projectId = 'YOUR_PROJECT_ID'; // Instantiates a client -const languageClient = Language({ +const language = Language({ projectId: projectId }); @@ -31,11 +31,15 @@ const languageClient = Language({ const text = 'Hello, world!'; // Detects the sentiment of the text -languageClient.detectSentiment(text) +language.detectSentiment(text) .then((results) => { const sentiment = results[0]; console.log(`Text: ${text}`); - console.log(`Sentiment: ${sentiment}`); + console.log(`Sentiment score: ${sentiment.score}`); + console.log(`Sentiment magnitude: ${sentiment.magnitude}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END language_quickstart] diff --git a/language/slackbot/demo_bot.js b/language/slackbot/demo_bot.js index a7a9165f987..b2a498595b8 100755 --- a/language/slackbot/demo_bot.js +++ b/language/slackbot/demo_bot.js @@ -181,7 +181,7 @@ function analyzeEntities (text, ts) { // Detects entities in the document return document.detectEntities() .then((results) => { - const entities = results[1].entities; + const entities = results[0]; entities.forEach((entity) => { const name = entity.name; @@ -222,9 +222,9 @@ function analyzeSentiment (text) { // Uncomment the following lines to log the sentiment to the console: // console.log(`Sentiment: ${sentiment}`) - // if (sentiment >= SENTIMENT_THRESHOLD) { + // if (sentiment.score >= SENTIMENT_THRESHOLD) { // console.log('Sentiment: positive.'); - // } else if (sentiment <= -SENTIMENT_THRESHOLD) { + // } else if (sentiment.score <= -SENTIMENT_THRESHOLD) { // console.log('Sentiment: negative.'); // } @@ -239,10 +239,10 @@ function handleAmbientMessage (bot, message) { return analyzeEntities(message.text, message.ts) .then(() => analyzeSentiment(message.text)) .then((sentiment) => { - if (sentiment >= SENTIMENT_THRESHOLD) { + if (sentiment.score >= SENTIMENT_THRESHOLD) { // We have a positive sentiment score larger than the threshold. bot.reply(message, ':thumbsup:'); - } else if (sentiment <= -SENTIMENT_THRESHOLD) { + } else if (sentiment.score <= -SENTIMENT_THRESHOLD) { // We have a negative sentiment score of absolute value larger than // the threshold. bot.reply(message, ':thumbsdown:'); diff --git a/language/slackbot/package.json b/language/slackbot/package.json index 026a9fa5cf7..1bc40860378 100644 --- a/language/slackbot/package.json +++ b/language/slackbot/package.json @@ -8,7 +8,7 @@ "main": "demo_bot.js", "dependencies": { "botkit": "0.0.5", - "@google-cloud/language": "0.8.0", + "@google-cloud/language": "0.10.2", "sqlite3": "3.1.8" }, "scripts": { diff --git a/language/slackbot/system-test/demo_bot.test.js b/language/slackbot/system-test/demo_bot.test.js index c29ba507b17..dba42fa4083 100644 --- a/language/slackbot/system-test/demo_bot.test.js +++ b/language/slackbot/system-test/demo_bot.test.js @@ -76,7 +76,7 @@ test.after.cb.always((t) => { test.serial(`should analyze sentiment in text`, async (t) => { const sentiment = await program.analyzeSentiment(text); - t.is(sentiment > 0, true); + t.is(sentiment.score > 0, true); }); test.serial(`should analyze entities in text`, async (t) => { diff --git a/language/slackbot/yarn.lock b/language/slackbot/yarn.lock index b3d079b38d4..ac3bc7e0545 100644 --- a/language/slackbot/yarn.lock +++ b/language/slackbot/yarn.lock @@ -2,42 +2,38 @@ # yarn lockfile v1 -"@google-cloud/common@^0.9.0": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.9.1.tgz#c72249589046fb4dd131b8ae7dbea88bb6bcf88c" +"@google-cloud/common@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.13.0.tgz#d062439a75b38eb76c4704d20f5b45301a69f17f" dependencies: - array-uniq "^1.0.2" - arrify "^1.0.0" - concat-stream "^1.5.0" + array-uniq "^1.0.3" + arrify "^1.0.1" + concat-stream "^1.6.0" create-error-class "^3.0.2" - dot-prop "^2.4.0" - duplexify "^3.2.0" + duplexify "^3.5.0" ent "^2.2.0" extend "^3.0.0" - google-auto-auth "^0.5.0" - google-proto-files "^0.8.0" - grpc "^1.0.0" - is "^3.0.1" - methmeth "^1.0.0" + google-auto-auth "^0.6.0" + is "^3.2.0" + log-driver "^1.2.5" + methmeth "^1.1.0" modelo "^4.2.0" - request "^2.70.0" - retry-request "^1.3.0" + request "^2.79.0" + retry-request "^1.3.2" split-array-stream "^1.0.0" stream-events "^1.0.1" - string-format-obj "^1.0.0" - through2 "^2.0.0" + string-format-obj "^1.1.0" + through2 "^2.0.3" -"@google-cloud/language@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@google-cloud/language/-/language-0.7.0.tgz#3874aa0243cb47d5a51d01461a6de66aff35d429" +"@google-cloud/language@0.10.2": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@google-cloud/language/-/language-0.10.2.tgz#8a558ad942467d59b4de5ddea257a95a3b7d5121" dependencies: - "@google-cloud/common" "^0.9.0" - arrify "^1.0.1" + "@google-cloud/common" "^0.13.0" extend "^3.0.0" - google-gax "^0.10.0" - google-proto-files "^0.8.5" + google-gax "^0.13.0" + google-proto-files "^0.11.0" is "^3.0.1" - propprop "^0.3.1" string-format-obj "^1.1.0" abbrev@1: @@ -78,11 +74,11 @@ array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" -array-uniq@^1.0.2: +array-uniq@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" -arrify@^1.0.0, arrify@^1.0.1: +arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -105,9 +101,9 @@ assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" -async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" +async@^1.4.0, async@~1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.4.2.tgz#6c9edcb11ced4f0dd2f2d40db0d49a109c088aab" async@^2.0.1, async@^2.1.2: version "2.1.4" @@ -119,10 +115,6 @@ async@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/async/-/async-1.2.1.tgz#a4816a17cd5ff516dfa2c7698a453369b9790de0" -async@~1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.4.2.tgz#6c9edcb11ced4f0dd2f2d40db0d49a109c088aab" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -139,7 +131,7 @@ balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" -base64url@^2.0.0: +base64url@2.0.0, base64url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" @@ -215,7 +207,7 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" -buffer-equal-constant-time@^1.0.1: +buffer-equal-constant-time@1.0.1, buffer-equal-constant-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -309,7 +301,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.5.0: +concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -397,13 +389,7 @@ destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" -dot-prop@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-2.4.0.tgz#848e28f7f1d50740c6747ab3cb07670462b6f89c" - dependencies: - is-obj "^1.0.0" - -duplexify@^3.2.0: +duplexify@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604" dependencies: @@ -418,7 +404,7 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -ecdsa-sig-formatter@^1.0.0: +ecdsa-sig-formatter@1.0.9, ecdsa-sig-formatter@^1.0.0: version "1.0.9" resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" dependencies: @@ -567,6 +553,13 @@ gauge@~2.7.1: supports-color "^0.2.0" wide-align "^1.1.0" +gcp-metadata@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-0.1.0.tgz#abe21f1ea324dd0b34a3f06ca81763fb1eee37d9" + dependencies: + extend "^3.0.0" + retry-request "^1.3.2" + generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" @@ -608,6 +601,15 @@ glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" +google-auth-library@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" + dependencies: + gtoken "^1.2.1" + jws "^3.1.4" + lodash.noop "^3.0.1" + request "^2.74.0" + google-auth-library@^0.9.10: version "0.9.10" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.9.10.tgz#4993dc07bb4834b8ca0350213a6873a32c6051b9" @@ -619,7 +621,7 @@ google-auth-library@^0.9.10: request "~2.74.0" string-template "~0.2.0" -google-auto-auth@^0.5.0, google-auto-auth@^0.5.2: +google-auto-auth@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.5.2.tgz#4c9f38574e69fb55a3c516ab0415e9fa33e67602" dependencies: @@ -628,17 +630,29 @@ google-auto-auth@^0.5.0, google-auto-auth@^0.5.2: object-assign "^3.0.0" request "^2.79.0" -google-gax@^0.10.0: - version "0.10.6" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.10.6.tgz#3af119704700fd212df6b9250e4b4a61676b3f96" +google-auto-auth@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.6.0.tgz#ad76656293d8d06b3c89c358becd29947d4510a8" + dependencies: + async "^2.1.2" + gcp-metadata "^0.1.0" + google-auth-library "^0.10.0" + object-assign "^3.0.0" + request "^2.79.0" + +google-gax@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.13.0.tgz#02571bcd556ddd58d86d8df3cc277cb8cecace86" dependencies: extend "^3.0.0" google-auto-auth "^0.5.2" - google-proto-files "^0.8.3" - grpc "~1.0" + google-proto-files "^0.9.1" + grpc "^1.2" + is-stream-ended "^0.1.0" lodash "^4.17.2" process-nextick-args "^1.0.7" readable-stream "^2.2.2" + through2 "^2.0.3" google-p12-pem@^0.1.0: version "0.1.1" @@ -646,9 +660,13 @@ google-p12-pem@^0.1.0: dependencies: node-forge "^0.6.46" -google-proto-files@^0.8.0, google-proto-files@^0.8.3, google-proto-files@^0.8.5: - version "0.8.6" - resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.8.6.tgz#a7c8ddccd2179690d270b0ebfc42994d56da0ee6" +google-proto-files@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.11.0.tgz#3d753120718e5e8574f38def739d54cf7a057553" + +google-proto-files@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.9.1.tgz#c760c79059bf62ba3ac56e1d1ba7b8d4560803be" graceful-fs@^4.1.2: version "4.1.11" @@ -658,9 +676,9 @@ graceful-fs@^4.1.2: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -grpc@^1.0.0, grpc@~1.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.0.1.tgz#e965544b5e56c998058102184e2ab1f27f123afd" +grpc@^1.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.2.3.tgz#60b4b533a8783fa0b389b6cfa5d5bee34786049f" dependencies: arguejs "^0.2.3" lodash "^4.15.0" @@ -668,7 +686,7 @@ grpc@^1.0.0, grpc@~1.0: node-pre-gyp "^0.6.0" protobufjs "^5.0.0" -gtoken@^1.1.0: +gtoken@^1.1.0, gtoken@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.1.tgz#90153a547c2fc1cd24a4d3d2ab3b5aba0a26897a" dependencies: @@ -781,10 +799,6 @@ is-my-json-valid@^2.12.4: jsonpointer "^4.0.0" xtend "^4.0.0" -is-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -797,7 +811,7 @@ is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" -is@^3.0.1: +is@^3.0.1, is@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/is/-/is-3.2.0.tgz#a362e3daf7df3fd8b7114115d624c5b7e1cb90f7" @@ -852,6 +866,15 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" +jwa@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" + dependencies: + base64url "2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.9" + safe-buffer "^5.0.1" + jwa@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.0.2.tgz#fd79609f1e772e299dce8ddb76d00659dd83511f" @@ -867,13 +890,21 @@ jws@^3.0.0, jws@~3.0.0: base64url "~1.0.4" jwa "~1.0.0" +jws@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" + dependencies: + base64url "^2.0.0" + jwa "^1.1.4" + safe-buffer "^5.0.1" + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" dependencies: invert-kv "^1.0.0" -lodash.noop@~3.0.0: +lodash.noop@^3.0.1, lodash.noop@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" @@ -881,6 +912,10 @@ lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +log-driver@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" + long@~3: version "3.2.0" resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" @@ -906,7 +941,7 @@ merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" -methmeth@^1.0.0: +methmeth@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/methmeth/-/methmeth-1.1.0.tgz#e80a26618e52f5c4222861bb748510bd10e29089" @@ -1077,10 +1112,6 @@ process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -propprop@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/propprop/-/propprop-0.3.1.tgz#a049a3568b896440067d15d8ec9f33735e570178" - protobufjs@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.1.tgz#589ecdda1a555fd69df4699adc142d36f133aa0b" @@ -1130,7 +1161,7 @@ rc@~1.1.6: minimist "^1.2.0" strip-json-comments "~1.0.4" -readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.1.5, readable-stream@^2.2.2: +readable-stream@^2.0.0, readable-stream@^2.1.5, readable-stream@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" dependencies: @@ -1142,6 +1173,18 @@ readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2. string_decoder "~0.10.x" util-deprecate "~1.0.1" +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + readable-stream@~1.1.9: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -1162,18 +1205,6 @@ readable-stream@~2.0.5: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - repeating@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/repeating/-/repeating-1.1.3.tgz#3d4114218877537494f97f77f9785fab810fa4ac" @@ -1205,7 +1236,7 @@ request@2.76.0: tough-cookie "~2.3.0" tunnel-agent "~0.4.1" -request@^2.67.0, request@^2.70.0, request@^2.72.0, request@^2.79.0: +request@^2.67.0, request@^2.72.0, request@^2.74.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -1256,7 +1287,7 @@ request@~2.74.0: tough-cookie "~2.3.0" tunnel-agent "~0.4.1" -retry-request@^1.3.0: +retry-request@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-1.3.2.tgz#59ad24e71f8ae3f312d5f7b4bcf467a5e5a57bd6" dependencies: @@ -1365,7 +1396,7 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" -string-format-obj@^1.0.0, string-format-obj@^1.1.0: +string-format-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/string-format-obj/-/string-format-obj-1.1.0.tgz#7635610b1ef397013e8478be98a170e04983d068" @@ -1432,7 +1463,7 @@ tar@~2.2.1: fstream "^1.0.2" inherits "2" -through2@^2.0.0: +through2@^2.0.0, through2@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: diff --git a/language/system-test/analyze.test.js b/language/system-test/analyze.test.js index dceebfda51b..defa8a3e980 100644 --- a/language/system-test/analyze.test.js +++ b/language/system-test/analyze.test.js @@ -45,40 +45,46 @@ test.afterEach.always(restoreConsole); test(`should run sync recognize`, async (t) => { const output = await runAsync(`${cmd} sentiment-text "${text}"`, cwd); - t.true(output.includes(`Sentiment: positive.`)); + t.true(output.includes(`Score: 0.`)); + t.true(output.includes(`Magnitude: 0.`)); }); test(`should analyze sentiment in a file`, async (t) => { const output = await runAsync(`${cmd} sentiment-file ${bucketName} ${fileName}`, cwd); - t.true(output.includes(`Sentiment: positive.`)); + t.true(output.includes(`Score: 0.`)); + t.true(output.includes(`Magnitude: 0.`)); }); test(`should analyze entities in text`, async (t) => { const output = await runAsync(`${cmd} entities-text "${text}"`, cwd); - t.true(output.includes(`Entities:`)); - t.true(output.includes(`people:`)); - t.true(output.includes(`places:`)); + t.true(output.includes(`Obama`)); + t.true(output.includes(`Type: PERSON`)); + t.true(output.includes(`White House`)); + t.true(output.includes(`Type: LOCATION`)); }); test('should analyze entities in a file', async (t) => { const output = await runAsync(`${cmd} entities-file ${bucketName} ${fileName}`, cwd); t.true(output.includes(`Entities:`)); - t.true(output.includes(`people:`)); - t.true(output.includes(`places:`)); + t.true(output.includes(`Obama`)); + t.true(output.includes(`Type: PERSON`)); + t.true(output.includes(`White House`)); + t.true(output.includes(`Type: LOCATION`)); }); test(`should analyze syntax in text`, async (t) => { const output = await runAsync(`${cmd} syntax-text "${text}"`, cwd); - t.true(output.includes(`Tags:`)); - t.true(output.includes(`NOUN`)); - t.true(output.includes(`VERB`)); - t.true(output.includes(`PUNCT`)); + t.true(output.includes(`Parts of speech:`)); + t.true(output.includes(`NOUN:`)); + t.true(output.includes(`President`)); + t.true(output.includes(`NOUN:`)); + t.true(output.includes(`Obama`)); }); test('should analyze syntax in a file', async (t) => { const output = await runAsync(`${cmd} syntax-file ${bucketName} ${fileName}`, cwd); - t.true(output.includes(`Tags:`)); - t.true(output.includes(`NOUN`)); - t.true(output.includes(`VERB`)); - t.true(output.includes(`PUNCT`)); + t.true(output.includes(`NOUN:`)); + t.true(output.includes(`President`)); + t.true(output.includes(`NOUN:`)); + t.true(output.includes(`Obama`)); }); diff --git a/language/system-test/quickstart.test.js b/language/system-test/quickstart.test.js index 3fea05ff7f3..5a4f00db59a 100644 --- a/language/system-test/quickstart.test.js +++ b/language/system-test/quickstart.test.js @@ -31,13 +31,12 @@ test.cb(`should detect sentiment`, (t) => { return language.detectSentiment(_text) .then(([sentiment]) => { - t.is(typeof sentiment, `number`); - setTimeout(() => { try { - t.is(console.log.callCount, 2); + t.is(console.log.callCount, 3); t.deepEqual(console.log.getCall(0).args, [`Text: ${expectedText}`]); - t.deepEqual(console.log.getCall(1).args, [`Sentiment: ${sentiment}`]); + t.deepEqual(console.log.getCall(1).args, [`Sentiment score: ${sentiment.score}`]); + t.deepEqual(console.log.getCall(2).args, [`Sentiment magnitude: ${sentiment.magnitude}`]); t.end(); } catch (err) { t.end(err); diff --git a/language/yarn.lock b/language/yarn.lock index 5c6bee646b8..8b29c03e5aa 100644 --- a/language/yarn.lock +++ b/language/yarn.lock @@ -2,20 +2,18 @@ # yarn lockfile v1 -"@google-cloud/common@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.12.0.tgz#b1cb0922c70f7e5273e402b0a6ae71de2f32abc3" +"@google-cloud/common@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.13.0.tgz#d062439a75b38eb76c4704d20f5b45301a69f17f" dependencies: array-uniq "^1.0.3" arrify "^1.0.1" concat-stream "^1.6.0" create-error-class "^3.0.2" - dot-prop "^2.4.0" duplexify "^3.5.0" ent "^2.2.0" extend "^3.0.0" - google-auto-auth "^0.5.2" - google-proto-files "^0.8.6" + google-auto-auth "^0.6.0" is "^3.2.0" log-driver "^1.2.5" methmeth "^1.1.0" @@ -27,24 +25,22 @@ string-format-obj "^1.1.0" through2 "^2.0.3" -"@google-cloud/language@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@google-cloud/language/-/language-0.8.0.tgz#0ee3ec6988b952b8d9acbbe980093f83663be7b6" +"@google-cloud/language@0.10.2": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@google-cloud/language/-/language-0.10.2.tgz#8a558ad942467d59b4de5ddea257a95a3b7d5121" dependencies: - "@google-cloud/common" "^0.12.0" - arrify "^1.0.1" + "@google-cloud/common" "^0.13.0" extend "^3.0.0" - google-gax "^0.10.0" - google-proto-files "^0.8.5" + google-gax "^0.13.0" + google-proto-files "^0.11.0" is "^3.0.1" - propprop "^0.3.1" string-format-obj "^1.1.0" -"@google-cloud/storage@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-0.7.0.tgz#87eb7bde35a1597511cba7b651e666178ac90fe1" +"@google-cloud/storage@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-1.0.0.tgz#cb6af3d8ce89a2e5b394adf2e5fa2bf83f36b2fd" dependencies: - "@google-cloud/common" "^0.12.0" + "@google-cloud/common" "^0.13.0" arrify "^1.0.0" async "^2.0.1" concat-stream "^1.5.0" @@ -141,7 +137,7 @@ balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" -base64url@^2.0.0: +base64url@2.0.0, base64url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" @@ -187,7 +183,7 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" -buffer-equal-constant-time@^1.0.1: +buffer-equal-constant-time@1.0.1, buffer-equal-constant-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -355,12 +351,6 @@ delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -dot-prop@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-2.4.0.tgz#848e28f7f1d50740c6747ab3cb07670462b6f89c" - dependencies: - is-obj "^1.0.0" - duplexify@^3.1.2, duplexify@^3.2.0, duplexify@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604" @@ -376,7 +366,7 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -ecdsa-sig-formatter@^1.0.0: +ecdsa-sig-formatter@1.0.9, ecdsa-sig-formatter@^1.0.0: version "1.0.9" resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" dependencies: @@ -479,6 +469,13 @@ gauge@~2.7.1: supports-color "^0.2.0" wide-align "^1.1.0" +gcp-metadata@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-0.1.0.tgz#abe21f1ea324dd0b34a3f06ca81763fb1eee37d9" + dependencies: + extend "^3.0.0" + retry-request "^1.3.2" + gcs-resumable-upload@^0.7.1: version "0.7.4" resolved "https://registry.yarnpkg.com/gcs-resumable-upload/-/gcs-resumable-upload-0.7.4.tgz#6633967badf7a4aed2d79337e7badfe889cfd617" @@ -536,6 +533,15 @@ glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" +google-auth-library@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" + dependencies: + gtoken "^1.2.1" + jws "^3.1.4" + lodash.noop "^3.0.1" + request "^2.74.0" + google-auth-library@^0.9.10, google-auth-library@^0.9.6: version "0.9.10" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.9.10.tgz#4993dc07bb4834b8ca0350213a6873a32c6051b9" @@ -563,17 +569,29 @@ google-auto-auth@^0.5.2: object-assign "^3.0.0" request "^2.79.0" -google-gax@^0.10.0: - version "0.10.6" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.10.6.tgz#3af119704700fd212df6b9250e4b4a61676b3f96" +google-auto-auth@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.6.0.tgz#ad76656293d8d06b3c89c358becd29947d4510a8" + dependencies: + async "^2.1.2" + gcp-metadata "^0.1.0" + google-auth-library "^0.10.0" + object-assign "^3.0.0" + request "^2.79.0" + +google-gax@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.13.0.tgz#02571bcd556ddd58d86d8df3cc277cb8cecace86" dependencies: extend "^3.0.0" google-auto-auth "^0.5.2" - google-proto-files "^0.8.3" - grpc "~1.0" + google-proto-files "^0.9.1" + grpc "^1.2" + is-stream-ended "^0.1.0" lodash "^4.17.2" process-nextick-args "^1.0.7" readable-stream "^2.2.2" + through2 "^2.0.3" google-p12-pem@^0.1.0: version "0.1.1" @@ -581,9 +599,13 @@ google-p12-pem@^0.1.0: dependencies: node-forge "^0.6.46" -google-proto-files@^0.8.3, google-proto-files@^0.8.5, google-proto-files@^0.8.6: - version "0.8.6" - resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.8.6.tgz#a7c8ddccd2179690d270b0ebfc42994d56da0ee6" +google-proto-files@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.11.0.tgz#3d753120718e5e8574f38def739d54cf7a057553" + +google-proto-files@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.9.1.tgz#c760c79059bf62ba3ac56e1d1ba7b8d4560803be" graceful-fs@^4.1.11, graceful-fs@^4.1.2: version "4.1.11" @@ -593,9 +615,9 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -grpc@~1.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.0.1.tgz#e965544b5e56c998058102184e2ab1f27f123afd" +grpc@^1.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.2.3.tgz#60b4b533a8783fa0b389b6cfa5d5bee34786049f" dependencies: arguejs "^0.2.3" lodash "^4.15.0" @@ -603,7 +625,7 @@ grpc@~1.0: node-pre-gyp "^0.6.0" protobufjs "^5.0.0" -gtoken@^1.1.0: +gtoken@^1.1.0, gtoken@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.1.tgz#90153a547c2fc1cd24a4d3d2ab3b5aba0a26897a" dependencies: @@ -724,10 +746,6 @@ is-my-json-valid@^2.12.4: jsonpointer "^4.0.0" xtend "^4.0.0" -is-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -790,6 +808,15 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" +jwa@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" + dependencies: + base64url "2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.9" + safe-buffer "^5.0.1" + jwa@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.0.2.tgz#fd79609f1e772e299dce8ddb76d00659dd83511f" @@ -805,6 +832,14 @@ jws@^3.0.0, jws@~3.0.0: base64url "~1.0.4" jwa "~1.0.0" +jws@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" + dependencies: + base64url "^2.0.0" + jwa "^1.1.4" + safe-buffer "^5.0.1" + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" @@ -821,7 +856,7 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -lodash.noop@~3.0.0: +lodash.noop@^3.0.1, lodash.noop@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" @@ -1045,10 +1080,6 @@ process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -propprop@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/propprop/-/propprop-0.3.1.tgz#a049a3568b896440067d15d8ec9f33735e570178" - protobufjs@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.1.tgz#589ecdda1a555fd69df4699adc142d36f133aa0b" @@ -1184,7 +1215,7 @@ request@2.76.0: tough-cookie "~2.3.0" tunnel-agent "~0.4.1" -request@^2.61.0, request@^2.72.0, request@^2.79.0: +request@^2.61.0, request@^2.72.0, request@^2.74.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -1502,15 +1533,15 @@ y18n@^3.2.0, y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" dependencies: camelcase "^3.0.0" -yargs@6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" +yargs@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.0.2.tgz#115b97df1321823e8b8648e8968c782521221f67" dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -1524,7 +1555,7 @@ yargs@6.6.0: string-width "^1.0.2" which-module "^1.0.0" y18n "^3.2.1" - yargs-parser "^4.2.0" + yargs-parser "^5.0.0" yargs@^3.10.0: version "3.32.0" diff --git a/package.json b/package.json index 0945f08e18e..f40d9c7c014 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "@google-cloud/datastore": "0.7.0", "@google-cloud/debug-agent": "0.10.2", "@google-cloud/dns": "0.5.0", - "@google-cloud/language": "0.8.0", + "@google-cloud/language": "0.10.2", "@google-cloud/logging": "0.7.0", "@google-cloud/monitoring": "0.2.0", "@google-cloud/pubsub": "0.8.0", diff --git a/speech/README.md b/speech/README.md index e568e3f053c..f4d546fd929 100644 --- a/speech/README.md +++ b/speech/README.md @@ -42,9 +42,10 @@ Commands: listen Detects speech in a microphone input stream. Options: - --help Show help [boolean] + --help Show help [boolean] --encoding, -e [string] [default: "LINEAR16"] - --sampleRate, -r [number] [default: 16000] + --sampleRateHertz, -r [number] [default: 16000] + --languageCode, -l [string] [default: "en-US"] Examples: node recognize.js sync ./resources/audio.raw -e LINEAR16 -r 16000 diff --git a/speech/package.json b/speech/package.json index e0902234332..282fbcb85f8 100644 --- a/speech/package.json +++ b/speech/package.json @@ -9,9 +9,9 @@ }, "dependencies": { "@google-cloud/speech": "0.9.0", - "@google-cloud/storage": "0.7.0", - "node-record-lpcm16": "0.2.0", - "yargs": "6.6.0" + "@google-cloud/storage": "1.0.0", + "node-record-lpcm16": "0.3.0", + "yargs": "7.0.2" }, "engines": { "node": ">=4.3.2" diff --git a/speech/quickstart.js b/speech/quickstart.js index 48c58b2c1d6..a2501407e69 100644 --- a/speech/quickstart.js +++ b/speech/quickstart.js @@ -42,5 +42,8 @@ speechClient.recognize(fileName, options) .then((results) => { const transcription = results[0]; console.log(`Transcription: ${transcription}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END speech_quickstart] diff --git a/speech/recognize.js b/speech/recognize.js index dcf56d30834..9563757d841 100644 --- a/speech/recognize.js +++ b/speech/recognize.js @@ -55,6 +55,9 @@ function syncRecognize (filename, encoding, sampleRateHertz, languageCode) { const transcription = results[0]; console.log(`Transcription: ${transcription}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END speech_sync_recognize] } @@ -91,6 +94,9 @@ function syncRecognizeGCS (gcsUri, encoding, sampleRateHertz, languageCode) { const transcription = results[0]; console.log(`Transcription: ${transcription}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END speech_sync_recognize_gcs] } @@ -131,6 +137,9 @@ function asyncRecognize (filename, encoding, sampleRateHertz, languageCode) { }) .then((transcription) => { console.log(`Transcription: ${transcription}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END speech_async_recognize] } @@ -171,6 +180,9 @@ function asyncRecognizeGCS (gcsUri, encoding, sampleRateHertz, languageCode) { }) .then((transcription) => { console.log(`Transcription: ${transcription}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END speech_async_recognize_gcs] } @@ -209,7 +221,7 @@ function streamingRecognize (filename, encoding, sampleRateHertz, languageCode) const recognizeStream = speech.createRecognizeStream(request) .on('error', console.error) .on('data', (data) => { - console.log('Data received: %j', data); + console.log(`Transcription: ${data.results}`); }); // Stream an audio file from disk to the Speech API, e.g. "./resources/audio.raw" diff --git a/speech/system-test/recognize.test.js b/speech/system-test/recognize.test.js index 9ba06fd8643..b86b5fe15f1 100644 --- a/speech/system-test/recognize.test.js +++ b/speech/system-test/recognize.test.js @@ -62,5 +62,5 @@ test(`should run async recognize on a GCS file`, async (t) => { test(`should run streaming recognize`, async (t) => { const output = await runAsync(`${cmd} stream ${filepath}`, cwd); - t.true(output.includes(text)); + t.true(output.includes(`Transcription: ${text}`)); }); diff --git a/speech/yarn.lock b/speech/yarn.lock index c3e237bb908..2df1d708685 100644 --- a/speech/yarn.lock +++ b/speech/yarn.lock @@ -2,60 +2,33 @@ # yarn lockfile v1 -"@google-cloud/common-grpc@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@google-cloud/common-grpc/-/common-grpc-0.1.1.tgz#0facc6c5e90eb9072bd4b602451248250bbf3ba0" +"@google-cloud/common-grpc@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@google-cloud/common-grpc/-/common-grpc-0.3.1.tgz#c29b8ce83bef2da409eb838fa187960bb8c3df2e" dependencies: - "@google-cloud/common" "^0.11.0" + "@google-cloud/common" "^0.13.0" dot-prop "^2.4.0" duplexify "^3.5.0" extend "^3.0.0" - google-proto-files "^0.8.6" - grpc "~1.0.1" + google-proto-files "^0.11.0" + grpc "^1.2.3" is "^3.2.0" + modelo "^4.2.0" retry-request "^1.3.2" through2 "^2.0.3" -"@google-cloud/common@^0.11.0": - version "0.11.0" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.11.0.tgz#5c94674a1ea9a4939865e342f0c1b909ca04e980" - dependencies: - array-uniq "^1.0.2" - arrify "^1.0.0" - concat-stream "^1.5.0" - create-error-class "^3.0.2" - dot-prop "^2.4.0" - duplexify "^3.2.0" - ent "^2.2.0" - extend "^3.0.0" - google-auto-auth "^0.5.0" - google-proto-files "^0.8.0" - grpc "^1.0.0" - is "^3.0.1" - log-driver "^1.2.5" - methmeth "^1.0.0" - modelo "^4.2.0" - request "^2.70.0" - retry-request "^1.3.0" - split-array-stream "^1.0.0" - stream-events "^1.0.1" - string-format-obj "^1.0.0" - through2 "^2.0.0" - -"@google-cloud/common@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.12.0.tgz#b1cb0922c70f7e5273e402b0a6ae71de2f32abc3" +"@google-cloud/common@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.13.0.tgz#d062439a75b38eb76c4704d20f5b45301a69f17f" dependencies: array-uniq "^1.0.3" arrify "^1.0.1" concat-stream "^1.6.0" create-error-class "^3.0.2" - dot-prop "^2.4.0" duplexify "^3.5.0" ent "^2.2.0" extend "^3.0.0" - google-auto-auth "^0.5.2" - google-proto-files "^0.8.6" + google-auto-auth "^0.6.0" is "^3.2.0" log-driver "^1.2.5" methmeth "^1.1.0" @@ -67,16 +40,16 @@ string-format-obj "^1.1.0" through2 "^2.0.3" -"@google-cloud/speech@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@google-cloud/speech/-/speech-0.6.0.tgz#161e9bb3f3aca4ed7acb65e1fdd8286ac34b41e8" +"@google-cloud/speech@0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@google-cloud/speech/-/speech-0.9.0.tgz#97fcb47046cdaff66afbd05508cb38e42f61cdb5" dependencies: - "@google-cloud/common" "^0.12.0" - "@google-cloud/common-grpc" "^0.1.1" + "@google-cloud/common" "^0.13.0" + "@google-cloud/common-grpc" "^0.3.0" events-intercept "^2.0.0" extend "^3.0.0" - google-gax "^0.10.2" - google-proto-files "^0.8.0" + google-gax "^0.13.0" + google-proto-files "^0.11.0" is "^3.1.0" propprop "^0.3.1" pumpify "^1.3.5" @@ -85,11 +58,11 @@ string-format-obj "^1.1.0" through2 "^2.0.1" -"@google-cloud/storage@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-0.7.0.tgz#87eb7bde35a1597511cba7b651e666178ac90fe1" +"@google-cloud/storage@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-1.0.0.tgz#cb6af3d8ce89a2e5b394adf2e5fa2bf83f36b2fd" dependencies: - "@google-cloud/common" "^0.12.0" + "@google-cloud/common" "^0.13.0" arrify "^1.0.0" async "^2.0.1" concat-stream "^1.5.0" @@ -133,7 +106,7 @@ arguejs@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/arguejs/-/arguejs-0.2.3.tgz#b6f939f5fe0e3cd1f3f93e2aa9262424bf312af7" -array-uniq@^1.0.2, array-uniq@^1.0.3: +array-uniq@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -186,7 +159,7 @@ balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" -base64url@^2.0.0: +base64url@2.0.0, base64url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" @@ -232,7 +205,7 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" -buffer-equal-constant-time@^1.0.1: +buffer-equal-constant-time@1.0.1, buffer-equal-constant-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -421,7 +394,7 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -ecdsa-sig-formatter@^1.0.0: +ecdsa-sig-formatter@1.0.9, ecdsa-sig-formatter@^1.0.0: version "1.0.9" resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" dependencies: @@ -528,6 +501,13 @@ gauge@~2.7.1: supports-color "^0.2.0" wide-align "^1.1.0" +gcp-metadata@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-0.1.0.tgz#abe21f1ea324dd0b34a3f06ca81763fb1eee37d9" + dependencies: + extend "^3.0.0" + retry-request "^1.3.2" + gcs-resumable-upload@^0.7.1: version "0.7.4" resolved "https://registry.yarnpkg.com/gcs-resumable-upload/-/gcs-resumable-upload-0.7.4.tgz#6633967badf7a4aed2d79337e7badfe889cfd617" @@ -585,6 +565,15 @@ glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" +google-auth-library@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" + dependencies: + gtoken "^1.2.1" + jws "^3.1.4" + lodash.noop "^3.0.1" + request "^2.74.0" + google-auth-library@^0.9.10, google-auth-library@^0.9.6: version "0.9.10" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.9.10.tgz#4993dc07bb4834b8ca0350213a6873a32c6051b9" @@ -603,7 +592,7 @@ google-auto-auth@^0.2.1: google-auth-library "^0.9.6" object-assign "^3.0.0" -google-auto-auth@^0.5.0, google-auto-auth@^0.5.2: +google-auto-auth@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.5.2.tgz#4c9f38574e69fb55a3c516ab0415e9fa33e67602" dependencies: @@ -612,17 +601,29 @@ google-auto-auth@^0.5.0, google-auto-auth@^0.5.2: object-assign "^3.0.0" request "^2.79.0" -google-gax@^0.10.2: - version "0.10.6" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.10.6.tgz#3af119704700fd212df6b9250e4b4a61676b3f96" +google-auto-auth@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.6.0.tgz#ad76656293d8d06b3c89c358becd29947d4510a8" + dependencies: + async "^2.1.2" + gcp-metadata "^0.1.0" + google-auth-library "^0.10.0" + object-assign "^3.0.0" + request "^2.79.0" + +google-gax@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.13.0.tgz#02571bcd556ddd58d86d8df3cc277cb8cecace86" dependencies: extend "^3.0.0" google-auto-auth "^0.5.2" - google-proto-files "^0.8.3" - grpc "~1.0" + google-proto-files "^0.9.1" + grpc "^1.2" + is-stream-ended "^0.1.0" lodash "^4.17.2" process-nextick-args "^1.0.7" readable-stream "^2.2.2" + through2 "^2.0.3" google-p12-pem@^0.1.0: version "0.1.1" @@ -630,9 +631,13 @@ google-p12-pem@^0.1.0: dependencies: node-forge "^0.6.46" -google-proto-files@^0.8.0, google-proto-files@^0.8.3, google-proto-files@^0.8.6: - version "0.8.6" - resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.8.6.tgz#a7c8ddccd2179690d270b0ebfc42994d56da0ee6" +google-proto-files@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.11.0.tgz#3d753120718e5e8574f38def739d54cf7a057553" + +google-proto-files@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.9.1.tgz#c760c79059bf62ba3ac56e1d1ba7b8d4560803be" graceful-fs@^4.1.11, graceful-fs@^4.1.2: version "4.1.11" @@ -642,9 +647,9 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -grpc@^1.0.0, grpc@~1.0, grpc@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.0.1.tgz#e965544b5e56c998058102184e2ab1f27f123afd" +grpc@^1.2, grpc@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.2.3.tgz#60b4b533a8783fa0b389b6cfa5d5bee34786049f" dependencies: arguejs "^0.2.3" lodash "^4.15.0" @@ -652,7 +657,7 @@ grpc@^1.0.0, grpc@~1.0, grpc@~1.0.1: node-pre-gyp "^0.6.0" protobufjs "^5.0.0" -gtoken@^1.1.0: +gtoken@^1.1.0, gtoken@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.1.tgz#90153a547c2fc1cd24a4d3d2ab3b5aba0a26897a" dependencies: @@ -839,6 +844,15 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" +jwa@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" + dependencies: + base64url "2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.9" + safe-buffer "^5.0.1" + jwa@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.0.2.tgz#fd79609f1e772e299dce8ddb76d00659dd83511f" @@ -847,7 +861,15 @@ jwa@~1.0.0: buffer-equal-constant-time "^1.0.1" ecdsa-sig-formatter "^1.0.0" -jws@^3.0.0, jws@~3.0.0: +jws@^3.0.0, jws@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" + dependencies: + base64url "^2.0.0" + jwa "^1.1.4" + safe-buffer "^5.0.1" + +jws@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/jws/-/jws-3.0.0.tgz#da5f267897dd4e9cf8137979db33fc54a3c05418" dependencies: @@ -870,7 +892,7 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -lodash.noop@~3.0.0: +lodash.noop@^3.0.1, lodash.noop@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" @@ -899,7 +921,7 @@ meow@~2.0.0: minimist "^1.1.0" object-assign "^1.0.0" -methmeth@^1.0.0, methmeth@^1.1.0: +methmeth@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/methmeth/-/methmeth-1.1.0.tgz#e80a26618e52f5c4222861bb748510bd10e29089" @@ -967,9 +989,9 @@ node-pre-gyp@^0.6.0: tar "~2.2.1" tar-pack "~3.3.0" -node-record-lpcm16@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/node-record-lpcm16/-/node-record-lpcm16-0.2.0.tgz#ae8da285c66d08e68662f7a1df538d68a88cf3dc" +node-record-lpcm16@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/node-record-lpcm16/-/node-record-lpcm16-0.3.0.tgz#797eb70c509db4e982a32162147a7bae34eaacca" node-uuid@~1.4.7: version "1.4.7" @@ -1237,7 +1259,7 @@ request@2.76.0: tough-cookie "~2.3.0" tunnel-agent "~0.4.1" -request@^2.61.0, request@^2.70.0, request@^2.72.0, request@^2.74.0, request@^2.79.0: +request@^2.61.0, request@^2.72.0, request@^2.74.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -1296,7 +1318,7 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -retry-request@^1.3.0, retry-request@^1.3.2: +retry-request@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-1.3.2.tgz#59ad24e71f8ae3f312d5f7b4bcf467a5e5a57bd6" dependencies: @@ -1555,15 +1577,15 @@ y18n@^3.2.0, y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" dependencies: camelcase "^3.0.0" -yargs@6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" +yargs@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.0.2.tgz#115b97df1321823e8b8648e8968c782521221f67" dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -1577,7 +1599,7 @@ yargs@6.6.0: string-width "^1.0.2" which-module "^1.0.0" y18n "^3.2.1" - yargs-parser "^4.2.0" + yargs-parser "^5.0.0" yargs@^3.10.0: version "3.32.0" diff --git a/translate/README.md b/translate/README.md index 86cf21bff01..76d2af6fba3 100644 --- a/translate/README.md +++ b/translate/README.md @@ -33,12 +33,12 @@ __Usage:__ `node translate.js --help` ``` Commands: - detect Detects the language of one or more strings. - list [target] Lists available translation languages. To return language names in a - language other than English, specify a target language. - translate Translates one or more strings into the target language. - translate-with-model Translates one or more strings into the target language using the - specified model. + detect Detects the language of one or more strings. + list [target] Lists available translation languages. To language names in a language + other than English, specify a target language. + translate Translates one or more strings into the target language. + translate-with-model Translates one or more strings into the target language using the + specified model. Options: --help Show help [boolean] diff --git a/translate/package.json b/translate/package.json index 2e4d71f0817..2ebf1cb4971 100644 --- a/translate/package.json +++ b/translate/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@google-cloud/translate": "0.8.0", - "yargs": "6.6.0" + "yargs": "7.0.2" }, "engines": { "node": ">=4.3.2" diff --git a/translate/quickstart.js b/translate/quickstart.js index 7bb0715b24b..394326427ce 100644 --- a/translate/quickstart.js +++ b/translate/quickstart.js @@ -39,5 +39,8 @@ translateClient.translate(text, target) console.log(`Text: ${text}`); console.log(`Translation: ${translation}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END translate_quickstart] diff --git a/translate/translate.js b/translate/translate.js index 8e48116294c..faa9fcae00c 100644 --- a/translate/translate.js +++ b/translate/translate.js @@ -15,125 +15,133 @@ 'use strict'; -const Translate = require('@google-cloud/translate'); - -// [START translate_detect_language] -function detectLanguage (input) { - // The text for which to detect language, e.g.: - // input = 'Hello, world'; +function detectLanguage (text) { + // [START translate_detect_language] + // Imports the Google Cloud client library + const Translate = require('@google-cloud/translate'); // Instantiates a client const translate = Translate(); - // Detects the language. "input" can be a string for detecting the language of + // The text for which to detect language, e.g. "Hello, world!" + // const text = 'Hello, world!'; + + // Detects the language. "text" can be a string for detecting the language of // a single piece of text, or an array of strings for detecting the languages // of multiple texts. - return translate.detect(input) + translate.detect(text) .then((results) => { let detections = results[0]; - - if (!Array.isArray(detections)) { - detections = [detections]; - } + detections = Array.isArray(detections) ? detections : [detections]; console.log('Detections:'); detections.forEach((detection) => { console.log(`${detection.input} => ${detection.language}`); }); - - return detections; + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END translate_detect_language] } -// [END translate_detect_language] -// [START translate_list_codes] function listLanguages () { + // [START translate_list_codes] + // Imports the Google Cloud client library + const Translate = require('@google-cloud/translate'); + // Instantiates a client const translate = Translate(); // Lists available translation language with their names in English (the default). - return translate.getLanguages() + translate.getLanguages() .then((results) => { const languages = results[0]; console.log('Languages:'); languages.forEach((language) => console.log(language)); - - return languages; + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END translate_list_codes] } -// [END translate_list_codes] -// [START translate_list_language_names] function listLanguagesWithTarget (target) { - // The target language for language names, e.g.: - // target = 'ru'; + // [START translate_list_language_names] + // Imports the Google Cloud client library + const Translate = require('@google-cloud/translate'); // Instantiates a client const translate = Translate(); - // Lists available translation language with their names in a target language, - // e.g. "ru" - return translate.getLanguages(target) + // The target language for language names, e.g. "ru" + // const target = 'ru'; + + // Lists available translation language with their names in a target language + translate.getLanguages(target) .then((results) => { const languages = results[0]; console.log('Languages:'); languages.forEach((language) => console.log(language)); - - return languages; + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END translate_list_language_names] } -// [END translate_list_language_names] -// [START translate_translate_text] -function translateText (input, target) { - // The text to translate, e.g.: - // input = 'Hello, world'; - // The target language, e.g.: - // target = 'ru'; - - if (!Array.isArray(input)) { - input = [input]; - } +function translateText (text, target) { + // [START translate_translate_text] + // Imports the Google Cloud client library + const Translate = require('@google-cloud/translate'); // Instantiates a client const translate = Translate(); - // Translates the text into the target language. "input" can be a string for + // The text to translate, e.g. "Hello, world!" + // const text = 'Hello, world!'; + + // The target language, e.g. "ru" + // const target = 'ru'; + + // Translates the text into the target language. "text" can be a string for // translating a single piece of text, or an array of strings for translating // multiple texts. - return translate.translate(input, target) + translate.translate(text, target) .then((results) => { let translations = results[0]; translations = Array.isArray(translations) ? translations : [translations]; console.log('Translations:'); translations.forEach((translation, i) => { - console.log(`${input[i]} => (${target}) ${translation}`); + console.log(`${text[i]} => (${target}) ${translation}`); }); - - return translations; + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END translate_translate_text] } -// [END translate_translate_text] - -// [START translate_text_with_model] -function translateTextWithModel (input, target, model) { - // The text to translate, e.g.: - // input = 'Hello, world'; - // The target language, e.g.: - // target = 'ru'; - // The model to use, e.g.: - // model = 'nmt'; - if (!Array.isArray(input)) { - input = [input]; - } +function translateTextWithModel (text, target, model) { + // [START translate_text_with_model] + // Imports the Google Cloud client library + const Translate = require('@google-cloud/translate'); // Instantiates a client const translate = Translate(); + // The text to translate, e.g. "Hello, world!" + // const text = 'Hello, world!'; + + // The target language, e.g. "ru" + // const target = 'ru'; + + // The model to use, e.g. "nmt" + // const model = 'nmt'; + const options = { // The target language, e.g. "ru" to: target, @@ -142,35 +150,36 @@ function translateTextWithModel (input, target, model) { model: model }; - // Translates the text into the target language. "input" can be a string for + // Translates the text into the target language. "text" can be a string for // translating a single piece of text, or an array of strings for translating // multiple texts. - return translate.translate(input, options) + translate.translate(text, options) .then((results) => { let translations = results[0]; translations = Array.isArray(translations) ? translations : [translations]; console.log('Translations:'); translations.forEach((translation, i) => { - console.log(`${input[i]} => (${target}) ${translation}`); + console.log(`${text[i]} => (${target}) ${translation}`); }); - - return translations; + }) + .catch((err) => { + console.error('ERROR:', err); }); + // [END translate_text_with_model] } -// [END translate_text_with_model] require(`yargs`) .demand(1) .command( - `detect `, + `detect `, `Detects the language of one or more strings.`, {}, - (opts) => detectLanguage(opts.input) + (opts) => detectLanguage(opts.text) ) .command( `list [target]`, - `Lists available translation languages. To return language names in a language other than English, specify a target language.`, + `Lists available translation languages. To language names in a language other than English, specify a target language.`, {}, (opts) => { if (opts.target) { @@ -181,16 +190,16 @@ require(`yargs`) } ) .command( - `translate `, + `translate `, `Translates one or more strings into the target language.`, {}, - (opts) => translateText(opts.input, opts.toLang) + (opts) => translateText(opts.text, opts.toLang) ) .command( - `translate-with-model `, + `translate-with-model `, `Translates one or more strings into the target language using the specified model.`, {}, - (opts) => translateTextWithModel(opts.input, opts.toLang, opts.model) + (opts) => translateTextWithModel(opts.text, opts.toLang, opts.model) ) .example(`node $0 detect "Hello world!"`, `Detects the language of a string.`) .example(`node $0 detect "Hello world!" "Goodbye"`, `Detects the languages of multiple strings.`) diff --git a/translate/yarn.lock b/translate/yarn.lock index b29d16c1c6b..e3b7612084b 100644 --- a/translate/yarn.lock +++ b/translate/yarn.lock @@ -2,20 +2,18 @@ # yarn lockfile v1 -"@google-cloud/common@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.12.0.tgz#b1cb0922c70f7e5273e402b0a6ae71de2f32abc3" +"@google-cloud/common@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.13.0.tgz#d062439a75b38eb76c4704d20f5b45301a69f17f" dependencies: array-uniq "^1.0.3" arrify "^1.0.1" concat-stream "^1.6.0" create-error-class "^3.0.2" - dot-prop "^2.4.0" duplexify "^3.5.0" ent "^2.2.0" extend "^3.0.0" - google-auto-auth "^0.5.2" - google-proto-files "^0.8.6" + google-auto-auth "^0.6.0" is "^3.2.0" log-driver "^1.2.5" methmeth "^1.1.0" @@ -27,11 +25,11 @@ string-format-obj "^1.1.0" through2 "^2.0.3" -"@google-cloud/translate@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@google-cloud/translate/-/translate-0.7.0.tgz#acb3b2690b946e6f5a65f51958f31cab3779d1e3" +"@google-cloud/translate@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@google-cloud/translate/-/translate-0.8.0.tgz#9570dfaff93ff5a92a1aee960b613ad020fc6f11" dependencies: - "@google-cloud/common" "^0.12.0" + "@google-cloud/common" "^0.13.0" arrify "^1.0.0" extend "^3.0.0" is "^3.0.1" @@ -70,16 +68,12 @@ async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.0.1, async@^2.1.2: +async@^2.1.2: version "2.1.4" resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" dependencies: lodash "^4.14.0" -async@~1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.4.2.tgz#6c9edcb11ced4f0dd2f2d40db0d49a109c088aab" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -92,40 +86,23 @@ aws4@^1.2.1: version "1.5.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" -base64url@^2.0.0: +base64url@2.0.0, base64url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" -base64url@~0.0.4: - version "0.0.6" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-0.0.6.tgz#9597b36b330db1c42477322ea87ea8027499b82b" - -base64url@~1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-1.0.6.tgz#d64d375d68a7c640d912e2358d170dca5bb54681" - dependencies: - concat-stream "~1.4.7" - meow "~2.0.0" - bcrypt-pbkdf@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" dependencies: tweetnacl "^0.14.3" -bl@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398" - dependencies: - readable-stream "~2.0.5" - boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" dependencies: hoek "2.x.x" -buffer-equal-constant-time@^1.0.1: +buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -137,17 +114,6 @@ builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -camelcase-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-1.0.0.tgz#bd1a11bf9b31a1ce493493a930de1a0baf4ad7ec" - dependencies: - camelcase "^1.0.1" - map-obj "^1.0.0" - -camelcase@^1.0.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" @@ -202,14 +168,6 @@ concat-stream@^1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" -concat-stream@~1.4.7: - version "1.4.10" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.4.10.tgz#acc3bbf5602cb8cc980c6ac840fa7d8603e3ef36" - dependencies: - inherits "~2.0.1" - readable-stream "~1.1.9" - typedarray "~0.0.5" - core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -240,12 +198,6 @@ delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" -dot-prop@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-2.4.0.tgz#848e28f7f1d50740c6747ab3cb07670462b6f89c" - dependencies: - is-obj "^1.0.0" - duplexify@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604" @@ -261,7 +213,7 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -ecdsa-sig-formatter@^1.0.0: +ecdsa-sig-formatter@1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" dependencies: @@ -307,14 +259,6 @@ forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" -form-data@~1.0.0-rc4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-1.0.1.tgz#ae315db9a4907fa065502304a66d7733475ee37c" - dependencies: - async "^2.0.1" - combined-stream "^1.0.5" - mime-types "^2.1.11" - form-data@~2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" @@ -323,6 +267,13 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" +gcp-metadata@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-0.1.0.tgz#abe21f1ea324dd0b34a3f06ca81763fb1eee37d9" + dependencies: + extend "^3.0.0" + retry-request "^1.3.2" + generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" @@ -337,33 +288,28 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - getpass@^0.1.1: version "0.1.6" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" dependencies: assert-plus "^1.0.0" -google-auth-library@^0.9.10: - version "0.9.10" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.9.10.tgz#4993dc07bb4834b8ca0350213a6873a32c6051b9" +google-auth-library@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" dependencies: - async "~1.4.2" - gtoken "^1.1.0" - jws "~3.0.0" - lodash.noop "~3.0.0" - request "~2.74.0" - string-template "~0.2.0" + gtoken "^1.2.1" + jws "^3.1.4" + lodash.noop "^3.0.1" + request "^2.74.0" -google-auto-auth@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.5.2.tgz#4c9f38574e69fb55a3c516ab0415e9fa33e67602" +google-auto-auth@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.6.0.tgz#ad76656293d8d06b3c89c358becd29947d4510a8" dependencies: async "^2.1.2" - google-auth-library "^0.9.10" + gcp-metadata "^0.1.0" + google-auth-library "^0.10.0" object-assign "^3.0.0" request "^2.79.0" @@ -373,10 +319,6 @@ google-p12-pem@^0.1.0: dependencies: node-forge "^0.6.46" -google-proto-files@^0.8.6: - version "0.8.6" - resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.8.6.tgz#a7c8ddccd2179690d270b0ebfc42994d56da0ee6" - graceful-fs@^4.1.2: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -385,9 +327,9 @@ graceful-fs@^4.1.2: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -gtoken@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.1.tgz#90153a547c2fc1cd24a4d3d2ab3b5aba0a26897a" +gtoken@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.2.tgz#172776a1a9d96ac09fc22a00f5be83cee6de8820" dependencies: google-p12-pem "^0.1.0" jws "^3.0.0" @@ -438,14 +380,6 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" -indent-string@^1.1.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-1.2.2.tgz#db99bcc583eb6abbb1e48dcbb1999a986041cb6b" - dependencies: - get-stdin "^4.0.1" - minimist "^1.1.0" - repeating "^1.1.0" - inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -464,12 +398,6 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -491,10 +419,6 @@ is-my-json-valid@^2.12.4: jsonpointer "^4.0.0" xtend "^4.0.0" -is-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -515,10 +439,6 @@ is@^3.0.1, is@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/is/-/is-3.2.0.tgz#a362e3daf7df3fd8b7114115d624c5b7e1cb90f7" -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -557,20 +477,22 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" -jwa@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.0.2.tgz#fd79609f1e772e299dce8ddb76d00659dd83511f" +jwa@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" dependencies: - base64url "~0.0.4" - buffer-equal-constant-time "^1.0.1" - ecdsa-sig-formatter "^1.0.0" + base64url "2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.9" + safe-buffer "^5.0.1" -jws@^3.0.0, jws@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.0.0.tgz#da5f267897dd4e9cf8137979db33fc54a3c05418" +jws@^3.0.0, jws@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" dependencies: - base64url "~1.0.4" - jwa "~1.0.0" + base64url "^2.0.0" + jwa "^1.1.4" + safe-buffer "^5.0.1" lcid@^1.0.0: version "1.0.0" @@ -588,7 +510,7 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -lodash.noop@~3.0.0: +lodash.noop@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" @@ -600,19 +522,6 @@ log-driver@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" -map-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - -meow@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-2.0.0.tgz#8f530a8ecf5d40d3f4b4df93c3472900fba2a8f1" - dependencies: - camelcase-keys "^1.0.0" - indent-string "^1.1.0" - minimist "^1.1.0" - object-assign "^1.0.0" - methmeth@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/methmeth/-/methmeth-1.1.0.tgz#e80a26618e52f5c4222861bb748510bd10e29089" @@ -621,7 +530,7 @@ mime-db@~1.25.0: version "1.25.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" -mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: +mime-types@^2.1.12, mime-types@~2.1.7: version "2.1.13" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" dependencies: @@ -631,10 +540,6 @@ mime@^1.2.11: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" -minimist@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - modelo@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/modelo/-/modelo-4.2.0.tgz#3b4b420023a66ca7e32bdba16e710937e14d1b0b" @@ -664,10 +569,6 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-1.0.0.tgz#e65dc8766d3b47b4b8307465c8311da030b070a6" - object-assign@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" @@ -730,10 +631,6 @@ punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" -qs@~6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625" - qs@~6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" @@ -765,32 +662,6 @@ readable-stream@^2.0.0, readable-stream@^2.1.5, readable-stream@^2.2.2: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -repeating@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-1.1.3.tgz#3d4114218877537494f97f77f9785fab810fa4ac" - dependencies: - is-finite "^1.0.0" - request@2.76.0: version "2.76.0" resolved "https://registry.yarnpkg.com/request/-/request-2.76.0.tgz#be44505afef70360a0436955106be3945d95560e" @@ -816,7 +687,7 @@ request@2.76.0: tough-cookie "~2.3.0" tunnel-agent "~0.4.1" -request@^2.72.0, request@^2.79.0: +request@^2.72.0, request@^2.74.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -841,32 +712,6 @@ request@^2.72.0, request@^2.79.0: tunnel-agent "~0.4.1" uuid "^3.0.0" -request@~2.74.0: - version "2.74.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.74.0.tgz#7693ca768bbb0ea5c8ce08c084a45efa05b892ab" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - bl "~1.1.2" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~1.0.0-rc4" - har-validator "~2.0.6" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - node-uuid "~1.4.7" - oauth-sign "~0.8.1" - qs "~6.2.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -950,10 +795,6 @@ string-format-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/string-format-obj/-/string-format-obj-1.1.0.tgz#7635610b1ef397013e8478be98a170e04983d068" -string-template@~0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" - string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -1011,7 +852,7 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" -typedarray@^0.0.6, typedarray@~0.0.5: +typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -1059,15 +900,15 @@ y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" dependencies: camelcase "^3.0.0" -yargs@6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" +yargs@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.0.2.tgz#115b97df1321823e8b8648e8968c782521221f67" dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -1081,4 +922,4 @@ yargs@6.6.0: string-width "^1.0.2" which-module "^1.0.0" y18n "^3.2.1" - yargs-parser "^4.2.0" + yargs-parser "^5.0.0" diff --git a/video/README.md b/video/README.md index b986b556277..8f941349cad 100644 --- a/video/README.md +++ b/video/README.md @@ -28,11 +28,10 @@ detection, and shot change detection. View the [documentation][analyze_docs] or the [source code][analyze_code]. ``` -node analyze.js Commands: - faces Analyzes faces in a video using the Cloud Video Intelligence API. - shots Analyzes shot angles in a video using the Cloud Video Intelligence API. - labels Labels objects in a video using the Cloud Video Intelligence API. + faces Analyzes faces in a video using the Cloud Video Intelligence API. + shots Analyzes shot angles in a video using the Cloud Video Intelligence API. + labels Labels objects in a video using the Cloud Video Intelligence API. Options: --help Show help [boolean] @@ -42,6 +41,7 @@ Examples: node analyze.js shots gs://my-bucket/my-video.mp4 node analyze.js labels gs://my-bucket/my-video.mp4 +For more information, see https://cloud.google.com/video-intelligence/docs ``` [analyze_docs]: https://cloud.google.com/video-intelligence/docs diff --git a/video/analyze.js b/video/analyze.js index 37bd8f802f1..c2362dc845f 100644 --- a/video/analyze.js +++ b/video/analyze.js @@ -13,11 +13,9 @@ * limitations under the License. */ -// https://cloud.google.com/video-intelligence/docs/ - 'use strict'; -function analyzeFaces (gcsPath) { +function analyzeFaces (gcsUri) { // [START analyze_faces] // Imports the Google Cloud Video Intelligence library const Video = require('@google-cloud/videointelligence').v1beta1(); @@ -26,34 +24,37 @@ function analyzeFaces (gcsPath) { const video = Video.videoIntelligenceServiceClient(); // The GCS filepath of the video to analyze - // const gcsPath = 'gs://my-bucket/my-video.mp4' + // const gcsUri = 'gs://my-bucket/my-video.mp4' const request = { - inputUri: gcsPath, + inputUri: gcsUri, features: ['FACE_DETECTION'] }; // Detect faces in a video video.annotateVideo(request) - .then((startResponse) => { - const operation = startResponse[0]; + .then((results) => { + const operation = results[0]; console.log('Waiting for operation to complete...'); return operation.promise(); }) - .then((doneResponse) => { + .then((results) => { // Get faces for first video - const faces = doneResponse[0].annotationResults[0].faceAnnotations; + const faces = results[0].annotationResults[0].faceAnnotations; faces.forEach((face, faceIdx) => { console.log('Thumbnail size:', face.thumbnail.buffer.length); face.segments.forEach((segment, segmentIdx) => { console.log(`Track ${segmentIdx} of face ${faceIdx}: frames ${segment.startTimeOffset} to ${segment.endTimeOffset}`); }); }); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END analyze_faces] } -function analyzeLabels (gcsPath) { +function analyzeLabels (gcsUri) { // [START analyze_labels] // Imports the Google Cloud Video Intelligence library const Video = require('@google-cloud/videointelligence').v1beta1(); @@ -62,23 +63,23 @@ function analyzeLabels (gcsPath) { const video = Video.videoIntelligenceServiceClient(); // The GCS filepath of the video to analyze - // const gcsPath = 'gs://my-bucket/my-video.mp4' + // const gcsUri = 'gs://my-bucket/my-video.mp4' const request = { - inputUri: gcsPath, + inputUri: gcsUri, features: ['LABEL_DETECTION'] }; // Detect labels in a video video.annotateVideo(request) - .then((startResponse) => { - const operation = startResponse[0]; + .then((results) => { + const operation = results[0]; console.log('Waiting for operation to complete...'); return operation.promise(); }) - .then((doneResponse) => { + .then((results) => { // Get labels for first video - const labels = doneResponse[0].annotationResults[0].labelAnnotations; + const labels = results[0].annotationResults[0].labelAnnotations; labels.forEach((label) => { console.log('Label description:', label.description); console.log('Locations:'); @@ -86,11 +87,14 @@ function analyzeLabels (gcsPath) { console.log(`\tFrames ${location.segment.startTimeOffset} to ${location.segment.endTimeOffset}`); }); }); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END analyze_labels] } -function analyzeShots (gcsPath) { +function analyzeShots (gcsUri) { // [START analyze_shots] // Imports the Google Cloud Video Intelligence library const Video = require('@google-cloud/videointelligence').v1beta1(); @@ -99,28 +103,31 @@ function analyzeShots (gcsPath) { const video = Video.videoIntelligenceServiceClient(); // The GCS filepath of the video to analyze - // const gcsPath = 'gs://my-bucket/my-video.mp4' + // const gcsUri = 'gs://my-bucket/my-video.mp4' const request = { - inputUri: gcsPath, + inputUri: gcsUri, features: ['SHOT_CHANGE_DETECTION'] }; // Detect camera shot changes video.annotateVideo(request) - .then((startResponse) => { - const operation = startResponse[0]; + .then((results) => { + const operation = results[0]; console.log('Waiting for operation to complete...'); return operation.promise(); }) - .then((doneResponse) => { + .then((results) => { // Get shot changes for first video - const shotChanges = doneResponse[0].annotationResults[0].shotAnnotations; + const shotChanges = results[0].annotationResults[0].shotAnnotations; shotChanges.forEach((shot, shotIdx) => { console.log(`Scene ${shotIdx}:`); console.log(`\tStart: ${shot.startTimeOffset}`); console.log(`\tEnd: ${shot.endTimeOffset}`); }); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END analyze_shots] } @@ -128,30 +135,29 @@ function analyzeShots (gcsPath) { const cli = require(`yargs`) .demand(1) .command( - `faces `, + `faces `, `Analyzes faces in a video using the Cloud Video Intelligence API.`, {}, - (opts) => analyzeFaces(opts.gcsPath) + (opts) => analyzeFaces(opts.gcsUri) ) .command( - `shots `, + `shots `, `Analyzes shot angles in a video using the Cloud Video Intelligence API.`, {}, - (opts) => analyzeShots(opts.gcsPath) + (opts) => analyzeShots(opts.gcsUri) ) .command( - `labels `, + `labels `, `Labels objects in a video using the Cloud Video Intelligence API.`, {}, - (opts) => analyzeLabels(opts.gcsPath) + (opts) => analyzeLabels(opts.gcsUri) ) .example(`node $0 faces gs://my-bucket/my-video.mp4`) .example(`node $0 shots gs://my-bucket/my-video.mp4`) .example(`node $0 labels gs://my-bucket/my-video.mp4`) .wrap(120) .recommendCommands() - .epilogue(`For more information, see https://cloud.google.com/video-intelligence/docs`); - -if (module === require.main) { - cli.help().strict().argv; -} + .epilogue(`For more information, see https://cloud.google.com/video-intelligence/docs`) + .help() + .strict() + .argv; diff --git a/video/package.json b/video/package.json index 675f002291d..63f9aa07c1f 100644 --- a/video/package.json +++ b/video/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@google-cloud/videointelligence": "https://storage.googleapis.com/videointelligence-alpha/videointelligence-nodejs.tar.gz", - "yargs": "6.6.0" + "yargs": "7.0.2" }, "engines": { "node": ">=4.3.2" diff --git a/video/yarn.lock b/video/yarn.lock new file mode 100644 index 00000000000..f89863fe9c6 --- /dev/null +++ b/video/yarn.lock @@ -0,0 +1,1038 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@google-cloud/videointelligence@https://storage.googleapis.com/videointelligence-alpha/videointelligence-nodejs.tar.gz": + version "0.7.1" + resolved "https://storage.googleapis.com/videointelligence-alpha/videointelligence-nodejs.tar.gz#5e5eb4c93d3969827490dae7288bd04a627b2aa6" + dependencies: + extend "^3.0.0" + google-gax "^0.10.6" + google-proto-files "^0.8.6" + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +ajv@^4.9.1: + version "4.11.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.6.tgz#947e93049790942b2a2d60a8289b28924d39f987" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +aproba@^1.0.3: + version "1.1.1" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" + +are-we-there-yet@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +arguejs@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/arguejs/-/arguejs-0.2.3.tgz#b6f939f5fe0e3cd1f3f93e2aa9262424bf312af7" + +ascli@~1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc" + dependencies: + colour "~0.7.1" + optjs "~3.2.2" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async@^2.1.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.3.0.tgz#1013d1051047dd320fe24e494d5c66ecaf6147d9" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +base64url@2.0.0, base64url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.0.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + +buffer-shims@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +bytebuffer@~5: + version "5.0.1" + resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" + dependencies: + long "~3" + +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +cliui@^3.0.3, cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +colour@~0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +debug@^2.2.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" + dependencies: + ms "0.7.2" + +decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ecdsa-sig-formatter@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" + dependencies: + base64url "^2.0.0" + safe-buffer "^5.0.1" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +extend@^3.0.0, extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +gauge@~2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.3.tgz#1c23855f962f17b3ad3d0dc7443f304542edfe09" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +google-auth-library@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" + dependencies: + gtoken "^1.2.1" + jws "^3.1.4" + lodash.noop "^3.0.1" + request "^2.74.0" + +google-auto-auth@^0.5.2: + version "0.5.4" + resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.5.4.tgz#1d86c7928d633e75a9c1ab034a527efcce4a40b1" + dependencies: + async "^2.1.2" + google-auth-library "^0.10.0" + object-assign "^3.0.0" + request "^2.79.0" + +google-gax@^0.10.6: + version "0.10.8" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.10.8.tgz#20a6acdc8fcf01d71c1c990b85e665761e36ddf0" + dependencies: + extend "^3.0.0" + google-auto-auth "^0.5.2" + google-proto-files "^0.9.1" + grpc "^1.1" + lodash "^4.17.2" + process-nextick-args "^1.0.7" + readable-stream "^2.2.2" + +google-p12-pem@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-0.1.2.tgz#33c46ab021aa734fa0332b3960a9a3ffcb2f3177" + dependencies: + node-forge "^0.7.1" + +google-proto-files@^0.8.6: + version "0.8.6" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.8.6.tgz#a7c8ddccd2179690d270b0ebfc42994d56da0ee6" + +google-proto-files@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.9.1.tgz#c760c79059bf62ba3ac56e1d1ba7b8d4560803be" + +graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +grpc@^1.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.2.3.tgz#60b4b533a8783fa0b389b6cfa5d5bee34786049f" + dependencies: + arguejs "^0.2.3" + lodash "^4.15.0" + nan "^2.0.0" + node-pre-gyp "^0.6.0" + protobufjs "^5.0.0" + +gtoken@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.2.tgz#172776a1a9d96ac09fc22a00f5be83cee6de8820" + dependencies: + google-p12-pem "^0.1.0" + jws "^3.0.0" + mime "^1.2.11" + request "^2.72.0" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hosted-git-info@^2.1.4: + version "2.4.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.1.tgz#4b0445e41c004a8bd1337773a4ff790ca40318c8" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +jwa@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" + dependencies: + base64url "2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.9" + safe-buffer "^5.0.1" + +jws@^3.0.0, jws@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" + dependencies: + base64url "^2.0.0" + jwa "^1.1.4" + safe-buffer "^5.0.1" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +lodash.noop@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" + +lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +long@~3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +mime@^1.2.11: + version "1.3.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + +minimatch@^3.0.0, minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +"mkdirp@>=0.5 0", mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +nan@^2.0.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.1.tgz#8c84f7b14c96b89f57fbc838012180ec8ca39a01" + +node-forge@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300" + +node-pre-gyp@^0.6.0: + version "0.6.34" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.34.tgz#94ad1c798a11d7fc67381b50d47f8cc18d9799f7" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.3.6" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.6.tgz#498fa420c96401f787402ba21e600def9f981fff" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +npmlog@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.1" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +once@^1.3.0, once@^1.3.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +optjs@~3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +protobufjs@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.2.tgz#59748d7dcf03d2db22c13da9feb024e16ab80c91" + dependencies: + ascli "~1" + bytebuffer "~5" + glob "^7.0.5" + yargs "^3.10.0" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.1.4, readable-stream@^2.2.2: + version "2.2.9" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" + dependencies: + buffer-shims "~1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~1.0.0" + util-deprecate "~1.0.1" + +request@^2.72.0, request@^2.74.0, request@^2.79.0, request@^2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sshpk@^1.7.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.11.0.tgz#2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string_decoder@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667" + dependencies: + buffer-shims "~1.0.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +window-size@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +y18n@^3.2.0, y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + +yargs@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.0.2.tgz#115b97df1321823e8b8648e8968c782521221f67" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + +yargs@^3.10.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + dependencies: + camelcase "^2.0.1" + cliui "^3.0.3" + decamelize "^1.1.1" + os-locale "^1.4.0" + string-width "^1.0.1" + window-size "^0.1.4" + y18n "^3.2.0" diff --git a/vision/README.md b/vision/README.md index 411c81a621f..4b5688b3562 100644 --- a/vision/README.md +++ b/vision/README.md @@ -37,20 +37,26 @@ __Usage:__ `node detect.js --help` ``` Commands: - faces Detects faces in a local image file. - faces-gcs Detects faces in an image in Google Cloud Storage. - labels Detects labels in a local image file. - labels-gcs Detects labels in an image in Google Cloud Storage. - landmarks Detects landmarks in a local image file. - landmarks-gcs Detects landmarks in an image in Google Cloud Storage. - text Detects text in a local image file. - text-gcs Detects text in an image in Google Cloud Storage. - logos Detects logos in a local image file. - logos-gcs Detects logos in an image in Google Cloud Storage. - properties Detects image properties in a local image file. - properties-gcs Detects image properties in an image in Google Cloud Storage. - safe-search Detects safe search properties in a local image file. - safe-search-gcs Detects safe search properties in an image in Google Cloud Storage. + faces Detects faces in a local image file. + faces-gcs Detects faces in an image in Google Cloud Storage. + labels Detects labels in a local image file. + labels-gcs Detects labels in an image in Google Cloud Storage. + landmarks Detects landmarks in a local image file. + landmarks-gcs Detects landmarks in an image in Google Cloud Storage. + text Detects text in a local image file. + text-gcs Detects text in an image in Google Cloud Storage. + logos Detects logos in a local image file. + logos-gcs Detects logos in an image in Google Cloud Storage. + properties Detects image properties in a local image file. + properties-gcs Detects image properties in an image in Google Cloud Storage. + safe-search Detects safe search properties in a local image file. + safe-search-gcs Detects safe search properties in an image in Google Cloud Storage. + crops Detects crop hints in a local image file. + crops-gcs Detects crop hints in an image in Google Cloud Storage. + web Finds similar photos on the web for a local image file. + web-gcs Finds similar photos on the web for an image in Google Cloud Storage. + fulltext Extracts full text from a local image file. + fulltext-gcs Extracts full text from an image in Google Cloud Storage. Options: --help Show help [boolean] @@ -70,6 +76,12 @@ Examples: node detect.js properties-gcs my-bucket your-image.jpg node detect.js safe-search ./resources/wakeupcat.jpg node detect.js safe-search-gcs my-bucket your-image.jpg + node detect.js crops ./resources/wakeupcat.jpg + node detect.js crops-gcs my-bucket your-image.jpg + node detect.js web ./resources/wakeupcat.jpg + node detect.js web-gcs my-bucket your-image.jpg + node detect.js fulltext ./resources/wakeupcat.jpg + node detect.js fulltext-gcs my-bucket your-image.jpg For more information, see https://cloud.google.com/vision/docs ``` diff --git a/vision/detect.js b/vision/detect.js index d8a2f7efac3..fed6b528677 100644 --- a/vision/detect.js +++ b/vision/detect.js @@ -39,6 +39,9 @@ function detectFaces (fileName) { console.log(` Sorrow: ${face.sorrow}`); console.log(` Surprise: ${face.surprise}`); }); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_face_detection] } @@ -72,6 +75,9 @@ function detectFacesGCS (bucketName, fileName) { console.log(` Sorrow: ${face.sorrow}`); console.log(` Surprise: ${face.surprise}`); }); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_face_detection_gcs] } @@ -94,6 +100,9 @@ function detectLabels (fileName) { console.log('Labels:'); labels.forEach((label) => console.log(label)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_label_detection] } @@ -121,6 +130,9 @@ function detectLabelsGCS (bucketName, fileName) { console.log('Labels:'); labels.forEach((label) => console.log(label)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_label_detection_gcs] } @@ -143,6 +155,9 @@ function detectLandmarks (fileName) { console.log('Landmarks:'); landmarks.forEach((landmark) => console.log(landmark)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_landmark_detection] } @@ -170,6 +185,9 @@ function detectLandmarksGCS (bucketName, fileName) { console.log('Landmarks:'); landmarks.forEach((landmark) => console.log(landmark)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_landmark_detection_gcs] } @@ -192,6 +210,9 @@ function detectText (fileName) { console.log('Text:'); detections.forEach((text) => console.log(text)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_text_detection] } @@ -219,6 +240,9 @@ function detectTextGCS (bucketName, fileName) { console.log('Text:'); detections.forEach((text) => console.log(text)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_text_detection_gcs] } @@ -241,6 +265,9 @@ function detectLogos (fileName) { console.log('Logos:'); logos.forEach((logo) => console.log(logo)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_logo_detection] } @@ -268,6 +295,9 @@ function detectLogosGCS (bucketName, fileName) { console.log('Logos:'); logos.forEach((logo) => console.log(logo)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_logo_detection_gcs] } @@ -290,6 +320,9 @@ function detectProperties (fileName) { console.log('Colors:'); properties.colors.forEach((color) => console.log(color)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_image_property_detection] } @@ -317,6 +350,9 @@ function detectPropertiesGCS (bucketName, fileName) { console.log('Colors:'); properties.colors.forEach((color) => console.log(color)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_image_property_detection_gcs] } @@ -341,6 +377,9 @@ function detectSafeSearch (fileName) { console.log(`Spoof: ${detections.spoof}`); console.log(`Medical: ${detections.medical}`); console.log(`Violence: ${detections.violence}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_safe_search_detection] } @@ -370,6 +409,9 @@ function detectSafeSearchGCS (bucketName, fileName) { console.log(`Spoof: ${detections.spoof}`); console.log(`Medical: ${detections.medical}`); console.log(`Violence: ${detections.violence}`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_safe_search_detection_gcs] } @@ -388,8 +430,8 @@ function detectCropHints (fileName) { // Find crop hints for the local file vision.detectCrops(fileName) - .then((data) => { - const cropHints = data[0]; + .then((results) => { + const cropHints = results[0]; cropHints.forEach((hintBounds, hintIdx) => { console.log(`Crop Hint ${hintIdx}:`); @@ -397,6 +439,9 @@ function detectCropHints (fileName) { console.log(` Bound ${boundIdx}: (${bound.x}, ${bound.y})`); }); }); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_crop_hint_detection] } @@ -420,8 +465,8 @@ function detectCropHintsGCS (bucketName, fileName) { // Find crop hints for the remote file vision.detectCrops(storage.bucket(bucketName).file(fileName)) - .then((data) => { - const cropHints = data[0]; + .then((results) => { + const cropHints = results[0]; cropHints.forEach((hintBounds, hintIdx) => { console.log(`Crop Hint ${hintIdx}:`); @@ -429,6 +474,9 @@ function detectCropHintsGCS (bucketName, fileName) { console.log(` Bound ${boundIdx}: (${bound.x}, ${bound.y})`); }); }); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_crop_hint_detection_gcs] } @@ -447,32 +495,35 @@ function detectWeb (fileName) { // Detect similar images on the web to a local file vision.detectSimilar(fileName) - .then((data) => { - const results = data[1].responses[0].webDetection; + .then((results) => { + const webDetection = results[1].responses[0].webDetection; - if (results.fullMatchingImages.length > 0) { - console.log(`Full matches found: ${results.fullMatchingImages.length}`); - results.fullMatchingImages.forEach((image) => { + if (webDetection.fullMatchingImages.length) { + console.log(`Full matches found: ${webDetection.fullMatchingImages.length}`); + webDetection.fullMatchingImages.forEach((image) => { console.log(` URL: ${image.url}`); console.log(` Score: ${image.score}`); }); } - if (results.partialMatchingImages.length > 0) { - console.log(`Partial matches found: ${results.partialMatchingImages.length}`); - results.partialMatchingImages.forEach((image) => { + if (webDetection.partialMatchingImages.length) { + console.log(`Partial matches found: ${webDetection.partialMatchingImages.length}`); + webDetection.partialMatchingImages.forEach((image) => { console.log(` URL: ${image.url}`); console.log(` Score: ${image.score}`); }); } - if (results.webEntities.length > 0) { - console.log(`Web entities found: ${results.webEntities.length}`); - results.webEntities.forEach((webEntity) => { + if (webDetection.webEntities.length) { + console.log(`Web entities found: ${webDetection.webEntities.length}`); + webDetection.webEntities.forEach((webEntity) => { console.log(` Description: ${webEntity.description}`); console.log(` Score: ${webEntity.score}`); }); } + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_web_detection] } @@ -496,32 +547,35 @@ function detectWebGCS (bucketName, fileName) { // Detect similar images on the web to a remote file vision.detectSimilar(storage.bucket(bucketName).file(fileName)) - .then((data) => { - const results = data[1].responses[0].webDetection; + .then((results) => { + const webDetection = results[1].responses[0].webDetection; - if (results.fullMatchingImages.length > 0) { - console.log(`Full matches found: ${results.fullMatchingImages.length}`); - results.fullMatchingImages.forEach((image) => { + if (webDetection.fullMatchingImages.length) { + console.log(`Full matches found: ${webDetection.fullMatchingImages.length}`); + webDetection.fullMatchingImages.forEach((image) => { console.log(` URL: ${image.url}`); console.log(` Score: ${image.score}`); }); } - if (results.partialMatchingImages.length > 0) { - console.log(`Partial matches found: ${results.partialMatchingImages.length}`); - results.partialMatchingImages.forEach((image) => { + if (webDetection.partialMatchingImages.length) { + console.log(`Partial matches found: ${webDetection.partialMatchingImages.length}`); + webDetection.partialMatchingImages.forEach((image) => { console.log(` URL: ${image.url}`); console.log(` Score: ${image.score}`); }); } - if (results.webEntities.length > 0) { - console.log(`Web entities found: ${results.webEntities.length}`); - results.webEntities.forEach((webEntity) => { + if (webDetection.webEntities.length) { + console.log(`Web entities found: ${webDetection.webEntities.length}`); + webDetection.webEntities.forEach((webEntity) => { console.log(` Description: ${webEntity.description}`); console.log(` Score: ${webEntity.score}`); }); } + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_web_detection_gcs] } @@ -538,11 +592,14 @@ function detectFulltext (fileName) { // The path to the local image file, e.g. "/path/to/image.png" // const fileName = 'my-file.jpg'; - // // Read a local image as a text document + // Read a local image as a text document vision.readDocument(fileName) - .then((data) => { - const results = data[1].responses[0].fullTextAnnotation; - console.log(results.text); + .then((results) => { + const fullTextAnnotation = results[1].responses[0].fullTextAnnotation; + console.log(fullTextAnnotation.text); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_fulltext_detection] } @@ -566,9 +623,12 @@ function detectFulltextGCS (bucketName, fileName) { // Read a remote image as a text document vision.readDocument(storage.bucket(bucketName).file(fileName)) - .then((data) => { - const results = data[1].responses[0].fullTextAnnotation; - console.log(results.text); + .then((results) => { + const fullTextAnnotation = results[1].responses[0].fullTextAnnotation; + console.log(fullTextAnnotation.text); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_fulltext_detection_gcs] } @@ -582,10 +642,10 @@ require(`yargs`) (opts) => detectFaces(opts.fileName) ) .command( - `faces-gcs `, + `faces-gcs `, `Detects faces in an image in Google Cloud Storage.`, {}, - (opts) => detectFacesGCS(opts.bucket, opts.fileName) + (opts) => detectFacesGCS(opts.bucketName, opts.fileName) ) .command( `labels `, @@ -594,10 +654,10 @@ require(`yargs`) (opts) => detectLabels(opts.fileName) ) .command( - `labels-gcs `, + `labels-gcs `, `Detects labels in an image in Google Cloud Storage.`, {}, - (opts) => detectLabelsGCS(opts.bucket, opts.fileName) + (opts) => detectLabelsGCS(opts.bucketName, opts.fileName) ) .command( `landmarks `, @@ -606,10 +666,10 @@ require(`yargs`) (opts) => detectLandmarks(opts.fileName) ) .command( - `landmarks-gcs `, + `landmarks-gcs `, `Detects landmarks in an image in Google Cloud Storage.`, {}, - (opts) => detectLandmarksGCS(opts.bucket, opts.fileName) + (opts) => detectLandmarksGCS(opts.bucketName, opts.fileName) ) .command( `text `, @@ -618,10 +678,10 @@ require(`yargs`) (opts) => detectText(opts.fileName) ) .command( - `text-gcs `, + `text-gcs `, `Detects text in an image in Google Cloud Storage.`, {}, - (opts) => detectTextGCS(opts.bucket, opts.fileName) + (opts) => detectTextGCS(opts.bucketName, opts.fileName) ) .command( `logos `, @@ -630,10 +690,10 @@ require(`yargs`) (opts) => detectLogos(opts.fileName) ) .command( - `logos-gcs `, + `logos-gcs `, `Detects logos in an image in Google Cloud Storage.`, {}, - (opts) => detectLogosGCS(opts.bucket, opts.fileName) + (opts) => detectLogosGCS(opts.bucketName, opts.fileName) ) .command( `properties `, @@ -642,10 +702,10 @@ require(`yargs`) (opts) => detectProperties(opts.fileName) ) .command( - `properties-gcs `, + `properties-gcs `, `Detects image properties in an image in Google Cloud Storage.`, {}, - (opts) => detectPropertiesGCS(opts.bucket, opts.fileName) + (opts) => detectPropertiesGCS(opts.bucketName, opts.fileName) ) .command( `safe-search `, @@ -654,10 +714,10 @@ require(`yargs`) (opts) => detectSafeSearch(opts.fileName) ) .command( - `safe-search-gcs `, + `safe-search-gcs `, `Detects safe search properties in an image in Google Cloud Storage.`, {}, - (opts) => detectSafeSearchGCS(opts.bucket, opts.fileName) + (opts) => detectSafeSearchGCS(opts.bucketName, opts.fileName) ) .command( `crops `, @@ -666,10 +726,10 @@ require(`yargs`) (opts) => detectCropHints(opts.fileName) ) .command( - `crops-gcs `, + `crops-gcs `, `Detects crop hints in an image in Google Cloud Storage.`, {}, - (opts) => detectCropHintsGCS(opts.bucket, opts.fileName) + (opts) => detectCropHintsGCS(opts.bucketName, opts.fileName) ) .command( `web `, @@ -678,10 +738,10 @@ require(`yargs`) (opts) => detectWeb(opts.fileName) ) .command( - `web-gcs `, + `web-gcs `, `Finds similar photos on the web for an image in Google Cloud Storage.`, {}, - (opts) => detectWebGCS(opts.bucket, opts.fileName) + (opts) => detectWebGCS(opts.bucketName, opts.fileName) ) .command( `fulltext `, @@ -690,10 +750,10 @@ require(`yargs`) (opts) => detectFulltext(opts.fileName) ) .command( - `fulltext-gcs `, + `fulltext-gcs `, `Extracts full text from an image in Google Cloud Storage.`, {}, - (opts) => detectFulltextGCS(opts.bucket, opts.fileName) + (opts) => detectFulltextGCS(opts.bucketName, opts.fileName) ) .example(`node $0 faces ./resources/face_no_surprise.jpg`) .example(`node $0 faces-gcs my-bucket your-image.jpg`) diff --git a/vision/package.json b/vision/package.json index 18d9189f914..2bac2fbb1f5 100644 --- a/vision/package.json +++ b/vision/package.json @@ -8,15 +8,15 @@ "test": "cd ..; npm run st -- --verbose vision/system-test/*.test.js" }, "dependencies": { - "@google-cloud/storage": "0.7.0", - "@google-cloud/vision": "^0.11.0", - "async": "2.1.4", - "natural": "0.4.0", - "redis": "2.6.5", - "yargs": "6.6.0" + "@google-cloud/storage": "1.0.0", + "@google-cloud/vision": "0.11.0", + "async": "2.3.0", + "natural": "0.5.0", + "redis": "2.7.1", + "yargs": "7.0.2" }, "optionalDependencies": { - "canvas": "1.6.2" + "canvas": "1.6.5" }, "engines": { "node": ">=4.3.2" diff --git a/vision/quickstart.js b/vision/quickstart.js index e650314dbdf..16afa9a4078 100644 --- a/vision/quickstart.js +++ b/vision/quickstart.js @@ -37,5 +37,8 @@ visionClient.detectLabels(fileName) console.log('Labels:'); labels.forEach((label) => console.log(label)); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END vision_quickstart] diff --git a/vision/yarn.lock b/vision/yarn.lock index cda80be1911..2449a5b2bd8 100644 --- a/vision/yarn.lock +++ b/vision/yarn.lock @@ -2,34 +2,33 @@ # yarn lockfile v1 -"@google-cloud/common-grpc@^0.1.1": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@google-cloud/common-grpc/-/common-grpc-0.1.3.tgz#fe692a1df214b0b8dc25ae96ba96990dc9c18b98" +"@google-cloud/common-grpc@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@google-cloud/common-grpc/-/common-grpc-0.3.1.tgz#c29b8ce83bef2da409eb838fa187960bb8c3df2e" dependencies: - "@google-cloud/common" "^0.12.0" + "@google-cloud/common" "^0.13.0" dot-prop "^2.4.0" duplexify "^3.5.0" extend "^3.0.0" - google-proto-files "^0.8.6" - grpc "^1.1.1" + google-proto-files "^0.11.0" + grpc "^1.2.3" is "^3.2.0" + modelo "^4.2.0" retry-request "^1.3.2" through2 "^2.0.3" -"@google-cloud/common@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.12.0.tgz#b1cb0922c70f7e5273e402b0a6ae71de2f32abc3" +"@google-cloud/common@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.13.0.tgz#d062439a75b38eb76c4704d20f5b45301a69f17f" dependencies: array-uniq "^1.0.3" arrify "^1.0.1" concat-stream "^1.6.0" create-error-class "^3.0.2" - dot-prop "^2.4.0" duplexify "^3.5.0" ent "^2.2.0" extend "^3.0.0" - google-auto-auth "^0.5.2" - google-proto-files "^0.8.6" + google-auto-auth "^0.6.0" is "^3.2.0" log-driver "^1.2.5" methmeth "^1.1.0" @@ -41,11 +40,11 @@ string-format-obj "^1.1.0" through2 "^2.0.3" -"@google-cloud/storage@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-0.7.0.tgz#87eb7bde35a1597511cba7b651e666178ac90fe1" +"@google-cloud/storage@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-1.0.0.tgz#cb6af3d8ce89a2e5b394adf2e5fa2bf83f36b2fd" dependencies: - "@google-cloud/common" "^0.12.0" + "@google-cloud/common" "^0.13.0" arrify "^1.0.0" async "^2.0.1" concat-stream "^1.5.0" @@ -62,20 +61,20 @@ string-format-obj "^1.0.0" through2 "^2.0.0" -"@google-cloud/vision@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@google-cloud/vision/-/vision-0.8.0.tgz#6af1d7e1b793e41f87c9e43633d1ac098967a4b3" +"@google-cloud/vision@0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@google-cloud/vision/-/vision-0.11.0.tgz#fa6806a9e4c2ae3471c0a8e3b6bc8a40f459c184" dependencies: - "@google-cloud/common" "^0.12.0" - "@google-cloud/common-grpc" "^0.1.1" + "@google-cloud/common" "^0.13.0" + "@google-cloud/common-grpc" "^0.3.0" arrify "^1.0.0" async "^2.0.1" extend "^3.0.0" - google-gax "^0.10.0" - google-proto-files "^0.8.0" + google-gax "^0.12.1" + google-proto-files "^0.10.0" is "^3.0.1" + prop-assign "^1.0.0" propprop "^0.3.0" - request "^2.70.0" rgb-hex "^1.0.0" string-format-obj "^1.0.0" @@ -139,9 +138,9 @@ assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" -async@2.1.4, async@^2.0.1, async@^2.1.2: - version "2.1.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" +async@2.3.0, async@^2.0.1, async@^2.1.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.3.0.tgz#1013d1051047dd320fe24e494d5c66ecaf6147d9" dependencies: lodash "^4.14.0" @@ -165,7 +164,7 @@ balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" -base64url@^2.0.0: +base64url@2.0.0, base64url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" @@ -211,7 +210,7 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" -buffer-equal-constant-time@^1.0.1: +buffer-equal-constant-time@1.0.1, buffer-equal-constant-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -252,11 +251,13 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -canvas@1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/canvas/-/canvas-1.6.2.tgz#12b56e3f00e7880aa45e3aae59fe75237720aaa4" +canvas@1.6.5: + version "1.6.5" + resolved "https://registry.yarnpkg.com/canvas/-/canvas-1.6.5.tgz#557f9988f5d2c95fdc247c61a5ee43de52f6717c" dependencies: nan "^2.4.0" + parse-css-font "^2.0.2" + units-css "^0.4.0" capture-stack-trace@^1.0.0: version "1.0.0" @@ -357,26 +358,42 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" +css-font-size-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-font-size-keywords/-/css-font-size-keywords-1.0.0.tgz#854875ace9aca6a8d2ee0d345a44aae9bb6db6cb" + +css-font-stretch-keywords@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/css-font-stretch-keywords/-/css-font-stretch-keywords-1.0.1.tgz#50cee9b9ba031fb5c952d4723139f1e107b54b10" + +css-font-style-keywords@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/css-font-style-keywords/-/css-font-style-keywords-1.0.1.tgz#5c3532813f63b4a1de954d13cea86ab4333409e4" + +css-font-weight-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-font-weight-keywords/-/css-font-weight-keywords-1.0.0.tgz#9bc04671ac85bc724b574ef5d3ac96b0d604fd97" + +css-global-keywords@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/css-global-keywords/-/css-global-keywords-1.0.1.tgz#72a9aea72796d019b1d2a3252de4e5aaa37e4a69" + +css-list-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/css-list-helpers/-/css-list-helpers-1.0.1.tgz#fff57192202db83240c41686f919e449a7024f7d" + dependencies: + tcomb "^2.5.0" + +css-system-font-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-system-font-keywords/-/css-system-font-keywords-1.0.0.tgz#85c6f086aba4eb32c571a3086affc434b84823ed" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" dependencies: assert-plus "^1.0.0" -date-format@^0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/date-format/-/date-format-0.0.0.tgz#09206863ab070eb459acea5542cbd856b11966b3" - -debug@^0.7.2: - version "0.7.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" - -debug@^2.2.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" - dependencies: - ms "0.7.2" - debug@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" @@ -424,7 +441,7 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -ecdsa-sig-formatter@^1.0.0: +ecdsa-sig-formatter@1.0.9, ecdsa-sig-formatter@^1.0.0: version "1.0.9" resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" dependencies: @@ -527,6 +544,13 @@ gauge@~2.7.1: supports-color "^0.2.0" wide-align "^1.1.0" +gcp-metadata@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-0.1.0.tgz#abe21f1ea324dd0b34a3f06ca81763fb1eee37d9" + dependencies: + extend "^3.0.0" + retry-request "^1.3.2" + gcs-resumable-upload@^0.7.1: version "0.7.4" resolved "https://registry.yarnpkg.com/gcs-resumable-upload/-/gcs-resumable-upload-0.7.4.tgz#6633967badf7a4aed2d79337e7badfe889cfd617" @@ -584,6 +608,15 @@ glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" +google-auth-library@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" + dependencies: + gtoken "^1.2.1" + jws "^3.1.4" + lodash.noop "^3.0.1" + request "^2.74.0" + google-auth-library@^0.9.10, google-auth-library@^0.9.6: version "0.9.10" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.9.10.tgz#4993dc07bb4834b8ca0350213a6873a32c6051b9" @@ -611,14 +644,24 @@ google-auto-auth@^0.5.2: object-assign "^3.0.0" request "^2.79.0" -google-gax@^0.10.0: - version "0.10.6" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.10.6.tgz#3af119704700fd212df6b9250e4b4a61676b3f96" +google-auto-auth@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.6.0.tgz#ad76656293d8d06b3c89c358becd29947d4510a8" + dependencies: + async "^2.1.2" + gcp-metadata "^0.1.0" + google-auth-library "^0.10.0" + object-assign "^3.0.0" + request "^2.79.0" + +google-gax@^0.12.1: + version "0.12.3" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.12.3.tgz#be06c339387421e2e11745018d15042e51f0e3fc" dependencies: extend "^3.0.0" google-auto-auth "^0.5.2" - google-proto-files "^0.8.3" - grpc "~1.0" + google-proto-files "^0.9.1" + grpc "^1.1" lodash "^4.17.2" process-nextick-args "^1.0.7" readable-stream "^2.2.2" @@ -629,9 +672,17 @@ google-p12-pem@^0.1.0: dependencies: node-forge "^0.6.46" -google-proto-files@^0.8.0, google-proto-files@^0.8.3, google-proto-files@^0.8.6: - version "0.8.6" - resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.8.6.tgz#a7c8ddccd2179690d270b0ebfc42994d56da0ee6" +google-proto-files@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.10.0.tgz#980ecc04383671540f1d8453d00a68950d73728a" + +google-proto-files@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.11.0.tgz#3d753120718e5e8574f38def739d54cf7a057553" + +google-proto-files@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.9.1.tgz#c760c79059bf62ba3ac56e1d1ba7b8d4560803be" graceful-fs@^4.1.11, graceful-fs@^4.1.2: version "4.1.11" @@ -641,9 +692,9 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -grpc@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.1.1.tgz#f8fe5fc984e7d4d6ab0c19259a7d232c95e142bc" +grpc@^1.1, grpc@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.2.3.tgz#60b4b533a8783fa0b389b6cfa5d5bee34786049f" dependencies: arguejs "^0.2.3" lodash "^4.15.0" @@ -651,17 +702,7 @@ grpc@^1.1.1: node-pre-gyp "^0.6.0" protobufjs "^5.0.0" -grpc@~1.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.0.1.tgz#e965544b5e56c998058102184e2ab1f27f123afd" - dependencies: - arguejs "^0.2.3" - lodash "^4.15.0" - nan "^2.0.0" - node-pre-gyp "^0.6.0" - protobufjs "^5.0.0" - -gtoken@^1.1.0: +gtoken@^1.1.0, gtoken@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.1.tgz#90153a547c2fc1cd24a4d3d2ab3b5aba0a26897a" dependencies: @@ -814,6 +855,10 @@ isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isnumeric@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isnumeric/-/isnumeric-0.2.0.tgz#a2347ba360de19e33d0ffd590fddf7755cbf2e64" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -848,6 +893,15 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" +jwa@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" + dependencies: + base64url "2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.9" + safe-buffer "^5.0.1" + jwa@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.0.2.tgz#fd79609f1e772e299dce8ddb76d00659dd83511f" @@ -856,7 +910,15 @@ jwa@~1.0.0: buffer-equal-constant-time "^1.0.1" ecdsa-sig-formatter "^1.0.0" -jws@^3.0.0, jws@~3.0.0: +jws@^3.0.0, jws@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" + dependencies: + base64url "^2.0.0" + jwa "^1.1.4" + safe-buffer "^5.0.1" + +jws@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/jws/-/jws-3.0.0.tgz#da5f267897dd4e9cf8137979db33fc54a3c05418" dependencies: @@ -879,7 +941,7 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -lodash.noop@~3.0.0: +lodash.noop@^3.0.1, lodash.noop@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" @@ -891,14 +953,6 @@ log-driver@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" -log4js@*: - version "1.1.0" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-1.1.0.tgz#c7d2b616d91bbf47cc65fb79d6fe04581c8096fa" - dependencies: - debug "^2.2.0" - semver "^5.3.0" - streamroller "^0.2.1" - long@~3: version "3.2.0" resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" @@ -962,20 +1016,15 @@ ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" -ms@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" - nan@^2.0.0, nan@^2.4.0: version "2.5.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.0.tgz#aa8f1e34531d807e9e27755b234b4a6ec0c152a8" -natural@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/natural/-/natural-0.4.0.tgz#3eb692d956a76ff05f4a379a277d455333906764" +natural@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/natural/-/natural-0.5.0.tgz#55a9bb68eccf5ece5535486004a57de264ae3180" dependencies: apparatus ">= 0.0.9" - log4js "*" sylvester ">= 0.0.12" underscore ">=1.3.1" @@ -1076,6 +1125,20 @@ osenv@^0.1.0: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +parse-css-font@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/parse-css-font/-/parse-css-font-2.0.2.tgz#7b60b060705a25a9b90b7f0ed493e5823248a652" + dependencies: + css-font-size-keywords "^1.0.0" + css-font-stretch-keywords "^1.0.1" + css-font-style-keywords "^1.0.1" + css-font-weight-keywords "^1.0.0" + css-global-keywords "^1.0.1" + css-list-helpers "^1.0.1" + css-system-font-keywords "^1.0.0" + tcomb "^2.5.0" + unquote "^1.1.0" + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -1118,6 +1181,10 @@ process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +prop-assign@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prop-assign/-/prop-assign-1.0.0.tgz#9767a1fbfd7093908647a6e846d31b4feaa70459" + propprop@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/propprop/-/propprop-0.3.1.tgz#a049a3568b896440067d15d8ec9f33735e570178" @@ -1182,15 +1249,6 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -readable-stream@^1.1.7, readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.1.5, readable-stream@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" @@ -1203,6 +1261,15 @@ readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2. string_decoder "~0.10.x" util-deprecate "~1.0.1" +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readable-stream@~2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" @@ -1230,17 +1297,17 @@ redis-commands@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.3.0.tgz#4307d8094aee1315829ab6729b37b99f62365d63" -redis-parser@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-2.3.0.tgz#313a47965e49ee35ab3a86c93388b403d76237f6" +redis-parser@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-2.6.0.tgz#52ed09dacac108f1a631c07e9b69941e7a19504b" -redis@2.6.5: - version "2.6.5" - resolved "https://registry.yarnpkg.com/redis/-/redis-2.6.5.tgz#87c1eff4a489f94b70871f3d08b6988f23a95687" +redis@2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/redis/-/redis-2.7.1.tgz#7d56f7875b98b20410b71539f1d878ed58ebf46a" dependencies: double-ended-queue "^2.1.0-0" redis-commands "^1.2.0" - redis-parser "^2.0.0" + redis-parser "^2.5.0" repeating@^1.1.0: version "1.1.3" @@ -1273,7 +1340,7 @@ request@2.76.0: tough-cookie "~2.3.0" tunnel-agent "~0.4.1" -request@^2.61.0, request@^2.70.0, request@^2.72.0, request@^2.79.0: +request@^2.61.0, request@^2.72.0, request@^2.74.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -1353,7 +1420,7 @@ safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@~5.3.0: +"semver@2 || 3 || 4 || 5", semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -1421,14 +1488,6 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" -streamroller@^0.2.1: - version "0.2.2" - resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-0.2.2.tgz#a13420e04169e573db068f5920ee23d881abfe33" - dependencies: - date-format "^0.0.0" - debug "^0.7.2" - readable-stream "^1.1.7" - string-format-obj@^1.0.0, string-format-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/string-format-obj/-/string-format-obj-1.1.0.tgz#7635610b1ef397013e8478be98a170e04983d068" @@ -1506,6 +1565,10 @@ tar@~2.2.1: fstream "^1.0.2" inherits "2" +tcomb@^2.5.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/tcomb/-/tcomb-2.7.0.tgz#10d62958041669a5d53567b9a4ee8cde22b1c2b0" + through2@^2.0.0, through2@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" @@ -1539,6 +1602,17 @@ underscore@>=1.3.1: version "1.8.3" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" +units-css@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/units-css/-/units-css-0.4.0.tgz#d6228653a51983d7c16ff28f8b9dc3b1ffed3a07" + dependencies: + isnumeric "^0.2.0" + viewport-dimensions "^0.2.0" + +unquote@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.0.tgz#98e1fc608b6b854c75afb1b95afc099ba69d942f" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -1564,6 +1638,10 @@ verror@1.3.6: dependencies: extsprintf "1.0.2" +viewport-dimensions@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz#de740747db5387fd1725f5175e91bac76afdf36c" + which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" @@ -1611,15 +1689,15 @@ y18n@^3.2.0, y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" dependencies: camelcase "^3.0.0" -yargs@6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" +yargs@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.0.2.tgz#115b97df1321823e8b8648e8968c782521221f67" dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -1633,7 +1711,7 @@ yargs@6.6.0: string-width "^1.0.2" which-module "^1.0.0" y18n "^3.2.1" - yargs-parser "^4.2.0" + yargs-parser "^5.0.0" yargs@^3.10.0: version "3.32.0" diff --git a/yarn.lock b/yarn.lock index 9b34737d2b3..210789282d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -61,6 +61,21 @@ retry-request "^1.3.2" through2 "^2.0.3" +"@google-cloud/common-grpc@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@google-cloud/common-grpc/-/common-grpc-0.3.1.tgz#c29b8ce83bef2da409eb838fa187960bb8c3df2e" + dependencies: + "@google-cloud/common" "^0.13.0" + dot-prop "^2.4.0" + duplexify "^3.5.0" + extend "^3.0.0" + google-proto-files "^0.11.0" + grpc "^1.2.3" + is "^3.2.0" + modelo "^4.2.0" + retry-request "^1.3.2" + through2 "^2.0.3" + "@google-cloud/common@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.11.0.tgz#5c94674a1ea9a4939865e342f0c1b909ca04e980" @@ -110,11 +125,34 @@ string-format-obj "^1.1.0" through2 "^2.0.3" -"@google-cloud/compute@0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@google-cloud/compute/-/compute-0.5.0.tgz#3b4420e0a09b5e99e4487439f1d9948b3aec3553" +"@google-cloud/common@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.13.0.tgz#d062439a75b38eb76c4704d20f5b45301a69f17f" dependencies: - "@google-cloud/common" "^0.12.0" + array-uniq "^1.0.3" + arrify "^1.0.1" + concat-stream "^1.6.0" + create-error-class "^3.0.2" + duplexify "^3.5.0" + ent "^2.2.0" + extend "^3.0.0" + google-auto-auth "^0.6.0" + is "^3.2.0" + log-driver "^1.2.5" + methmeth "^1.1.0" + modelo "^4.2.0" + request "^2.79.0" + retry-request "^1.3.2" + split-array-stream "^1.0.0" + stream-events "^1.0.1" + string-format-obj "^1.1.0" + through2 "^2.0.3" + +"@google-cloud/compute@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@google-cloud/compute/-/compute-0.6.0.tgz#84de1442c35ddd7b6a49bad548235b70bb67d535" + dependencies: + "@google-cloud/common" "^0.13.0" arrify "^1.0.0" async "^2.0.1" create-error-class "^3.0.2" @@ -169,17 +207,15 @@ methmeth "^1.0.0" string-format-obj "^1.0.0" -"@google-cloud/language@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@google-cloud/language/-/language-0.8.0.tgz#0ee3ec6988b952b8d9acbbe980093f83663be7b6" +"@google-cloud/language@0.10.2": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@google-cloud/language/-/language-0.10.2.tgz#8a558ad942467d59b4de5ddea257a95a3b7d5121" dependencies: - "@google-cloud/common" "^0.12.0" - arrify "^1.0.1" + "@google-cloud/common" "^0.13.0" extend "^3.0.0" - google-gax "^0.10.0" - google-proto-files "^0.8.5" + google-gax "^0.13.0" + google-proto-files "^0.11.0" is "^3.0.1" - propprop "^0.3.1" string-format-obj "^1.1.0" "@google-cloud/logging@0.7.0": @@ -197,13 +233,13 @@ is-circular "^1.0.1" string-format-obj "^1.0.0" -"@google-cloud/monitoring@0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@google-cloud/monitoring/-/monitoring-0.1.4.tgz#d2629045150289ae6eef385f68f6e1b93cce2967" +"@google-cloud/monitoring@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@google-cloud/monitoring/-/monitoring-0.2.0.tgz#34cdf719b03c1d41b90a827dd95e99f1e87782b6" dependencies: extend "^3.0.0" - google-gax "^0.10.0" - google-proto-files "^0.8.3" + google-gax "^0.12.3" + google-proto-files "^0.10.0" "@google-cloud/pubsub@0.8.0": version "0.8.0" @@ -250,16 +286,16 @@ string-format-obj "^1.1.0" through2 "^2.0.3" -"@google-cloud/speech@0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@google-cloud/speech/-/speech-0.6.0.tgz#161e9bb3f3aca4ed7acb65e1fdd8286ac34b41e8" +"@google-cloud/speech@0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@google-cloud/speech/-/speech-0.9.0.tgz#97fcb47046cdaff66afbd05508cb38e42f61cdb5" dependencies: - "@google-cloud/common" "^0.12.0" - "@google-cloud/common-grpc" "^0.1.1" + "@google-cloud/common" "^0.13.0" + "@google-cloud/common-grpc" "^0.3.0" events-intercept "^2.0.0" extend "^3.0.0" - google-gax "^0.10.2" - google-proto-files "^0.8.0" + google-gax "^0.13.0" + google-proto-files "^0.11.0" is "^3.1.0" propprop "^0.3.1" pumpify "^1.3.5" @@ -289,11 +325,11 @@ string-format-obj "^1.0.0" through2 "^2.0.0" -"@google-cloud/translate@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@google-cloud/translate/-/translate-0.7.0.tgz#acb3b2690b946e6f5a65f51958f31cab3779d1e3" +"@google-cloud/translate@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@google-cloud/translate/-/translate-0.8.0.tgz#9570dfaff93ff5a92a1aee960b613ad020fc6f11" dependencies: - "@google-cloud/common" "^0.12.0" + "@google-cloud/common" "^0.13.0" arrify "^1.0.0" extend "^3.0.0" is "^3.0.1" @@ -308,20 +344,20 @@ google-gax "^0.10.6" google-proto-files "^0.8.6" -"@google-cloud/vision@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@google-cloud/vision/-/vision-0.8.0.tgz#6af1d7e1b793e41f87c9e43633d1ac098967a4b3" +"@google-cloud/vision@0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@google-cloud/vision/-/vision-0.11.0.tgz#fa6806a9e4c2ae3471c0a8e3b6bc8a40f459c184" dependencies: - "@google-cloud/common" "^0.12.0" - "@google-cloud/common-grpc" "^0.1.1" + "@google-cloud/common" "^0.13.0" + "@google-cloud/common-grpc" "^0.3.0" arrify "^1.0.0" async "^2.0.1" extend "^3.0.0" - google-gax "^0.10.0" - google-proto-files "^0.8.0" + google-gax "^0.12.1" + google-proto-files "^0.10.0" is "^3.0.1" + prop-assign "^1.0.0" propprop "^0.3.0" - request "^2.70.0" rgb-hex "^1.0.0" string-format-obj "^1.0.0" @@ -1900,7 +1936,7 @@ clean-css@2.2.x: dependencies: commander "2.2.x" -clean-css@^3.1.9, clean-css@^3.3.0, clean-css@~3.4.2: +clean-css@^3.1.9, clean-css@^3.3.0: version "3.4.25" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.4.25.tgz#9e9a52d5c1e6bc5123e1b2783fa65fe958946ede" dependencies: @@ -1913,6 +1949,12 @@ clean-css@~2.1.0: dependencies: commander "2.1.x" +clean-css@~4.0.3: + version "4.0.11" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.0.11.tgz#a6d88bffb399420b24298db49d99a1ed067534a8" + dependencies: + source-map "0.5.x" + clean-stack@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.1.1.tgz#a1b3711122df162df7c7cb9b3c0470f28cb58adb" @@ -2712,7 +2754,7 @@ debug-log@^1.0.0, debug-log@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" -debug@*, debug@2, debug@2.6.0, debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.1.2, debug@^2.2.0: +debug@*, debug@2.6.0, debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.1.2, debug@^2.2.0: version "2.6.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" dependencies: @@ -2740,6 +2782,12 @@ debug@1.0.4: dependencies: ms "0.6.2" +debug@2, debug@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" + dependencies: + ms "0.7.2" + debug@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.1.0.tgz#33ab915659d8c2cc8a41443d94d6ebd37697ed21" @@ -2752,12 +2800,6 @@ debug@2.2.0, debug@~2.2.0: dependencies: ms "0.7.1" -debug@2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" - dependencies: - ms "0.7.2" - debug@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/debug/-/debug-0.8.1.tgz#20ff4d26f5e422cb68a1bacbbb61039ad8c1c130" @@ -3477,10 +3519,6 @@ etag@~1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/etag/-/etag-1.7.0.tgz#03d30b5f67dd6e632d2945d30d6652731a34d5d8" -etag@~1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" - event-emitter@~0.3.5: version "0.3.5" resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" @@ -3989,10 +4027,6 @@ fresh@0.3.0, fresh@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" -fresh@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" - fs-extra@*, fs-extra@0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" @@ -4361,7 +4395,17 @@ google-auto-auth@^0.5.0, google-auto-auth@^0.5.2: object-assign "^3.0.0" request "^2.79.0" -google-gax@^0.10.0, google-gax@^0.10.2, google-gax@^0.10.6: +google-auto-auth@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.6.0.tgz#ad76656293d8d06b3c89c358becd29947d4510a8" + dependencies: + async "^2.1.2" + gcp-metadata "^0.1.0" + google-auth-library "^0.10.0" + object-assign "^3.0.0" + request "^2.79.0" + +google-gax@^0.10.0, google-gax@^0.10.6: version "0.10.8" resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.10.8.tgz#20a6acdc8fcf01d71c1c990b85e665761e36ddf0" dependencies: @@ -4373,6 +4417,32 @@ google-gax@^0.10.0, google-gax@^0.10.2, google-gax@^0.10.6: process-nextick-args "^1.0.7" readable-stream "^2.2.2" +google-gax@^0.12.1, google-gax@^0.12.3: + version "0.12.3" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.12.3.tgz#be06c339387421e2e11745018d15042e51f0e3fc" + dependencies: + extend "^3.0.0" + google-auto-auth "^0.5.2" + google-proto-files "^0.9.1" + grpc "^1.1" + lodash "^4.17.2" + process-nextick-args "^1.0.7" + readable-stream "^2.2.2" + +google-gax@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.13.0.tgz#02571bcd556ddd58d86d8df3cc277cb8cecace86" + dependencies: + extend "^3.0.0" + google-auto-auth "^0.5.2" + google-proto-files "^0.9.1" + grpc "^1.2" + is-stream-ended "^0.1.0" + lodash "^4.17.2" + process-nextick-args "^1.0.7" + readable-stream "^2.2.2" + through2 "^2.0.3" + google-p12-pem@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-0.1.1.tgz#66ef8946ee97e8da37f1beb1d8ec5c3be2ba4539" @@ -4383,7 +4453,11 @@ google-proto-files@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.10.0.tgz#980ecc04383671540f1d8453d00a68950d73728a" -google-proto-files@^0.8.0, google-proto-files@^0.8.3, google-proto-files@^0.8.5, google-proto-files@^0.8.6: +google-proto-files@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.11.0.tgz#3d753120718e5e8574f38def739d54cf7a057553" + +google-proto-files@^0.8.0, google-proto-files@^0.8.6: version "0.8.6" resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.8.6.tgz#a7c8ddccd2179690d270b0ebfc42994d56da0ee6" @@ -4391,9 +4465,9 @@ google-proto-files@^0.9.0, google-proto-files@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.9.1.tgz#c760c79059bf62ba3ac56e1d1ba7b8d4560803be" -googleapis@16.1.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-16.1.0.tgz#0f19f2d70572d918881a0f626e3b1a2fa8629576" +googleapis@18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-18.0.0.tgz#76c7c8b7e3fadb61eac44389a9beaee9240ddf01" dependencies: async "~2.1.4" google-auth-library "~0.10.0" @@ -4464,7 +4538,17 @@ growl@1.9.2: version "1.9.2" resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" -grpc@^1.0.0, grpc@^1.1, grpc@^1.1.1: +grpc@^1.0.0, grpc@^1.2, grpc@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.2.3.tgz#60b4b533a8783fa0b389b6cfa5d5bee34786049f" + dependencies: + arguejs "^0.2.3" + lodash "^4.15.0" + nan "^2.0.0" + node-pre-gyp "^0.6.0" + protobufjs "^5.0.0" + +grpc@^1.1, grpc@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.2.0.tgz#9b99516a885475fdd25f28766cab8e6460153f52" dependencies: @@ -4539,12 +4623,12 @@ grunt-contrib-copy@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/grunt-contrib-copy/-/grunt-contrib-copy-0.5.0.tgz#410075ac45a5856ba191b1cc725725450d4a0215" -grunt-contrib-cssmin@0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/grunt-contrib-cssmin/-/grunt-contrib-cssmin-0.14.0.tgz#88b0a92536969bb566281c5c61ec5062d833f3b7" +grunt-contrib-cssmin@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/grunt-contrib-cssmin/-/grunt-contrib-cssmin-2.0.0.tgz#3bc8e8c8865c819159cc2779f82fcf833473345b" dependencies: chalk "^1.0.0" - clean-css "~3.4.2" + clean-css "~4.0.3" maxmin "^1.1.0" grunt-contrib-cssmin@~0.9.0: @@ -6850,10 +6934,6 @@ ms@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" -ms@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-1.0.0.tgz#59adcd22edc543f7b5381862d31387b1f4bc9473" - ms@^0.7.1: version "0.7.3" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff" @@ -9393,16 +9473,7 @@ serve-favicon@2.0.1: dependencies: fresh "0.2.2" -serve-favicon@^2.2.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.4.2.tgz#aed1d8de67d5b83192cf31fdf53d2ea29464363e" - dependencies: - etag "~1.8.0" - fresh "0.5.0" - ms "1.0.0" - parseurl "~1.3.1" - -serve-favicon@~2.3.0: +serve-favicon@2.3.2, serve-favicon@^2.2.0, serve-favicon@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.3.2.tgz#dd419e268de012ab72b319d337f2105013f9381f" dependencies: @@ -9727,6 +9798,10 @@ source-map@0.4.x, source-map@^0.4.4, source-map@~0.4.1: dependencies: amdefine ">=0.0.4" +source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.0, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + source-map@^0.2.0, source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" @@ -9739,10 +9814,6 @@ source-map@^0.3.0: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.0, source-map@~0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - spawn-wrap@1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.2.4.tgz#920eb211a769c093eebfbd5b0e7a5d2e68ab2e40"